FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
28-3
28: U
SER
-
DEFINED
M
ACRO
I
NSTRUCTION
Operation Example
The following ladder program will execute the UMACRO instruction when main program input I0000 is turned on. When the
UMACRO instruction is executed, user-defined macro name 0 will be executed.
A0001 will operate as I0001 in the user-defined macro because A1 of the UMACRO instruction has been set to I0001. Therefore,
the MOV instruction will be executed when I0001 is turned on.
Main program
User-defined macro (user-defined macro name S1: 0)
Note:
You can save time and effort in writing similar ladder programs and creating new ladder programs by turning a ladder program into a user-
defined macro.
Note:
The UMACRO, JMP, JEND, MCR, MCS, LCAL, LJMP, LRET, LABEL, DJNZ, and END instructions cannot be used in a user-defined macro.
Settings
(1) S1 (source 1): User-defined Macro Name
Select the user-defined macro to execute.
Click
Settings
to display the
Argument settings
dialog box.
In the
Argument settings
dialog box, configure the argument settings for each user-defined macro number.
For details, see "Argument settings dialog box" on page 28-4.
(2) Argument Settings
Use this area to configure the devices that will be passed to the user-defined macro that is set with the user-defined macro
name (1). The device address or tag name is set according to the device type of each argument displayed in the
Tag Name
column. The number of arguments and the device types can be changed in the
Argument settings
dialog box.
A1
I0001
UMACRO S1
0
I0000
REP
D1 -
D0001
MOV(W)
S1 -
D0000
A0001
(1)
(2)
Summary of Contents for MICROSmart FC6A Series
Page 1: ...B 1726 7 FC6A SERIES Ladder Programming Manual ...
Page 8: ...Preface 7 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 32: ...1 OPERATION BASICS 1 20 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 96: ...3 INSTRUCTIONS REFERENCE 3 18 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 130: ...4 BASIC INSTRUCTIONS 4 34 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 192: ...9 SHIFT ROTATE INSTRUCTIONS 9 12 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 272: ...12 DISPLAY INSTRUCTIONS 12 24 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 284: ...14 REFRESH INSTRUCTIONS 14 6 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 502: ...25 DATA LOG INSTRUCTIONS 25 22 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 546: ...26 SCRIPT 26 44 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...
Page 598: ...APPENDIX A 14 FC6A SERIES MICROSMART LADDER PROGRAMMING MANUAL FC9Y B1726 ...