Add button to turn on light (relay)

More
03 Oct 2022 19:36 #253373 by jlm123
Hey all:

LinuxCNC 2.8.4, Debian 10, Probe Basic, Mesa 7i76e card

I have a work light running through a relay controlled by the Mesa card.    In QT Dragon and Axis, I was able to create a button that turned the worklight on the mill on and off.   Any idea how to do this in Probe Basic? 

Thanks.

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

More
04 Oct 2022 01:11 #253402 by andypugh
The simple way might be just to connect it to the coolant style that you don't use (mist or flood)

There are probably more satisfying ways.

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

More
04 Oct 2022 14:08 #253446 by jlm123
Yeah, but I'm looking for the satisifaction.

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

More
05 Oct 2022 04:37 #253495 by rodw
have a look at how qtplasmac does it. It allows you to define a number of buttons...

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

More
13 Oct 2022 21:40 #254091 by jlm123
The progress so far:

I successfully added a hal button in QT Designer for the light.    However, when I add the line to the custom.hal file:
net Light => qtpyvcp.Light
I get a message that it can't find the qtpyvcp.Light pin.


 

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

More
20 Oct 2022 15:46 #254611 by jlm123
I figured it out.

If you follow the instructions to install the developement install of probe basic, the postgui hal file is time.hal (which should be in your machine config folder.

In qtdesigner, I created a hal button, made it checkable, and put in the "pinbasename" field "worklight"
in time.hal, I added the line
net Light =< qtpyvcp.worklight.checked.

in the machine hal file, I connected Light to the appropriate output of my mesa card.

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

Time to create page: 0.161 seconds
Powered by Kunena Forum