NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Using LinuxCNC AXIS How to connect buttons and files.

Welcome, Guest
Username: Password: Remember me

TOPIC: How to connect buttons and files.

Re:How to connect buttons and files. 10 Апр 2011 04:55 #8738

  • Mike_Eitel
  • Mike_Eitel's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Thank you received: 1
  • Karma: 2
OK Ihave partialy sucess:

In the ini file :

OPEN_FILE = /home/cnc/emc2/nc_files/EMC.ngc
......................
#
Connect buttons of screen
HALUI =halui

[HALUI]
MDI_COMMAND = G0 X1 Y1 Z1
MDI_COMMAND = G0 X2 Y2 Z2
MDI_COMMAND = G0 X3 Y3 Z3
MDI_COMMAND = o<Tools/square> call



In the postgui / pyvyp.hal :
net cmd00 pyvcp.cmd00 halui.mdi-command-00
net cmd01 pyvcp.cmd01 halui.mdi-command-01
net cmd02 pyvcp.cmd02 halui.mdi-command-02
net cmd03 pyvcp.cmd03 halui.mdi-command-03


In my ncfiles I have a subdirectoty called tools and as examle herin the file square.ngc:
o<tools/square> sub
G0 Z1
G0 x0 y0
F 120
G1 x0 y0 z0
G1 x0 y10 z0
G1 x10 y10 z0
G1 x10 y0 z0
G1 x0 y0 z0
o<tools/square> endsub
M2
%

As soon as I press the button, all commands in the file are processed correctly.

That way I can predefine some G-code programms, runned without request.
I'll experiment with M1 and message to get additional information and safety on screen

Maybe I'l find also something for .py and jpg. ;-()

Mike
Last Edit: 10 Апр 2011 04:57 by Mike_Eitel.
The administrator has disabled public write access.

Re:How to connect buttons and files. 10 Апр 2011 04:57 #8739

  • Rick G
  • Rick G's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1071
  • Thank you received: 15
  • Karma: 80
Perhaps Andy will jump in,

In the mean time have you looked at ...

www.linuxcnc.org/component/option,com_ku...d,6514/lang,english/

Rick G
The administrator has disabled public write access.

Re:How to connect buttons and files. 10 Апр 2011 05:01 #8741

  • Rick G
  • Rick G's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1071
  • Thank you received: 15
  • Karma: 80
Great, looks like your on your way.

Rick
The administrator has disabled public write access.

Re:How to connect buttons and files. 10 Апр 2011 05:03 #8742

  • Mike_Eitel
  • Mike_Eitel's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Thank you received: 1
  • Karma: 2
Yes Rick

I thibk this will be a good way to go.

I forgot about M101 etc.

Mike
The administrator has disabled public write access.

Re:How to connect buttons and files. 11 Апр 2011 06:19 #8758

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4139
  • Thank you received: 141
  • Karma: 130
Mike_Eitel wrote:
I forgot about M101 etc.

If you want to call a Python file from a PYVCP button, I think that MDI_COMMAND M100 is probably the way to do it.
The administrator has disabled public write access.

Re:How to connect buttons and files. 11 Апр 2011 06:37 #8760

  • Mike_Eitel
  • Mike_Eitel's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 135
  • Thank you received: 1
  • Karma: 2
Hi Andy

Yes Ricks way via M1ff commands works

I'm just in the phase to try the available python files and decide wich ones I want to use.

The only bad thing:
I have to copy the files to the base nc_files direktory and rename them to M101 to M1ff ... and make them executable.

I was not able to do it a bit more indircet ( by placing the calls inside those "command files" , means working with the original file names.py . )

Mike
The administrator has disabled public write access.
Time to create page: 1.330 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.