WinCC OA 3.14 P10
I'm trying to trigger an alarm when one of the bits in a bit32 DPE (simatic: DB1.DBD26) is set.
I've configured discrete alarm handling but it just doesn't work. I want the alarm to trigger when bit 30 is set.
I set the bit 30 to "1" in "state bits" but what to enter in limiting values?
bit32 alarms
- twinsen
- Posts:16
- Joined: Mon Jan 30, 2017 1:31 pm
Re: bit32 alarms
Ok, I've done some research:
Those state bits are actually - user bits, NOT the original_value bits we get from the driver, so they are not relevant to my task.
I've managed to trigger an alarm on the specific bit in bit32: in the limiting value you must enter:
*1*****************************
The alarm will be triggered if the 30th bit is set.
But there's another issue: by design only the top range alarm is dispayed - lower ranges are set to GONE.
And I have 32 bits = 32 alarms that can be triggered simultaneously (an engine's states).
Is there a way (without defining 32 ios for each bit) to get 32 bits as 1 io, then split it to 32 internal bits (each having it's own _alert_hdl config)?
Those state bits are actually - user bits, NOT the original_value bits we get from the driver, so they are not relevant to my task.
I've managed to trigger an alarm on the specific bit in bit32: in the limiting value you must enter:
*1*****************************
The alarm will be triggered if the 30th bit is set.
But there's another issue: by design only the top range alarm is dispayed - lower ranges are set to GONE.
And I have 32 bits = 32 alarms that can be triggered simultaneously (an engine's states).
Is there a way (without defining 32 ios for each bit) to get 32 bits as 1 io, then split it to 32 internal bits (each having it's own _alert_hdl config)?
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: bit32 alarms
If the bits can be addressed by their subindex in the _address config you can use the following approach:
-- define a node in the the dp-type structure of type "DPEL_BOOL_STRUCT". Below this node you define 32 elements.
If an _address config is added at the node the driver writes the information for every bit to the elements.
Please note that a configuration like this is counted as 32 I/Os.
Best Regards
Leopold Knipp
Senior Support Specialist
-- define a node in the the dp-type structure of type "DPEL_BOOL_STRUCT". Below this node you define 32 elements.
If an _address config is added at the node the driver writes the information for every bit to the elements.
Please note that a configuration like this is counted as 32 I/Os.
Best Regards
Leopold Knipp
Senior Support Specialist
- NFedorenko
- Posts:45
- Joined: Wed Jun 15, 2016 5:41 pm
Re: bit32 alarms
One solution is to make DPEL_BOOL_STRUCT and to use _dp_fct config for those 32 bool elements. For each element you can use mask like dpe1 & 0x0010000... So it will be internal dpe, and no need to use script. Sure you can use other configs (alert_hdl) for that elements.
- twinsen
- Posts:16
- Joined: Mon Jan 30, 2017 1:31 pm
Re: bit32 alarms
Nikolay, but ios will be still counted as 32?
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: bit32 alarms
I'll start to disappoint you.
* separating the UINT using dp functions means that you'll add stress to the Event manager (we had a project that was only busy doing calculations)
* The dp function wont work for all attributes. E.g. the bit wil not receive the quality of the UINT32
* You'll not have any old/new comparison or smoothing. You'll archive more than you hoped for
In my opinion..... you'll regret this. They best option is to adjust your license and let the driver handle this
Share the fun
Frenk
* separating the UINT using dp functions means that you'll add stress to the Event manager (we had a project that was only busy doing calculations)
* The dp function wont work for all attributes. E.g. the bit wil not receive the quality of the UINT32
* You'll not have any old/new comparison or smoothing. You'll archive more than you hoped for
In my opinion..... you'll regret this. They best option is to adjust your license and let the driver handle this
Share the fun
Frenk
- twinsen
- Posts:16
- Joined: Mon Jan 30, 2017 1:31 pm
Re: bit32 alarms
Thanks for replies everyone. That's a pity! It's a pretty common way to save tags in other SCADAs - pack states into bits on PLC's side and unpack and trigger alarms on them on the other side.
I guess I'll have to stick with the DPEL_BOOL_STRUCT solution after all.
But still... wasting precious ios on a simple task like that: 1io vs 32 - breakes my heart
I guess I'll have to stick with the DPEL_BOOL_STRUCT solution after all.
But still... wasting precious ios on a simple task like that: 1io vs 32 - breakes my heart
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: bit32 alarms
In case you want to save datapoint element you could configure a multi-instance alert and use scripting to set and remove these alarms. But this is not an easy task.
To prevent a dp function from writing the result you can use the 'removeDoneCB' function.
To prevent a dp function from writing the result you can use the 'removeDoneCB' function.