Description
Motion Control instruction "MC_WriteParam" enables the writing of tags of the positioning axis technology object in the user program. In contrast to the value assignment of the tags in the user program, "MC_WriteParam" can also change values of read-only tags.
You can learn about the tags, the conditions under which they can be written and the time at which they take effect in the description of the technology object tags.
Requirements
-
The positioning axis technology object has been configured correctly.
-
To write tags that are read-only in the user program, the axis must be disabled.
Override response
A MC_WriteParam command cannot be aborted by any other Motion Control command.
A new MC_WriteParam command does not abort any active Motion Control commands.
Parameters
|
Parameter |
Declaration |
Data type |
Default value |
Description |
|
|---|---|---|---|---|---|
|
Parameter |
INPUT |
VARIANT (BOOL, INT, DINT, UDINT*, REAL) *) as of V5 |
- |
VARIANT pointer to the technology object tag positioning axis (destination address) to be written |
|
|
Value |
INPUT |
VARIANT (BOOL, INT, DINT, UDINT*, REAL) *) as of V5 |
- |
VARIANT pointer to the value to be written (source address) |
|
|
Execute |
INPUT |
BOOL |
FALSE |
Start of the command with a positive edge |
|
|
Done |
OUTPUT |
BOOL |
FALSE |
TRUE |
Value was written |
|
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 V4...5 (S7-1200)
MC_Reset: Acknowledge fault, restart technology object V4...5 (S7-1200)
MC_Home: Home axis, set home position V4...5 (S7-1200)
MC_Halt: Stop axis V4...5 (S7-1200)
MC_MoveAbsolute: Absolute positioning of axis V4...5 (S7-1200)
MC_MoveRelative: Relative positioning of axis V4...5 (S7-1200)
MC_MoveVelocity: Move axis at set velocity V4...5 (S7-1200)
MC_MoveJog: Move axis in jog mode V4...5 (S7-1200)
MC_CommandTable: Run axis commands as motion sequence V4...5 (S7-1200)
MC_ChangeDynamic: Change dynamic settings of axis V4...5 (S7-1200)
MC_ReadParam: Continuously read motion data of a positioning axis V4...5 (S7-1200)
S7-1200 Motion Control V1...3 (S7-1200)