Ok, I am trying to display alarms on a screen with MessageListByValue1 so that I can also show date time stamp. The alarms are tied to bits in the array and display when the bit is a 1 on an RSView32 display. I want to display the same alarm on AdvancedHMI on a TV. So for ex. ALARMH.A[1] AU-1 Return High Temp Alarm. ALARMH.A[10] AU-10 High Temp Alarm
The easiest way to do this would be to write a few rungs in the PLC that would check the values of the BOOL array, if it finds one that is true, then put the bit number into a DINT tag and pause it for a few seconds, then continue checking the BOOL array in a round robin. Then you could use the MessageListByValue and put the DINT Tag in the PLCAddressValue property.
Otherwise, its going to take a bit of VB code writing to do the same thing with the HMI. This is roughly how you would do it:
- Add a timer to the form and set the Interval to 250, and Enabled to True
- Double click the timer to get to the code
- Add this code:
Dim Values() as string
Values=EthernetIPforCLXCom1.Read("ALARMH.A[0]",32)
For BitNumber=0 to Values.Length-1
if Values(BitNumber)="True" and LastValues(BitNumber)<>"True" then
MessageListByValue1.Value=BitNumber
End If
LastValues(BitNumber)=Values(BitNumber)
Next
- Above the subroutine declaration, add this line of code:
Private LastValues(32) as string