FB_EcMasterObjectID

The FB_EcMasterObjectID function block can be used to determine the object ID of the EtherCAT master device.
Inputs
VAR_INPUT
sNetId : T_AmsNetId;
bExecute : BOOL;
tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VARName | Type | Description |
|---|---|---|
sNetId | String containing the AMS network ID of the EtherCAT master device. | |
bExecute | BOOL | The function block is enabled by a positive edge at this input. |
tTimeout | TIME | Maximum time allowed for the execution of the function block. |
Outputs
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrId : UDINT;
oidEcMaster : OTCID;
END_VARName | Type | Description |
|---|---|---|
bBusy | BOOL | This output is set when the function block is activated, and remains set until feedback is received. |
bError | BOOL | This output is set after the bBusy output has been reset when an error occurs in the transmission of the command. |
nErrId | UDINT | Supplies the ADS error code associated with the most recently executed command if the bError output is set. |
oidEcMaster | OTCID | Object ID of the EtherCAT master device |
Requirements
Development Environment | Target platform | PLC libraries to include |
|---|---|---|
TwinCAT v3.1.4024.56 | PC or CX (x86, x64, Arm®) | Tc2_EtherCAT >= 3.7.1.0 |