Processing DINT fault words into individual bits

bgtorque

Member
Join Date
Oct 2013
Location
Northampton
Posts
127
Hi
I am being given several fault words (as a DINT) from a Drive that I am receiving into a Compactlogix L33ER controller. I have a small PanelView PLus 600 as a HMI.

I also have an automation system that I can stream DINT's to that will then get logged in the test file.

Essentially I want to display the status of the error messages on the HMI and then I will also stream the various fault words to the automation system as the native DINT to get logged.

With regards to the HMI, I guess I can use a mutlistage indicator to show the status as each bit means something different. The trouble is there can be several faults simultaneously within each fault word and so several bits could be high at any one time.

what is the most efficient way to code this to show what bits and so in text what actual errors or status's are present?

E.g Software Fault word 3 = 33088 would mean that Bits 6, 8 and 15 are high and would indicate issues with EtherCAT, the U+ gate driver and the lem2 and i'd want the text for just those to show.

Bit6 EtherCAT error
Bit7 Load default
Bit8 gate2 driver U+
Bit9 gate2 driver U-
Bit10 gate2 driver V+
Bit11 gate2 driver V-
Bit12 gate2 driver W+
Bit13 gate2 driver W-
Bit14 bus2fuse
Bit15 lem2
Bit16 current sensor pwr

Any ideas on how best to code this given the relatively small screens? For the pass through to the automation system i'd just pass on the 33088 DINT that would get embedded andi'd have to write a simple VB decoder for them to use down the line.

Thanks.
 
I would use a simple string display on the HMI and have the PLC cycle through the alarm words looking for 1s and then copy the corresponding alarm text into the tag that's displayed on the HMI. In my example, I have an INT[3] tag that contains my alarm bits. The array can hold 48 alarms numbered 0-47. Each active message is shown for 1 second before going on to the next.


edit to add:
If all of your alarms are in a single DINT, you can forego the MOD instruction and the indirection of the word. You would limit your loop index to 0-31. That would go where I have "Alarms_TopStop_Index_Bit"

AlarmScroll.PNG
 
One way to do this is put the multistate indicator into LSB mode. It will prefer the least significant bit and when that bit clears, it will show the next least significant bit. Typically, the bits are ordered in terms of severity.

But if you want all errors visible, just make 32 tiny indicators and make a block out of them. Then clicking on the block would open up expanded info.

Another approach I've seen uses PLC logic to rotate values using a timer. Then a local message display or multistate indicator displays the currently decoded error.
 
The built in alarm banner on the PV+ gets hard to read on the smaller displays. It's completely illegible on the 400s. Also, having the alarm banner pop up over top your screen is a royal pain and that's how I've always seen it done. Not saying it can't be done any other way, just that I've always seen it that way. I'd rather have a scrolling display at the bottom that leaves my other controls visible and available instead of having new messages interrupt what I'm working on.
 
The built in alarm banner on the PV+ gets hard to read on the smaller displays. It's completely illegible on the 400s. Also, having the alarm banner pop up over top your screen is a royal pain and that's how I've always seen it done. Not saying it can't be done any other way, just that I've always seen it that way. I'd rather have a scrolling display at the bottom that leaves my other controls visible and available instead of having new messages interrupt what I'm working on.

You can increase the font size, although you're still limited by the small screen in how many characters you can show.

100% agree with the rest of this though.

We use the Alarm Setup and have a page with an Alarm Status List so all current alarms can be viewed simultaneously, but we get rid of the default banner that pops up and instead have a message display on each screen that cycles through current alarms using similar logic to what you shared.
 
@joeseph_e2

I liked your alarm display sequencer, but I can't determine where you are setting this bit.
Where is this.jpg

I'm thinking its at the end of the rung above it, being set while the timer is running ... but not seeing it there has me wondering.
 
It's sort of a "belt-and-suspenders" thing where the HMI would sometimes show the last active alarm momentarily when a new alarm triggers. That just makes sure that the registers are current. That bit also controls the visibility of the alarm banner. If it's off, the banner disappears exposing a green box that says something like "No top stop alarms".
 
Good idea,
I'm going to use this in a DINT[4] array. I have a ST script counting the set bits in the alarm array already so that's what I will used in place of the NEQ. Very nice.

I might add a priority integer array to Color the text in animation. Not sure 'bout that yet. Scope creep 'ya know.
 

Similar Topics

I need assistance in the form of some example programs pertaining to analog read and write. Thanks in advance. Sangli
Replies
1
Views
198
in s7-1200 manual it said Whenever the operating mode changes from STOP to RUN, the CPU clears the process image inputs, initializes the process...
Replies
0
Views
1,058
Can someone explain the order of processing the actions of a step...is it top - bottom see attachment for reference. Does it process the blkmov...
Replies
1
Views
2,075
My company imposes programming standards and insists on using AOIs for AI, AO, DI, DO points. I like AOIs and use them as subroutines when I have...
Replies
10
Views
3,083
I have an issue with an Allen Bradley SLC 5/05 program acting “slow”. A few months ago, I noticed an issue with a part of my PLC program not...
Replies
1
Views
1,313
Back
Top Bottom