FB_WriteDriveParameter
The FB_WriteDriveParameter function block can be used to write various parameters of the Beckhoff servo hardware asynchronously.
Supported Beckhoff hardware | ||
---|---|---|
AX5xxx | AX8xxx / AMP8xxx / MD8xxx | Compact drive technology (servo) |
|
|
|
Inputs
VAR_INPUT
Execute : BOOL;
ParameterNumber : E_DriveParameterNumber;
Mode : E_ReadWriteMode;
Interval : TIME;
Value : ANY;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The function block is activated by a positive edge at this input. |
ParameterNumber | Specifies which parameter is to be written. | |
Mode | Specifies whether the parameter is to be written once or cyclically (as quickly as possible). | |
Interval | TIME | In addition to E_ReadWriteMode.Cyclic, an interval time can be specified here in which the parameter is to be written. |
Value | ANY | A variable of the correct type must be passed for the parameter. The required type is specified as a comment after the entry in the E_DriveParameterNumber structure. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | Axis data structure that unambiguously addresses an axis in the system. Among other parameters it contains the current axis status, including position, velocity or error state. |
Outputs
VAR_OUTPUT
Valid : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorID : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Valid | BOOL | This output is set when valid information has been written to the drive. |
Busy | BOOL | This output is set when the function block is activated, and remains set until feedback is received. |
Error | BOOL | This output is set after the Busy output has been reset when an error occurs in the transmission of the command. |
ErrorID | UDINT | In the event of a set error output returns the ADS error code. |
Requirements
Development environment | Target platform type | PLC libraries to include | Firmware version | Revision |
---|---|---|---|---|
TwinCAT ≥4024.67 | PC or CX (x86 or x64) | Tc2_MC2_Drive ≥V3.3.51.0 |
| ≥0032 |