MDI Commands

More
13 Jan 2015 22:29 #54974 by doronby
Can you please point me to where I can follow a newbie step-by-step instructions on how to have a one button on GUI execute this code or any pre-define G-code from a file
thanks
-Doron

Please Log in or Create an account to join the conversation.

More
13 Jan 2015 23:49 #54977 by Todd Zuercher
This is about as succinct an explanation as I can find.
wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding_Custom_MDI_Buttons

It would also help to read as much info you can find on Halui and Pyvcp in the integrators manual.

If you search around you should be able to find more examples to try to follow..
The following user(s) said Thank You: doronby

Please Log in or Create an account to join the conversation.

More
14 Jan 2015 02:27 #54985 by dgarrett
Another alternative to experiment with is a set set of probe
routines adapted for ngcgui:

(This complete simulator config will work for 2.6 or greater,
set up is for inch units)
$ wget http://www.panix.com/~dgarrett/stuff/probe_demo.tgz
$ tar zxf probe_demo.tgz
$ cd probe_demo
$ linuxcnc probes.ini & # & --> run in background
$ simulate_probe &
The simulate_probe is a simple built-in gui to simulate a probe
The following user(s) said Thank You: doronby

Please Log in or Create an account to join the conversation.

More
14 Jan 2015 10:24 #54990 by doronby
Replied by doronby on topic Re:Probe for center of hole
I see that the use of MDI_COMMAND requires editing the INI file and is limited to 63 lines. (and having to restart the engine,,,)
I was hoping to be able to use several buttons which are connected to G-Code files. (typicallly for Z-touch off, center probe, special tool offsets, etc....)
Thanks.
-Doron

Please Log in or Create an account to join the conversation.

More
14 Jan 2015 21:00 #55002 by andypugh

I see that the use of MDI_COMMAND requires editing the INI file and is limited to 63 lines


You can have 63 buttons. That doesn't seem like such a limitation.
Each button can call a G-code subroutine of arbitrary length.

You can do much the same thing without INI and HAL intervention by using a GladeVCP button linked to an MDI_action object. The MDI_action contains a single line of G-code, but that too can be a subroutine call. Rather usefully the MDI_action string can contain string-substitution values from other GladeVCP controls, and those can be passed as parameters to the G-code subroutine.

Please Log in or Create an account to join the conversation.

More
15 Jan 2015 01:01 #55008 by doronby
Replied by doronby on topic Re:Probe for center of hole
What I really need a step by step 'Newbie' how-to connect GUI button to arbitary G-code.
Does anything like that exist ?
If not, I guess I will have commence the long reading + Trial-and-error exercise.

Thanks
-Doron

P.S.
So far I have done the following.
1) Installed the LiveCD
2) Run the step wizard and configure the pins and screws
3) Modify the files to use the x and y screw compensation files I created with my DRO
4) Adjust speeds, accelation and travel limits to fit my machine.
4) Adapt Z-Touch-off and Center-Finder G-code that I found on the Forum.
5) Since I had modified my setup files... I can not re-run the StepWizard again to activate options as it warns me that I am going to loose my hand edits...

Please Log in or Create an account to join the conversation.

More
15 Jan 2015 01:04 #55009 by doronby
Replied by doronby on topic Re:Probe for center of hole

I see that the use of MDI_COMMAND requires editing the INI file and is limited to 63 lines


You can have 63 buttons. That doesn't seem like such a limitation.
Each button can call a G-code subroutine of arbitrary length.

You can do much the same thing without INI and HAL intervention by using a GladeVCP button linked to an MDI_action object. The MDI_action contains a single line of G-code, but that too can be a subroutine call. Rather usefully the MDI_action string can contain string-substitution values from other GladeVCP controls, and those can be passed as parameters to the G-code subroutine.


not 63 buttons.... total of 63 lines with MDI_Command..0..63

Please Log in or Create an account to join the conversation.

More
15 Jan 2015 01:43 #55012 by andypugh

not 63 buttons.... total of 63 lines with MDI_Command..0..63


No, each MDI_COMMAND HAL pin calls a single line of G-code defined in the INI file.
If you need more than one line of G-code then the single line of G-code has to be a subroutine call.
eg
MDI_COMMAND O<hole_probe> CALL
MDI_COMMAND O<bottom_left_corner> CALL

Please Log in or Create an account to join the conversation.

More
15 Jan 2015 16:12 #55022 by Rick G

Please Log in or Create an account to join the conversation.

More
15 Jan 2015 20:43 #55025 by BigJohnT
Where does it say the limit is 63 commands?

BTW 0-63 is 64...

JT

Please Log in or Create an account to join the conversation.

Time to create page: 0.164 seconds
Powered by Kunena Forum