XHC-WHB04B-6 and LinuxCNC 2.9.1

More
2 years 5 months ago #300605 by tommylight
net = connect some pin to some other pin
machine.is-on = LinuxCNC machine on/off pin
halui.machine.is-on = hal UI meaning User interface machine on/off pin
whb.halui.machine.is-on = WHB "joystick" machine on/off pin

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

More
2 years 5 months ago #300608 by westhedge
Therein lies my confusion. When I read the basic hal  linuxcnc.org/docs/2.6/html/hal/basic_hal.html it says "The same signal-name can be used in multiple net commands to connect additional pins, as long as the rules above are obeyed." (then there's a diagram showing the flow)

My understanding (which may be incorrect?):
machine.is-on (signal)
halui.machine.is-on (signal reader)
whb.halui.machine.is-on (signal reader)


And the man page (their example) states:
"Since the signal xStep contains the value of stepgen.0.out (the source) you can use the same signal again to send the value to another reader. To do this just use the signal with the readers on another line."
So my first attempt was to do just that, but it did not work as I'd expected. Am I incorrect about the nature of these pins?
e.g.
net a b1 b2
does not appear to be the same as
net a b1
net a b2


As I say - maybe my understanding of these pins is flawed. New to the hal concept, and I'm thinking about it like logic circuit wiring.

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

More
2 years 5 months ago - 2 years 5 months ago #300613 by PCW
Replied by PCW on topic XHC-WHB04B-6 and LinuxCNC 2.9.1
These statements are equivalent:

net a b1 b2 b3

net a b1
net a b2
net a b3

As long as 'a' is a signal and 'b1', 'b2' are pins
and you do not have more than one source pin.
Last edit: 2 years 5 months ago by PCW.

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

More
2 years 5 months ago #300614 by westhedge
Interesting...
So If I have just this one line:
net machine.is-on whb.halui.machine.is-on halui.machine.is-on

halshow shows this for the signal:
Signals:
Type          Value  Name     (linked to)
bit           FALSE  machine.is-on
                         <== halui.machine.is-on
                         ==> whb.halui.machine.is-on

But if instead I have these 2 lines:
net machine-is-on         halui.machine.is-on
net machine.is-on         whb.halui.machine.is-on


halshow shows:
Signals:
Type Value Name (linked to)
bit FALSE machine-is-on
<== halui.machine.is-on

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

More
2 years 5 months ago #300615 by PCW
Replied by PCW on topic XHC-WHB04B-6 and LinuxCNC 2.9.1
No sure why halshow does that but halcmd prints the expected (identical) thing:

halcmd: net a hm2_7i95.0.inmux.00.input-00
halcmd: net a hm2_7i95.0.ssr.00.out-00
halcmd: show signal a
Signals:
Type                  Value  Name     (linked to)
bit                   FALSE  a
                                 <== hm2_7i95.0.inmux.00.input-00
                                 ==> hm2_7i95.0.ssr.00.out-00

(new session)


halcmd: net a  hm2_7i95.0.inmux.00.input-00  hm2_7i95.0.ssr.00.out-00
halcmd: show signal a
Signals:
Type                  Value  Name     (linked to)
bit                   FALSE  a
                                 <== hm2_7i95.0.inmux.00.input-00
                                 ==> hm2_7i95.0.ssr.00.out-00



 
The following user(s) said Thank You: tommylight

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

More
2 years 5 months ago #300617 by westhedge
I think I have discovered the root of the problem:

if I do this all in JUST the WHB file:
net machine.is-on                halui.machine.is-on
net machine.is-on                whb.halui.machine.is-on

halshow shows the desired wiring.

But if I have the same exact lines in their respective separate main and WHB files, that's when the pin wiring breaks down.

So... maybe this has something to do with the way hal processes the net commands across files. I can say with certainty the two commands above on separate files = non-working WHB.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum