Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
33 Applied Instructions (Extension File Register Control)
33.3 INITR / Initialize R and ER
759
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
31
Applied Instructions
(Data Transfer 3)
32
Applied Instructions
(High Speed
Processing 2)
33
Applied Instructions
(Extension File
Register Control)
34
Applied Instructions
(FX
3U
-CF-ADP)
35
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
B
Applied
Instruction List
Cautions
1. Initializing two or more sectors
When a memory cassette is attached, 18 ms is required to initialize one sector.
(When a memory cassette is not attached, only 1 ms is required to initialize one sector.)
When initializing two or more sectors, take either measures shown below.
1) Set a large value to the watchdog timer D8000 using the following program.
Guideline of the watchdog timer set value
A value acquired by the following procedure can be regarded as the guideline of the watchdog timer set value.
If an acquired value is 200 ms or less, however, it is not necessary to change the watchdog timer set value.
a) Write a program to be executed from GX Works2 to the PLC.
[Online] [Write to PLC ...]
b) Set the current value of D8000 (unit: ms) to "1000" using the modify value function in GX Works2.
Select [Online] [Monitor] [Monitor Mode] to switch the [PRG] MAIN screen.
[Debug] [Modify Value]
c) Set the PLC mode to RUN, and execute the program. (Execute this instruction also.)
d) Monitor the maximum scan time D8012 (unit: 0.1 ms) using the device/buffer Memory Batch function
in GX Works2.
[Online] [Device/Buffer Memory Batch]
e) Set the watchdog timer to the maximum scan time (D8012) or more.
D8012 stores the maximum scan time in increments of 0.1 ms.
Rough guide to the watchdog timer set value D8000 (unit: ms) is the "value stored in D8012 divided by
10" added by 50 to 100.
2) Setting WDT instruction just before and after INITR instruction as shown below.
If the processing time of the INITR instruction exceeds 200 ms, set the value of D8000 (unit: ms) to the
processing time or more.
2. About the allowable number of times of writing operations in memory
Note the following when accessing the extension file registers:
The memory cassette (flash memory) allows up to 10,000 times of writing operations.
The number of times of writing operations counts up each time the INITR, RWER or INITER instruction is
executed. Do not let the number of times of writing operations exceed the allowable number of times of
writing operations.
When a continuous operation type instruction is executed, writing operation to the memory occurs for each
operation cycle of the PLC. To avoid this, be sure to use pulse operation type instructions.
The number of times of writing operations does not count up when the LOADR, SAVER or LOGR
instruction is executed. However, the SAVER and LOGR instructions require the target write sectors to be
initialized before executing the instructions. Note that, when initializing by using the INITR or INITER
instruction, the number of times of writing operations in the memory counts up every time the NITR or
INITER instruction is executed.
M8002
Initial pulse
MOV
EN
s
ENO
d
K D8000
Command
input
The watchdog timer is reset.
The watchdog timer is reset.
WDT
EN ENO
LDP
EN ENO
s
INITR
EN
s
n
ENO
*1. Device of registers to be initialized
*2. Number of sectors of registers to
be initialized
WDT
EN ENO
*1
*2