Writing an Array to a flag tag in crimson 3.0

Taintd

Member
Join Date
Apr 2024
Location
Waikato
Posts
3
Hi, I'm having an issue in crimson 3.0 when I create a programme using a case statement referencing a fault word that each bit needs to change the state of a flag tag so that it comes up in the alarm banner how do I configure the flag tag, as my script shows that it's ok syntaxes is fine but when I input the corresponding value into a setpoint no alarms come up, asked my tutor but he hasn't been much help.
 
Can you share your crimson file?

I typically set up alarms like this at the tag level. If each bit represents a different fault, I reference the word from the field device in one tag, and the bits as flag tags with the data source referencing that integer tag treated as a bit array and specifying a bit number.

If the tag is a code, I just make it a multi-state object and put all the faults as states, and on the alarm tab Event Name use an expression including the tag value.AsText. That way, your event viewer and alarm banner will show a unique alarm for each value with no need for separate complex expressions or programs with case statements.
 
Can you show me an example of that?
Here's one example of bit of word alarming. This system had two pumps so I use a symmetrical folder and tag structure for each and widgets for the display. I use a memory string tag called Title for the name of the pumps, because often, the end users want something besides "Pump 1" and "Pump 2". In this case, they wanted "West" and "East". Since I reference that title everywhere in the other tags and alarms, widgets, etc. I only had to change the data source of the Title tag to get the naming they preferred. I actually have another Title tag nested inside this one that points at the Title tag in the root folder. Sometimes it looks like I get carried away with indirection, but the payoff is the entry of the strings in the alarms and status words is easier to type out by doing that.
 

Attachments

  • bits of word for alarms 0.png
    bits of word for alarms 0.png
    114.1 KB · Views: 12
  • bits of word for alarms 1.png
    bits of word for alarms 1.png
    100.2 KB · Views: 12
  • bits of word for alarms 2.png
    bits of word for alarms 2.png
    108.4 KB · Views: 12
Last edited:
I am.able to do that but when I write an interger value using a memory tag in crimson to write it doesn't make logical sense as using bit end means I need to write 2,4,8,16,32 to bring up the correct alarm, where as I need to input into the fault word as say 3 it bring its fault_3 flag tag alarm.
Here's one example of bit of word alarming. This system had two pumps so I use a symmetrical folder and tag structure for each and widgets for the display. I use a memory string tag called Title for the name of the pumps, because often, the end users want something besides "Pump 1" and "Pump 2". In this case, they wanted "West" and "East". Since I reference that title everywhere in the other tags and alarms, widgets, etc. I only had to change the data source of the Title tag to get the naming they preferred. I actually have another Title tag nested inside this one that points at the Title tag in the root folder. Sometimes it looks like I get carried away with indirection, but the payoff is the entry of the strings in the alarms and status words is easier to type out by doing that.
 
I am.able to do that but when I write an interger value using a memory tag in crimson to write it doesn't make logical sense as using bit end means I need to write 2,4,8,16,32 to bring up the correct alarm, where as I need to input into the fault word as say 3 it bring its fault_3 flag tag alarm.
That is different than your original post, and I am unable to follow what you have stated here. What is the source and data type of the alarm?

The last example I gave was one where each bit represented a different condition, and multiple conditions could be true at once (therefore generating multiple alarm events).

The other common example is a fault code where each unique value in an integer register represents a different (single) fault condition. You can program those in Crimson with a multi-state format and put the fault description in each state Text field. Then on the alarm tab, you can pick event mode Data Mismatch (assuming zero means no alarm) and put 0 for the Value and for the event name, reference the value of the tag.AsText Then, the alarm will display the text from the format tab in the alarm banner and alarm list objects.
 

Similar Topics

Hi. Not the fist time I'm saying this but just to give a background. 95% of my PLC programming has used Schneider over the last 10 years on...
Replies
66
Views
5,002
I'm working with Crimson 3.1. Is there a way to write an array's position into a tag? For example, I have an array size of 100, I'll call them...
Replies
5
Views
4,055
I have an application where we are setting up recipes for our system. I have a an array of UDTs to store my recipes in the PLC (CLX), We are...
Replies
1
Views
1,593
Hi. I am trying to log a large data table into a 2 dimensional array from Control logix. I have been able to successfully load single dimension...
Replies
4
Views
2,244
Hi Thanks for reading this post. I Having trouble writing Wonderware array values to a compactlogix PAC. I can read the values through a...
Replies
1
Views
4,217
Back
Top Bottom