XHC-WHB04B-6 and LinuxCNC 2.9.1

More
14 May 2024 21:19 - 14 May 2024 21:19 #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: 14 May 2024 21:19 by PCW.

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

More
14 May 2024 21:19 #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
14 May 2024 21:30 #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
14 May 2024 21:38 #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.

More
14 May 2024 21:44 - 14 May 2024 21:45 #300619 by PCW
Replied by PCW on topic XHC-WHB04B-6 and LinuxCNC 2.9.1
Sounds like the whb hal (postgiu.hal?) file is not linked-in

(I usually test this kind of issue by inserting a deliberate error in the file
to make sure its being used)
Last edit: 14 May 2024 21:45 by PCW.

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

More
14 May 2024 21:52 #300620 by westhedge
Hmmm... My ini shows this:

[HAL]
HALUI = halui
HALFILE = GantryMill.hal
HALFILE = custom.hal
HALFILE = toolchanger.hal
HALFILE = xhc_whb04b_6.hal
POSTGUI_HALFILE = gmoccapy_postgui.hal
POSTGUI_HALFILE = custom_postgui.hal
SHUTDOWN = shutdown.hal

In the end, because i used pncconf to generate the GantryMill.hal file I put this in my xhc_whb04b_6.hal file:

unlinkp halui.machine.is-on
net machine.is-on whb.halui.machine.is-on halui.machine.is-on

That seems to work. Jog dial works. Need to tweak the button functions, but I'll sort that out. Cheers!

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

More
14 May 2024 22:01 #300622 by PCW
Replied by PCW on topic XHC-WHB04B-6 and LinuxCNC 2.9.1
having

net machine.is-on halui.machine.is-on
in GantryMill.hal

and

net machine.is-on whb.halui.machine.is-on
in xhc_whb04b_6.hal

would be identical

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

More
14 May 2024 22:06 #300623 by westhedge
I agree they *should* be identicial... weird thing is it didn't work out that way. It simply refused to work unless I put it all in the latter xhc_whb04b_6.hal file. Could be a version bug, who knows.

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

More
14 May 2024 22:12 #300625 by PCW
Replied by PCW on topic XHC-WHB04B-6 and LinuxCNC 2.9.1
That doesn't make any sense.

 It makes no difference when or from where a net command is
executed as long as the connected pins are present. 
(at least in any version of LinuxCNC I've used)


 

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

More
14 May 2024 22:18 #300626 by westhedge
I agree with you - it didn't make sense to me either based on my [admittedly limited] knowledge. I will do some more testing around this and document what I find.

Is it possible to see a log of what hal commands are actually executed in order on start? That might illuminate the issue.

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

Time to create page: 0.094 seconds
Powered by Kunena Forum