MMF_SUB: Standard Subroutine
(Original Document)
Function Description
This function block can be used to execute any MMF standard subroutine except moves to CoordinatedSets (see MMF_ESUB).
Additional parameters EN and ENO may be configured.
FBD Representation
Representation:
LD Representation
Representation:
IL Representation
Representation:
CAL MMF_SUB_Instance (S:=setAccel, R:=accelSet, AXIS_ID:=1,
    OPCODE:=MMF_setAccel, PAR3:=10000.0, MFB:=MFB,
    Q=>accelSet)
ST Representation
Representation:
MMF_SUB_Instance (S:=setAccel, R:=accelSet, AXIS_ID:=1,
    OPCODE:=MMF_setAccel, PAR3:=10000.0, MFB:=MFB,
    Q=>accelSet) ;
Parameter Description
Description of input parameters.
Parameter
Data Type
Meaning
S
Rising input starts subroutine.
R
BOOL
Resets block and prevents subroutine from starting (does not halt a subroutine in progress.)
AXIS_ID
Axis ID for this subroutine.
OPCODE
INT
Unique number of the subroutine to be executed.
PAR1
First parameter for this subroutine.
PAR2
UDINT
Second parameter for this subroutine.
PAR3
Third parameter for this subroutine.
PAR4
REAL
Fourth parameter for this subroutine.
Description of in-output parameters.
Parameter
DataType
Meaning
MFB
Must be connected to the MMFStart block of 200 registers (usually named MFB).
Description of output parameters.
Parameter
DataType
Meaning
Q
BOOL
True when this subroutine has been recognized by the motion controller (reset by R).
ERROR
INT
First error code that is generated upon attempting to start this subroutine (written only when Q rises).
RET1
UDINT
First return value from this subroutine.
RET2
REAL
Second return value from this subroutine.
RET3
REAL
Third return value from this subroutine.
Example
The Boolean setAccel turns on, and the new value for the acceleration is written to axis number 1. This block can also be used to get the current settings for parameters in the motion controller. For a list of the correct parameters associated with any Motion C function refer to your MMF user manual.
Runtime Errors
For a list of all error codes and values of the block, refer to Tables of Error Codes for the Motion Library.