FB_SoEReset

FB_SoEReset 1:

The functionblock FB_SoEReset can be used to execute a drive reset (S-0-0099). Drives with more than on channel may require a reset on all channels. The timeout time must be 10s, because the reset can take up to 10s.

For the AX5000 the flag "Wait For WcState is OK" in the Advanced EtherCAT Settings has to be active.

FB_SoEReset 2:

An NC-Reset is not executed.

If an NC-Reset is necessary, it can be executed via the MC_Reset block from the TcMc.lib

VAR_INPUT

VAR_INPUT
    NetId    : T_AmsNetId := '';
    Execute  : BOOL;
    Timeout  : TIME := T#10s;
END_VAR

NetId: A string containing the AMS network identifier of the PC.

Execute: The block is activated by a rising edge at this input.

Timeout: Maximum time allowed for the execution of the function block.

VAR_IN_OUT

VAR_IN_OUT
    Axis : AXIS_REF; (* Axis reference *)
END_VAR

Axis: Axis structure (see TcMC2.lib).

VAR_OUTPUT

VAR_OUTPUT
    Busy         : BOOL;
    Error        : BOOL;
    AdsErrId     : UINT;
    SercosErrId  : UINT;
END_VAR

Busy: This output is set when the function block is activated and remains set until an acknowledgement is received.

Error: This output is set up after the bBusy output has been reset if there has been an error in transmission of the command.

AdsErrId: Supplies the ADS error code associated with the most recently executed command if the Error output is set.

SercosErrId: Supplies the Sercos error code associated with the most recently executed command if the Error output is set.

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