ns=2;s=DEPRAG Smart/Devices/DEPRAG/AST/RemoveDevice
Terminates the connection to the device and removes it from the ActiveDevices list.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bAstRemoveDevice : BOOL;
outputAstRemoveDevice : ST_Int32OutputData;
hrAstRemoveDevice : HRESULT;
fbAst : FB_AST;
END_VAR
hrAstRemoveDevice := fbAst.RemoveDevice(
bExecute := bAstRemoveDevice,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
nDeviceId := 10,
OutputData => outputAstRemoveDevice);
IF hrAstRemoveDevice <> S_FALSE THEN
bAstRemoveDevice := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".