ECATReadData
Function - 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 Ethernet frame is 1500.
|
Nbytes |
SINT |
1, 2, or 4 |
Bytes |
No default |
Number of bytes to read. |
Direction |
BOOL |
FALSE, TRUE |
N/A |
No default |
Direction of the frame.
|
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).
- Allows a direct access to the memory EtherCAT Process Image of the EtherCAT frame which is sent or received when you need to debug the application.
- 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, this function is used for more than just debug.
- It is used to get 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.
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