Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 01:09:03 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  FAQs
| | |-+  Toggling Outputs
Pages: 1   Go Down
Print
Author Topic: Toggling Outputs  (Read 436 times)
0 Members and 2 Guests are viewing this topic.
Joe@Majestic
Holding

Offline Offline

Posts: 1


View Profile
« on: September 07, 2010, 12:06:56 PM »

How do you toggle an output?

as it is right now the wiki shows output on/off 4-6 but no ability to toggle them

thank you

~Joe
Logged
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,261


Super Kitty.


View Profile WWW
« Reply #1 on: September 11, 2010, 02:57:43 AM »

Joe,

One way is to create a VB screen button and paste in the following code ;

If IsOutputActive(OUTPUT5) Then ‘Check to see if its on
DeActivateSignal(OUTPUT5) ‘Its on so turn it off
Else
ActivateSignal(OUTPUT5) ‘Its off so turn it on
End If

Obviously this is for Output #5 change for whichever output you wish to toggle.

Tweakie.

Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
jorber
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #2 on: September 28, 2010, 05:01:01 PM »

I am trying to make this script:

‘ Show the user the state of the Y HOME input
If IsActive(YHOME) Then
MsgBox “Y HOME is active”
Else
MsgBox “Y HOME  is inactive”
End If

But when I debugg it and I put the mouse over YHOME to see its value shows YHOME = "5" no matter if is active or inactive always the same then acts as always false the statement.
what wolbe happening here? Huh
Logged
jorber
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #3 on: September 28, 2010, 05:03:26 PM »

I am trying to make this script:

‘ Show the user the state of the Y HOME input
If IsActive(YHOME) Then
MsgBox “Y HOME is active”
Else
MsgBox “Y HOME  is inactive”
End If

But when I debugg it and I put the mouse over YHOME to see its value shows YHOME = "5" no matter if is active or inactive always the same then acts as always false the statement.
what wolbe happening here? Huh
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!