ns=2;s=DEPRAG Smart/Devices/General/OpenProtocol/OpenProtocolDevices/0/SetTighteningProgram
Selects a screwdriving program.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bOpenProtocolSetTighteningProgram : BOOL;
OutputDataOpenProtocolSetTighteningProgram : ST_VoidOutputData;
hrOpenProtocolSetTighteningProgram : HRESULT;
fbOpenProtocol : FB_OpenProtocol;
END_VAR
hrOpenProtocolSetTighteningProgram := fbOpenProtocol.SetTighteningProgram(
bExecute := bOpenProtocolSetTighteningProgram,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sDeviceId := '0',
nProgramNumber := 1,
OutputData => OutputDataOpenProtocolSetTighteningProgram);
IF hrOpenProtocolSetTighteningProgram <> S_FALSE THEN
bOpenProtocolSetTighteningProgram := 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".