- Posts: 199
- Thank you received: 0
Help with User M Code
- RobotMatic
- Topic Author
- Offline
- Elite Member
-
Less
More
5 years 10 months ago #192252
by RobotMatic
Help with User M Code was created by RobotMatic
video
when the program is stopped by emergency or by the ESC button, Linuxcnc turns off the signals M3-M7-M8 for example.
I am using Linuxcnc 2.8 in a 5 axis configuration for a 2 station induction machine where I have created 4 user M codes.
M100 ON Inductor A
M101 OFF Inductor A
M102 ON Inductor B
M103 OFF Inductor B
When I create my special M code, I cannot connect it to any signal, a condition that I must respect for my M code to work.
So, I can't understand how I can make the M codes created run in the same ESC or emergency situation to turn off the inductors.
in my configuration it would be to execute M101-M103
for example
# M100 Encendido Inductor A
halcmd setp parport.0.pin-01-out TRUE
exit 0
Thanks for the help
when the program is stopped by emergency or by the ESC button, Linuxcnc turns off the signals M3-M7-M8 for example.
I am using Linuxcnc 2.8 in a 5 axis configuration for a 2 station induction machine where I have created 4 user M codes.
M100 ON Inductor A
M101 OFF Inductor A
M102 ON Inductor B
M103 OFF Inductor B
When I create my special M code, I cannot connect it to any signal, a condition that I must respect for my M code to work.
So, I can't understand how I can make the M codes created run in the same ESC or emergency situation to turn off the inductors.
in my configuration it would be to execute M101-M103
for example
# M100 Encendido Inductor A
halcmd setp parport.0.pin-01-out TRUE
exit 0
Thanks for the help
Please Log in to join the conversation.
5 years 10 months ago #192264
by Aciera
Replied by Aciera on topic Help with User M Code
Add this to your .ini file:
Then in your .hal file connect like this as an example:
Code:
[HALUI]
MDI_COMMAND = M101 (OFF Inductor A)
MDI_COMMAND = M103 (OFF Inductor B)
Then in your .hal file connect like this as an example:
Code:
net inductors-off <= halui.estop.isâactivated => halui.mdi-command-00 => halui.mdi-command-01
Please Log in to join the conversation.
5 years 10 months ago #192266
by cmorley
Replied by cmorley on topic Help with User M Code
I think you could use an and2 component.
connect the output to the parallel port pin
connect one input to estop
set the other input from your Mcode file.
Chris
connect the output to the parallel port pin
connect one input to estop
set the other input from your Mcode file.
Chris
Please Log in to join the conversation.
- RobotMatic
- Topic Author
- Offline
- Elite Member
-
Less
More
- Posts: 199
- Thank you received: 0
5 years 10 months ago #192336
by RobotMatic
Replied by RobotMatic on topic Help with User M Code
Thank you very much for the help, I will be modifying it. I'm learning a lot thanks to the help of this forum !!! thanksssss
Please Log in to join the conversation.
Time to create page: 0.090 seconds
