CoE

Some input and output components of control systems can be parameterized. For EtherCAT components, parameterization is based on the Can-Application-protocoll-over-EtherCAT (CoE) standard, see information on the CoE interface. VIs that enable you to read and write CoE objects from LabVIEW™ are described below. The AMS address of the EtherCAT device is used here. The address is made up of the master AMS NetId and AMS port of the client. The folder contains the following VIs:

The example CoE Read or Write describes the use of CoE blocks.

Read CoE List

The VI Read CoE List reads a CoE directory of a subscriber and lists all objects in an array that are available for the selected device. The objects are identified via indices that are used by subsequent CoE VIs for access.

CoE 1:

Input/output

Meaning

[0][4] Handle

Handle to the ADS client

[5][6] DeviceAddress

AMS address of the device consisting of:

  • AMS NetId of the master
  • AMS port of the client

[7] ListType

LabVIEW™ Enum

Describes which indices from the directory are to be listed:

  • TotalNumberOfLists: Lists the number of elements in the AllCoEObjects, RxPDOs, TxPDOs, StoredForDevice and StartUp directories.
  • AllCoEObjects: List of all CoE objects
  • RxPDOs: List of all RxPDO objects
  • TxPDOs: List of all TxPDO objects
  • SettingObjects: List of all objects that are relevant when the device is replaced.
  • StartUp: List of objects that can be used as StartUp parameters.

[8] List

1D array of the indices of the objects

Read CoE Description

The VI Read CoE Description calls up the CoE object description of the device and sends it to LabVIEW™. The description includes the object name and the number of entries or subindices of the object.

CoE 2:

Input/output

Meaning

[0][4] Handle

Handle to the ADS client

[5][6] DeviceAddress

AMS address of the device consisting of:

  • AMS NetId of the master
  • AMS port of the client

[7] Index

Index of the object

[8] ObjectName

Name of the object

[10] ObjectDescription

LabVIEW™ cluster consisting of the following elements:

  • Index: Index of the object
  • DataType: Data type of the object
  • MaxSubIndex: Number of subindices of the object

Read CoE Entry

The VI Read CoE Entry reads a CoE entry of an object. The object is referenced via the index and subindex. Information is returned, such as the name of the entry and the access.

CoE 3:

Input/output

Meaning

[0][4] Handle

Handle to the ADS client

[5][6] DeviceAddress

AMS address of the device consisting of:

  • AMS NetId of the master
  • AMS port of the slave

[7] Index

Index of the object

[8] Entry Name

Type of entry

[9] SubIndex

Subindex of the entry

[10] CoE Entry

LabVIEW™ cluster consisting of the following elements:

  • Index: Index of the object
  • SubIndex: Subindex of the entry
  • BitLength: The length of the entry in bits
  • ObjectAccess: Information on changeability, e.g. whether it can only be read or also written.

Read CoE Value

The VI Read CoE Value reads the value of a CoE entry. An array of the length BitLength in bytes is returned. The array specifies the value in hexadecimal numbers in little-endian format.

CoE 4:

Input/output

Meaning

[0][4] Handle

Handle to the ADS client

[5][6] DeviceAddress

AMS address of the device consisting of:

  • AMS NetId of the master
  • AMS port of the slave

[7] CoE Entry

LabVIEW™ cluster consisting of the following elements:

  • Index: Index of the object
  • SubIndex: Subindex of the entry
  • DataType: Data type of the entry
  • BitLength: The length of the value of the entry in bits
  • ObjectAccess: Describes the EtherCAT state in which the object can be accessed.

[8] Data

1D byte array with the value of the CoE entry

The value of the CoE entry is displayed in hexadecimal and the bytes are transferred in little-endian order. Character strings and arrays are transferred from left to right, whereby the elements of the array are stored in little-endian.

Write CoE Value

The Write CoE Value block writes the value of the CoE entry. The value to be written is an array of bytes of the size BitLength. The values must be specified in hexadecimal numbers in little-endian format.

CoE 5:

[0][4] Handle

Handle to the ADS client

[5][6] DeviceAddress

AMS address of the device consisting of:

  • AMS NetId of the master
  • AMS port of the slave

[7] Object Entry

LabVIEW™ cluster consisting of the following elements:

  • Index: Index of the object
  • SubIndex: SubIndex of the entry
  • DataType: Data type of the entry
  • BitLength: The length of the value of the entry in bits
  • ObjectAccess: Describes the EtherCAT state in which the object can be accessed.

[9] Data

1D byte array with the value of the CoE entry