Adding custom buttons

More
16 Jul 2018 19:08 #114333 by Ralf
Adding custom buttons was created by Ralf
This might be a mind numbingly stupid question, and I may have overlooked something very obvious in the countless ways I have searched google, so please bear with me, I'm rather new to LinuxCNC, when the usage goes beyond just starting it up get it to process g-code.

How do I add a button to the GUI, that let's me touch off the current coordinate system to a known offset?
.. or executing some custom g-code for that matter..

I have added a camera to my mill, and I would like a simple solution to touch off the workpiece, with a known offset. Even just adding custom default values other than 0.0 to the touch off dialog, would do the trick.

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

More
16 Jul 2018 20:27 #114336 by Grotius
Replied by Grotius on topic Adding custom buttons
Hi start using some g-code with mdi input.

G38.2 Probe toward workpiece, stop on contact, signal error if failure
G38.3 Probe toward workpiece, stop on contact
G38.4 Probe away from workpiece, stop on loss of contact, signal error if failure
G38.5 Probe away from workpiece, stop on loss of contact

complete g-code line example :
G38.3 Z-100 F500 (height measuring with probe)
G10 L20 P1 Z-10 (correction to z height value)

Good luck.

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

More
16 Jul 2018 21:28 #114341 by cmorley
Replied by cmorley on topic Adding custom buttons
A gladevcp panel embedded into AXIS is the usual way.
linuxcnc.org/docs/2.7/html/gui/gladevcp....d_action_mdi_widgets

Chris M
The following user(s) said Thank You: Ralf

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

More
16 Jul 2018 21:33 #114342 by MaHa
Replied by MaHa on topic Adding custom buttons
If you have a centering camera, this might help

forum.linuxcnc.org/48-gladevcp/30587-cam...essie?start=10#87728
The following user(s) said Thank You: Ralf

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

More
17 Jul 2018 09:51 #114358 by Ralf
Replied by Ralf on topic Adding custom buttons
Thanks, I'll have a look at both.

For some reason though, either CamPY, glade or qv4l2 isn't stable on my setup, seems like the video dies, and glade throws a "g_object_ref: assertion `object->ref_count > 0' failed".

But I can get video in a in a tab using mplayer, so this is less of an issue for now.

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

More
20 Jul 2018 22:59 #114618 by lorenzn
Replied by lorenzn on topic Adding custom buttons
I used mplayer too. -vf rectangle can be used to draw the center lines. I'm using the camera to touch off also connected it to the sheet align subroutine to set the rotation. I tested it in a tab in the Axis UI but prefer the separate window.
#!/bin/sh

#draw vertical and horizontal center lines with two rectangles

x=1280
y=720

fps=14

xh=$(($x/2))
yh=$(($y/2))

mplayer tv:// -tv driver=v4l2:width=$x:height=$y -fps $fps -vf rectangle=$xh:$y:0:0,rectangle=$x:$yh:0:0,rotate=0,mirror  > /dev/null &

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

Time to create page: 0.120 seconds
Powered by Kunena Forum