- Posts: 566
- Thank you received: 0
How to read signal state in g-code program
5 years 8 months ago #199030
by aleksamc
How to read signal state in g-code program was created by aleksamc
If I want to read value of the pin from G-code, I type
#<_hal[pinname]>
But when I want to read signal name (not pin), when I type
(debug, #<_hal[signal_name>]>) and signal is true or false, I get ####
How to read binary signal name in G-code?
#<_hal[pinname]>
But when I want to read signal name (not pin), when I type
(debug, #<_hal[signal_name>]>) and signal is true or false, I get ####
How to read binary signal name in G-code?
Please Log in to join the conversation.
5 years 8 months ago #199058
by aleksamc
Replied by aleksamc on topic How to read signal state in g-code program
Ok, it seems that signal value gets the same as pin value, I made only simple mistake in writing [].
Please Log in to join the conversation.
5 years 8 months ago #199972
by andypugh
Note that this will (generally) return the value on the HAL pin at the moment that the G-code started.
To read live status it is a bad choice, far better then to use the G-code analogue input pins and M65 (etc)
Replied by andypugh on topic How to read signal state in g-code program
aleksamc wrote: If I want to read value of the pin from G-code, I type
#<_hal[pinname]>
Note that this will (generally) return the value on the HAL pin at the moment that the G-code started.
To read live status it is a bad choice, far better then to use the G-code analogue input pins and M65 (etc)
Please Log in to join the conversation.
5 years 8 months ago #200022
by aleksamc
Replied by aleksamc on topic How to read signal state in g-code program
Thank you very much for good advice, Andypugh.
I also wondered why I didn't get change in g-code if I change values.
I also wondered why I didn't get change in g-code if I change values.
Please Log in to join the conversation.
Time to create page: 0.700 seconds
