Arduino based USB Pendant for Linuxcnc

More
10 years 1 month ago - 10 years 1 month ago #80565 by Tchefter

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 ;) THANK YOU - God bless!
Last edit: 10 years 1 month ago by Tchefter.

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

More
10 years 1 month ago - 10 years 1 month ago #80859 by Tchefter
Since I have to wait 3-4 weeks on the 7-segment displays, to build my external DRO, I thought I build the equivalent of ArcEye's Pendant also because all the material was in the drawer. The first test went well. Now I must learn as I adjust the fields on the keypad for me and as I have the DRO display on the counterpart and in Axis at the right side. The housing consists of 4 parts 8mm black MDF. The bottom and the lid are 6mm Plexiglas.
I have installed a red / green LED: red Estop is free, green machine is on :)
Thanks again! :)
Last edit: 10 years 1 month ago by Tchefter.

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

More
10 years 1 month ago #80869 by Rick G
Looking Good!

Rick G
The following user(s) said Thank You: Tchefter

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

More
10 years 1 month ago #80890 by ArcEye
Very good, looks like 'The Science Museum' version of my pendant, cut away to show the workings. :laugh:
The following user(s) said Thank You: Tchefter

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

More
10 years 1 month ago - 10 years 1 month ago #80966 by Tchefter
Hello :)
i want use some MDI Commands on the Keypad.
My Thoughts where, change the output for the LCD in the INO File like this:
Code:
case '*': // MDI 1 if(!bEstop && bMachine) { Serial.write('1'); lcd.setCursor(13, 2); lcd.print("XY-0 "); } break; case '0': // MDI 2 if(!bEstop && bMachine) { Serial.write('2'); lcd.setCursor(13, 2); lcd.print("Z-0 "); } break; case '#': // MDI 3 if(!bEstop && bMachine) { Serial.write('3'); lcd.setCursor(13, 2); lcd.print("CAM OFF"); } break;

and in the serialcon2 like this:
Code:
case '1': system("halcmd setp halui.mdi-command-01 1"); system("halcmd setp halui.mdi-command-02 0"); system("halcmd setp halui.mdi-command-05 0"); break; case '2': system("halcmd setp halui.mdi-command-01 0"); system("halcmd setp halui.mdi-command-02 1"); system("halcmd setp halui.mdi-command-05 0"); break; case '3': system("halcmd setp halui.mdi-command-01 0"); system("halcmd setp halui.mdi-command-02 0"); system("halcmd setp halui.mdi-command-05 1"); break;

Must i add the Commands in my postguil.hal like this ?
Code:
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-

Or w/o the <=

This is my current custom_postgui.hal
Code:
# Benutzerdefinierte HAL-Anweisungen können nachfolgend angegeben werden # Die Befehle in dieser Datei werden nach der AXIS GUI (und PyVCP-Panel) ausgeführt. loadusr -W serialcon2 net Xpos halui.axis.0.pos-relative serialcon2.xposition net Ypos halui.axis.1.pos-relative serialcon2.yposition net Zpos halui.axis.2.pos-relative serialcon2.zposition loadrt mult2 addf mult2.0 servo-thread setp mult2.0.in1 60 net vel-sec <= motion.current-vel => mult2.0.in0 net vel-min <= mult2.0.out => pyvcp.mmmin sets spindle-at-speed true net remote-rapid-to-home halui.mdi-command-00 <= pyvcp.rapid-to-home net remote-xy-home halui.mdi-command-01 <= pyvcp.xy-home net remote-z-home halui.mdi-command-02 <= pyvcp.z-home net remote-fraeser0+ halui.mdi-command-03 <= pyvcp.fraeser0+ net remote-fraeser0 halui.mdi-command-04 <= pyvcp.fraeser0 net remote-fraeser0- halui.mdi-command-05 <= pyvcp.fraeser0- net remote-x halui.mdi-command-06 <= pyvcp.x net remote-y halui.mdi-command-07 <= pyvcp.y net remote-z halui.mdi-command-08 <= pyvcp.z net remote-xyz halui.mdi-command-09 <= pyvcp.xyz net Xpos halui.axis.0.pos-relative <= pyvcp.Xpos net Ypos halui.axis.1.pos-relative <= pyvcp.Ypos net Zpos halui.axis.2.pos-relative <= pyvcp.Zpos

And the [Halui] Section in my .ini File
Code:
[HALUI] # HalUI-MDI-Befehle hier einfügen (max. 64) MDI_COMMAND = G0 X0 Y0 Z0 MDI_COMMAND = G0 X0 Y0 MDI_COMMAND = G0 Z0 MDI_COMMAND = G0 X18.789 Y94.072 MDI_COMMAND = G0 X0 Y0 MDI_COMMAND = G0 X-18.789 Y-94.072 MDI_COMMAND = G92 X0 MDI_COMMAND = G92 Y0 MDI_COMMAND = G92 Z0 MDI_COMMAND = G92 X0 Y0 Z0

Thanks for your understanding :)

Greetings Fritz
Last edit: 10 years 1 month ago by Tchefter.

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

More
10 years 1 month ago #80970 by ArcEye
You can change the LCD output and the actual command activated to whatever you like.

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");

The following user(s) said Thank You: Tchefter

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

Time to create page: 0.436 seconds
Powered by Kunena Forum