Arduino based USB Pendant for Linuxcnc

More
12 years 1 month ago #51629 by ArcEye
Hi

Just an update.

I have been using my pendant quite a lot recently.
I upgraded my big mill to Mesa 5i25 / 7i76 cards and hard wired the pendant I used to have connected to a parport card, into the 7i76 encoder and IO interfaces.

This means that on my small mill, which shares the same computer, I now have no other pendant option.

I have re-written some of the code.

The polling rate is increased to every 10th of a second and the baud rate increased to 115200

There is now a check on the data received and the LCD display is only updated when it differs from the previous data.

The jogging logic is slightly changed.
After selecting the jog velocity and enabling jog, a press on a direction arrow jogs until the button is pressed again, or the jog enable button is pressed.
The velocity can be changed mid jog without stopping, useful when you are nearing the target and want accuracy.

Overall the pendant is much more responsive and the display is rock steady.

I have zipped up the new code, the versions of the arduino libraries I used for keypad, LCD and serial ( because they have changed) and a config folder that runs a sim which interacts with the pendant.

Instructions for building and changing the code to match your particular arduino / jog increment requirements etc. remain the same as per earlier posts

regards
The following user(s) said Thank You: cparsons

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

More
11 years 5 months ago - 11 years 5 months ago #59130 by tome
Arceye,
I have a toolchanger board driven by an Arduino (nano) and I want to modify your serialcon2 component in order to send tool requests to the Arduino and receive tool change completed signal from the Arduino over USB. However I cannot get the component to build. I have the Linuxcnc-dev stuff installed but I do not have the "comp" program in order to put it my config directory and build it. I did do the other instructions I found on the net which is to put the .comp file into /linuxcnc-dev/src/hal/components/ and then make. But I get a failure that stdlib.h isn't found:

tom@EMCO-120P:~/linuxcnc-dev/src$ make
Reading 183/183 dependency files
Done reading dependencies
Creating serialcon2.mak
Reading 183/183 dependency files
Done reading dependencies
Preprocessing serialcon2.comp
MAKEFLAGS="" \
/usr/bin/python modsilent.py make KBUILD_EXTRA_SYMBOLS=/usr/realtime-3.4-9-rtai-686-pae/modules/Module.symvers -C /usr/src/linux-headers-3.4-9-rtai-686-pae SUBDIRS=`pwd` CC=gcc V=0 modules
make[1]: Entering directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
CC [M] /home/tom/linuxcnc-dev/src/objects/hal/components/serialcon2.o
make[1]: Leaving directory `/usr/src/linux-headers-3.4-9-rtai-686-pae'
/home/tom/linuxcnc-dev/src/objects/hal/components/serialcon2.c:30:20: fatal error: stdlib.h: No such file or directory
compilation terminated.
make[4]: *** [/home/tom/linuxcnc-dev/src/objects/hal/components/serialcon2.o] Error 1
make[3]: *** [_module_/home/tom/linuxcnc-dev/src] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make: *** [modules] Error 2

I re-ran ./configure just to be sure it could find things, and I can see /usr/include/stdlib.h exists but no luck. I also tried to edit the .comp file and make the include line: #include </usr/include/stdlib.h> which I know is ugly, and that still failed with the error above. What am I missing?

EDIT: I am building this on 2.7~pre6 on Debian Wheezy.

Thanks,
Tom
Last edit: 11 years 5 months ago by tome. Reason: typo

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

More
11 years 5 months ago #59131 by andypugh

tome wrote: I do not have the "comp" program in order to put it my config directory and build it.


Try "halcompile" we changed the name of "comp" because that had a name-clash with something else, and was popping up a really bad bit of advice.
The following user(s) said Thank You: Tchefter

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

More
11 years 5 months ago #59132 by tome

andypugh wrote:

tome wrote: I do not have the "comp" program in order to put it my config directory and build it.


Try "halcompile" we changed the name of "comp" because that had a name-clash with something else, and was popping up a really bad bit of advice.


Andy, Thanks that works!

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

More
10 years 9 months ago #68710 by ymilord
Awesome project!

But I am running into a issue. I have everything on the HAL side configured. I have the AVR side compiled and flashed. But nothing happens on the LCD screen on the the arduino. But when I screen /dev/ttyUSB0 and manually pass "X-0.123" that appears on the screen. Then I connected another arduino that is setup up as a serial debugger (as in it displays raw values that being send via it serial connection to the connected lcd screen) looks like nothing is being sent from the LinuxCNC side. I've double/tripled checked the *.hal/serialcon2 files and they match the ones provided here. And no errors are being thrown when LinuxCNC launches. Just simply no data is being passed.

I've tested this with the latest dev build of LinuxCNC (fresh install) and also MachineKit (also a fresh install). Both compiled the serialcon2 with no errors and installed it in /usr/bin/. Both launch with no errors. Once again no data is being passed.

Anyone have any suggestions on what else I can check that I may have missed?

Thanks in advance.

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

More
10 years 9 months ago #68741 by ArcEye
If you have not changed the module or the Arduino script, the only place the error can be is in your hal file.

The fact you can send a string which is displayed on the LCD rules out the Arduino script and your having selected the wrong port designation.

Please attach your hal file

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

Time to create page: 0.084 seconds
Powered by Kunena Forum