AdvancedHMI Software

General Category => Support Questions => Topic started by: EE_Kraig on September 14, 2018, 01:04:58 PM

Title: Change Pilot Light color in code
Post by: EE_Kraig on September 14, 2018, 01:04:58 PM
I'm using a DataSubscriber to change a pilot light color but it's not working.

Code: [Select]
if (e.PlcAddress == "10014")
               {
                  if (e.Values[0] == "0")
                  {
                     plLowLevelA.LightColor = PilotLight.LightColors.Green;
                  }
                  else
                  {
                     plLowLevelA.LightColor = PilotLight.LightColors.Red;
                  }
               }

The code gets to this section just fine but the light color is always red.
Title: Re: Change Pilot Light color in code
Post by: Archie on September 14, 2018, 03:53:23 PM
If the Value is False, then you will have to change LightColorOff property.