Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: atwoodr on September 30, 2013, 11:06:02 PM

Title: Updating an LED on the screen via VB code
Post by: atwoodr on September 30, 2013, 11:06:02 PM
Hi Everyone, I searched the forums as best I could for what I thought would be a simple, common question, but I am unable to find an answer, "How does one update (or toggle) an LED on the screen using VB code in a button on the screen?" 

I apologize if I am missing something obvious, but I can't seem to figure it out.  I have tried setting different values to True or False including the code below:

Code: [Select]
Dim test As Boolean

test = GetOEMLed(500)

If (test = true) Then
  DeActivateSignal(500)
  DeActivateSignal(OUTPUT4)
  DeActivateSignal(77)
  DeActivateSignal(852)
Else
  ActivateSignal(500)
  ActivateSignal(OUTPUT4)
  ActivateSignal(77)
  ActivateSignal(852)
End If

I can use any LED OEM code for this.  I just need to get 4-7 of them to work on the screen. 

Thanks,
Ryan