Hello Guest it is December 14, 2024, 10:54:28 AM

Author Topic: ON/OFF buttons  (Read 7974 times)

0 Members and 1 Guest are viewing this topic.

ON/OFF buttons
« on: September 02, 2009, 03:01:22 AM »
Greetings.

Is there a way that I could create seperate "on" and "off" buttons for various functions?
For example, I want to assign different keyboard shortcuts to "Optional Stop" so that one button will turn it on, and another will turn it off. This is so that I can use a hardware switch connected to a keyboard encoder. I would rather not use the toggle fuction that that button already uses.
Looking at the screen designer software, it apears that for that function (op stop) there is only a toggle on/off via the same button.
Could someone point me in the direction to find my solution please.

Jon

Offline zealous

*
  •  489 489
  • HI!
    • Artsoft Solutions
Re: ON/OFF buttons
« Reply #1 on: September 09, 2009, 10:45:39 AM »
You can check the state of Optional stop in VB

'turn off M01 bnt
Code: [Select]
if getOEMLED(65)=true Then
'Optional stop is on turn it off
DoOEMButton(177)
End If

'turn on M01 bnt
Code: [Select]
if getOEMLED(65)=false Then
'Optional stop is off turn it on
DoOEMButton(177)
End If

Re: ON/OFF buttons
« Reply #2 on: September 15, 2009, 09:05:08 PM »
Yeah, that works!
Just had to add onother button so that there is one for off, and one for on.

Now, the other buttons......

Does anyone know the OEM code for Single Block/Step. I cant see it in the list of OEM codes.

Offline ger21

*
  • *
  •  6,295 6,295
    • The CNC Woodworker
Re: ON/OFF buttons
« Reply #3 on: September 15, 2009, 09:53:10 PM »
82
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: ON/OFF buttons
« Reply #4 on: September 15, 2009, 10:01:52 PM »
Thanks.

But, isnt 82 for the LED?

Offline ger21

*
  • *
  •  6,295 6,295
    • The CNC Woodworker
Re: ON/OFF buttons
« Reply #5 on: September 15, 2009, 10:07:34 PM »
Oops, thought that was what you wanted. Try 1004.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: ON/OFF buttons
« Reply #6 on: September 17, 2009, 07:30:38 AM »
Yeap. Thats the one. Thanks