Checking hal pin from NGC?
18 Sep 2013 00:21 #38950
by machete
Checking hal pin from NGC? was created by machete
Hello!
I am trying to folow this example, from here:
www.linuxcnc.org/docs/devel/html/remap/structure.html
But with any hal-pin it always show me "does not exist", or if i just try to debug it's value "######".
My version of LinuxCNC: 2.6.0
P.S. I want to have ability to do, or not to do part of NGC program (tool changing) depending on output pin of Classic Ladder.
I am trying to folow this example, from here:
www.linuxcnc.org/docs/devel/html/remap/structure.html
o100 if [EXISTS[#<_hal[motion-controller.time]>]]
(debug, [motion-controller.time] exists: #<_hal[motion-controller.time]>)
o100 else
(debug, [motion-controller.time] does not exist)
o100 endif
But with any hal-pin it always show me "does not exist", or if i just try to debug it's value "######".
My version of LinuxCNC: 2.6.0
P.S. I want to have ability to do, or not to do part of NGC program (tool changing) depending on output pin of Classic Ladder.
Please Log in or Create an account to join the conversation.
18 Sep 2013 06:35 #38964
by andypugh
You need to turn on the feature of reading HAL pins from g-code:
www.linuxcnc.org/docs/devel/html/remap/s...d_sub_ini_features_a
Replied by andypugh on topic Checking hal pin from NGC?
www.linuxcnc.org/docs/devel/html/remap/structure.html
My version of LinuxCNC: 2.6.0
You need to turn on the feature of reading HAL pins from g-code:
www.linuxcnc.org/docs/devel/html/remap/s...d_sub_ini_features_a
Please Log in or Create an account to join the conversation.
18 Sep 2013 14:50 - 18 Sep 2013 14:50 #38976
by machete
Replied by machete on topic Checking hal pin from NGC?
Thank you!
Is that correct?
[RS274NGC]
FEATURES = 8
enable #<_hal[Hal item]> readonly variables: 8
if set, the interpreter will fetch read-only values from HAL file through this special variable syntax.
Is that correct?
[RS274NGC]
FEATURES = 8
Last edit: 18 Sep 2013 14:50 by machete.
Please Log in or Create an account to join the conversation.
18 Sep 2013 17:03 #38980
by andypugh
Yes, though you might want to use FEATURES=12 to get access to INI file parameters too.
Replied by andypugh on topic Checking hal pin from NGC?
Is that correct?
[RS274NGC]
FEATURES = 8
Yes, though you might want to use FEATURES=12 to get access to INI file parameters too.
Please Log in or Create an account to join the conversation.
25 Sep 2013 21:02 #39181
by machete
Replied by machete on topic Checking hal pin from NGC?
Hmm... i wasn't able to get any #<_hal[hal-pin]> value before executing M66 g-code!
(i spent two days to understand that)
So, here is my correctly working NGC program for tool changing:
(i spent two days to understand that)
So, here is my correctly working NGC program for tool changing:
o<mytoolchange> sub
M66 P3 L0 Q0 (asking Classic Ladder is tool change needed?)
(flag from classic ladder)
(#debug, [5399]: #5399 - showing OK!)
(#debug, [skip-tool-change]: #<_hal[skip-tool-change]> - also showing OK!)
o100 if [#5399]
(debug, Skip changing tool!)
M6 (just legalize it for system)
o100 else
(debug, Changing.)
M5 (stop spindle)
G0 G53 Z75.1 (go to plane of Tool Magazine's clamps)
M64 P0 (enabling DO-CHANGE bit for classic ladder)
M66 P0 L3 Q2678400 (waiting 1 month for PHASE2 signal when)
G0 G53 Z205.3 (go back to left tool in the clamp)
M66 P1 L3 Q2678400 (waiting 1 month for PHASE3 signal)
G0 G53 Z75.1 (go to plane of Tool Magazine's clamps Y75.5)
M66 P2 L3 Q2678400 (waiting 1 month for CHANGED)
M65 P0 (disabling DO-CHANGE bit)
M6 (acting loopbacks)
o100 endif
o<mytoolchange> endsub
M2
Please Log in or Create an account to join the conversation.
Time to create page: 0.207 seconds