Help, Arduino based control panel for Linuxcnc.

More
7 years 4 months ago #138099 by Robban
Hi,
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
Code:
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 to join the conversation.

More
7 years 4 months ago #138106 by pl7i92
hi you better use pins in the comp to set things then using system halcmd

like here

Code:
# 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") c.newpin("estop_activate",hal.HAL_BIT,hal.HAL_IN) c.newpin("estop_reset",hal.HAL_BIT,hal.HAL_IN) c.newpin("estop_is_activated",hal.HAL_BIT,hal.HAL_IN)

Please Log in to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum