Arduino based USB Pendant for Linuxcnc
28 May 2015 05:01 #59131
by andypugh
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.
Replied by andypugh on topic Arduino based USB Pendant for Linuxcnc
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.
28 May 2015 05:07 #59132
by tome
Andy, Thanks that works!
Replied by tome on topic Arduino based USB Pendant for Linuxcnc
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.
18 Jan 2016 18:49 #68710
by ymilord
Replied by ymilord on topic Arduino based USB Pendant for Linuxcnc
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.
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.
19 Jan 2016 09:13 #68741
by ArcEye
Replied by ArcEye on topic Arduino based USB Pendant for Linuxcnc
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
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.
19 Jan 2016 11:02 #68750
by ymilord
Replied by ymilord on topic Arduino based USB Pendant for Linuxcnc
The HAL used was the example provided in the zip (unaltered)
Please Log in or Create an account to join the conversation.
19 Jan 2016 12:32 - 19 Jan 2016 12:32 #68751
by ArcEye
Replied by ArcEye on topic Arduino based USB Pendant for Linuxcnc
Start the config, look at Machine > Hal Configuration, check to see the component and its pins are connected to halui.
Then watch those pins and see the values changing as you move the axes in the sim.
If that works, it must be your connection, check the physical connection and that your Arduino actually uses /dev/ttyUSB0
AND that the device exists in /dev. udev might not have detected it and created the port for some reason.
A lot of Arduinos use different ports, but you should have seen which port it was on when you flashed it.
Then watch those pins and see the values changing as you move the axes in the sim.
If that works, it must be your connection, check the physical connection and that your Arduino actually uses /dev/ttyUSB0
AND that the device exists in /dev. udev might not have detected it and created the port for some reason.
A lot of Arduinos use different ports, but you should have seen which port it was on when you flashed it.
Last edit: 19 Jan 2016 12:32 by ArcEye.
Please Log in or Create an account to join the conversation.
19 Jan 2016 14:30 #68759
by ArcEye
Replied by ArcEye on topic Arduino based USB Pendant for Linuxcnc
From a terminal
tail -f /var/log/messages
Plug in your pendant and you should get an output like this
I think this one has an ATMega arduino inside it.
Just brought the pendant up from the workshop, compiling etc.
Should have test results soon.
tail -f /var/log/messages
Plug in your pendant and you should get an output like this
Jan 19 14:25:30 INTEL-i7 kernel: [19814.122134] usb 4-1.5: new full-speed USB device number 9 using ehci-pci
Jan 19 14:25:30 INTEL-i7 kernel: [19814.220941] usb 4-1.5: New USB device found, idVendor=0403, idProduct=6001
Jan 19 14:25:30 INTEL-i7 kernel: [19814.220946] usb 4-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 19 14:25:30 INTEL-i7 kernel: [19814.220948] usb 4-1.5: Product: FT232R USB UART
Jan 19 14:25:30 INTEL-i7 kernel: [19814.220949] usb 4-1.5: Manufacturer: FTDI
Jan 19 14:25:30 INTEL-i7 kernel: [19814.220951] usb 4-1.5: SerialNumber: A80090Oa
Jan 19 14:25:30 INTEL-i7 kernel: [19814.223355] ftdi_sio 4-1.5:1.0: FTDI USB Serial Device converter detected
Jan 19 14:25:30 INTEL-i7 kernel: [19814.223388] usb 4-1.5: Detected FT232RL
Jan 19 14:25:30 INTEL-i7 kernel: [19814.223735] usb 4-1.5: FTDI USB Serial Device converter now attached to ttyUSB0
Jan 19 14:25:30 INTEL-i7 mtp-probe: checking bus 4, device 9: "/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.5"
Jan 19 14:25:30 INTEL-i7 mtp-probe: bus: 4, device: 9 was not an MTP device
I think this one has an ATMega arduino inside it.
Just brought the pendant up from the workshop, compiling etc.
Should have test results soon.
Please Log in or Create an account to join the conversation.
19 Jan 2016 15:03 #68760
by ArcEye
Replied by ArcEye on topic Arduino based USB Pendant for Linuxcnc
I have used the files from the .zip on page 5
forum.linuxcnc.org/media/kunena/attachme.../arduino-pendant.zip
Running under Machinekit because that was what I had installed, minimal alterations to core_sim.hal file, just to load tp and declare kins and tp in the EMCMOT line, and the pendant just works.
Axis
Pendant
Machine > Hal Configuration
Hopefully you will find your problem soon, my best guess has to be the port address, which is hard coded in the component.
regards
forum.linuxcnc.org/media/kunena/attachme.../arduino-pendant.zip
Running under Machinekit because that was what I had installed, minimal alterations to core_sim.hal file, just to load tp and declare kins and tp in the EMCMOT line, and the pendant just works.
Axis
Pendant
Machine > Hal Configuration
Hopefully you will find your problem soon, my best guess has to be the port address, which is hard coded in the component.
regards
Please Log in or Create an account to join the conversation.
23 Jan 2016 16:25 - 23 Jan 2016 16:27 #68973
by ymilord
Replied by ymilord on topic Arduino based USB Pendant for Linuxcnc
I reloaded MK (dev) and and used the setup in the zip you linked too. Verified in the config to see if it was set to how you mentioned above.. And the same thing. Nothing. The tty is somewhat hardcored. You can change it in the serialcon2 file before you compile it. But either way it's set to ttyUSB0 which is what the arduino is set to. But at any rate, from the machine that is running MK I can screen /dev/ttyUSB0 and manually send values to the display. (as a standard user. Not root) So between the Arduino (Uno, MEGA or a nano- I've tried all three) MK/LinuxCNC does not send the values to the display.
Once again it fires up with no errors.
Once again it fires up with no errors.
Last edit: 23 Jan 2016 16:27 by ymilord.
Please Log in or Create an account to join the conversation.
23 Jan 2016 16:44 #68977
by ArcEye
Replied by ArcEye on topic Arduino based USB Pendant for Linuxcnc
That mystifies me, the only other thing I can think of - the baud rate.
In the later zip the serialcon2 component sets the baud rate to maximum ie.
#define BAUDRATE B115200
It might be that your arduino cannot cope with that and is not receiving anything
Try setting it to minimum ie.
#define BAUDRATE B9600
The other possibility is that you did not use all the libraries in the zip to compile the arduino script.
The new libraries are different, that includes serial and you need to use the packaged ones.
In the later zip the serialcon2 component sets the baud rate to maximum ie.
#define BAUDRATE B115200
It might be that your arduino cannot cope with that and is not receiving anything
Try setting it to minimum ie.
#define BAUDRATE B9600
The other possibility is that you did not use all the libraries in the zip to compile the arduino script.
The new libraries are different, that includes serial and you need to use the packaged ones.
Please Log in or Create an account to join the conversation.
Time to create page: 0.309 seconds