- Posts: 197
- Thank you received: 0
Arduino based USB Pendant for Linuxcnc
it shows /dev/ttyACM0
So i changed this in serialcon to this
#define DEVICE "/dev/ttyACM0"
Should this be ok?
while nothing happens after:
fh@v3:~/linuxcnc/configs/CNCV3$ sudo halcompile --install serialcon2.comp
[sudo] password for fh:
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/tmp40WBeb/serialcon2.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
Greetings Fritz
EDIT: i test the Port with the simple Blink-Example, that works...
Please Log in to join the conversation.
So i changed this in serialcon to this
#define DEVICE "/dev/ttyACM0"
Should this be ok?
If that is the device port you are using, then it is correct.
/dev/ttyUSB0 is more normal, but depends on the board.
while nothing happens after:
fh@v3:~/linuxcnc/configs/CNCV3$ sudo halcompile --install serialcon2.comp
[sudo] password for fh:
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/tmp40WBeb/serialcon2.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
Don't understand what you are trying to say.
The print just shows you have compiled the component and installed it to /usr/bin probably.
However please be aware you have compiled a component called serialcon2, but your hal file is loading a component called
serialcon
loadusr -W serialcon
The name of the file and the component must be the same as each other
github.com/LinuxCNC/linuxcnc/blob/master...ls/halcompile.g#L958
because otherwise halcompile would fail.
So you probably are trying to load a component which does not exist, albeit you haven't actually said what the problem is.
Please Log in to join the conversation.
ArcEye wrote:
loadusr -W serialcon
The name of the file and the component must be the same as each other
github.com/LinuxCNC/linuxcnc/blob/master...ls/halcompile.g#L958
because otherwise halcompile would fail.
So you probably are trying to load a component which does not exist, albeit you haven't actually said what the problem is.
Holy Moly!!! I AM SO STUPID :ohmy: :ohmy: :ohmy: :lol:
Thank You ArcEye that was Problem, i forgot to change from serialcon to serialcon2
You made my Day
Please Log in to join the conversation.
I have installed a red / green LED: red Estop is free, green machine is on
Thanks again!
Please Log in to join the conversation.
Rick G
Please Log in to join the conversation.
Please Log in to join the conversation.
i want use some MDI Commands on the Keypad.
My Thoughts where, change the output for the LCD in the INO File like this:
and in the serialcon2 like this:
Must i add the Commands in my postguil.hal like this ?
Or w/o the <=
This is my current custom_postgui.hal
And the [Halui] Section in my .ini File
Thanks for your understanding
Greetings Fritz
Please Log in to join the conversation.
Must i add the Commands in my postguil.hal like this ?
net remote-xy-home halui.mdi-command-01 <= serialcon2.xy-home
net remote-z-home halui.mdi-command-02 <= serialcon2.z-home
net remote-fraeser0- halui.mdi-command-05 <= serialcon2.fraeser0-
No.
The 'pins' you are linking do not exist, the MDI commands are already being activated by specific setp inside serialcon.
eg
system("halcmd setp halui.mdi-command-01 1");
Please Log in to join the conversation.
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 to join the conversation.
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 to join the conversation.
