Sample function block from SEW-EURODRIVE
The FB_ParameterCoE_ReadWrite_GenC sample function block from SEW-EURODRIVE can be used to read and write parameters acyclically.
The inputs and outputs of the function block are described as follows:
Type | Parameter | Value |
|---|---|---|
Input | xEnable | Positive edge that starts the SDO service. |
Input | Interface | Name of the interface of the PLC to the stations. For POWERLINK the name is "IF3". |
Input | PLKStation | Node number of the station with which the SDO service is to be run. |
Input | nIndex | Index of the parameter that is to be read or written. In the MOVISUITE® engineering software, the index is displayed in the tooltip of the parameter. The subindex is separated from the index number by a dot. |
Input | nCoEService | Pointer to the data range in which the read parameter is to be stored. |
Input | nAxisNumber | If you are using a double-axis module, enter the number of the axis. For all other inverters the value "1" must be entered. |
Input | nSubindex | Subindex of the parameter that is to be read or written. In the MOVISUITE® engineering software, the index is displayed in the tooltip of the parameter. The subindex is separated from the index number by a dot. |
Input | nWriteValue | Value that is to be written in a write operation. |
Input | nByteSize | Length of the parameter in bytes that is to be read or written. |
Output | xError_CoE | If an error is detected, the output has the value "TRUE". |
Output | xCoEDone | If the service was carried out successfully, the output has the value "TRUE". |
Output | nErrid_ADS | Error information. For more information on SDO abort codes, refer to the online help of the Automation Studio engineering tool. |
Output | xCoEBusy | If the function block is active, the output has the value "TRUE". |
Output | xInit | If the values of the following inputs are valid, the output has the value "TRUE":
|
Output | nReadValue | Value that was read during a read operation. |