FB_SoEReset
The drive (S-0-0099) can be reset with the function block FB_SoEReset. In the case of multiple-channel devices if necessary, both channels will have to perform a reset. The timeout time must be 10 s, as the reset can take up to 10 s depending on the error. The flag "Wait For WcState is OK" must be enabled in the advanced EtherCAT settings for the AX5000.
An NC reset will not be performed. If an NC reset is necessary, it can be executed via the function block MC_Reset from the Tc2_MC2 PLC library.
Inputs
VAR_INPUT
NetId : T_AmsNetID := '';
Execute : BOOL;
Timeout : TIME := T#10s;
END_VAR
Name | Type | Description |
---|---|---|
NetId | T_AmsNetID | String which contains the AMS Network ID of the PC (type: T_AmsNetId). |
Execute | BOOL | The function block is enabled via a positive edge at this input. |
Timeout | TIME | Maximum time allowed for the execution of the function block. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
Busy : BOOL;
Error : BOOL;
AdsErrId : UINT;
SercosErrId : UINT;
END_VAR
Name | Type | Description |
---|---|---|
Busy | BOOL | This output is set when the function block is activated, and remains set until a feedback is received. |
Error | BOOL | This output is set after the Busy output has been reset when an error occurs in the transmission of the command. |
AdsErrId | UINT | In the case of a set Error output returns the ADS error code of the last executed command. |
SercosErrId | UINT | In the case of a set Error output returns the Sercos error of the last executed command. |
Sample
fbSoEReset : FB_SoEReset;
SoEReset : BOOL;
(* NcAxis *)
Axis : AXIS_REF;
IF SoEReset THEN
fbSoEReset(
Axis := Axis,
Execute := TRUE,
);
IF NOT fbSoEReset.Busy THEN
fbSoEReset(Axis := Axis, Execute := FALSE);
SoEReset := FALSE;
END_IF
END_IF