Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
27 Applied Instructions (Data Operation 3)
27.3 POP / Shift Last Data Read [FILO Control]
663
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Program examples
In the program example shown below, among value stored in D20 input first to D101 to D106, the last value
input is stored to D10, and "1" is subtracted from the number of stored data (pointer D100) every time X000
turns ON.
When the first-in data is as shown in the table below
Pointer D100 K3
Data
D101 H1234
D102 H5678
D103 HABCD
D104 H0000
D105 H0000
D106 H0000
[Structured ladder/FBD]
Last-in read command
SFWR
EN
s
n
ENO
d
D100D20
K7
LDP
EN
s
ENO
first-in command
X010
LDP
EN
s
ENO
X000
POP
EN
s
n
ENO
d
D10D100
K7
[ST]
SFWR(LDP(TRUE,X010),D20,K7,D100);
POP(LDP(TRUE,X000),D100,K7,D10);
D20
D106 D105 D104 D103 D102 D101 D100
H0000 H0000 H0000 HABCD H5678 H1234 K3
first-in command
D100:
K2K3
D100:
K1K2
D100:
K0K1
D106 D105 D104 D103 D102 D101 D100
H0000 H0000 H0000 HABCD H5678 H1234 K3K2
Do not change.
D10
HABCD
Last-in read command
X000:OFFON