Author Topic: Multistate Indicator  (Read 4748 times)

Phrog30

  • Guest
Multistate Indicator
« on: June 18, 2017, 08:44:04 PM »
Here is a multistate indicator, similar to what is already in AHMI but also mimics the multistate in FTView.  The main difference is it offers blinking fore and back colors on each state, something the stock component in AHMI will not do.  It offers value and LSB in one component.  As far as I can see both value and LSB work like FTView, if you see otherwise please let me know.  I didn't include all of the options in this compared to the stock component in AHMI as I don't see the need, but you should be able to easily add them for your needs.  You will need to add the class MessageValue and the component MultiState to work.

James

bob1371

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Multistate Indicator
« Reply #1 on: August 26, 2017, 02:02:52 AM »

Hello,

Is it possible to reference a tag value in the message box? I'm looking at a cycle timer and going to set up 3 different colors on the multi state dependent on limits set up in PLC I will get a 0, 1, or 2 to control the states. I want the actual timer value to be the message, is this doable? I tried using the multi state and then putting a basic label over top with transparent background but transparent appears to always be white.


Phrog30

  • Guest
Re: Multistate Indicator
« Reply #2 on: August 26, 2017, 10:01:48 AM »

Hello,

Is it possible to reference a tag value in the message box? I'm looking at a cycle timer and going to set up 3 different colors on the multi state dependent on limits set up in PLC I will get a 0, 1, or 2 to control the states. I want the actual timer value to be the message, is this doable? I tried using the multi state and then putting a basic label over top with transparent background but transparent appears to always be white.

It is not possible.  You have a few choices:
1.  Create a datasubscriber and then use this to write to the text value on the multistate.
2.  Use the valuechanged event on the basiclabel and write to the mutlistate as shown below.
3.  Or just do it all in code.

Code: [Select]
    Private Sub BasicLabelValueChange(sender As Object, e As EventArgs) Handles BasicLabel1.ValueChanged
        MultiState1.Text = BasicLabel1.Value
    End Sub