- Posts: 45
- Thank you received: 0
HAL mapping direction <= versus =>
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 :
:dry:andypugh wrote: 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
Please Log in to join the conversation.
JC10 wrote: 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 :
:dry:andypugh wrote: 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 to join the conversation.
Please Log in to join the conversation.
This where multiple sigals are set on one line, I find confusing and don't do it any more
Please Log in to join the conversation.
Please Log in to join the conversation.
JC10 wrote:
andypugh wrote: 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 to join the conversation.
rodw wrote: 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.
Code:# --- 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 moreCode:net 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
With this way, i see the flow of data clearly.
What is weird to me is that in yours, you only used <= arrows
Please Log in to join the conversation.
and then you can asign the signal to a outsource that takes it PYVCP led Motion control Halui .....
Please Log in to join the conversation.
JC10 wrote: 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 :
Code: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:
linuxcnc.org/docs/devel/html/man/man9/toggle2nist.9.html
Please Log in to join the conversation.
So in this particular case the one liner is quite efficient!
Please Log in to join the conversation.
