Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: EzCyclone on July 23, 2010, 07:31:33 PM

Title: OEM code for Output 2 Toggle
Post by: EzCyclone on July 23, 2010, 07: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
Title: Re: OEM code for Output 2 Toggle
Post by: Hood on July 24, 2010, 05: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
Title: Re: OEM code for Output 2 Toggle
Post by: Tweakie.CNC on July 24, 2010, 06: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  ;D ) 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.
Title: Re: OEM code for Output 2 Toggle
Post by: Hood on July 24, 2010, 06:57:57 AM
(minus the Hood line  ;D )

Tweakie.

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

Just to clear it up, VB should be

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

Hood
Title: Re: OEM code for Output 2 Toggle
Post by: budman68 on July 24, 2010, 07:18:38 AM
lol! You're just having a heck of a time with that little thing aren't you!  :D

Maybe we need to start a a forum for netbooks ?  ;)

Dave
Title: Re: OEM code for Output 2 Toggle
Post by: Hood on July 24, 2010, 07:47:36 AM
;D
Title: Re: OEM code for Output 2 Toggle
Post by: EzCyclone on July 24, 2010, 12:21:25 PM
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?  :)
Title: Re: OEM code for Output 2 Toggle
Post by: Tweakie.CNC on July 24, 2010, 12:44:40 PM
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.