Chapter 12 Troubleshooting
1
11.3.11 MC_SetPosition
FB/FC Explanation Applicable model
FB
MC_SetPosition is used to set the position of the axis to a given value and
no actual axis motion is brought accordingly.
DVP15MC11T
MC_SetPosition
Axis Done
MC_SetPosition_instance
Execute
Position
Busy
Error
Relative
ReferenceType
ErrorID
ExecutionMode
Input Parameters
Parameter name Function Data type
Validation timing
Axis
the axis which is to be
USINT
(The variable value
Execute
changes from
Execute
executed when
Execute changes from
BOOL
TRUE or FALSE
(FALSE)
-
Position
Position.
(Unit: Unit)
LREAL
positive number or 0
(0)
Execute
changes from
FALSE to TRUE
Relative
mode or absolute
mode for the target
position and current
BOOL
TRUE or FALSE
(FALSE)
When Execute
changes from
FALSE to TRUE
ReferenceType
Specify the position
type for reference.
MC_
ReferenceType
Position
1: mcActual Position
When Execute
changes from
FALSE to TRUE
ExecutionMode Reserved
Output Parameters
Function Data type Valid range
Done
TRUE when the instruction is completed.
BOOL TRUE / FALSE
Busy TRUE while the instruction is being executed. BOOL TRUE / FALSE
Error TRUE while there is an error. BOOL TRUE / FALSE
ErrorID
Contains error codes when an error occurs. Please refer
to section 12.2 for the corresponding error code.
WORD
11-73