General Discussions
Alarm from Bits in Word

Hello, I am new to VTScada. I have an Alarm Word from the PLC, where each bit represents an individual fault. I'd like to read the entire Alarm Word as a single tag in VTscada and create alarms for each individual bit. I have found the expression Bit([HMI Alarm Word],2) for example to work as an expression, but I'm not sure where/how to enter this to create the Alarm. Thanks.

Hello, I am new to VTScada. I have an Alarm Word from the PLC, where each bit represents an individual fault. I'd like to read the entire Alarm Word as a single tag in VTscada and create alarms for each individual bit. I have found the expression Bit([HMI Alarm Word],2) for example to work as an expression, but I'm not sure where/how to enter this to create the Alarm. Thanks.

You'll likely want to to check out the following from the help files:

Start here (Specifically Bit Addressing): https://www.vtscada.com/help/Content/D_Tags/Dev_ModiconAddressing.htm

Then check out the following for general info on this: https://www.vtscada.com/help/Content/D_Tags/Dev_DataSuffixesForTagIO.htm

You'll likely want to to check out the following from the help files: Start here (Specifically Bit Addressing): https://www.vtscada.com/help/Content/D_Tags/Dev_ModiconAddressing.htm Then check out the following for general info on this: https://www.vtscada.com/help/Content/D_Tags/Dev_DataSuffixesForTagIO.htm

Trihedral Engineering Ltd.

Hi, thanks for the reply.

Unfortunately this doesn't solve the problem. I can access the individual bits of my HMI alarm word by using their individual PLC addresses, but this means importing 16 different tags. I want to only import a single word length tag. In VTScada I have a PLC tag (word) called "HMI Alarm Word". When I try to create a new "alarm" tag, I want to use a single bit of this word as the trigger tag. In VTscada, when I select the "tag" trigger, I can only add the entire tag (word) in the field, I cannot modify the tag name to add a /2 or whatever other bit I need. If I select expression, I can enter Bit([HMI Alarm Word],2) but the alarm doesn't work. It would be helpful if you could provide a step-by-step solution to this, as I've already read through most of the documentation I could find that would be relevant to this.

Hi, thanks for the reply. Unfortunately this doesn't solve the problem. I can access the individual bits of my HMI alarm word by using their individual PLC addresses, but this means importing 16 different tags. I want to only import a single word length tag. In VTScada I have a PLC tag (word) called "HMI Alarm Word". When I try to create a new "alarm" tag, I want to use a single bit of this word as the trigger tag. In VTscada, when I select the "tag" trigger, I can only add the entire tag (word) in the field, I cannot modify the tag name to add a /2 or whatever other bit I need. If I select expression, I can enter Bit([HMI Alarm Word],2) but the alarm doesn't work. It would be helpful if you could provide a step-by-step solution to this, as I've already read through most of the documentation I could find that would be relevant to this.

You are on the right track. I do this quite often. The way I set my alarm words up is the following:

  1. I build an analog status tag – AlarmWord
  2. Under it I put my alarm tags
  3. Trigger tab - Triggered by Expression: Pickvalid(Bit([AlarmWord],7),0)
  4. Function = Equal to = or ==
  5. Setpoint = 1
You are on the right track. I do this quite often. The way I set my alarm words up is the following: 1. I build an analog status tag – AlarmWord 2. Under it I put my alarm tags 3. Trigger tab - Triggered by Expression: Pickvalid(Bit([AlarmWord],7),0) 4. Function = Equal to = or == 5. Setpoint = 1

Hi Josef,

Thank you for that response. I tried this exactly as you have described, and it doesn't seem to be working. Even if the tag in the PLC is high, VTscada doesn't recognize the alarm as high in the tag browser for some reason. I'm not sure if you're familiar with Siemens, but I'm using an S7-1200 PLC, and I'm assigning DB1.DBW28 to the HMI Alarm Word in VTscada. If I set up an alarm under this at bit 0 (DB1.DBX28.0), and set that bit high in the PLC, VTscada still sees the alarm value as "OFF". My trigger expression in that case is Pickvalid(Bit([HMI Alarm Word 1],0),0). Is there another setting buried somewhere that I am missing?

Thanks

Hi Josef, Thank you for that response. I tried this exactly as you have described, and it doesn't seem to be working. Even if the tag in the PLC is high, VTscada doesn't recognize the alarm as high in the tag browser for some reason. I'm not sure if you're familiar with Siemens, but I'm using an S7-1200 PLC, and I'm assigning DB1.DBW28 to the HMI Alarm Word in VTscada. If I set up an alarm under this at bit 0 (DB1.DBX28.0), and set that bit high in the PLC, VTscada still sees the alarm value as "OFF". My trigger expression in that case is Pickvalid(Bit([HMI Alarm Word 1],0),0). Is there another setting buried somewhere that I am missing? Thanks

OK I figured it out ... if I declare something as a word in VTscada, bit 4 in the word is actually DB1.DBX29.4 and not DB1.DBX28.4 ... the byte order was throwing me off. Finally got it working with your above expression. Thank you for your help!

OK I figured it out ... if I declare something as a word in VTscada, bit 4 in the word is actually DB1.DBX29.4 and not DB1.DBX28.4 ... the byte order was throwing me off. Finally got it working with your above expression. Thank you for your help!
50
5
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft