2 global variables and local variables, 1) global variables, 2) local variables – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual
Page 76
6 Variables (Registers)
6.1.2 Global Variables and Local Variables
6-4
6.1.2 Global Variables and Local Variables
(1) Global Variables
Global variables can be used in common by ladder logic programs, user functions, and the drawings in motion
programs and sequence programs. In other words, the calculated results for a given ladder logic program can be
used by other user functions and motion programs. The global variable size is stored by the system for each vari-
able. (See the following illustration.)
Fig. 6.1 Global Variables
(2) Local Variables
Local variables are used locally by each program. They cannot be used by other programs. Local variables are
stored in the corresponding program memory.
Ladder programs
User functions
Motion programs and
Sequence programs
Global variables
S registers
8192 words
M registers
65535 words
I registers
32768 words
+
Monitoring
parameters
O registers
32768 words
+
Setting
parameters
C registers
16384 words
D register
D register
D register
D register
Subprogram
(SPS004)
Subprogram
(MPS002)
SSEE SPS004;
Sequence program #3
(SPM003)
MSEE MPS002;
Motion program #1
(MPM001)