IOF_SER_DRIVE_Reset
The function block "IOF_SER_DRIVE_Reset" performs a drive reset of a SERCOS drive. The drive errors are cleared.
Internally, an instance of the ADSWRITE function block is called.
VAR_INPUT
VAR_INPUT
sNetId : T_AmsNetId;
nPort : UINT;
bReset : BOOL;
tTimeout : TIME;
END_VAR
sNetId: It is possible here to provide the AmsNetId of the TwinCAT computer on which the ADS command is to be executed. If it is to be run on the local computer, an empty string can be entered.
nPort: The port number nPort is specified by the TwinCAT System Manager during the hardware configuration.
bReset: The function block is activated by a positive edge at this input.
tTimeout: States the length of the timeout that may not be exceeded by execution of the ADS command.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrId : UDINT;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until and acknowledgement is received.
bError: If an ADS error should occur during the transfer of the command, then this output is set once the bBusy output is reset.
nErrId: Supplies the ADS error number when the bError output is set.
Requirements
Development environment | Target system type | IO hardware | PLC libraries to include |
---|---|---|---|
TwinCAT v2.8.0 Build > 743 | PC (i386) | Sercans SCS-P ISA; Sercans SCS-P PCI; | TcIoFunctions.Lib ( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib are included automatically ) |