XHC-WHB04B-6 LinuxCNC not working
- satiowadahc
- Offline
- Senior Member
Less
More
- Posts: 55
- Thank you received: 12
21 Jan 2020 01:40 #155290
by satiowadahc
Replied by satiowadahc on topic XHC-WHB04B-6 LinuxCNC not working
Good to hear! As I don't have a 6 axis one, and haven't received feedback do the last two axis's work?
Please Log in or Create an account to join the conversation.
21 Jan 2020 17:52 #155338
by jonch919
There were a couple of typos I corrected in that version. Not sure if you have posted a new one.
I did however get the other driver from the "German guy" working. It works really well with that driver.
It it would be interesting to hear if anyone else got your driver for the 6-axis working. I'd like to try that as well.
Replied by jonch919 on topic XHC-WHB04B-6 LinuxCNC not working
I tried the 6-axis driver you posted. I could not get it working. From what I remember it didn't seem that the two versions worked in the same way. It was some command that didn't exist on mine. Can't remember details I'm afraid, haven't had time to work on my mill for months.Good to hear! As I don't have a 6 axis one, and haven't received feedback do the last two axis's work?
There were a couple of typos I corrected in that version. Not sure if you have posted a new one.
I did however get the other driver from the "German guy" working. It works really well with that driver.
It it would be interesting to hear if anyone else got your driver for the 6-axis working. I'd like to try that as well.
Please Log in or Create an account to join the conversation.
23 Mar 2020 04:36 - 23 Mar 2020 04:39 #161179
by MovT
Replied by MovT on topic XHC-WHB04B-6 LinuxCNC not working [SOLVED]
Jogwheel function [SOLVED]
Hi.
I solved the not proper working jogwheel with the driver from machinekit, that Talla83 supplied on his homepage and Youtube channel.
If you already use halui.machine.is-on for switching some solenoids etc. you run in the trap. When you start and get the error that halui.machine.is-on is already connected, and comment out the line, you kill the logic:
The driver NEED the signal on whb.halui.machine.is-on to run properly its safe to do nothing untile the machine is on. If you see the RESET in the display the machine need to be power on. If you do that, the signal will be set, the "RESET" disappear and you can use all other functions you have set and after homing, jogging works like a charm.
Maybe it's a good idea to komment it in the HAL that this line is mandatory.
Hope it will spread around and we all will have fun in these days.
Take care and keep well!!!
Best,
Udo
Hi.
I solved the not proper working jogwheel with the driver from machinekit, that Talla83 supplied on his homepage and Youtube channel.
If you already use halui.machine.is-on for switching some solenoids etc. you run in the trap. When you start and get the error that halui.machine.is-on is already connected, and comment out the line, you kill the logic:
net pdnt.machine.is-on halui.machine.is-on whb.halui.machine.is-on
The driver NEED the signal on whb.halui.machine.is-on to run properly its safe to do nothing untile the machine is on. If you see the RESET in the display the machine need to be power on. If you do that, the signal will be set, the "RESET" disappear and you can use all other functions you have set and after homing, jogging works like a charm.
Maybe it's a good idea to komment it in the HAL that this line is mandatory.
Hope it will spread around and we all will have fun in these days.
Take care and keep well!!!
Best,
Udo
Last edit: 23 Mar 2020 04:39 by MovT.
The following user(s) said Thank You: sdwyer
Please Log in or Create an account to join the conversation.
29 Mar 2020 00:28 - 29 Mar 2020 00:31 #161888
by alkabal
Replied by alkabal on topic XHC-WHB04B-6 LinuxCNC not working
Hi
I have used the last driver from machinekit and try to update for linuxcnc master
All work fine excepted the velocity jog mode, turning the feedrate button from pendant update the feedrate override in GUI (2% to 100%) but the move seems to be allways at same velocity.
I have some trouble understanding the process for velocity jog feed.
Is there a reason for not merging something like this driver ?
Br
Ps : this driver include toggle mode for mist/flood from Fn+ step/continuous (and lube from macro 2), also include a toggle for Absolut/Relative Dro from macro 10, + removed some useless code
I have used the last driver from machinekit and try to update for linuxcnc master
All work fine excepted the velocity jog mode, turning the feedrate button from pendant update the feedrate override in GUI (2% to 100%) but the move seems to be allways at same velocity.
I have some trouble understanding the process for velocity jog feed.
Is there a reason for not merging something like this driver ?
Br
Ps : this driver include toggle mode for mist/flood from Fn+ step/continuous (and lube from macro 2), also include a toggle for Absolut/Relative Dro from macro 10, + removed some useless code
Last edit: 29 Mar 2020 00:31 by alkabal.
Please Log in or Create an account to join the conversation.
31 Mar 2020 21:15 - 31 Mar 2020 21:22 #162300
by alkabal
Replied by alkabal on topic XHC-WHB04B-6 LinuxCNC not working
If this can be usefull for someone, for smoothieboard + smoopi with kivy i have write a driver full featured.
This one add two more feature :
-Spindle override using lead position
-Speedrate override using CON mode
The result is 4 different function using STEP/MPG/CON/LEAD
This driver was written with much difficulty but i hope is not crappy and is easy to read.
github.com/wolfmanjm/kivy-smoothie-host/pull/16
For Linuxcnc i have see other based source code than raoul Rubien, based on the original hb04b, or if i remember also a python version. (i can't found the topic another time)
At the end, what is the most finished version ?
Why nobody try to include one of this to master ?
This one add two more feature :
-Spindle override using lead position
-Speedrate override using CON mode
The result is 4 different function using STEP/MPG/CON/LEAD
This driver was written with much difficulty but i hope is not crappy and is easy to read.
github.com/wolfmanjm/kivy-smoothie-host/pull/16
For Linuxcnc i have see other based source code than raoul Rubien, based on the original hb04b, or if i remember also a python version. (i can't found the topic another time)
At the end, what is the most finished version ?
Why nobody try to include one of this to master ?
Last edit: 31 Mar 2020 21:22 by alkabal.
Please Log in or Create an account to join the conversation.
31 Mar 2020 22:49 - 31 Mar 2020 23:00 #162312
by alkabal
The Step/Mpg mode are managed here but this is not clear for me. (and more trouble with the use of ilowpass and scale from hal)
in my own driver i do
Replied by alkabal on topic XHC-WHB04B-6 LinuxCNC not working
// ----------------------------------------------------------------------
void Pendant::dispatchFeedValueToHal()
{
// on feed rotary button change
FeedRotaryButton& feedButton = mCurrentButtonsState.feedButton();
if (feedButton.isPermitted())
{
float axisJogStepSize = 0;
if (feedButton.stepMode() == HandwheelStepmodes::Mode::STEP)
{
mHal.setFeedOverrideCountEnable(false);
mHal.setStepMode(true);
mHal.setFeedOverrideScale(0.1);
mHal.setFeedOverrideDirectValue(false);
axisJogStepSize = feedButton.stepSize();
}
else if (feedButton.stepMode() == HandwheelStepmodes::Mode::CONTINUOUS)
{
mHal.setFeedOverrideCountEnable(false);
mHal.setContinuousMode(true);
// On velocity mode set feed-override value to absolute percentage value: counts*scale.
axisJogStepSize = 2;
//axisJogStepSize = feedButton.stepSize();
mHal.setFeedOverrideDirectValue(true);
float feedButtonStepSize = feedButton.stepSize();
if (feedButtonStepSize >= 10)
{
// on velocity >= 10%: set a coarse grained scale,
// this also affects the Feed+/- increment
mHal.setFeedOverrideScale(0.1);
mHal.setFeedOverrideCounts(feedButtonStepSize * 0.1);
}
else
{
// on velocity < 10%: set a fine grained scale,
// this also affects the Feed+/- increment
mHal.setFeedOverrideScale(0.01);
mHal.setFeedOverrideCounts(feedButtonStepSize * 1);
}
}
else
{
}
mHal.setStepSize(axisJogStepSize);
}
else
{
mHal.setStepSize(0);
}
}
// ----------------------------------------------------------------------
The Step/Mpg mode are managed here but this is not clear for me. (and more trouble with the use of ilowpass and scale from hal)
in my own driver i do
steplut = {0x0d: 0.001, 0x0e: 0.01, 0x0f: 0.1, 0x10: 1, 0x1a: 1, 0x1b: 1, 0x1c: 0} # combined button for set step
mpglut = {0x0d: 2, 0x0e: 5, 0x0f: 10, 0x10: 30, 0x1a: 60, 0x1b: 100, 0x1c: 0} # combined button for set mpg
dist = 0.001 * wheel-pulse * self.mpglut[speed_mode] # mode mpg
dist = self.steplut[speed_mode] *wheel-pulse # mode step
Last edit: 31 Mar 2020 23:00 by alkabal.
Please Log in or Create an account to join the conversation.
01 Apr 2020 00:38 - 01 Apr 2020 00:38 #162323
by alkabal
Replied by alkabal on topic XHC-WHB04B-6 LinuxCNC not working
Writing this allow to have something variable but i'm unsure about the real reaction needed for Mpg mode.
I have try to use without success :
halui.feed-override.count-enable (bit, in)
halui.feed-override.counts (s32, in) - counts * scale = FO
halui.feed-override.direct-value (bit, in)
halui.feed-override.scale (float, in)
I have try to use without success :
halui.feed-override.count-enable (bit, in)
halui.feed-override.counts (s32, in) - counts * scale = FO
halui.feed-override.direct-value (bit, in)
halui.feed-override.scale (float, in)
void Pendant::dispatchFeedValueToHal()
{
// on feed rotary button change
FeedRotaryButton& feedButton = mCurrentButtonsState.feedButton();
if (feedButton.isPermitted())
{
float axisJogStepSize = 0;
if (feedButton.stepMode() == HandwheelStepmodes::Mode::STEP)
{
mHal.setStepMode(true);
mHal.setContinuousMode(false);
mHal.setFeedOverrideCountEnable(false);
mHal.setFeedOverrideDirectValue(false);
mHal.setFeedOverrideScale(0);
axisJogStepSize = feedButton.stepSize();
}
else if (feedButton.stepMode() == HandwheelStepmodes::Mode::CONTINUOUS)
{
mHal.setStepMode(false);
mHal.setContinuousMode(true);
mHal.setFeedOverrideCountEnable(false);
mHal.setFeedOverrideDirectValue(false);
mHal.setFeedOverrideScale(0);
axisJogStepSize = feedButton.stepSize() * 0.001;
}
else
{
}
mHal.setStepSize(axisJogStepSize);
}
else
{
mHal.setStepSize(0);
}
}
Last edit: 01 Apr 2020 00:38 by alkabal.
Please Log in or Create an account to join the conversation.
01 Apr 2020 21:35 #162381
by andypugh
I am not aware of anyone asking.
If you want to make a pull-request to LinuxCNC then it might get merged. The problem is that most developers probably don't have the hardware to test it with.
Replied by andypugh on topic XHC-WHB04B-6 LinuxCNC not working
Why nobody try to include one of this to master ?
I am not aware of anyone asking.
If you want to make a pull-request to LinuxCNC then it might get merged. The problem is that most developers probably don't have the hardware to test it with.
Please Log in or Create an account to join the conversation.
01 Apr 2020 22:37 - 01 Apr 2020 22:38 #162393
by alkabal
Replied by alkabal on topic XHC-WHB04B-6 LinuxCNC not working
Thanks for reply, i like to PR if you agree but i need to finish some works.
Is this have more sense ? "In Mpg mode the step speed is in percent of max-velocity"
(if yes the good pin it is halui.max-velocity.value for calc ?)
I have corrected the Lead mode for use spindle override to GUI.
Fix scale Button Feed+/- for speed override to GUI
Fix Rotary knob to change only pendant feedrate
Is this have more sense ? "In Mpg mode the step speed is in percent of max-velocity"
(if yes the good pin it is halui.max-velocity.value for calc ?)
I have corrected the Lead mode for use spindle override to GUI.
Fix scale Button Feed+/- for speed override to GUI
Fix Rotary knob to change only pendant feedrate
Last edit: 01 Apr 2020 22:38 by alkabal.
Please Log in or Create an account to join the conversation.
02 Apr 2020 19:35 #162484
by andypugh
If you can it is rather better to use the motion jogging pins rather than halui.
Halui is a user-space program. Motion (which creates the joint.... and axis.... HAL pins) runs in realtime so will react to inputs more dependably.
Though that probably doesn't matter as much when you are connecting via USB, which has its own issues.
Replied by andypugh on topic XHC-WHB04B-6 LinuxCNC not working
Writing this allow to have something variable but i'm unsure about the real reaction needed for Mpg mode.
I have try to use without success :
halui.feed-override.count-enable (bit, in)
halui.feed-override.counts (s32, in) - counts * scale = FO
halui.feed-override.direct-value (bit, in)
halui.feed-override.scale (float, in)
If you can it is rather better to use the motion jogging pins rather than halui.
Halui is a user-space program. Motion (which creates the joint.... and axis.... HAL pins) runs in realtime so will react to inputs more dependably.
Though that probably doesn't matter as much when you are connecting via USB, which has its own issues.
Please Log in or Create an account to join the conversation.
Time to create page: 0.120 seconds