Description
The Motion Control instruction "MC_ReadParam" enables continuous reading of motion data and status messages of an axis. The current value of the corresponding tags is determined at the start of the command.
The following motion data and status messages can be read:
-
As of technology version V4:
-
Setpoint position of the axis
-
Setpoint and actual velocity of the axis
-
Current distance of axis from target position
-
Target position of the axis
-
-
Additional as of technology version V5:
-
Actual position of the axis
-
Actual velocity of the axis
-
Current following error
-
Drive status
-
Encoder status
-
Status bits
-
Error bits
-
Requirements
The positioning axis technology object has been configured correctly.
Override response
A MC_ReadParam command cannot be aborted by any other Motion Control command.
A new MC_ReadParam command does not abort any active Motion Control commands.
Parameters
|
Parameter |
Declaration |
Data type |
Default value |
Description |
|
|---|---|---|---|---|---|
|
Enable |
INPUT |
BOOL |
FALSE |
TRUE |
Read the tag specified with the "Parameter" and store the value in the destination address specified with "Value". |
|
FALSE |
Do not update assigned motion data |
||||
|
Parameter |
INPUT |
VARIANT (REAL) |
- |
VARIANT pointer to the value to be read. The following tags are permitted:
The description of the tags named and the tag structures can be found in the Appendix AUTOHOTSPOT. |
|
|
Value |
INOUT |
VARIANT (REAL) |
- |
VARIANT pointer to the target tag or destination address to which the read value is to be written. |
|
|
Valid |
OUTPUT |
BOOL |
FALSE |
TRUE |
The read value is valid. |
|
FALSE |
The read value is invalid. |
||||
|
Busy |
OUTPUT |
BOOL |
FALSE |
TRUE |
The command is being executed |
|
Error |
OUTPUT |
BOOL |
FALSE |
TRUE |
An error occurred during execution of the command. The cause of the error can be found in parameters "ErrorID" and "ErrorInfo". |
|
ErrorID |
OUTPUT |
WORD |
16#0000 |
Error ID for parameter "Error" |
|
|
ErrorInfo |
OUTPUT |
WORD |
16#0000 |
Error info ID for parameter "ErrorID" |
|
See also
MC_Power: Enable, disable axis as of V6 (S7-1200)
MC_Reset: Acknowledge fault, restart technology object as of V6 (S7-1200)
MC_Home: Home axes, set reference point as of V6 (S7-1200)
MC_Halt: Stop axis as of V6 (S7-1200)
MC_MoveAbsolute: Absolute positioning of axis as of V6 (S7-1200)
MC_MoveRelative: Relative positioning of axis as of V6 (S7-1200)
MC_MoveVelocity: Move axis at set velocity as of V6 (S7-1200)
MC_MoveJog: Move axis in jog mode as of V6 (S7-1200)
MC_CommandTable: Run axis commands as motion sequence as of V6 (S7-1200)
MC_ChangeDynamic: Change dynamic settings of axis as of V6 (S7-1200)
MC_WriteParam: Write tag of positioning axis as of V6 (S7-1200)