Arduino based USB Pendant for Linuxcnc
- Tchefter
-
- Offline
- Elite Member
-
- Posts: 196
- Thank you received: 32
Thats what i have tried, but no Response in LinuxCNC, only my Text on the LCD changes.The 'pins' you are linking do not exist, the MDI commands are already being activated by specific setp inside serialcon.
For my Understanding:
The Key i press sends the Arduino ie. "1" to serialcon2
serialcon2 sends i.e. MDI-Command-01 with 1 to postgui.hal
postguihal. Looks what "01" is and fire up the Command that stands in the [Halui] Section...
Is that correct on the whole?
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
The Key i press sends the Arduino ie. "1" to serialcon2
Correct
serialcon2 sends i.e. MDI-Command-01 with 1 to postgui.hal
Wrong, postgui.hal is just a file that is processed after the GUI is built, because pyvcp pins will not have been created
until then.
serialcon executes the command which changes the state of a halui pin
postguihal. Looks what "01" is and fire up the Command that stands in the [Halui] Section...
halui looks up the MDI command which relates to the number and executes that.
Please Log in or Create an account to join the conversation.
- anda
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
and in picture 2( that's what appear on the lcd when I start linuxcnc). I think it's a connection problem. Any advice? Thank you
Arduino pendant when I start linuxcnc
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
At the most basic level, make sure that the #define DEVICE= definition in serialcon2.comp is correct for your board, it needs to be whatever port you used to upload the arduino script arduinopendant.ino
Failing that, you need to attach all your config files (ini and hal), run with DEBUG=7 in your ini file and attach the debug output from stderr and linuxcnc.log
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
Hello Mr ArcEye. I tried a fresh install for arduino pendant, and I got: " Pin 'halui.axis.0-pos-relative' does not exist" .
In custom_postgui.hal I have to put only
"loadusr -W serialcon2
net Xposition halui.axis.0.pos-relative serialcon2.xposition
net Yposition halui.axis.1.pos-relative serialcon2.yposition
net Zposition halui.axis.2.pos-relative serialcon2.zposition" ? Thank you
Please don't send me personal emails, I am not going to answer them
halui.axis.0-pos-relative is a valid pin, but without your config files I am not going to guess whether you have even enabled HALUI
www.linuxcnc.org/docs/devel/html/gui/halui.html
Please Log in or Create an account to join the conversation.
- anda
- Offline
- New Member
-
- Posts: 2
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
Once right at the start of adna.hal, before any rt components have been loaded
loadusr -W serialcon2
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt pwmgen output_type=1
and then again in custom_postgui.hal
It should only be loaded once in custom_postgui.hal, after everything else is loaded.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23362
- Thank you received: 4964
Please Log in or Create an account to join the conversation.
- travis036
-
- Offline
- Elite Member
-
- Posts: 283
- Thank you received: 32
Very neat project!
~Travis
Please Log in or Create an account to join the conversation.
- travis036
-
- Offline
- Elite Member
-
- Posts: 283
- Thank you received: 32
I have a 4.3" Nextion display i was thinking of incorporating into a wireless (Xbee) pendant.
I haven't started building my CNC router yet, but my brain is still churning at the idea.

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