XHC-HB04 wireless MPG pendant HAL module

More
03 Oct 2013 03:20 #39492 by rmagnus
Hello .\
I pasted the exact MDI_COMMAND you kindly suggested, without knowing what to do with commands 0 to 5 so I left the ... after the = . Is that OK?

The goto zero button now works connected to the MDI 9

now the problem is that my pendant has no touch x , y and z buttons, instead it has a =0 button that is supposed to touch to zero the selected axis with the dial.

so the MDI 6, 7 and 8 commands dont work, if I try to uncomment the next lines it crashes....

#net x0 halui.mdi-command-06 xhc-hb04.button-x0
#net y0 halui.mdi-command-07 xhc-hb04.button-y0
#net z0 halui.mdi-command-08 xhc-hb04.button-z0

I have no idea how to make it work.

Thank you for your help!

Rodolfo

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

More
03 Oct 2013 03:39 #39493 by rmagnus
I was reading on this same thread that Tommy managed to use his =0 button but then ran into problems when he said
"But there is still a BIG issue with unwanted switching to joint mode when calling subroutine trough MDI_COMMAND"
And he with Andypough tried to fix it but I don´t know how it ended.

So I don´t know what to do next to make my =0 button work.

Thanks again

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

More
03 Oct 2013 18:50 #39503 by andypugh

"But there is still a BIG issue with unwanted switching to joint mode when calling subroutine trough MDI_COMMAND"


What sort of machine are you using? Unless you have a non-trivial kinematics loaded (like for a robot, or possibly a dual motor gantry) then you won't see that issue.
The following user(s) said Thank You: rmagnus

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

More
04 Oct 2013 02:54 #39513 by f1oat

I was reading on this same thread that Tommy managed to use his =0 button but then ran into problems when he said
"But there is still a BIG issue with unwanted switching to joint mode when calling subroutine trough MDI_COMMAND"
And he with Andypough tried to fix it but I don´t know how it ended.

So I don´t know what to do next to make my =0 button work.

Thanks again

You will need to build a HAL config file with AND component to handle the axis selection switch.
For this pendant, use xhc-hb04-layout2.ini layout definition file
If you modify your xhc-hb04.hal file as below, it should work:
loadusr -W xhc-hb04 -I xhc-hb04-layout2.ini -H
loadrt and2 count=3

....

# X=0, Y=0, Z=0 
net zero xhc-hb04.button-zero => and2.0.in0 and2.1.in0  and2.2.in0
net jog-x and2.0.in1
net jog-y and2.1.in1
net jog-z and2.2.in1

net x0 halui.mdi-command-06 <= and2.0.out
net y0 halui.mdi-command-07 <= and2.1.out
net z0 halui.mdi-command-08 <= and2.2.out
net origin halui.mdi-command-09 xhc-hb04.button-goto-zero

Sorry, I have no access to my machine to verify the syntax. Hope there are not too much mistakes !
Frederic.
The following user(s) said Thank You: rmagnus

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

More
04 Oct 2013 03:20 #39515 by rmagnus
My machine is a probotix comet so yes it has 2 motors for the y axis. Should I do something different?

Thank you!

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

More
04 Oct 2013 03:23 #39516 by rmagnus
I will try it and report back thanks!

So for the Probotix comet with 2 motors for the gantry what should I be aware of ? I don't want to damage it

Thank you

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

More
04 Oct 2013 04:08 #39517 by andypugh

ISo for the Probotix comet with 2 motors for the gantry what should I be aware of ? I don't want to damage it


Are you using trivkins or gantrykins?

Does the machine start up in Joint mode?

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

More
04 Oct 2013 04:43 #39519 by rmagnus
I have no idea! Probotix ships the machine ready to run so this is the first time I hear about that

Where do I look for. Excuse my ignorance

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

More
04 Oct 2013 19:06 #39537 by andypugh

Where do I look for. Excuse my ignorance


When you start the machine, are the axes referred to as 0,1,2,3 and do you then need to switch to World Mode after homing?

If no then you don't have a Joint Mode to worry about.
The following user(s) said Thank You: rmagnus

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

More
06 Oct 2013 09:16 #39592 by rmagnus
Hello Frederic

Thank you for the help.

I had problem implementing.

I did what you suggest but got this error:

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
Unrecognized line skipped: POC FMS LEN DIAM COMMENT
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/and2.ko': -1 File exists
xhc-hb04.hal:3: exit value: 1
xhc-hb04.hal:3: insmod failed, returned -1
See the output of 'dmesg' for more information.
2375
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


And if I comment the lone loadrt and2 count=3 I get this error.....

Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
Unrecognized line skipped: POC FMS LEN DIAM COMMENT
xhc-hb04.hal:52: Pin 'and2.0.in0' was already linked to signal 'switches-y1'
2076
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components


Please advice!

Thank you
Rodolfo

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

Time to create page: 0.239 seconds
Powered by Kunena Forum