Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
27 Applied Instructions (Data Operation 3)
27.1 FDEL / Deleting Data from Tables
655
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)
Function and operation explanation
1. 16-bit operation (FDEL/FDELP)
"n"th data is deleted from a data table (stored in the device specified by and later), and the deleted data
is stored in the device specified by . "n + 1"th data and later in the data table are shifted forward one by
one, and the number of stored data is subtracted by "1".
Cautions
1) The device range used in a data table should be controlled by the user.
The data table has the number of pieces of data, which is stored in , starting from the next device
( + 1) after the device storing the number of pieces of data .
Refer to the program example below.
2) The instruction is provided in the FX
3UC PLC Ver. 2.20 or later.
Related instruction
Error
An operation error is caused in the following cases. The error flag M8067 turns ON, and the error code is
stored in D8067.
1) When the table position "n" from the device specified by exceeds the "amount of data stored plus
one"
(Error code: K6706)
2) When the value "n" exceeds the range of the number of pieces of data specified by .
(Error code: K6706)
3) When the FDEL instruction is executed under the condition "n 0" (Error code: K6706)
4) When the amount of data stored specified by is "0". (Error code: K6706)
5) When the data table range exceeds the corresponding device range (Error code: K6706)
Instruction Description
FINS Inserts data into an arbitrary position in a data table
+0
Data table
+2
+3
+4
+1
+5
3333
4444
5
5432
1234
5678
0
Device range used
in data table
+0
Data table
+2
+3
+4
+1
+5
4444
1234
4
5432
5678
0
3333
-1
Deleted data
"0" is stored.
Data table range
Number of
stored data
Number of
stored data
When "n" is "2"
d d
s
FDEL
EN
s
n
ENO
d
Device storing deleted data
Command
input
Position of deleted data in table
Head device in data table
Data table (having
the number of
stored pieces of
data starting
from " + 1")
d