Using M65 and M64 in pause mode

More
22 Mar 2023 09:10 #267283 by DmitryKV
Hello.
I have a task that I can't complete. The point is the following. I added a couple of buttons to the user interface, by pressing which commands from the handler are executed: ACTION.CALL_MDI('M65 P9') and ACTION.CALL_MDI('M64 P9'). Everything works fine until no G-code is executed. How can I control a digital port while paused or in motion while executing G-code? And in a pause you need more than in motion. Is it possible?

Regards, Dmitry

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

More
24 Mar 2023 02:27 #267394 by cmorley
Not sure it helps but you can set digital output with the python module.
linuxcnc.org/docs/2.9/html/config/python...inuxcnc_command_code

set_digital_output(int, int)
set digital output pin to value

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

More
24 Mar 2023 08:45 #267400 by DmitryKV
Hello.
Thanks for the answer. I already tried this way. Does not help. Gives this message:
can't do it (EMC_MOTION_SET_DOUT) in automatic mode with read interpreter. According to the message, this is not possible.
In principle, I can implement the functions I need a little differently. But I can not find in the documentation whether what I want is possible. Maybe someone will tell?
In G code, I can read the state of the pins with: for example - P#<_hal[motion.analog-in-05]>. Is there a similar way to also set pins to a state? If there is, then I will create my own pins and will not use the digital pins of the motion module. I don't need to do this in real time.

Regards, Dmitry.

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

More
27 Mar 2023 23:56 #267645 by snowgoer540
what exactly are you trying to do? What are you controlling?

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

More
29 Mar 2023 09:57 #267786 by DmitryKV
Hello.

I have several auxiliary devices on the machine that need to be powered at certain times. I additionally insert control functions into the G code. I also need to be able to control them manually during the cutting process.
Additional devices are ventilation valves, damper electromagnets, in general, this applies to the cutting table. It can also be, for example, additional gases for a fixed methane torch.

Regards, Dmitry.

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

Moderators: snowgoer540
Time to create page: 0.149 seconds
Powered by Kunena Forum