12 Program Example
12.1 Reading/Writing Buffer Memory
252
FX
3U
-20SSC-H Positioning Block User's Manual
b) Writing numeric values to the buffer memory
In the program below, "K5,000,000" is written to the buffer memory (BFM #501 and #500) in unit No.
1.
c) Writing the current value of data registers to the buffer memory
In the program below, the current value of data registers (D21 and D20) is written to the buffer
memory (BFM #501 and #500) in unit No. 1.
2) FROM/TO instructions (conventional method)
Read and write the contents of the buffer memory using the FROM/TO instructions.
a) Reading and transferring numeric values to data registers (FROM instruction)
In the program below, the contents of the buffer memory (BFM #1 and #0) in unit No. 1 are read and
transferred to data registers (D11 and D10).
b) Writing numeric values to the buffer memory (TO instruction)
In the program below, "K5,000,000" is written to the buffer memory (BFM #501 and #500) in unit
No. 1.
c) Writing the current value of data registers to the buffer memory (TO instruction)
In the program below, the current value of data register (D21 and D20) is written to the buffer memory
(BFM #501 and #500) in unit No. 1.
Write
command
FNC 12
DMOV
K5,000,000
U1\G500
Transfer
source
Buffer memory No.
Unit No.
Write
command
FNC 12
DMOV
D20
U1\G500
Transfer
source
Buffer memory No.
Unit No.
Read
command
FNC 78
DFROM
K1
K0
D10
K1
Transfer
destination
Number of transfer
points
Buffer memory No.
Unit No.
FNC 79
DTO
K1
K500
K5,000,000
K1
Number of transfer
points
Write
command
Buffer memory No.
Unit No.
Transfer
source
Write
command
FNC 79
DTO
K1
K500
D20
K1
Transfer
source
Number of
transfer points
Unit No.
Buffer memory No.