Author Topic: Alarm List - Using MessageListByValue?  (Read 3538 times)

ASF

  • Newbie
  • *
  • Posts: 26
    • View Profile
Alarm List - Using MessageListByValue?
« on: March 06, 2017, 10:41:16 PM »
I'm trying to set up a dynamic alarm display for the first time on AdvancedHMI. As far as I can tell, there isn't a specific object for this yet (unless one has been added since the posts I found on the subject?)

I found a post that talks about using a MessageListByValue to do this. Are there any examples out there of how to set this up?

I'm using a Click Koyo Ethernet PLC, and my alarms are C register bits, modbus addresses 16485 through 16499.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Alarm List - Using MessageListByValue?
« Reply #1 on: March 06, 2017, 10:59:00 PM »
Are you Messages/Alarms using individual bits or an integer?

ASF

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Alarm List - Using MessageListByValue?
« Reply #2 on: March 06, 2017, 11:28:17 PM »
They're using individual bits

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Alarm List - Using MessageListByValue?
« Reply #3 on: March 07, 2017, 12:30:16 AM »
Start with a MessageDisplayByBit

Add your messages using the Messages property or you can create a file with the list of messages using the SampleINIFile\Alarms.txt as a guide
Set PLCAddressValues to an integer that contains the bits

ASF

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Alarm List - Using MessageListByValue?
« Reply #4 on: March 15, 2017, 01:09:32 AM »
Hi Archie,

Thanks for that. I'm having a play with it now, and just wanted to check a few things...

My alarms are stored in modbus addresses 424577 and 424578, which are 16-bit registers. For each alarm, a true bit represents an active alarm. I assume that I should:
- Set PLCAddressValues to 424577
- Set PLCElementBitWidth to 16
- Set PLCNumberOfElements to 2
- Set Value to 1
- Set ValueBitMask to 0
Then define my messages using bits 0-31, where bit 0 will represent the LSB of 424577 and bit 31 will represent the MSB of 424578. Is this right so far?

I have found the sample txt file for the alarm messages, but I can't work out how to either point to a text file, or import a text file, to correlate that text file with the message display object. How do I do this?

Thanks!

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5262
    • View Profile
    • AdvancedHMI
Re: Alarm List - Using MessageListByValue?
« Reply #5 on: March 15, 2017, 01:56:35 AM »
To use a text file for alarms:

- In Solution Explorer, Right click the AdvancedHMI project and select Add New Item
- Select Text File and give it a name Alarms.txt
- After adding the file, in Solution Explorer select the file by single clicking, then go to the Properties Windows
- Set the property Copy To Output to Directory  to "Copy if Newer"
- Double click the file to edit it
- Add alarms like this:

0, Alarm for bit 0
1, Bit 1 alarm
2, Message for bit 2

- Open your form in design view and add a MessageDisplayByBit
- Set the INIFileName to ".\Alarms.txt"

I would use a long integer designation and 1 element like this:

PLCAddressValue = L424577
PLCElementBitWidth=32
PLCNumberOfElements =1