WHB04B-4 Lead Switch Issue
- slammers
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
08 Oct 2021 15:56 #222557
by slammers
WHB04B-4 Lead Switch Issue was created by slammers
I recently purchased a WHB04B-4 pendant. The majority of it works using LinuxCNC 2.8 except the lead function. When I turn the step rotary switch to lead, it does not produce the desired results.
I looked at the source code for this user component and it seems the issue is the lead switch position uses a different code for the 4 axis version of the pendant vs the 6 axis.
This link says that this issue was fixed and merged into the code in May, but the current version in github does not seem to conatain this change
github.com/LinuxCNC/linuxcnc/pull/987
Looking at the USB event, my device uses code 0x9B instead of 0x1C for the lead as shown in the current source code.
Does anyone know if this has been implemented and if so, how does one get the latest version that would contain this fix?
If its not released, is there any good instructions on how I can compile this module myself?
Thanks
Shawn
I looked at the source code for this user component and it seems the issue is the lead switch position uses a different code for the 4 axis version of the pendant vs the 6 axis.
This link says that this issue was fixed and merged into the code in May, but the current version in github does not seem to conatain this change
github.com/LinuxCNC/linuxcnc/pull/987
Looking at the USB event, my device uses code 0x9B instead of 0x1C for the lead as shown in the current source code.
Does anyone know if this has been implemented and if so, how does one get the latest version that would contain this fix?
If its not released, is there any good instructions on how I can compile this module myself?
Thanks
Shawn
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
08 Oct 2021 22:41 #222600
by andypugh
Replied by andypugh on topic WHB04B-4 Lead Switch Issue
Which version of LinuxCNC are you running? I think that change should have made it in to 2.8.2.
You might need to refresh synaptic for it to notice the 2.8.2 version.
Which OS are you using? I might have forgotten to update the repo index.
You might need to refresh synaptic for it to notice the 2.8.2 version.
Which OS are you using? I might have forgotten to update the repo index.
Please Log in or Create an account to join the conversation.
- slammers
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
09 Oct 2021 02:21 #222622
by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
2.8.2. I just downloaded and installed it a month ago.
I downloaded the souce code and this issue still exits in version 2.9.
I was able to make the change and recompile version 2.82 and fixed the issue.
I downloaded the souce code and this issue still exits in version 2.9.
I was able to make the change and recompile version 2.82 and fixed the issue.
Please Log in or Create an account to join the conversation.
- alkabal
- Offline
- Platinum Member
Less
More
- Posts: 476
- Thank you received: 52
09 Oct 2021 09:37 #222625
by alkabal
Replied by alkabal on topic WHB04B-4 Lead Switch Issue
Hello
Sorry if the actual patch does not work fine this is strange for me because i have test both situation.
If you have a working patch allowing the two value to be accepted, please can you ask a PR.
Best regards
Sorry if the actual patch does not work fine this is strange for me because i have test both situation.
If you have a working patch allowing the two value to be accepted, please can you ask a PR.
Best regards
Please Log in or Create an account to join the conversation.
- slammers
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
09 Oct 2021 12:36 - 09 Oct 2021 12:55 #222633
by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
Oh, I now see where you changed the code. Not sure why that does not work for me.
I just changed line 335 in pendant.cc to use the other code and that works
lead(0x1c, "Lead", ""), => lead(0x9b, "Lead", ""),
I can try and add some debugging info to see why your code is not executed for me.
I just changed line 335 in pendant.cc to use the other code and that works
lead(0x1c, "Lead", ""), => lead(0x9b, "Lead", ""),
I can try and add some debugging info to see why your code is not executed for me.
Last edit: 09 Oct 2021 12:55 by slammers.
Please Log in or Create an account to join the conversation.
- alkabal
- Offline
- Platinum Member
Less
More
- Posts: 476
- Thank you received: 52
09 Oct 2021 20:26 #222684
by alkabal
Replied by alkabal on topic WHB04B-4 Lead Switch Issue
Your welcome, all patch and correction can be really appreciated.
Please Log in or Create an account to join the conversation.
- slammers
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
10 Oct 2021 15:39 #222757
by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
I see you patched these two functions
void Pendant::dispatchFeedEventToHandwheel(const KeyCode& feed, bool isActive)
void Pendant::dispatchActiveFeedToHal(const KeyCode& feed, bool isActive)
When I look at the value of key.code when I turn the knob to lead, the value is always 0x00 so your || condition key.code == 0x96 is never true
I think line 337 in FeedRotaryButtonCodes::FeedRotaryButtonCodes() :
undefined(0x00, "", ""),
sets the key code to 0x00 because 0x9B is not in the table for permisable values.
Shawn
void Pendant::dispatchFeedEventToHandwheel(const KeyCode& feed, bool isActive)
void Pendant::dispatchActiveFeedToHal(const KeyCode& feed, bool isActive)
When I look at the value of key.code when I turn the knob to lead, the value is always 0x00 so your || condition key.code == 0x96 is never true
I think line 337 in FeedRotaryButtonCodes::FeedRotaryButtonCodes() :
undefined(0x00, "", ""),
sets the key code to 0x00 because 0x9B is not in the table for permisable values.
Shawn
Please Log in or Create an account to join the conversation.
- slammers
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
10 Oct 2021 16:04 - 10 Oct 2021 16:06 #222761
by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
I made changes like in the following files and it seems to work for me. I renamed pendant.cc to pendant.txt as the forums do not allow .cc files for some reason.
Shawn
Shawn
Attachments:
Last edit: 10 Oct 2021 16:06 by slammers.
Please Log in or Create an account to join the conversation.
- bally123
- Offline
- Senior Member
Less
More
- Posts: 48
- Thank you received: 5
12 Nov 2023 16:39 - 12 Nov 2023 16:40 #285178
by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
Hi Slammers
I'm facing very similar issues with my wh04b-4, I would greatly appreciate it if you can help me figure out how to compile this driver. I want to make to various changes to the source. I'm happy enough with making the changes - its the compile process that's new to me.
Thanks Bally
I'm facing very similar issues with my wh04b-4, I would greatly appreciate it if you can help me figure out how to compile this driver. I want to make to various changes to the source. I'm happy enough with making the changes - its the compile process that's new to me.
Thanks Bally
Last edit: 12 Nov 2023 16:40 by bally123.
Please Log in or Create an account to join the conversation.
- slammers
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
12 Nov 2023 17:35 - 12 Nov 2023 17:38 #285184
by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
What is I just give your the compiled file? I guess that would only work if you are using the same revision of LinuxCNC that I have. Which is 2.8.
Last edit: 12 Nov 2023 17:38 by slammers.
Please Log in or Create an account to join the conversation.
Time to create page: 0.185 seconds