XHC-HB04 wireless MPG pendant HAL module

More
10 years 4 months ago #76621 by dannym
Yeah, the spindle button can work fine! Press it once it starts. press it again, it stops

This is what I did in my .hal file:
Code:
#SPINDLE button addf and2.0 servo-thread addf and2.1 servo-thread addf not.0 servo-thread net spindleOn halui.spindle.is-on not.0.in and2.1.in1 net spindleXHCButton edge.1.out and2.0.in0 and2.1.in0 net spindleOnB not.0.out and2.0.in1 net spindleTurnOn halui.spindle.start and2.0.out net spindleTurnOff halui.spindle.stop and2.1.out

The MPG and RF link and LinuxCNC polling loop already perform suitable debouncing. There will be only one edge per button press. And the spindle.is-on won't be true until at least one polling cycle after halui.spindle.start is strobed.

Please Log in to join the conversation.

More
10 years 4 months ago #76687 by Gasman
Hi Danny -thanks for the quick response but I still can't get this to function as expected - the spindle now seems to start when the program starts but the spindle button on the pendant does nothing - nor does the button on the Axis GUI. I will have another play with Hal Command when I get a chance to get to the workshop to see what it thinks is connected where.

I tried it in my postgui.hal file (and put loadrt and2 count=2 , loadrt not count=1, loadrt edge count=1 into my custom.hal.) Is that correct or should it go in my main hal file?

Please Log in to join the conversation.

More
10 years 4 months ago #76695 by cncbasher
Gasman:
untill you have everything working in axis , then it wont work
you should be able to stop and start the spindle from axis , after you have homed ,
this would suggest either the spindle output is not as you think it is , so what interface are you using ? vfd etc
and how do you have this wired

also it may help posting your full config as an archive to you post so it can be checked

Please Log in to join the conversation.

More
10 years 4 months ago #76773 by Gasman
Now got it working thanks - can toggle on/off the spindle, mist and flood as well as use the Mode button to switch between manual and MDI. My problem was I had forgotten that I had changed some things in the main hal file for my machine whilst i was trying to get this working in in sim on my laptop. Now all fixed. Just working on adding a camera next..

Please Log in to join the conversation.

More
10 years 3 months ago #77106 by vre
hello!

I have created my config with stepconf wizard and hb04 does not start
It shows me errors with conflicts.
Is safe to comment lines that cause the conflict in my main hal generated by stepconf wizard ?
these are the lines that cause conflict
Code:
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs net probe-in => motion.probe-input
Code:
Machine configuration file is '6040-parallel.ini' Starting LinuxCNC... Found file(REL): ./6040-parallel.hal Found file(REL): ./xhc-hb04.tcl xhc-hb04: waiting for XHC-HB04 device xhc-hb04: found XHC-HB04 device xhc-hb04.tcl: !!! <halui.home-all> target pin does not exist, continuing Pin 'motion.probe-input' was already linked to signal 'probe-in' while executing "hal net pendant:probe-z <= xhc-hb04.button-probe-z => motion.probe-input" ("eval" body line 1) invoked from within "eval hal net $args" (procedure "net" line 1) invoked from within "net pendant:$bname <= $fullbname => $thepin" (procedure "connect_pins" line 35) invoked from within "connect_pins " invoked from within "if { ![namespace exists ::tp] || ([::tp::passnumber] != 0) } { connect_pins ;# per ini file items: [XHC_HB04_BUTTONS]buttonname=pin wheel_setup..." (file "./xhc-hb04.tcl" line 529) invoked from within "source $filename" invoked from within "set result [source $filename]" (file "/usr/bin/haltcl" line 55) Shutting down and cleaning up LinuxCNC... xhc-hb04: connection lost, cleaning up [timestamp] [threadID] facility level [function call] <message> -------------------------------------------------------------------------------- [ 0.000000] [00005353] libusbx: error [do_close] Device handle closed while transfer was still being processed, but the device is still connected as far as we know [ 0.000066] [00005353] libusbx: warning [do_close] A cancellation for an in-flight transfer hasn't completed but closing the device handle LinuxCNC terminated with an error. You can find more information in the log

Please Log in to join the conversation.

More
10 years 3 months ago #77146 by andypugh

vre wrote: Is safe to comment lines that cause the conflict in my main hal generated by stepconf wizard ?

It is safe, but the lines in question almost certainly had a purpose.

You will need to look at the two files and work out what is required to achieve the desired effect.
For example, consider two files that collectively contain
Code:
net probe-input motion.probe-in net probe-input parport.0.pin-00-in ... net input-probe motion.probe-in net input-probe parport.0.pin-0-in

Then this following will not cause an error, but neither will it work:
Code:
#net probe-input motion.probe-in net probe-input parport.0.pin-00-in ... net input-probe motion.probe-in #net input-probe parport.0.pin-0-in

Please Log in to join the conversation.

More
10 years 3 months ago #77154 by vre
xhc-hb04 works ok in simulation but in machine iam testing it i get
Code:
joint 2 following error
when i jog Z axis after a while and linuxcnc stops
if i jog from gui Z axis everything works ok
Jogging X & Y axes working from hb04

How can i fix this problem ?

here someone else have similar problem
sourceforge.net/p/emc/mailman/message/34193513/
----
The problem was the big mpg accelration.
I made this change and now works fine..
Code:
#mpg_accels = 50 50 500 600 mpg_accels = 50 50 50

Please Log in to join the conversation.

More
10 years 2 months ago #79320 by besriworld
Hello ,
I bought by mistake this remote HB03
Can you work with LinuxCNC?

Please Log in to join the conversation.

More
10 years 2 months ago #79321 by andypugh

besriworld wrote: Hello ,
I bought by mistake this remote HB03
Can you work with LinuxCNC?


Probably. Have you tried it?

Please Log in to join the conversation.

More
10 years 2 months ago #79323 by besriworld
No I have not tried . I have read that does not work with linuxCNC

Please Log in to join the conversation.

Time to create page: 0.320 seconds
Powered by Kunena Forum