message philosophy (bits vs numbers (ints))

rbrummond

Member
Join Date
Sep 2013
Location
VA
Posts
3
A big heated discussion today at work about whether to use bits or integer numbers for error/alarm messages. I would be interested in reading what this forum thinks,

Thanks,

Bob
 
Depends on the hardware. I have used numbers to display on CPU LED display the error that needs to be corrected. I have also used bits to trigger ASCII messages to a register to show on the HMI.
What hardware are you using?
Regards,
Garry
http://www.accautomation.ca
 
We are mostly using AB and Siemens plc. The messages are going over opc to a pc for some control and our message display.
 
It may depend some on the HMI you're using. With FTView ME/SE there is an option to use bits or integers. With an integer you can only have 1 alarm active at a time (especially bad if you're not requiring acknowledgement). If you use the bit option you have full functionality.

Now with Rockwell devices the alarm setup allows you to use integers and address alarms individually to the bit level. Many competing HMIs do not handle this so well. So, if you later want to have another product looking at these alarm tags you'll have to do some extra work to get them into a Boolean tag.

I prefer to setup alarms in Boolean arrays so that compatibility is not an issue. It can also be better than having an array of integers as it gets weird to address a couple thousand alarms that way (always resetting back to 0 with a new DINT). Having Boolean alarms is handled slightly better in setup with FTView SE than ME so that could factor as well.
 
I always pack my alarms in bits of arrays of alarm words. I usually also loop through the array of alarm words and when an active bit is found, I convert that to its decimal representation of place within the bit array. For example, if Alarm[10].6 is ON and the Alarm is an array of 32 bit words, then the decimal value of the alarm = Word * 32 + bit = 326.
I like using bits for compactness, and like Peter mentioned, it allows you to OR, XOR, & AND your alarms for easy handling, but then having the integer value makes for easy interface to a message display, if you are like me and avoid FactoryTalk alarms like the plague.
 
I tend to put strings as my first choice if the PLC can handle them easily. I like to be able to see the alarm message when I am online with the PLC without having to cross reference a chart of numbers or try to get to the HMI to see what the translation of the number or bit represents.

On PLCs that cannot gracefully handle strings, I mostly use integers. Integers do not allow multiple alarms, but most technicians can only work on one problem at a time. I will prioritize which alarm is the most important to correct first. For example, no need to see why a cylinder did not reach it's switch if the E-stop is pressed.

I have actually worked on machines that used the multiple scrolling alarms in which a snowball effect would occur. One faulty condition triggered the first alarm, then the restriction of letting the machine proceed caused another alarm. Sometimes you could see a dozen alarms scroll through and it made it quite difficult to figure out which was the root problem that caused the chain reaction.
 
Bits definetly for Siemens. The built in Alarm/warning system can keep a history of them or log them to a csv file. And mutiple alarms can be displayed at once.
 
Thanks for everyone's feed back. I always find a lot of good info up here from very smart and experienced people.

Bob
 
Bits!
using bits allows for more than one alarm message.
using bits allows an easy method to mask alarms.
using bits allows and easy way to do something on the rising edge of multiple alarms.

Peter,

When you say bits, are you referring to BOOLs, as either individually declared tags, or as an array (BOOL[32] for example), or would using individual bits of a DINT (say, DINT[0].0) qualify as that as well?
 
As for Siemens HMIs, you can use an ARRAY of BOOLs.
You cannot specify alarms as an INT number in Siemens HMIs.

For completeness sake I also mention that Siemens PLCs and HMIs can use a system called ALARM_S, which is a way to handle the alarms in the PLC (multilanguage texts and all) rather than in the HMI. However, just use ARRAY of BOOLs, it is much simpler and easy to comprehend.
 

Similar Topics

I have a safety PLC AB that is stuck trying to charge the capacitor and will not do anything. No communication or anything can be done. Is there...
Replies
0
Views
56
Hello, Ive gotten a few answers on this from the Rockwell tech support but it's just not clear as they often point to the manual. I've also read...
Replies
0
Views
76
Hello I need to message read the entire 16 channel raw analog inputs from a 1769-L33ER Compact Logic controller to another 1769-L33ER Compact...
Replies
8
Views
226
Wizards, It has been a few, but you all have always done me well. I have acquired a 1769-L33ER and want to use it as my collection PLC to...
Replies
5
Views
443
Hello forum! Long time user, first time poster. I am currently designing a control system that has a Production system, linked to live plant...
Replies
0
Views
149
Back
Top Bottom