Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 02:25:23 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  OEM code for Output 2 Toggle
Pages: 1   Go Down
Print
Author Topic: OEM code for Output 2 Toggle  (Read 426 times)
0 Members and 1 Guest are viewing this topic.
EzCyclone
Active Member

Offline Offline

Posts: 30


View Profile
« on: July 23, 2010, 06:31:33 PM »

Simple enough I just can't find the OEM code for output 2 toggle.  I find output 2 on and off, but not toggle, is there such a thing?  If so what is it?

Thank Evan
Logged
Hood
Active Member

Offline Offline

Posts: 17,352


Carnoustie, Scotland


View Profile
« Reply #1 on: July 24, 2010, 04:51:08 AM »

Not that I know of but a simple macro would do the same, you could either write it to a macro or place it in a VB button that you place on the screen.
The VB would look similar to this

If GetOemLED(853) Then
DeActivateSignal(OutPut2)
Else
ActivateSignal(OutPut2)


Hood
End If


Hood
Logged
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,258


Super Kitty.


View Profile WWW
« Reply #2 on: July 24, 2010, 05:48:16 AM »

Evan,

If you wish to toggle Output #2 from within a GCode program :-

The command M50 doesn't seem to get used anymore so by placing the macro Hood has given (minus the Hood line  Grin ) in the macro 'M50.m1s' (delete or rem the stuff that's in there already) then by placing M50 in the GCode this will toggle output #2.

Tweakie.
Logged

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

Offline Offline

Posts: 17,352


Carnoustie, Scotland


View Profile
« Reply #3 on: July 24, 2010, 05:57:57 AM »

(minus the Hood line  Grin )

Tweakie.

Oops bloody Netbooks keyboards are too small for me and screens to small to see as well Grin
Now I cant edit it as its been more than 5 mins since I wrote it, that bloody redneck Bretts to blame for that Grin

Just to clear it up, VB should be

If GetOemLED(853) Then
DeActivateSignal(OutPut2)
Else
ActivateSignal(OutPut2)
End If

Hood
Logged
budman68
Master of the Custodial Arts, or better known as:
Global Moderator
*
Offline Offline

Posts: 1,994



View Profile
« Reply #4 on: July 24, 2010, 06:18:38 AM »

lol! You're just having a heck of a time with that little thing aren't you!  Cheesy

Maybe we need to start a a forum for netbooks ?  Wink

Dave
Logged

----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    Wink
Hood
Active Member

Offline Offline

Posts: 17,352


Carnoustie, Scotland


View Profile
« Reply #5 on: July 24, 2010, 06:47:36 AM »

Grin
Logged
EzCyclone
Active Member

Offline Offline

Posts: 30


View Profile
« Reply #6 on: July 24, 2010, 11:21:25 AM »

Lol I don't want to program it, not looking for VB or Gcode.  What I want is to put a button on my screen to turn on and off my output 2.  I can't find any button codes in the XLS for screen4 to turn on or off or toggle output two.  Just trying to add a button to my screen, that's all.  Anybody know those numbers?  Smiley
Logged
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,258


Super Kitty.


View Profile WWW
« Reply #7 on: July 24, 2010, 11:44:40 AM »

Evan,

Quote
What I want is to put a button on my screen to turn on and off my output 2

I seem to have missed something here - surely Hood has already given you the information you need to do just that.

Add a VB button to your screen then within Mach paste in Hood's VB code and away you go - Output #2  toggles  ON / OFF.

Tweakie.
Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
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!