Arduino based USB Pendant for Linuxcnc

More
23 Jan 2016 16:50 #68979 by ymilord
Hrmm. But me manually sending values @ 115200 works. So that means the the arduino side (the sketch and the libraries) is working correctly?

I changed both ends to 9600 and same deal.

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

More
23 Jan 2016 17:24 #68982 by ArcEye
What does tail -f /var/log/messages show when you plug in the pendant?

What does the pendant LCD display when you plug it in?

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

More
23 Jan 2016 17:26 - 23 Jan 2016 17:28 #68984 by ymilord
Jan 23 17:25:19 beaglebone kernel: [ 4244.066373] usb 1-1: new full-speed USB device number 3 using musb-hdrc
Jan 23 17:25:19 beaglebone kernel: [ 4244.186197] usb 1-1: New USB device found, idVendor=1a86, idProduct=7523
Jan 23 17:25:19 beaglebone kernel: [ 4244.186207] usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Jan 23 17:25:19 beaglebone kernel: [ 4244.186217] usb 1-1: Product: USB2.0-Serial
Jan 23 17:25:19 beaglebone kernel: [ 4244.187133] ch341 1-1:1.0: ch341-uart converter detected
Jan 23 17:25:19 beaglebone kernel: [ 4244.188609] usb 1-1: ch341-uart converter now attached to ttyUSB0

Just 'X:*'

Last edit: 23 Jan 2016 17:28 by ymilord.

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

More
23 Jan 2016 17:30 #68985 by ArcEye

Just 'X:*'


It should display
X: * 0000.000
Y:   0000.000
Z:   0000.000

If that is all you get, there is something wrong the arduino end

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

More
23 Jan 2016 17:33 #68986 by ArcEye
No sorry, that is after the first cycle

Should be
X: *
Y:
Z:

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

More
23 Jan 2016 17:34 #68987 by ymilord
The sketch is unaltered. I've installed the IDE (separate install from my main copy) on my local machine then this morning I created a VM with only the libraries in the ZIP.

Well All three axis. But when it connects it places a "*" after the ":".

What is the prefix that HAL is sending to the AVR? via screen /dev/ttyUSB0 I can do "Y-0.1234" it populates the X: axis field with value specified.

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

More
23 Jan 2016 17:35 #68988 by ymilord
Yeah exactly.

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

More
23 Jan 2016 17:40 - 23 Jan 2016 17:41 #68989 by ArcEye
From serialcon2.comp
	    bzero(buffer, 50); 
            sprintf(buffer, "X%08.03fY%08.03fZ%08.03f", xposition, yposition, zposition);
            write(fd, buffer, sizeof(buffer));

So if you send "X1000.999Y2000.888Z3000.777"

That should populate those axes with those values
Last edit: 23 Jan 2016 17:41 by ArcEye.

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

More
18 Sep 2016 11:22 - 18 Sep 2016 11:24 #80554 by Tchefter
Hi @all :)
can someone tell me what USB Device i put in the serialcon?

Sep 18 13:10:45 v3 kernel: [ 434.312142] usb 7-1: new full-speed USB device number 4 using uhci_hcd
Sep 18 13:10:46 v3 kernel: [ 434.518175] usb 7-1: New USB device found, idVendor=2341, idProduct=0043
Sep 18 13:10:46 v3 kernel: [ 434.518183] usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=220
Sep 18 13:10:46 v3 kernel: [ 434.518190] usb 7-1: Manufacturer: Arduino (www.arduino.cc)
Sep 18 13:10:46 v3 kernel: [ 434.518201] usb 7-1: SerialNumber: 5543131373735170A212
Sep 18 13:10:46 v3 kernel: [ 434.521254] cdc_acm 7-1:1.0: ttyACM0: USB ACM device
Sep 18 13:10:46 v3 mtp-probe: checking bus 7, device 4: "/sys/devices/pci0000:00/0000:00:1d.1/usb7/7-1"
Sep 18 13:10:46 v3 mtp-probe: bus: 7, device: 4 was not an MTP device

After reboot my PC this changes ever +1 usb 7-1: i.e. usb 5-1 / usb 6-1 etc...

I'm using LinuxCNC 2.7.7 on Wheezy.
I want to use only the DRO output no Key Functions or anything.
I changed the Arduino sketch without Keypad. Baudrate i d'ont changed.

Is this Installation from serialcon correct? (i'm not a Linux spec :unsure: )

fh@v3:~/linuxcnc/configs/CNCV3$ sudo comp install serialcon2.comp
sudo: comp: command not found
fh@v3:~/linuxcnc/configs/CNCV3$ sudo halcompile --install serialcon2.comp
gcc -Os -g -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI -Os -o serialcon2 /tmp/tmpLNBXUM/serialcon2.c -Wl,-rpath,/lib -L/lib -llinuxcnchal

Or must there a lot more?
I put this in my costum_postgui.hal

loadusr -W serialcon
....
net Xposition halui.axis.0.pos-relative serialcon.xposition
net Yposition halui.axis.1.pos-relative serialcon.yposition
net Zposition halui.axis.2.pos-relative serialcon.zposition

No more Files where attached...

Greetings Fritz
Last edit: 18 Sep 2016 11:24 by Tchefter.

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

More
18 Sep 2016 11:35 #80555 by andypugh
I seem to recall that USB devices also show up somewhere else on /dev by serial number.
That might be less mutable.
The following user(s) said Thank You: Tchefter

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

Time to create page: 0.105 seconds
Powered by Kunena Forum