HAL mapping direction <= versus =>

More
22 Nov 2018 16:41 - 23 Nov 2018 03:44 #121222 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 :

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

:dry:

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.

More
22 Nov 2018 16:50 #121223 by bevins

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

:dry:

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.

More
22 Nov 2018 16:53 #121224 by Clive S
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.

More
22 Nov 2018 19:32 #121229 by rodw
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 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.

More
24 Nov 2018 16:45 #121294 by BigJohnT
Seems to be pretty clear in the documents...

linuxcnc.org/docs/2.7/html/hal/basic-hal.html#_net

JT

Please Log in or Create an account to join the conversation.

More
26 Nov 2018 13:31 #121365 by andypugh

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.

More
11 Dec 2018 09:50 - 11 Dec 2018 09:53 #122193 by JC10

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 more
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 :unsure: 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 :unsure: ?
Last edit: 11 Dec 2018 09:53 by JC10.

Please Log in or Create an account to join the conversation.

More
11 Dec 2018 09:53 #122194 by pl7i92
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 .....

Please Log in or Create an account to join the conversation.

More
11 Dec 2018 10:02 #122195 by andypugh

This last one is really puzzling but I did my homework and I think i am fluent with this new language :unsure: 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 
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

Please Log in or Create an account to join the conversation.

More
11 Dec 2018 10:07 #122196 by rodw
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:
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.160 seconds
Powered by Kunena Forum