Y_WriteDriveMemory
The
Y_WriteDriveMemory
function block writes two or four bytes of data to 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 | Value | DWORD | Value that the user wishes to write to the memory register in DWORD format. | 0 |
| V | DataType | INT | Enumeration with the following values. 0 = Default (UDINT); 1 = UINT, 2 = UDINT; 3 = INT; 4 = DINT | 0 |
| V | Mode | INT | Enumeration with the following values. 0 = Default (Volatile), 1 = Volatile; 2 = Non volatile. ( Only mode = 0 is supported) | 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. | |
Notes
- Only works with Yaskawa Servopacks which implement memobus
- The address map varies on a per-device basis
- Please contact your Yaskawa representative if you need the internal address of specific parameters on the servopack.
- Mode = 0 is the only option supported.
- Y_WriteDriveMemory on iCube uses 40h-style memory bus addresses. Below are examples of addresses for certain parameters
| Address | Function | Bytes | Types | Data Type |
|---|---|---|---|---|
| 0xE51C |
Control Mode | 2 | Unsigned | UINT(1) |
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.)
Error Description
See the
Function Block ErrorID List
Example 1
This is an example of how this FB should be used in the application.