CCW Alarm Que

JamesV

Member
Join Date
Mar 2024
Location
missouri
Posts
22
Hey out there, I am trying to build an alarm que in CCW. I have got the FFL and FFU working, however the string that goes with the alarm can't be used in the FFL & FFU. Any ideas on how to get the string to follow the alarm?
I have achieved this in the past using a Control data type and a BSR. CCW does not have the all of the same tools as RSLogix 500 or Studio so therefore I cannot emulate that code..
 
How are you displaying the alarm string?

If you're using a panel view you could put the alarm message in the alarm configuration on the HMI and use a DINT tag in CCW as the Trigger.

If you must have the string in the PLC to be displayed as the alarm, consider using a DINT tag for the alarm and doing your FFL/FFU then, create a loop in structured text (ST) that will transfer the corresponding alarm text to a new Alarm_Display string tag. This way there is only one tag called Alarm_Display that just shows the current alarm from the FFL/FFU based on its corresponding DINT tag. (I've done this for some recipe tags in CCW)

NOTE: If your using the completely free version of CCW and not the professional you may not have the ability to do ST, but you could figure it out in ladder, it would just be a bit more tedious and longer to implement. (I don't recall the free version's short comings but remember they were a thorn when i encountered them)
 
How are you displaying the alarm string?

If you're using a panel view you could put the alarm message in the alarm configuration on the HMI and use a DINT tag in CCW as the Trigger.

If you must have the string in the PLC to be displayed as the alarm, consider using a DINT tag for the alarm and doing your FFL/FFU then, create a loop in structured text (ST) that will transfer the corresponding alarm text to a new Alarm_Display string tag. This way there is only one tag called Alarm_Display that just shows the current alarm from the FFL/FFU based on its corresponding DINT tag. (I've done this for some recipe tags in CCW)

NOTE: If your using the completely free version of CCW and not the professional you may not have the ability to do ST, but you could figure it out in ladder, it would just be a bit more tedious and longer to implement. (I don't recall the free version's short comings but remember they were a thorn when i encountered them)
I am using a Cmore RHMI. Trying to use code I have wrote in the past, but there are things way different in CCW vs. Rockwell's other platforms. Can you possibly give me an example of the the ST Loop? I am using a UDint for my alarms in the FFL/FFU already. This is currently what I am doing, once the Alarm latches in the String is moved into a holding place to be read by the HMI, It holds and displays the ST for 4 seconds once it hits the FFU. But if I can loop it to follow that will work also. There may be multiple alarms so that is why i want to hold and display the message as it shifts thru.
1714408480921.png
 
I don't have CCW at the moment so I can't verify the syntax but hopefully this points you in the right direction for what i was thinking.

Here is an array that hold all your alarm text:
1714413601480.png

This is the loop example that basically cycles through 0-100 until it matches your current Alarm_Trigger value from your FFL/FFU of alarms. Then it will take that trigger value and find the corresponding Alarm_Registry[x] text and populate Alarm_Text. This Alarm_Text is what you will display on the HMI.

I would add some logic to clear the alarm text and possibly timers to hold/cycle through although what you already have may be enough to do that function.

============
// Loop example

FOR x := 0 TO 100 BY 1 DO;
IF Alarm_Trigger = x THEN;
COP(Alarm_Registry[x], Alarm_Text, Alarm_Registry[x].LEN);
END_IF;
END_FOR;

============
 
Last edited:
I am using a Cmore RHMI. Trying to use code I have wrote in the past, but there are things way different in CCW vs. Rockwell's other platforms. Can you possibly give me an example of the the ST Loop? I am using a UDint for my alarms in the FFL/FFU already. This is currently what I am doing, once the Alarm latches in the String is moved into a holding place to be read by the HMI, It holds and displays the ST for 4 seconds once it hits the FFU. But if I can loop it to follow that will work also. There may be multiple alarms so that is why i want to hold and display the message as it shifts thru.
 
I don't have CCW at the moment so I can't verify the syntax but hopefully this points you in the right direction for what i was thinking.

Here is an array that hold all your alarm text:
View attachment 69681

This is the loop example that basically cycles through 0-100 until it matches your current Alarm_Trigger value from your FFL/FFU of alarms. Then it will take that trigger value and find the corresponding Alarm_Registry[x] text and populate Alarm_Text. This Alarm_Text is what you will display on the HMI.

I would add some logic to clear the alarm text and possibly timers to hold/cycle through although what you already have may be enough to do that function.

============
// Loop example

FOR x := 0 TO 100 BY 1 DO;
IF Alarm_Trigger = x THEN;
COP(Alarm_Registry[x], Alarm_Text, Alarm_Registry[x].LEN)
END_IF;
END_FOR;

===========
 
So that is the FOR LOOP statement. X is the loop variable.

So this code will index from 0 to 100 by 1 increment completing the enclosed code. The enclosed code is an IF statement using the 'x' variable. You can read this as:

When 'x' is (0), then, if Alarm_Trigger is equal to 'x' (0), then copy Alarm_Registry[0] to the Alarm_Text tag with length = the length of Alarm_Registry[0].LEN. Then increment 'x' to 1 and repeat.

It would be after the COP statement you could introduce a timer to hold the incrementing if you wanted.

If you are not familiar with FOR loops this coding may be a bit too advanced? Try YouTubing Tim Wilborne, he has some great beginner level stuff for those learning using CCW.
 
Last edited:
What do the data structures look like? What goes into the FIFO array when the FFL is triggered and leaves when the FFU is triggered? How are the alarm strings stored? How does the HMI display the alarm string(s), i.e. where does it get the string(s) from? How many alarm strings are displayed on the HMI at a time?
 
Code

XIC First_Pass MOV 1 iALARM​
BST XIO IN_ALARM[iALARM] NXB XIC ALARM_TON.Q BND + iALARM 1 iALARM​
> iALARM 100 MOV 1 iALARM​
MOV '' ALARM_DISPLAY_TEXT​
XIC IN_ALARM[iALARM] XIO ALARM_TON.Q BST TON ALARM_TON T#4s T#0s NXB MOV ALARM_TEXT[iALARM] ALARM_DISPLAY​

Data Structures

ALARM_DISPLAY_TEST: STRING; current alarm text to display for at most 4s​
iALARM: DINT; alarm number, 1-100, to test in current scan​
IN_ALARM[1..100]: ARRAY of BOOL; State of alarms 1-100​
ALARM_TEXT[1..100]: ARRAY of STRING; Text of alarms 1-100​
 
What do the data structures look like? What goes into the FIFO array when the FFL is triggered and leaves when the FFU is triggered? How are the alarm strings stored? How does the HMI display the alarm string(s), i.e. where does it get the string(s) from? How many alarm strings are displayed on the HMI at a time?
Thanks for the questions. I am using a single Udint with around 30 alarms. It is moved into an Array in the FFL then to the FFU once the FIFO is full. then to another Alarm_out array Udint. I have an array of String Tags [0..40] that I want to follow the current alarms thru the FIFO and monitor it once it hits the Alram_out Tag.

1714481785422.png
 
Code

XIC First_Pass MOV 1 iALARM​
BST XIO IN_ALARM[iALARM] NXB XIC ALARM_TON.Q BND + iALARM 1 iALARM​
> iALARM 100 MOV 1 iALARM​
MOV '' ALARM_DISPLAY_TEXT​
XIC IN_ALARM[iALARM] XIO ALARM_TON.Q BST TON ALARM_TON T#4s T#0s NXB MOV ALARM_TEXT[iALARM] ALARM_DISPLAY​

Data Structures

ALARM_DISPLAY_TEST: STRING; current alarm text to display for at most 4s​
iALARM: DINT; alarm number, 1-100, to test in current scan​
IN_ALARM[1..100]: ARRAY of BOOL; State of alarms 1-100​
ALARM_TEXT[1..100]: ARRAY of STRING; Text of alarms 1-100​

Is this code a Structured text?
 
Is this code a Structured text?

No, those are Allen-Bradley CCW mnemonics. It was easier to type them into a post than to draw the ladder logic.

If you expand the space (drag the horizontal line down when the cursor changes to up/down arrow(s)) at the top of the rung diagramr, you should see a text box into which you can type those mnemonics; as you type, will translate the mnemonics to ladder rung logic. The operands (tag/variable names) will be specific to your setup, but the logic should work.
  • XIC blah is a -] [- instruction that examines the value of bit/boolean operand blah and sets its output rung True if the value is 1 AND the input rung is True.
  • BSTstarts a top-level branch;
    • NXB ends a branch and starts a parallel branch back where the last BST or NXB at the same branch level occured
    • BND ends a set of parallel branches
  • > sourceA sourceB is a greater-than comparison instruction
  • MOV 1 blah is a MOVe instruction that moves the value 1 into tag blah
  • XIO blah is a -]/[- instruction that examines the value of bit/boolean operand blah and sets its output rung True if the value is 0 AND the input rung is True.
  • TON ... is a Timer ON-delay instruction
 
Btw, one very useful property about those mnemonics is that, when are they read left-to-right and top-to-bottom, that is the same order in which the instructions will be evaluated by the PLC during the scan cycle.
 
Thanks for the questions. I am using a single Udint with around 30 alarms. It is moved into an a FIFO Array in by the FFL instruction then to removed by the FFU instruction once the FIFO is full. then to another Alarm_out array (of bits?) Udint. I have an array of String Tags [0..40] that I want to follow the current alarms thru the FIFO and monitor it once it hits the Alram_out Tag.

View attachment 69699

Let me see if I am understanding what you said there:
  • Alarm events (e.g. high tank level or whatever) are detected, and each alarm event, when it is detected, causes a the value of a bit in UDINT tag ALARM to become 1.
  • At some point*, a rising edge to an FFL instruction causes the current value of the UDINT tag ALARM to be the most recent value "pushed" onto the FIFO array, which iis ARRAY[0..5] of UDINT ARR.
    • If the array is full before (after?) that FFL edge occurs, a rising edge to an FFU instruction causes the oldest value in the FIFO (ARR[0..5]) to be "popped" off of the FIFO in into the value of UDINT tag ALARM_OUT.
    • * "At some point" is undefined, or maybe it's the expiry of a repeating timer?
  • Asynchronously with all of the above activity, the bits in the FIFO array UDINTs and/or the UDINT ALARM_OUT tag somehow interact with the strings in the ARRAY[0..40] STRING array ALARM_MSG to cause alarms to be "monitored(?)"
Am I close?
 

Similar Topics

I want to create a screen in Connected Components Workbench (9.0) that displays a list of the currently active alarms. In FTView I would use the...
Replies
1
Views
2,427
When creating an alarm for Panelview 800 I am getting the error message that an alarm is no message configured, but the text column to be...
Replies
0
Views
2,361
my ccw softwer stops working when i add and try to open a ladder program.
Replies
0
Views
85
Hello. Has anyone ran into an issue with HSC on 2080-LC20. It run a cut off press and every so often after resetting to 0 it does not count...
Replies
1
Views
142
I am running CCW 13 trying to upload to a micro 820 vers.12 I get an output message OPC server is unable to load project controller. Please help!
Replies
5
Views
299
Back
Top Bottom