Alarm and Event inside a control module
Please upload an example for building alarms (red in alarmlist) and events (green in eventlist) inside a control module in CBM. The code please only in structured text.
Thanks in advance
nola2k
Voted best answer
There really not so much fuzz about making an alarm in ST
1. Connect the AlarmEventLib
2. Add a AlarmCond(M) function block, named e.g A1
3. As you type the A1 name + left parenthesis in ST the variable connection window pops up
4. Copy & declare at least the declaration of Signal, SrcName, CondName and Message
5. Set these up with correct values (see previous post - you need to know what an Alarm Owner is - read up about that in the user's guides)
6. Download
7. Trigger the signal to go from false --> true
8. Observe an alarm...
9. For diagnostics, add variables for CondState and Status (the latter will get some error code if you haven't fulfilled the requirements, e.g. too long SrcName/Condition, etc.)
Answers
Have you consulted the CBMs online help?
AlarmEventLib:
- SimpleEventDetector
- AlarmCond
- AlarmCondBasic
Define the empty parameters (the rest don't need a value) then trigger the signal property.
The combination of SrcName and ConditionName MUST
- be unique
- can not exceed certain length
- only subset of characters allowed
Good luck!
Thanks for your answer.
Yes, I have consulted the CBMs online help, but all help is only given for FBD code,
nothing for alarm and event building with structured text code.
Regards
nola2k
I will try it today.
Add new comment