WHB04B-4 Lead Switch Issue

More
12 Nov 2023 17:55 #285186 by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
Hi 

That would be appreciated and my working machine is on 2.8. 

But ultimately I'd really like to be developing the source code to suit my needs going forward. In addition to the lead switch I want to change other things. 

I created a topic earlier regarding all my issues and thoughts, then found this topic later on.

forum.linuxcnc.org/24-hal-components/506...ues-and-improvements

My SIM machine is on 2.9 and it's only a matter of time before I move to that so being able to compile my changes is really the ideal situation.

But in meantime yes I would glady appreciate your file.

Thanks Bally

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

More
12 Nov 2023 18:00 #285188 by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
Have you read the help on compiling LinuxCNC? This should be all you need. These are the instructional I followed.

linuxcnc.org/docs/master/html/code/building-linuxcnc.html

The only real headache was the step

dpkg-checkbuilddeps

as there were tons of dependacies I had to add to my system. Both once they are all installed the build process worked fine.

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

More
13 Nov 2023 08:52 #285241 by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
I had a read last night, will look at that some more this week and begin to work through it.

Lots of questions are springing up as I read due to unfamiliarity, but it's a place to start from. 

Id really appreciate it if I can have your compiled file, I can  verify the improvements you made and have an easier time on the machine until I get to a point where I'm implementing my own additional changes.

Thanks for your help... 

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

More
13 Nov 2023 15:50 #285272 by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
Sure, this file should go in the /usr/bin driectory

hopefully it works for you,

I think you should be able to run it from a terminal window

xhc-whb04b-6 -ue

and it will print out events when you press buttons on the pendant. 
 
Attachments:

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

More
20 Nov 2023 18:47 - 20 Nov 2023 19:31 #286079 by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
Hi Slammers

I have installed a RIP linuxcnc system.(V2.9)   I now have the pendant driver terminal test mode working. I have added a few changes to pendant.cc and used a make command to recompile linuxcnc.

regards implementing these changes- did you compile just the driver or do a make linuxcnc ?

If there's a way to compile just the driver could you help me with the terminal commands and make file?

In terminal I attempted to  make the driver and obviously got an error, no rule to make target. I believe I need a make file - but I am a bit out of my depth here in terms of the content and syntax . I guess the submake file will give me some clues as to the content of the makefile ?

Thanks for the driver file - I will try that on my 2.8 machine later
 
Cheers Bally

 
Last edit: 20 Nov 2023 19:31 by bally123.

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

More
20 Nov 2023 20:07 #286093 by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
Hi slammers

I tried your file but got an error trying to run the driver from terminal and same opening linuxcnc. 

Permission denied.

I simply renamed the existing file in bin and pasted your file. 

Any ideas?

Cheers Andy 
 

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

More
21 Nov 2023 01:11 - 21 Nov 2023 01:13 #286128 by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
Did you check the file permisions are correct? It needs to have execute permisions. Use chmod to set the permissions the same as the file you renamed.

I think you can compile just a particular component but its been a long time and i do not remember how to do it, I will have to try and figure it out.
Last edit: 21 Nov 2023 01:13 by slammers.

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

More
21 Nov 2023 01:22 #286129 by slammers
Replied by slammers on topic WHB04B-4 Lead Switch Issue
I think you can just do the following

cd into src directory then

make ../bin/xhc-whb04b-4

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

More
21 Nov 2023 08:39 #286146 by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
Hi Slammers

I will try the permissions setting later on - thanks

Regards the make instruction - I get this error :   make: *** No rule to make target '../bin/xhc-whb04-6'

I don't see a makefile in the folders - which i think is the problem.

Cheers Andy

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

More
21 Nov 2023 20:29 #286193 by bally123
Replied by bally123 on topic WHB04B-4 Lead Switch Issue
Hi Slammers

I sorted the permissions and got the terminal test running on my mill - V2.8 but unfortunately the lead mode still stays inactive - I was a little surprised so i downloaded your file again and ran through the process again just in case i had somehow mixed up the original file - but again no change, it appears that file you posted doesn't respond to 0x9b (lead position code)  - is it possible that was the original code you not your recompiled version?

On my V2.9 linuxcnc sim PC I made the change to 0x9b in pendant.cc - compiled linuxcnc and verified lead mode is now active   - so that's a good start.  I Just need to figure out how to compile the driver rather than everything.

In the meantime I am thinking I might just try my newly complied driver from 2.9 on my 2.8 machine - if it works then at least I can patch my development from 2.9 to 2.8 - and mean being less reliant on your time / help.

Appreciate any thoughts on why your file might not have changed the operation.

Cheers for all your help so far, its greatly appreciated.

 

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

Time to create page: 0.186 seconds
Powered by Kunena Forum