4 Line Display Fault Messaging

BPyles

Member
Join Date
Apr 2014
Location
Canton Ohio
Posts
15
I have a 4 line display (OptiMate 640). I need to feed it the four highest priority faults. I currently keep track of faults in N7:50.xx where xx is the fault number (16 total) 0 is high priority and 15 is low priority.

To move the message to the display I just need to MOV an Int with the message ## (0-160) into N7:xx where xx represents the line number (0-3) in the HMI. The HMI stores all the text for the messages.

Any suggestion on how either to prioritize the messages and display the 4 highest priority messages OR cycle through all the messages without any spaces (i.e. remove the non-active faults from the N7:50)?

NOte: I am using MicroLogix1000 and don't believe I can use indirect addressing! Normally I would run a loop with a counter and indirect address the C.ACC to the Message.
 
Any suggestion on how either to prioritize the messages and display the 4 highest priority messages OR cycle through all the messages without any spaces (i.e. remove the non-active faults from the N7:50)?
With only four items this can be done with not too many instructions:

EQU N7:50 0 BST COP #N7:51 #N7:50 3 NXB CLR N7:53 BND
EQU N7:51 0 BST COP #N7:52 #N7:51 2 NXB CLR N7:53 BND
EQU N7:52 0 BST MOV N7:53 N7:52 NXB CLR N7:53 BND

This logic won't prioritize, it just moves any non-zero integers to the front of the file.


NOte: I am using MicroLogix1000 and don't believe I can use indirect addressing! Normally I would run a loop with a counter and indirect address the C.ACC to the Message.
From a few minutes tinkering with RSLogix micro starter it looks like you can use indexed addressing. It'd be more work on your part to handle/manipulate the pointer but, I believe it could be done.
 
I have a 4 line display (OptiMate 640). I need to feed it the four highest priority faults. I currently keep track of faults in N7:50.xx where xx is the fault number (16 total) 0 is high priority and 15 is low priority.

To move the message to the display I just need to MOV an Int with the message ## (0-160) into N7:xx where xx represents the line number (0-3) in the HMI. The HMI stores all the text for the messages.

Any suggestion on how either to prioritize the messages and display the 4 highest priority messages OR cycle through all the messages without any spaces (i.e. remove the non-active faults from the N7:50)?

NOte: I am using MicroLogix1000 and don't believe I can use indirect addressing! Normally I would run a loop with a counter and indirect address the C.ACC to the Message.



can you change order of alarm bits to opposite direction (alarm bit N7:50.0 lowest and N7:50.15 highest priority, it could make things little bit easier)


If I understanded it right this ladder code should do trick, it is long and brutal method still. (alarm.pdf)
It orders 4 highest alarm bits to 4 different integers (your hmi lines, numb zero = no alarm, 16=highest and 1 = lowest alarm number)

I coded it with different PLC platform, put it should work also on micrologix . With indirect addressing or with arrays it could be lot easier.


Another cycles active alarms at one integer variable. (16 different alarm and 16 different numbers, active alarm is showed 1 second, if there is several alarms they are cycled with 1 sec period.)


Do you have only 16 alarms or more than that?
 
Lare,

Thanks!!!! The program worked perfectly. I sligtly modified it. Instead of subtracting I just unlatched the bit in the temp int. Also, instead of using a GRT command I just used an XIC command!

Thanks again.
 
Ok, good that it worked. It was fast coded from scratch. It will work with 32 alarms (dint variable), but after that it will go more complicated.
 
Here's an instance where Structured Text would come in handy.

PROGRAM PLC_PRG
VAR
Alarm_Bits: ARRAY [1..16] OF BOOL;
Alarm_Lines: ARRAY [1..4] OF INT;
I: INT;
J: INT;

END_VAR

// Initialize the Alarm Line Index
J:= 1;

// Loop through all possible alarms
// Highest priority alarm is 1, Lowest is 16
FOR I:= 1 TO 16 DO
IF Alarm_Bits THEN
Alarm_Lines[J] := I;
J := J+1;
IF J > 4 THEN
EXIT;
END_IF
END_IF
END_FOR

 
Last edited:

Similar Topics

Is it possible to inject a new line character directly into a string display expression? Attached is a picture of the string display properties...
Replies
5
Views
4,120
is it possible to change the display of real numbers in codesys 3.5 while online from exponential to decimal values?
Replies
0
Views
1,952
I need to install (10) 2 line displays to display preset and elapsed time from a compact logix plc. Does anyone have any good suggestions of a...
Replies
3
Views
1,914
I'm using a C-More to log data from 4 RTD probes. The signals are processed through an Advantech ADAM-6015, which I read over Modbus TCP/IP. I can...
Replies
0
Views
2,122
plc is a GE 90/30 311 Rev 8.50 which does not have a log function. (tried to enter the instruction but got a "not supported" error message. CPUS...
Replies
0
Views
1,578
Back
Top Bottom