FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726 28-1
28: USER-DEFINED MACRO INSTRUCTION
This chapter describes the instruction that executes registered user-defined macros.
A user-defined macro is a ladder program that has been registered with an arbitrary number and name, and that can be used
multiple times within the main program. For creating user-defined macros, see "User-defined macro registration procedure" on
page 28-6.
For the differences between user-defined macros and subroutines, see "Differences between User-defined Macros and
Subroutines" on page A-6.
â–
UMACRO (User-defined Macro)
Executes the user-defined macro with the specified number.
Symbol
Operation
When the input is on, the user-defined macro that corresponds to the specified user-defined macro name will be executed. When
the input is off, the user-defined macro that corresponds to the specified user-defined macro name will not be executed.
You can set the argument devices that will be used in the user-defined macro that is executed by the UMACRO instruction.
Argument devices are devices that the user-defined macro will actually use when the UMACRO instruction is executed. For
example, when I0001 is set for A1, A0001 will operate as I0001 in the user-defined macro.
Valid Devices
*1 The valid range of S1 (user-defined macro name) is 0 to 255.
*2 A1 to A100 are argument devices that will be used in the user-defined macro. The argument devices that will be used can be configured in the
"Argument settings dialog box" on page 28-4, and 0 to 100 argument devices can be used.
For example, when Number of arguments is set to 5 in the "Argument settings dialog box" on page 28-4, argument devices A1 to A5 can be
used. When Number of arguments is set to 0 in the "Argument settings dialog box" on page 28-4, argument devices cannot be used.
Device Function I Q M R T C D P Constant Repeat
S1 (Source 1) User-defined Macro Name ———————— X
*1
—
A1 ... An
*2
Argument Device 1 to n
(n is 1 ≤ n ≤ 100)
XXXXXXX— X —
A1
*****
UMACRO S1
*****
An
*****
・・・・