ECATWriteData

PLCopen motion icon Pipe Network motion icon

 Function - Writes 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 Ethernet frame is 1500.


  • 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, export the ENI file and check the Offset value needed to access the desired information.

Nbytes

SINT

1, 2, or 4

Bytes

No default

Number of bytes to write.

Value

DINT

-2147483648 to 2147483647

N/A

No default

Value to be written in the image.

Only the number of bytes specified by Nbytes is copied.

Outputs

Output

Data Type

Range

Unit

Description

Default (.Q)

BOOL

FALSE, TRUE

N/A

TRUE if the data was written.

See Function - General Rules.

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).
  • Modify the EtherCAT process image by directly writing values in it.
  • If you have a device other than the drive, this function is used for more than just debug.
    • It is used to set the status of the module (e.g., Stepper I/O slice) in the case the project is based on an external XML file because it contains unsupported EtherCAT device.
    • See Add an Unsupported EtherCAT Device for more information.

FBD Language Example

FFLD Language Example

IL Language Example

Not available.

ST Language Example

//For use with Kollmorgen Thermocouple slice I/O to read in deg C
//Lookup offset by exporting ENI file after EtherCAT network is scanned
//Use offst 124 (byte) to write 0 in control word to allow temperature to be shown on status byte

ON WriteControlOnly DO
ECATWriteData
( 124, 1, 0 );
END_DO

See Also

ECATReadData