XHC-WHB04-4 Python component

More
7 years 2 months ago #143713 by serafim
Thanks, pl7i92. Can you or somebody share hal for the WHB04B? I can see that designated pins work but drives are not moving. I guess I'm missing some pin connection.
Code:
loadusr -W whb04b net axis0jogenable axis.x.jog-enable whb04b.sel_x net axis1jogenable axis.y.jog-enable whb04b.sel_y net axis2jogenable axis.z.jog-enable whb04b.sel_z net joginc whb04b.inc net joginc axis.x.jog-scale net joginc axis.y.jog-scale net joginc axis.z.jog-scale net jogcnts whb04b.mpg_cnt net jogcnts axis.x.jog-counts net jogcnts axis.y.jog-counts net jogcnts axis.z.jog-counts setp axis.x.jog-vel-mode 1 setp axis.y.jog-vel-mode 1 setp axis.z.jog-vel-mode 1

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

More
7 years 2 months ago #143727 by pl7i92
Replied by pl7i92 on topic XHC-WHB04-4 Python component
this is only the base connection
So do you got a COMP called whb04b
otherwise use the internal for the base XHC it will work for all pins

its alot more to be connected to run the B version
WHERE are the BUTTONS Discribed INI file

loadusr -W xhc-hb04 -H -I wbcnc_2.7.9.ini -s 4


linuxcnc.org/docs/html/man/man1/xhc-hb04.1.html

you need to understand how the postgui system workes together with HALUI
Get signal from external and do somthing in the servo tread time

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

More
6 years 5 months ago #167967 by fixer
Replied by fixer on topic XHC-WHB04-4 Python component
I edited fist post, component is now on github.
It does behave a bit different, it produces much less traffic on the USB bus than the "official" driver.
The following user(s) said Thank You: tommylight

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

More
5 years 9 months ago #196547 by probotix
Good job on this. I have it running on 2.8.1

Can you explain this syntax for me?
Code:
h.fn = data[2] == 12 or data[3] == 12

Also, when running inches, the 1.0 jog increments only moves 0.48 inches. Any ideas?

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

More
5 years 9 months ago #196559 by fixer
Replied by fixer on topic XHC-WHB04-4 Python component
sure.
h.fn is output pin of self hal component. "data" structure contains received data from whb device. Fields [2] and [3] are pressed buttons, value 12 means fn button pressed.

on metric inrements are 1mm, 0.1mm, 0.01mm, 0.001mm. On imperial each should be divided by 10 - line 196
can you check with halshow whb inc and axis jog-scale pins? what do they show on your configuration. Show your hal files so I can check.

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

More
5 years 9 months ago - 5 years 9 months ago #196568 by probotix
Sorry let me clarify my question. I don't have a full understanding of the python syntax, yet. I'm trying to understand the a = b == x or c == x syntax. I know what a,b,c, and x are, just not what the equals signs and or mean when combined like that. does it mean that a is true if either b == x or c == x.

If so, why do you have to check both data[2] and data[3]?
Last edit: 5 years 9 months ago by probotix.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum