HAL mapping direction <= versus =>
22 Nov 2018 16:41 - 23 Nov 2018 03:44 #121222
by JC10
HAL mapping direction <= versus => was created by JC10
Hello,
new to LINUXCNC HAL my brain is twisted by the meaning of <= versus =>. I thought it was data flow orientated like hardware input pin => hal input pin and reciprocally for output. And this, despite i was reading cases in contradiction with my pseudo rule...
Reading the 1986 Maho retrofit, i fell on andypugh's following post that finished to puzzle me :
Andy can you help with some reference or a good explanation ?
Thanks
new to LINUXCNC HAL my brain is twisted by the meaning of <= versus =>. I thought it was data flow orientated like hardware input pin => hal input pin and reciprocally for output. And this, despite i was reading cases in contradiction with my pseudo rule...
Reading the 1986 Maho retrofit, i fell on andypugh's following post that finished to puzzle me :
The 7i77.0.0.input-NN pins are HAL _outputs_ They are physical inputs that set the value of attached HAL pins.
So the mapping needs to be maho_panel.out => 7i77.out and maho_panel.in => 7i77.in
Andy can you help with some reference or a good explanation ?
Thanks
Last edit: 23 Nov 2018 03:44 by JC10. Reason: Typo
Please Log in or Create an account to join the conversation.
22 Nov 2018 16:50 #121223
by bevins
As far as I know, the <=, => are just visual representation on which way the signal is being connected. You don't need to use them. I don't use them in my files.
Replied by bevins on topic HAL mapping direction <= versus =>
Hello,
new to LINUXCNC HAL my brain is twisted by the meaning of <= versus =>. I thought it was data flow orientated like hardware input pin => hal input pin and reciprocally for output. And this, spite i was reading cases in contradiction with my pseudo rule...
Reading the 1986 Maho retrofit, i felt on andypugh's following post that finished to puzzle me :
The 7i77.0.0.input-NN pins are HAL _outputs_ They are physical inputs that set the value of attached HAL pins.
So the mapping needs to be maho_panel.out => 7i77.out and maho_panel.in => 7i77.in
Andy can you help with some reference or a good explanation ?
Thanks
As far as I know, the <=, => are just visual representation on which way the signal is being connected. You don't need to use them. I don't use them in my files.
Please Log in or Create an account to join the conversation.
22 Nov 2018 16:53 #121224
by Clive S
Replied by Clive S on topic HAL mapping direction <= versus =>
The <= versus => don't mean anything and are not needed in the file. They can be ambiguous and confusing. They are put in so that the human can have an idea which way the data flows. I am a novice as well so no doubt others will chime in.
Please Log in or Create an account to join the conversation.
22 Nov 2018 19:32 #121229
by rodw
Replied by rodw on topic HAL mapping direction <= versus =>
They are really not necessary but useful if used consistently. I refer to always define a signal on one line and send it somewhere on another line.
This where multiple sigals are set on one line, I find confusing and don't do it any more
# --- EXTERNAL ESTOP SWITCH ---
net external-estop <= hm2_7i76e.0.7i76.0.0.input-00
net external-estop => estop-latch.0.fault-in
This where multiple sigals are set on one line, I find confusing and don't do it any more
net pause-on toggle2nist.0.is-on <= and2.0.in1 <= and2.3.in1 <= and2.5.in1 <= halui.program.is-paused
Please Log in or Create an account to join the conversation.
24 Nov 2018 16:45 #121294
by BigJohnT
Replied by BigJohnT on topic HAL mapping direction <= versus =>
Please Log in or Create an account to join the conversation.
26 Nov 2018 13:31 #121365
by andypugh
This is because the HAL pin that drives a hardware output is a HAL input pin. You pass a value _in_ to the HAL pin and that controls the voltage output.
Replied by andypugh on topic HAL mapping direction <= versus =>
So the mapping needs to be maho_panel.out => 7i77.out and maho_panel.in => 7i77.in
Andy can you help with some reference or a good explanation ?
This is because the HAL pin that drives a hardware output is a HAL input pin. You pass a value _in_ to the HAL pin and that controls the voltage output.
Please Log in or Create an account to join the conversation.
11 Dec 2018 09:50 - 11 Dec 2018 09:53 #122193
by JC10
This last one is really puzzling but I did my homework and I think i am fluent with this new language to translate it in :
With this way, i see the flow of data clearly.
What is weird to me is that in yours, you only used <= arrows ?
Replied by JC10 on topic HAL mapping direction <= versus =>
They are really not necessary but useful if used consistently. I refer to always define a signal on one line and send it somewhere on another line.
# --- EXTERNAL ESTOP SWITCH --- net external-estop <= hm2_7i76e.0.7i76.0.0.input-00 net external-estop => estop-latch.0.fault-in
This where multiple sigals are set on one line, I find confusing and don't do it any morenet pause-on toggle2nist.0.is-on <= and2.0.in1 <= and2.3.in1 <= and2.5.in1 <= halui.program.is-paused
This last one is really puzzling but I did my homework and I think i am fluent with this new language to translate it in :
net pause-on <= toggle2nist.0.is-on
net pause-on => and2.0.in1
net pause-on => and2.3.in1
net pause-on => and2.5.in1
net pause-on => halui.program.is-paused
With this way, i see the flow of data clearly.
What is weird to me is that in yours, you only used <= arrows ?
Last edit: 11 Dec 2018 09:53 by JC10.
Please Log in or Create an account to join the conversation.
11 Dec 2018 09:53 #122194
by pl7i92
Replied by pl7i92 on topic HAL mapping direction <= versus =>
Basic you load a NET / Signal with a pinstate
and then you can asign the signal to a outsource that takes it PYVCP led Motion control Halui .....
and then you can asign the signal to a outsource that takes it PYVCP led Motion control Halui .....
Please Log in or Create an account to join the conversation.
11 Dec 2018 10:02 #122195
by andypugh
Well, actually:Because the halui pin is an output and is the driver for the net and toggle2nist.is-on is an input:
linuxcnc.org/docs/devel/html/man/man9/toggle2nist.9.html
Replied by andypugh on topic HAL mapping direction <= versus =>
This last one is really puzzling but I did my homework and I think i am fluent with this new language to translate it in :
net pause-on <= toggle2nist.0.is-on net pause-on => and2.0.in1 net pause-on => and2.3.in1 net pause-on => and2.5.in1 net pause-on => halui.program.is-paused
With this way, i see the flow of data clearly.
Well, actually:
net pause-on <= halui.program.is-paused
net pause-on => toggle2nist.0.is-on
net pause-on => and2.0.in1
net pause-on => and2.3.in1
net pause-on => and2.5.in1
linuxcnc.org/docs/devel/html/man/man9/toggle2nist.9.html
Please Log in or Create an account to join the conversation.
11 Dec 2018 10:07 #122196
by rodw
Replied by rodw on topic HAL mapping direction <= versus =>
I have to say I think that line was contributed by Todd so It might be best to get him to correct your work as it so long I have forgotten what it does. toggle2nist.0.is-on is an input and halui.program.is-paused is an output so I think its more like:
So in this particular case the one liner is quite efficient!
net pause-on <= halui.program.is-paused
net pause-on => toggle2nist.0.is-on
net pause-on => and2.0.in1
net pause-on => and2.3.in1
net pause-on => and2.5.in1
So in this particular case the one liner is quite efficient!
Please Log in or Create an account to join the conversation.
Time to create page: 0.096 seconds