Y_ReadDriveMemory
The Y_ReadDriveMemory function block reads two or four bytes of data from the specified drive's memory.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference | 0 |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge, all function block inputs are read and the function block is initiated. | 0 |
| V | Address | UDINT | Memory address | 0 |
| V | DataType | INT | Enumeration with the following values. 0 = Default (UDINT); 1 = UINT, 2 = UDINT; 3 = INT; 4 = DINT | 0 |
| VAR_OUTPUT | ||||
| B | Done | BOOL | Set high when the commanded action has completed successfully. If another block takes control before the action is completed, the Done output will not be set. This output is reset when Execute goes FALSE. | |
| B | Busy | BOOL | Set high upon the rising edge of the Execute input, and reset when Done, or Error is true. In the case of a function block with an Enable input, a Busy output indicates the function is operating, but not ready to provide Valid information. (No Error) | |
| B | Error | BOOL | Set high if an error has occurred during the execution of the function block. This output is cleared when 'Execute' or 'Enable' goes low. | |
| E | ErrorID | UINT | If Error is true, this output provides the Error ID. This output is reset when 'Execute' or 'Enable' goes low. | |
| E | Value | DWORD | The value read from the drive memory register. | |
Notes
- If the memory to be written is a 32 bit value, the DataType override is not necessary. 32 bit is assumed to be the default.
DataType is an enumeration with the following values:
0 = default (UDINT,4 bytes),
1 = UINT(2 bytes),
2 = UDINT (4 bytes),
3 = INT (2 bytes),
4 = DINT (4 bytes).
- The function block does not validate the memory range, leaving this to the drive.
(Note: because the drive responds to out-of-range conditions with transient errors that are not reported, all writes should be verified by readback.) - Y_ReadDriveMemory on iCube uses 40h-style memory bus addresses. Below are examples of addresses for certain parameters
| Address | Function | Bytes | Types | Data Type |
|---|---|---|---|---|
| 0x0100 |
Speed loop gain | 2 | Unsigned | UINT (1) |
| 0x0124 |
Friction compensation | 2 | Signed | INT (3) |
| 0x0210 |
Gear ratio | 4 | Unsigned |
USINT (2) |
| 0x0231 |
Backlash compensation | 4 | Signed | DINT (4) |
| 0xE51C |
Control Mode | 2 | Unsigned | UINT(1) |
Additional memory addresses can be found in the document:
Servodrive Σ-7 series Message communication register specifications Ver1.1.14.0
Error Description
See the
Function Block ErrorID List
Example 1
This is an example of how this FB should be used in the application.