MC_ReadActualVelocity
The MC_ReadActualVelocity returns the actual (feedback) velocity of the axis in user units as configured by the user.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| B | Axis | AXIS_REF | Logical axis reference. | |
| VAR_INPUT |
|
|||
| B | Enable | BOOL | The function block will continue to execute every scan while Enable is TRUE and there are no errors. | FALSE |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | The Valid output indicates that the function block is operating normally and the outputs of the function block are valid. | |
| B | 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. | |
| B | 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. | |
| B | Velocity | LREAL | The value of the actual velocity in [user units/s] | |
Notes
For servos, the output 'Velocity' is a signed value. The actual velocity is also available using MC_ReadParameter 1001. For additional parameters related to the axis velocity, check the Axis Parameter List.
-
VFDs with Modbus RTU connection:
-
Axis_REF: Logical
axis number and driver type have to be defined
-
The block, based on the frequency reading from the axis, converts the value to the current velocity.
-
-
The current velocity is read and is not rounded up. Due to the accuracy of the velocity in the drive, it may differ from the set velocity.
-
Note that the Velocity value is refreshed along with the status of the axis. The current status of an axis is only checked if a function with a higher priority is not being executed.
-
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
Example
Instance of
MC_ReadActualVelocity
reading Servo Axis 1. The axis is commanded a velocity of 10.0 by
MC_MoveVelocity.
The LogicAnalyzer timing trace for the above example of MC_ReadActualVelocity is shown below:
Error Description
See the
Function Block ErrorID List