Help with User M Code
- RobotMatic
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 185
- Thank you received: 21
17 Dec 2020 15:39 - 17 Dec 2020 15:53 #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
Last edit: 17 Dec 2020 15:53 by RobotMatic.
Please Log in or Create an account to join the conversation.
17 Dec 2020 17:25 - 17 Dec 2020 17:26 #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:
[HALUI]
MDI_COMMAND = M101 (OFF Inductor A)
MDI_COMMAND = M103 (OFF Inductor B)
Then in your .hal file connect like this as an example:
net inductors-off <= halui.estop.isâactivated => halui.mdi-command-00 => halui.mdi-command-01
Last edit: 17 Dec 2020 17:26 by Aciera.
The following user(s) said Thank You: RobotMatic
Please Log in or Create an account to join the conversation.
17 Dec 2020 17:26 #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
The following user(s) said Thank You: RobotMatic
Please Log in or Create an account to join the conversation.
- RobotMatic
- Topic Author
- Offline
- Elite Member
Less
More
- Posts: 185
- Thank you received: 21
18 Dec 2020 15:12 #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 or Create an account to join the conversation.
Time to create page: 0.080 seconds