F_iecSetAOQuality
This function sets / resets the quality flags of an application object to a defined value.
FUNCTION F_iecSetAOQuality: UDINT
VAR_INPUT
QMsk : DWORD;
END_VAR
VAR_IN_OUT
dbEntry : ST_IEC870_5_101AODBEntry;
device : ST_IEC870_5_101DeviceInterface;
END_VAR
QMsk : Quality-Flags. The Quality-Flags can be combined with OR Linking. If QMsk = zero, no flags are set/reset. See: List of available quality-flags.
dbEntry: Application object whose status of the Quality-Flags are to be set.
device: Communication interface of IEC device.
Return parameter | Description |
---|---|
0 | No error |
<> 0 | error: IEC60870-5-10x error code |
Example for a call in ST:
PROGRAM MAIN
VAR
slave1AODB : ARRAY[1..199] OF ST_IEC870_5_101AODBEntry;
server1 : FB_IEC870_5_104Slave;
...
bBlock : BOOL;
bUnblock : BOOL;
bIsBlocked : BOOL;
END_VAR
Program code:
IF bBlock THEN
bBlock := FALSE;
F_iecSetAOQuality( IECQ_BL_ON, slave1AODB[1], server1.system.device );
END_IF
IF bUnblock THEN
bUnblock := FALSE;
F_iecSetAOQuality( IECQ_BL_OFF, slave1AODB[1], server1.system.device );
END_IF
bIsBlocked := SEL( ( F_iecGetAOQuality( slave1AODB[1], server1.system.device ) AND IECQ_BL_ON ) = IECQ_BL_ON, FALSE, TRUE );
Requirements
Development Environment | Target System | PLC libraries to include |
---|---|---|
TwinCAT v2.9.0 Build >= 1030 | PC or CX (x86) | TcIEC870_5_101.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib; are included automatically ) |
TwinCAT v2.10.0 Build >= 1301 | CX (ARM) |