MMF_USUB: User Subroutine
(Original Document)
Function Description
This function block can execute user subroutines. User subroutines are special built-in routines constructed to simplify a multi-step process.
Additional parameters EN and ENO may be configured.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL MMF_USUB_Instance (S:=0, R:=configurationSaved,
    AXIS_ID:=1, OPCODE:=UMMF_saveConfig,
    MFB:=MFB, Q=>configurationSaved)
Representation in ST
Representation
MMF_USUB_Instance (S:=0, R:=configurationSaved,
    AXIS_ID:=1, OPCODE:=UMMF_saveConfig,
    MFB:=MFB, Q=>configurationSaved) ;
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
Data Type
Meaning
MFB
Must be connected to the MMFStart block of 200 registers (usually named MFB).
Description of output parameters:
Parameter
Data Type
Meaning
Q
BOOL
True when this subroutine has been recognized by 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.
Runtime Errors
For a list of all error codes and values of the block, refer to Tables of Error Codes for the Motion Library.