Help, Arduino based control panel for Linuxcnc.

28 Jun 2019 08:06 #138099 by Robban
Trying to make a control panel with Arduino based on the code for Arduino based USB Pendant for Linuxcnc
I think i having some trouble with the connection to linuxcnc.
Trying to use this code for a Emco 120 control panel but i cant get it to work, using the original serialcon file and have checked that i have the right port, also added the necessary code in the postgui.hal file
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
Have removed the lcd code from it and done so i can send the commands via the serialmonitor.
I have also made so i can see the x y position in the serial monitor so i know it works from linuxcnc to the Arduino
I can see the serialcon pins in the Hal configuration.
Can someone help me to see whats wrong.
In the serial monitor i try to send ..
"D" Estop on/off
"9" Machine on/off
"7" Home all
..and so on, but nothing happens.
Adding the arduino and original serialcon.comp file

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

28 Jun 2019 10:20 #138106 by pl7i92
hi you better use pins in the comp to set things then using system halcmd

like here

# search your /dev for the port 
PORT = "/dev/ttyUSB0"
ser = serial.Serial(PORT, 9600)

#Now we create the HAL component and its pins
c = hal.component("pendant")

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

Time to create page: 0.168 seconds
Powered by Kunena Forum