Mitsubishi Electronics FX3G User Manual

Page of 964
728
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
33 Extension File Register Control – FNC290 to FNC299
33.3 FNC292 – INITR / Initialize R and ER
• Setting the WDT (FNC 07) instruction just before and after the INITR instruction as shown below:
If the processing time of the INITR command exceeds 200ms, set the watchdog timer value D8000 (unit: ms) to the
processing time or more.
2. Allowable number of writes to the memory
Note the following cautions on access to extension file registers.
• Data can be written to the memory cassette (flash memory) up to 10,000 times. 
Every time the INITR (FNC292), RWER (FNC294) or INITER (FNC295) instruction is executed, it is counted as a 
write to the memory. Make sure not to exceed the allowable number of writes. 
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the 
PLC. To prevent this, make sure to use a pulse operation type instruction.
• Execution of the LOADR (FNC290), SAVER (FNC291) or LOGR (FNC293) instruction is not counted as a write to 
the memory. However, it is necessary to initialize the writing target sector before executing the SAVER (FNC291) 
or LOGR (FNC293) instruction.
Every time the INITR (FNC292) or INITER (FNC295) instruction is executed, it is counted as a write to the memory. 
Make sure not to exceed the allowable number of writes.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
• When any device number other than the head device number of a sector of extension file registers is set to 
 
(error code: K6706)
• When a device number to be initialized exceeds "32767" (error code: K6706)
In this case, devices up to R32767 (ER32767) are initialized.
• When the protect switch of the memory cassette is set to ON (error code: K6770)
Program example
In the program example shown below, the extension registers R0 to R2047 in the sector 0 are initialized.
Note that the extension file registers ER0 to ER2047 are also initialized if a memory cassette is attached.
• Extension registers (R) [inside the built-in RAM]
Device number
Current value
Before execution
After execution
R0
H1234
HFFFF
R1
H5678
HFFFF
R2
H90AB
HFFFF
...
...
...
R2047
HCDEF
HFFFF
The watchdog timer is reset.
FNC292
INITR
n
FNC 07
WDT
FNC 07
WDT
The watchdog timer is reset.
Command
input
   
S
FNC292
INITR
R0
K1
FNC 07
WDT
FNC 07
WDT
X000
END