FunctionECATReadDataPLCopen motion iconPipe Network motion icon


  • This is a low level function and it should only be used carefully by advanced users.

Description

This function allows a direct access to the memory image of the EtherCATClosed ***EtherCAT is an open, high-performance Ethernet-based fieldbus system. The development goal of EtherCAT was to apply Ethernet to automation applications which require short data update times (also called cycle times) with low communication jitter (for synchronization purposes) and low hardware costs frame which is sent or received when you need to debug your application. You access the EtherCAT image element by giving the offset in the image and the size of the element.

If you have a device other than the drive, ECATReadData is used for more than just debug. It is used to get the status of the module (e.g. Stepper I/O slice).

Arguments

Input

Offset Description Offset in bytes from the beginning of the frame

  • The Offset value required to access may change when the firmware for any device on the EtherCAT network is updated or whenever the EtherCAT network topology changes. When performing an update of a network device or changing the network topology, one should export the ENI file and check the Offset value needed to access the desired information.
  Data type UINT
  Range 0-size of frame
(maximum size of an EthernetClosed Ethernet is a large, diverse family of frame-based computer networking technologies that operate at many speeds for local area networks (LANs) frame is 1500)
  Unit bytes
  Default
Nbytes Description Number of bytes to read
  Data type SINT
  Range 1, 2 or 4
  Unit bytes
  Default
Direction Description Direction of the frame (true = output image, false = input image).
  Data type BOOL
  Range 0, 1
  Unit N/A
  Default

  • The valid ranges for the Value parameter are:
    For 1 byte: 0 to 255
    For 2 bytes: 0 to 65535
    For 4 bytes: - 2147483648 to 2147483648 (The sign bit represents the most significant bit in the data word)

Output

Value Description Value of the EtherCAT frame
  Data type DINT
  Unit N/A

Related Functions

ECATGetObjVal

Example

Structured Text

 

// Read 4 bytes starting at offset 26 of the output image

 

Position := ECATReadData(26, 4, true);

 

FBD

FFLD

Go back to the top of the page [Top]