F_iecGetAOQuality

This function reads the status of the qualitiy flag of an application object.
FUNCTION F_iecGetAOQuality: DWORD
VAR_IN_OUT
dbEntry : ST_IEC870_5_101AODBEntry;
device : ST_IEC870_5_101DeviceInterface;
END_VAR
dbEntry : Application object whose qualitiy flags are to be read.
device: Communication interface to IEC device.
Return parameter | Description |
---|---|
0 | error , no qualtiy flag for this application object available. |
<> 0 | No error. The return parameter delivers the status of the Quality-Flags. See: available Quality-Flags. |
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) |