Re read Hal pin while in GCode

More
05 Jan 2021 00:07 #194097 by FedX
Hi,

is it possible to read a hal pin with #<_hal[Halpin_example]> then trigger a routine and re read the pin afterwards to check if the state has changed?

If i just continue with the next o if state the halpin is still low in the file even if its state has changed to true before entering the o if state..

br

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

More
05 Jan 2021 00:50 #194103 by rodw
Replied by rodw on topic Re read Hal pin while in GCode
M66 wait on input will let you wait until it changes
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m66
Have a look how Plasmac changes tools/materials.

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

More
05 Jan 2021 08:24 - 05 Jan 2021 22:34 #194127 by FedX
Replied by FedX on topic Re read Hal pin while in GCode
Perfect that could be exactly what I was looking for.
Why is it limited to 4 inputs?

It worked fine thanks for the hint :)

Br
Dominik
Last edit: 05 Jan 2021 22:34 by FedX.
The following user(s) said Thank You: rodw

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

More
06 Jan 2021 17:25 #194254 by rmu
Replied by rmu on topic Re read Hal pin while in GCode
It isn't really limited to 3. See section above:

The P-word ranges from 0 to a default value of 3. If needed the the number of I/O can be increased by using the num_dio parameter when loading the motion controller. See the Motion Section for more information.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum