ECATReadData

PLCopen motion icon Pipe Network motion icon

 FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Reads cyclic parameter (byte offset format).

Inputs

Input

Data Type

Range

Unit

Default

Description

Offset

UINT

0 to 1500

Bytes

No default

Offset in bytes from the beginning of the frame.

The 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.

Nbytes

SINT

1, 2, or 4

Bytes

No default

Number of bytes to read.

Direction

BOOL

0, 1

N/A

No default

Direction of the frame.

  • TRUE = output image.
  • FALSE = input image.

Outputs

Output

Data Type

Range

Unit

Description

Value

DINT

No range

N/A

Value of the EtherCAT frame.

Remarks


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


  • 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 2147483647 (The sign bit represents the most significant bit in the data word).

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

// Read 4 bytes starting at offset 26 of the output image 
Position := ECATReadData(26, 4, true);

See Also

ECATWriteData