Setting a hal pin from Gcode
17 Mar 2015 23:23 #56952
by mariusl
Regards
Marius
www.bluearccnc.com
Setting a hal pin from Gcode was created by mariusl
Hi
I am trying to set a hal pin from gcode. I can read a pin but I am having trouble setting one.
This is my attempt
the error is " Internal error: could not assign #<_hal[hurcotc.move-done]>"
I am trying to set a hal pin from gcode. I can read a pin but I am having trouble setting one.
This is my attempt
o<test> sub
(DEBUG, #<_hal[hurcotc.position-req]>)
#<_hal[hurcotc.move-done]> = 0
G0 A#<_hal[hurcotc.position-req]>
o101 while [#<_hal[motion.in-position]> NE 1]
#1 = [#1+1] (increment the test counter)
(debug, #1)
o101 endwhile
#<_hal[hurcotc.move-done]> = 1
o<test> endsub
m2
the error is " Internal error: could not assign #<_hal[hurcotc.move-done]>"
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
18 Mar 2015 00:47 #56954
by ArcEye
Replied by ArcEye on topic Setting a hal pin from Gcode
Hi
They are read only.
The FEATURES=12 or whatever gives you access to the values, but you cannot change them, that would be the Holy Grail.
If the pin can be written to, you can do it from a user M code
halcmd setp <pinname> value type thing
Whether it is linked and what type of pin it is is going to determine if it can be written
regards
They are read only.
The FEATURES=12 or whatever gives you access to the values, but you cannot change them, that would be the Holy Grail.
If the pin can be written to, you can do it from a user M code
halcmd setp <pinname> value type thing
Whether it is linked and what type of pin it is is going to determine if it can be written
regards
Please Log in or Create an account to join the conversation.
18 Mar 2015 02:53 #56961
by mariusl
Damn that sucks. I will have to rethink. maybe use a timer to set a pin.
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Setting a hal pin from Gcode
They are read only.
Damn that sucks. I will have to rethink. maybe use a timer to set a pin.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
18 Mar 2015 12:24 #56972
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Setting a hal pin from Gcode
There was a way to wait for a signal in a user M code that uses a shell script. I cannot remember however how to do that. Any suggestions
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
18 Mar 2015 21:36 #56985
by andypugh
www.linuxcnc.org/docs/html/gcode/m-code.html#sec:M100-to-M199
But to set a HAL pin value from G-code the simpler way is to use:
www.linuxcnc.org/docs/html/gcode/m-code.html#sec:M62-M65
and net the HAL pin to motion.digital-out-00 (or whatever)
Replied by andypugh on topic Setting a hal pin from Gcode
There was a way to wait for a signal in a user M code that uses a shell script.
www.linuxcnc.org/docs/html/gcode/m-code.html#sec:M100-to-M199
But to set a HAL pin value from G-code the simpler way is to use:
www.linuxcnc.org/docs/html/gcode/m-code.html#sec:M62-M65
and net the HAL pin to motion.digital-out-00 (or whatever)
Please Log in or Create an account to join the conversation.
22 Mar 2015 13:11 #57087
by mariusl
Regards
Marius
www.bluearccnc.com
Replied by mariusl on topic Setting a hal pin from Gcode
Thanks Andy
Sorry I took so long to answer but I dont get any notifications from the forum any more.
Sorry I took so long to answer but I dont get any notifications from the forum any more.
Regards
Marius
www.bluearccnc.com
Please Log in or Create an account to join the conversation.
Time to create page: 0.081 seconds