Author Topic: Basic Indicator colors  (Read 2466 times)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Basic Indicator colors
« on: October 30, 2014, 12:49:22 PM »
Hi, can anyone provide code to change the color of a basic indicator? I have tried the following but they did not work. I have Bit5 assigned to a datasubscriber and getting a value of 1 for Bit 5 returned.  PLC properties for the BasicLabel are left blank and "none" for commcomponent. Thanks for the help!   

If Bit5 = 1 Then
            BasicIndicator1.SelectColor2 = True
        End If

        If Bit5 = 1 Then
            BasicIndicator2.Color1 = Color.Red
        End If
 

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5268
    • View Profile
    • AdvancedHMI
Re: Basic Indicator colors
« Reply #1 on: October 30, 2014, 07:49:48 PM »
BasicIndicator1.SelectColor2 =(Bit5=1)

MrPike

  • Sr. Member
  • ****
  • Posts: 297
    • View Profile
Re: Basic Indicator colors
« Reply #2 on: October 30, 2014, 10:19:35 PM »
Thanks, can you explain the PLC Address Select Color 2 and 3 properties?  What about the PLC address is AdvHMI looking for?  I am using AdvHMI to connect to control panels not a PLC so I dont have an individual bit to address here.  I have a register with various bits set depending on different conditions and Im trying to change the color based on a particular bit within the register.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5268
    • View Profile
    • AdvancedHMI
Re: Basic Indicator colors
« Reply #3 on: October 31, 2014, 05:37:03 AM »
The BasicIndicator is a 3 color indicator with the colors indicated using the properties Color1, Color2, and Color3. The color to display is then indicated by using the SelectColor2 and SelectColor3 properties.

The properties PLCAddressSelectColor2 and PLCAddressSelectColor3 can be used to specify addresses of boolean values in the PLC to be used to control the color selection.