Y_WriteDriveParameter
The
Y_WriteDriveParameter
function block writes the specified parameter to the drive or servopack of the specified axis. To transfer a copy of all parameters from the controller to the servopack, use
Y_WriteParameters .
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference. | |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge of the Execute input, all other inputs are read and the function block becomes operational. If an input needs to be modified, the value will have to be changed and the Execute input will have to be re-triggered. | FALSE |
| B | ParameterNumber | UINT | Parameter in the drive. Note that the parameter numbers for the Sigma amplifiers are displayed in hex in all documentation. For consistency, the ParameterNumber can be entered in hex. | UINT#0 |
| V | Retained | BOOL | If set to TRUE, the parameter is written to RAM and ROM. Not supported for Sigma CoE servopacks. See notes for further details. | FALSE |
| B | Value | DINT | Value of the parameter. | DINT#0 |
| V | DataTypeOverride | INT | Please see notes below. | 0 |
| VAR_OUTPUT | ||||
| B | Done | BOOL | The Done output is set to TRUE when the commanded action has completed successfully. If another function block takes control before the action is completed, the Done output will never become TRUE. This output is reset when Execute becomes FALSE. | |
| E | Busy | BOOL | For function blocks with Execute input, the Busy output is set to TRUE upon the rising edge of the Execute, and set to FALSE when Done, CommandAborted or Error outputs becomes TRUE. In the case of a function block with an Enable input, Busy indicates that the function block is operating, but may not be ready to provide valid outputs. | |
| B | Error | BOOL | The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE. | |
| E | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE. | |
Notes
-
For EtherCAT servos controlled by the FMK.
- Retained input is not supported for EtherCAT Sigma servos. Save-to-EEPROM (permanent memory) can be initiated by a specific write value to CoE object 1010h "Store Parameters". This writes all parameters to the EEPROM. Y_EC_COE_SdoWrite can be used to write CoE object 1010 to trigger a permanent write to EEPROM. (Sub index 1 for XS and 7S. Explained further in the Drive manuals)
- In most cases, the drive parameters are 16 bit values and the DataType override is not necessary.
- The parameter size (2 or 4 bytes) and sign is fetched from the default parameter XML files if DataTypeOverride is not connected.
- If the parameter is not found in this file, a “NoDefaultParameterInfo" error will occur.
- For all unsigned 32 bit parameters, the user is responsible for converting Value to UDINT using the DINT_TO_UDINT function since the value might be greater than 268435455. To assist the user in determining if this is needed, a data type output is generated as an output of the Y_ReadDriveParameter FB.
- DataType is defined as follows:
- 1: UINT (2 byte unsigned integer)
- 2: UDINT (4 byte unsigned double integer)
- 3: INT (2 byte integer)
- 4: DINT (4 byte double integer)
-
For VFDs with PROFINET and EtherCAT option cards:
- ParameterNumber: Parameter numbers are displayed in Memobus hex address in all documentation.
- Retained input is not supported.
- DataTypeOverride is not supported.
-
Max of 10 Parameters (Read and Write) can be stored in the Parameter buffer at one time
- ParameterNumber: Parameter numbers are displayed in Memobus hex address in all documentation.
-
For VFDs with
Modbus RTU connection:
-
Axis_REF: Logical
axis number and driver type have to be defined
- ParameterNumber: Parameter numbers are displayed in Memobus hex address in all documentation.
- DataTypeOverride: not supported
-
Max of 10 Parameters (Read and Write) can be stored in the Parameter buffer at one time
-
Further details of the communication management to Yaskawa Drives and Generic Devices are described here:
Modbus RTU Communication Details for Drives and generic Modbus Devices
-
Axis_REF: Logical
axis number and driver type have to be defined
Error Description
See the
Function Block ErrorID List
Example
Shown below is the process of changing parameter Pn170.2 to 4 (changing the "Rigidity Level" to "Tuning-less Level 4"). Note: The conversions ("TO_UINT") are not necessary, this is for displaying purposes only.
Note
The diagram below exemplifies how to specify changes to other parts of the same parameter (if applicable):
More information from official documentation regarding this has been included below:
Below is an example of reading from memory to verify the parameter value:
Note
In order to make the parameter change permanent, use Y_EC_COE_SdoWrite. More specifically, write "save" using a Yt_ByteArray4 to index 16#1010 (depicted below). After a reboot of the servo, the parameter change takes effect.