A
PPENDIX
A-6
FC6A S
ERIES
MICROS
MART
L
ADDER
P
ROGRAMMING
M
ANUAL
FC9Y-B1726
Differences between User-defined Macros and Subroutines
User-defined macros and subroutines are both functions that group the processing used multiple times into a single unit, and then
execute that processing with a call instruction, but they have the following differences.
■
User-defined macro
Item
User-defined Macro
Subroutine
Created location and call
method
User-defined macros are created in the User-
defined macro editor. The user-defined macro
code for the corresponding user-defined macro
name is inserted into the location of the UMACRO
instruction.
Subroutines are created after the END instruction
in the ladder program. The subroutine of the
corresponding label number is called each time
the LCAL instruction is executed.
User program size
When multiple UMACRO instructions are used
with the same user-defined macro name, the size
of the user program will increase by each use.
The size of the user program will not increase if
the LCAL instruction is used multiple times with
the same label number.
Argument device
Argument devices can be used.
Argument devices cannot be used.
Nested calls
Another user-defined macro cannot be called in
the user-defined macro.
Another subroutine can be called in the
subroutine.
User-defined macro
(user-defined macro name S1: 1)
User-defined macro
(user-defined macro name S1: 1)
User-defined macro
(user-defined macro name S1: 1)
S1
・・・
1
I0001
UMACRO
S1
・・・
1
I0000
UMACRO
S1
・・・
1
I0001
UMACRO
S1
・・・
1
I0000
UMACRO
Insert
Main program
After the ladder program conversion
User-defined macro editor
While editing
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 ...