MC_ReadActVel
Description
-
- This function or function block returns cached data. See Programming a Dual Core Controller for more information.
Arguments
For more detail on how inputs and outputs work, refer to PLCopen Function Blocks - General Rules
Input
Enable | Description | Requests to read the axis's actual velocity |
Data type | BOOL | |
Range | 0, 1 | |
Unit | n/a | |
Default | — | |
Axis | Description | Name of a declared instance of the AXIS_REF library function. For more details, About Axis Name and Number |
Data type | AXIS_REF | |
Range | [1,256] | |
Unit | n/a | |
Default | — |
Output
Valid | Description | Indicates the value at the ActualVelocity output is available |
Data type | BOOL | |
Busy | Description | Indicates this function block is executing |
Data type | BOOL | |
Error | Description | Indicates an invalid input |
Data type | BOOL | |
ErrorID | Description | Indicates the error if Error output is set to TRUE. |
Data type | INT | |
ActualVelocity | Description |
Actual velocity of the axis. Please note that oscillations may be seen due to this being an instant velocity, not an average velocity. |
Unit | User unit/sec | |
Data type | LREAL |
Example
Structured Text
* MC_ReadActVel ST example *); Inst_MC_ReadActVel( TRUE, Axis1 ); //Inst_MC_ReadActVel is an instance of MC_ReadActVel function block ActualVel := Inst_MC_ReadActVel.ActualVelocity; // store ActualVelocity output into a user defined variable
Ladder Diagram