ns=2;s=DEPRAG Smart/Devices/General/OpenProtocol/RemoveDevice
Removes a device from the OpenProtocolDevices list.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bOpenProtocolRemoveDevice : BOOL;
OutputDataOpenProtocolRemoveDevice : ST_Int32OutputData;
hrOpenProtocolRemoveDevice : HRESULT;
fbOpenProtocol : FB_OpenProtocol;
END_VAR
hrOpenProtocolRemoveDevice := fbOpenProtocol.RemoveDevice(
bExecute := bOpenProtocolRemoveDevice,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
nDeviceId := 0,
OutputData => OutputDataOpenProtocolRemoveDevice);
IF hrOpenProtocolRemoveDevice <> S_FALSE THEN
bOpenProtocolRemoveDevice := 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".