Scrolling Messages

DaytonPLC

Member
Join Date
Nov 2013
Location
Beavercreek, OH
Posts
18
Whats the best way to use a multi state indicator message bar and be able to scroll through each message after say 2 seconds.

What I'm trying to do is give the operator a tool on the HMI that will show different messages to help them figure out why something isn't happening as it should. But there may be 2, 3 or more message states that are a problem so I would like to flash a state up for several seconds then flash the next active state a few seconds later etc...

I'm using Logix5000 V20 and a Panelview 600

Thanks for any suggestions
 
Last edited:
You'd probably be best setting up a timer in the PLC and have it move whatever integer/bit values you want to display after a few seconds. That way the multistate indicator is used as intended and the PLC controls the message.
 
You'd probably be best setting up a timer in the PLC and have it move whatever integer/bit values you want to display after a few seconds. That way the multistate indicator is used as intended and the PLC controls the message.

Thanks Christoff84 but say I have 100 states. I have 3 messages active, say #5, #60 and # 90. How do I only call up those 3 states to scroll through?
 
I have a way I developed in CoDeSys in Structured Text. Maybe you can convert it to something you can use.

Here's a video showing it in action:
https://www.dropbox.com/s/vu7dn54cwq9lycb/2015-11-20 14.47.24.mov?dl=0

Code:
[FONT="Courier New"]PROGRAM PLC_PRG
VAR
     // An array of BOOL flags.  If the flag is on, the message relating to that 
     // index in the message library will be shown.  These BOOLs would normally
     // be set to an alarm or status bit
     Messages:       ARRAY [0..9] OF BOOL := [1,0,1,1,1,0,0,0,1,1];
     NUM_MSGS:       INT :=10;
     i:              INT :=0;           // Index Variable
     iStart :        INT;               // Value of i When loop starts
     MsgNumber:      INT:=0;            // The number of the current message
     MsgTimer:       TON;               // Timer to cycle messages
     MsgTimer_PT:    TIME:=T#3S;        // Preset of timer

     // Used in the visualization to simulate messages in an HMI
     MsgText:        ARRAY [0..9] OF STRING := [
                           'Normal',
                           'Error 1', 
                           'Error 2',
                           'Error 3',
                           'Error 4',
                           'Error 5',
                           'Error 6',
                           'Error 7',
                           'Error 8',
                           'Error 9'];
                                
     iProgress:      INT;
END_VAR

// The message timer continually resets itself
MsgTimer(IN:=NOT(MsgTimer.Q), PT:= MsgTimer_PT);

// Drives a bar in the visualization
iProgress := TIME_TO_INT(MsgTimer.ET);

IF MsgTimer.Q THEN
     iStart := i;    // Save the starting point
     i := i + 1;     // Index the pointer & reset to 0 if too high
     IF i>= NUM_MSGS THEN i:= 0; END_IF;

     // Look for a message that is on, keep going until you find a 
     // Messages[i] that is true or until you have come back to the start    
     WHILE Messages[i] = FALSE DO
           i := i + 1;     
           IF i>= NUM_MSGS THEN i:= 0; END_IF;
           // If we get back to the start, EXIT
           IF i = iStart THEN
                EXIT;
           END_IF
     END_WHILE
END_IF
// Set the message number to be displayed
MsgNumber := i;[/FONT]
 
Thanks Christoff84 but say I have 100 states. I have 3 messages active, say #5, #60 and # 90. How do I only call up those 3 states to scroll through?

That depends on how you track the faults in your program. Personally I would have the fault load an array of bits, and if a fault is present, search the array using a pointer, whenever the array[pointer] = 1 then store the pointer number for display in the multistate indicator.

Basically what ndzied1 has shown in structured text.
 
Whats the best way to use a multi state indicator message bar and be able to scroll through each message after say 2 seconds.

What I'm trying to do is give the operator a tool on the HMI that will show different messages to help them figure out why something isn't happening as it should. But there may be 2, 3 or more message states that are a problem so I would like to flash a state up for several seconds then flash the next active state a few seconds later etc...

I'm using Logix5000 V20 and a Panelview 600

Thanks for any suggestions

Isn't there alarm banner on HMI for active alarms?
 
I worked on a PLC that the original programmers made an I-Fix HMI for that they said could only show one alarm. So they programmed the SLC 5/05 to look for a fault out of 45 fault conditions, but if they found one they sent that fault integer to the HMI and counted one fault. Every line after the first fault check they checked if the count was 0, then they would check the next fault, but if there was already a fault every fault after it was ignored.

This caused my customer to scrap a full days run because one tank was being serviced and all the HMI showed was Tank XX Level Fault - the other 2 faults for undertemperature and overtemperature on 2 tanks were never reported to the operator, so he ran the line blindly.

I rewrote the PLC, and they want to know how I did it because they have another customer that needs my update done (for free of course)

I check each fault. If one exists I count up one and record that fault integer to N20:[C5:xx.ACC].

After all the checks if the count is not 0 then I have a fault & cycle a 5 second timer, and that scrolls though the N20: file showing each existing integer's fault for 5 seconds up to the count of faults. I also check the number of faults and if it drops I write 0 to the fault integer in the N20: file so it isn't full of old numbers.

I don't have to worry about them reading this, because they never heard of this forum, and the customer allowed me to password protect and Deny Future Access the program. Boy do they want to know.
 
Last edited:
OK, Thanks everybody but I'm not talking about faults. I am using faults in the HMI, what im talking about is just messages that I trigger with a DINT that is attached to a HMI Multi State Indicator. I use MOV for anytime a message should be displayed such as "Waiting for part load" or "Unload Cabinet Full", etc.

What I'm trying to do is if we have multiple message that are active, I would like to display the first for a few seconds then the next for a few seconds etc. till the problems are corrected and I'll drop the MOV conditions.
 
Here's one way to do it, it uses indirect addressing, which some don't like. It takes an array, which is shown by the rungs with NOP and searches for high bits then spits out a position. This position could be used in your multistate. You could also just send a string that you CONCAT in the PLC. Many options, again, this is just one.

To test, toggle one of the bits in the rungs with NOP and look at "Indicator_Position".

1.png 2.png
 
OK, Thanks everybody but I'm not talking about faults. I am using faults in the HMI, what im talking about is just messages that I trigger with a DINT that is attached to a HMI Multi State Indicator. I use MOV for anytime a message should be displayed such as "Waiting for part load" or "Unload Cabinet Full", etc.

What I'm trying to do is if we have multiple message that are active, I would like to display the first for a few seconds then the next for a few seconds etc. till the problems are corrected and I'll drop the MOV conditions.

That doesn't mean you can't set it up to function like an alarm. It sounds like you want the functionality of an alarm display, using a multi-state indicator.

You need to have the program go through all your 100 alarms and check for active/non-active. Once it finds an active alarm, display that info for 5 seconds, then continue scrolling through the alarms until you find the next active error. You can either build a loop to do this, or just let it naturally increment each scan cycle. Once you hit the last alarm, reset to 0 and start all over again. If no alarms are active, don't bother scanning for alarms.
 
Ladder logic and state machine attached.
I have not shown the logic for MSG2, MSG3, which will be the same as MSG1 shown, except with different variables and values.

Msg cycler state diagram.PNG MSG cycler.PNG
 

Similar Topics

Does anyone know of a way within FT View to make the text of a caption scroll (move right to left) if the length of the message you want to...
Replies
2
Views
1,695
New to the forum and looking for a bit of advice or a nudge in the right direction. I am currently working with the Beckhoff Twincat system and...
Replies
8
Views
2,652
Hello Friends I am creating a little program that has 10 fault messages. If 1 fault occurs, there is no problem, the fault is displayed. If 2 o...
Replies
1
Views
1,454
This is a general question to find what systems/products are in the market (if at all). Operations Manager in my plant has a request of me. he...
Replies
18
Views
8,149
I'm trying to figure out the best way to scroll through multiple alarms if multiple alarms are present. I have a CMore connected to a SLC504. I...
Replies
2
Views
2,103
Back
Top Bottom