EasyManua.ls Logo

SEW-Eurodrive DFE24B EtherCAT - Example of Reading a Parameter in Twincat Via Ethercat

SEW-Eurodrive DFE24B EtherCAT
92 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Manual – Fieldbus Interface DFE24B EtherCA
47
6
Parameterization via EtherCAT
®
Operating Behavior on EtherCAT
®
6.3.2 Example of reading a parameter in TwinCAT via EtherCAT
®
The function SDO-READ is available for reading parameters. The index of the parame-
ter to be read is necessary. The parameter index is displayed in the parameter tree via
tool tip.
For implementation in TwinCAT, the function module FB_EcCoESdoRead is required.
This function module is available in the TcEtherCAT.lib library. This function module can
be integrated in two steps.
1. Creating an instance of the function module FB_EcCoESdoRead.
2. The inputs of the function module are assigned as follows:
sNetID: Net ID of the EtherCAT
®
master
nSlaveAddr: EtherCAT
®
address of the SEW unit from which data is to be read.
nIndex: Index of the parameter to be read.
nSubIndex: Subindex of the parameter to be read.
pDstBuf: Pointer to the data range in which the read parameter is to be stored.
cbBufLen: Maximum memory size for parameters to be read in byte.
bExecute: A positive edge starts the read process.
tTimeout: Timeout interval of the function module.
The output flags bBusy and bError indicate the status of the service. nErrId shows the
error number when the bError flag is set if an error occurs.
The function module is integrated in TwinCAT as follows:
3018638731

Table of Contents

Related product manuals