HAL mapping direction <= versus =>

More
7 years 11 months ago #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 :

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

:dry:

Andy can you help with some reference or a good explanation ?

Thanks

Please Log in to join the conversation.

More
7 years 11 months ago #121223 by bevins

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 :

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

: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 to join the conversation.

More
7 years 11 months ago #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 to join the conversation.

More
7 years 11 months ago #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.
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 more
Code:
net pause-on toggle2nist.0.is-on <= and2.0.in1 <= and2.3.in1 <= and2.5.in1 <= halui.program.is-paused

Please Log in to join the conversation.

More
7 years 11 months ago #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 to join the conversation.

More
7 years 11 months ago #121365 by andypugh

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.

More
7 years 10 months ago #122193 by JC10

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 more
Code:
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 :

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.

What is weird to me is that in yours, you only used <= arrows :unsure: ?

Please Log in to join the conversation.

More
7 years 10 months ago #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 to join the conversation.

More
7 years 10 months ago #122195 by andypugh

JC10 wrote: 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 :

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:
Code:
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 to join the conversation.

More
7 years 10 months ago #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:
Code:
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 to join the conversation.

Time to create page: 0.085 seconds
Powered by Kunena Forum