APPENDIX

Appendix 9.2 When accessing buffer memory using sequence program

MELSEC-Q

In the following program example, data are read from or written to the buffer memory of the Q series C24 using the REMFR/REMTO instruction.

POINT

Use GX Configurator-SC to change the default value of the buffer memory. Using GX Configurator-SC, save the new setting value to the flash ROM of the Q series C24. (Refer to Chapter 8.)

(1) Program conditions

The following program reads data from or writes data to the QJ71C24N buffer memory (CH1 side word/byte units designation area) when the read/write command (X1020, X1021) turns ON.

(a) Devices used:

• Read/write command..............................................................

X1020, X1021

• Read/write command pulse signal .........................................

M10, M11

• Completion device for REMFR/REMTO instruction ..............

M100 to 103

• Normal/abnormal completion flag for REMFR/REMTO

 

instruction................................................................................

M200 to 203

• Read from word/byte units designation area .........................

D0

• Write to word/byte units designation area..............................

D1

(2) Program examples

(a) Read from buffer memory

<Read command>

Changes the read command into pulses.

Reads the word/byte units designation area data of the buffer memory to D0.

Normal completion of REMFR instruction

Abnormal completion of

REMFR instruction

(b) Write to buffer memory

<Write command>

Changes the write command into pulses.

Sets the word/byte units designation to byte.

Transfers the setting value to the word/byte units designation area of the buffer memory.

Normal completion of REMTO instruction

Abnormal completion of

REMTO instruction

App. - 34

App. - 34