Linking touch off Z 0.0 to MPG2-C22

More
08 Jul 2013 21:57 #36401 by rmattioda
Linking touch off Z 0.0 to MPG2-C22 was created by rmattioda
I want to take the touch off Z command and link it to my jog enable on the 4th axis button on a mpg2 4 axis pendant

so far everything works as normal and have added this to add the new button

I have added this to my custom_postgui HAL file, NOTE that I have a custom HAL file which has the MPG2 code in

net touch-off-Z <= parport.1.pin-07-in

I have added this to the INI file:

[HALUI]
MDI_COMMAND = G10 L20 P1 X1 Y2 Z3


The only thing that I can see that is working is when I use the HAL meter in EMC2 is the following

*when looking at partport.1.pin 7 i can see the bit change when I press the button on the mpg2 on axis 4-enable
*when looking at the touch off Z in the meter the bit changes along with the press of the button on the mpg2 on axis 4-enable

I assume this is from the code that is added to the postgui hal file

how do I get the MDI command to initiate so that when i press the button it will use the touch off at 0.0 so i can origin the machine for operation.

also to add this was my reference for the MPG2 which worked great except when adding axis 4 which would cause the software to crash on start up.

also note that the axis 4 would not work before I added the net touch-off-Z <= parport.1.pin-07-in in the custom_postgui file, and of course after.

Thank you for your help

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

More
08 Jul 2013 23:16 - 09 Jul 2013 00:26 #36408 by ArcEye
Replied by ArcEye on topic Linking touch off Z 0.0 to MPG2-C22
Hi

I presume you want to link the two

net touch-off-Z halui.mdi-command-NN parport.1.pin-07-in

where NN is the HALUI number in your ini file

regards

EDIT;
I don't know how your pendant is connected, if you are connecting an -in pin presume it must plug directly into the parport card, would need to see the whole config
(G10 L20 P1 X1 Y2 Z3 will set Z to 3 not 0 and will also set X and Y, but the principle is correct)
Last edit: 09 Jul 2013 00:26 by ArcEye.

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

More
09 Jul 2013 03:06 #36425 by rmattioda
Replied by rmattioda on topic Linking touch off Z 0.0 to MPG2-C22
I added the lines below to the custom_postgui.hal file

net touch-off-Z halui.mdi-command-00 parport.1.pin-07-in

Making NN 00 since there is only 1 midi command in thye .INI file 00 is correct right?

I changed the [HALUI] to MDI_COMMAND = G10 L20 P1 X0

because i only want my Z access to touch off to 0.0

is this correct? I have attached all the affected files


once again thanks

File Attachment:

File Name: linuxcncpost.txt
File Size:13 KB
Attachments:

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

More
09 Jul 2013 05:27 #36432 by BigJohnT
Replied by BigJohnT on topic Linking touch off Z 0.0 to MPG2-C22
G10 L20 P1 X0

Sets the X axis to 0.0 in coordinate system 1 which is the G54 coordinate system.

www.linuxcnc.org/docs/html/gcode/gcode.html#sec:G10-L20


JT

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

More
09 Jul 2013 14:22 #36440 by ArcEye
Replied by ArcEye on topic Linking touch off Z 0.0 to MPG2-C22

I added the lines below to the custom_postgui.hal file

net touch-off-Z halui.mdi-command-00 parport.1.pin-07-in


In the copy you posted it still just says net touch-off-Z <= parport.1.pin-07-in

halui.mdi-command-00 is correct for the first command in the .ini file, but as JT says you are zeroing X not Z

Needs to be G10 L20 P1 Z0 to set Z to 0 in the G54 co-ordinates system

regards

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

More
09 Jul 2013 22:12 #36448 by rmattioda
Replied by rmattioda on topic Linking touch off Z 0.0 to MPG2-C22
Problem fixed

Custom_postgui.hal-additions

net touch-off Z halui.mdi-command-XX <= parport.1.pin-07-in

INI additions

MDI_COMMAND G0 L20 P1 Z0

one again thanks

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

Time to create page: 0.069 seconds
Powered by Kunena Forum