MMF_ESUB: Subroutine Using Extended Parameters
(Original Document)
Function Description
Issues an MMFStart subroutine using extended parameters.
Additional parameters EN and ENO may be configured.
FBD Representation
Representation:
LD Representation
Representation:
IL Representation
Representation:
CAL MMF_ESUB_Instance (S:=coordMove, R:=reset,
    AXIS_ID:=CS1, OPCODE:=MMF_moveQueue,
    PAR1:=MMF_ABS_MOVE, EPAR:=SubroutineParameter,
    NUMEPAR:=NumberOfSubroutine, MFB:=MFB, Q=>nextMove)
ST Representation
Representation:
MMF_ESUB_Instance (S:=coordMove, R:=reset,
    AXIS_ID:=CS1, OPCODE:=MMF_moveQueue,
    PAR1:=MMF_ABS_MOVE, EPAR:=SubroutineParameter,
    NUMEPAR:=NumberOfSubroutine, MFB:=MFB, Q=>nextMove) ;
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.
EPAR
ARRAY [1..16] OF REAL
Extended parameter for this subroutine.
NUMEPAR
NUMEPAR value is the total number of position and velocity and must be an even number.
The valid range is 2 to 16.The consequence of erroneous NUMEPAR value can lead to an uncontroled speed.
CAUTION: Not controlling the speed could lead to overshoot the move.
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.
Example
This function block is designed specifically for executing moveImmed and moveQueue subroutines with Coordinated Sets. PAR1 specifies the MoveType (Absolute or Incremental) and EPAR takes the Position for all the "n" axes in the Coordinated Set. Then EPAR takes the Velocity of all "n" axes in the Coordinated Set, up to eight axes. NUMEPAR defines how many of the array elements are to be used. The NUMEPAR value is the total number of position and velocity and must be an even number. The valid range is 2 to 16. If the user gives a value out of bounds the input is forced to either the max. or min. value according to which boundary is exceeded. For these "move" subroutines, PAR2 is not used and there are no Return values, but they are included in the EFB for future subroutines.
Runtime Errors
For a list of all error codes and values of the block, refer to Tables of Error Codes for the Motion Library.