ns=2;s=DEPRAG Smart/Devices/General/OpenProtocol/OpenProtocolDevices/0/Disconnect
Disconnects the connection to an Open Protocol device.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bOpenProtocolDisconnect : BOOL;
OutputDataOpenProtocolDisconnect : ST_VoidOutputData;
hrOpenProtocolDisconnect : HRESULT;
fbOpenProtocol : FB_OpenProtocol;
END_VAR
hrOpenProtocolDisconnect := fbOpenProtocol.Disconnect(
bExecute := bOpenProtocolDisconnect,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sDeviceId := '0',
OutputData => OutputDataOpenProtocolDisconnect);
IF hrOpenProtocolDisconnect <> S_FALSE THEN
bOpenProtocolDisconnect := 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".