Hi:
No matter if you use CSS or edm or medm or alh or StripTool or one of the Qt-based user displays for EPICS, or if you use the records that you interface to your DSP as inputs of additional EPICS IOC record or sequencer logic, you should create
records with proper EPICS alarms, i.e. records that send out alarm updates.
For example, this analog record will create a MINOR alarm when its value reaches 100:
record(ai, “demo”)
{
field(DTYP, “..modbus..”)
field(INP, “..whatever you need here..”)
field(HIGH, “10”)
field(HSV, “MINOR”)
}
I understand that your DSP is already checking the value and creating alarms, but you need to get that information into the “demo” record. Assume that your DSP is also comparing the value against some threshold, and that threshold may change.
Then add another record which reads that alarm threshold from the DSP and puts it into the HIGH field of the above record:
record(ai, “demo_threshold”)
{
field(DTYP, “..modbus..”)
field(INP, “..whatever you need here..”)
field(FLNK, “ demo_threshold_update”)
}
record(ao, “demo_threshold_update”)
{
field(DOL, “demo_threshold”)
field(OMSL, “closed_loop”)
field(OUT, “demo.HIGH”)
}
Yes, this means that both your DSP and the “demo” record will perform the threshold check.
Yes, this means you need additional records to read the threshold from the DSP and update the HIGH field of the demo record. You might be able to package that into a database template for re-use.
With CSS, you might be tempted to hack around this by using rules/scripts to change the background color of a widget based on the alarm info read from the DSP via additional PVs, but this is a bad idea for several reasons:
You will likely need several rules/scripts. They’re not trivial, they will slow your display down, and they will need to be adjusted with upcoming updates of CSS. You need additional PVs anyway to read the alarm state from the DSP, so you might
as well add a few more records to update the HIGH of analog records etc. to create proper alarms.
More important, you really want proper PVs that create alarms so that you can use them in any Channel Access client (archive, alarm, other IOCs, ..).
Thanks,
Kay
Hi ,
I am Carlos from Spain and I am developing an HMI, it consists of:
A DSP sends measurements, alarms and events through modbus addresses, these data are converted to EPICS
and displayed on screen with CSS. The "brain" of the project is the DSP, ie, alarms are not made by epics, alarms are generated by the DSP and the cs-studio is only displayed if there is failure, if there is no fault, measures etc .. I would know how these
failures can be collected, events and actions and how I can build a table in CS-Studio where these data to be displayed and also to generate a file with this data.
Thanks,
Carlos
|