187
4
4 Instructions 4.5.3 Table Operation
FDEL: Deletion of data from a table
◆
Overview
The FDEL instruction deletes any data from a table.
FDEL S D n
Deletion of data
from a table
Applicable model:
H3U
S Deleted data
Number of the element that stores the data to be
deleted
16-bit instruction (7
steps)
FDEL: Continuous
execution
FDELP: Pulse
execution
D
Data table
information
Start number of elements that store a data table
D: Number of stored data entries
D+1: Start position of a data table
n
Position of
deletion
Position in a table at which data is deleted
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
The nth data entry in a table from head address [D+1] is deleted. The deleted data is stored in [S]. The (n+1)
th data entry and subsequent ones move forward in [D+1], and D (which indicates the number of stored
data entries) is decremented by 1.
5
D+1
Data table
D
……………………
5432
3333
4444
1234
5678
….
0
D+2
5
D+1
Data table
D
……………………
5432
4444
1234
5678
0
3333
D+2
N = 2
Deleted data
0 saved
Table range
Number of saved
data entries
Number of saved
data entries
D data entries
from head
address [D+1]
of the table
Range of elements
used by the
data table
An error is returned in the following conditions. The error ag M8067 is set to ON to identify this error and
the error code is stored in D8067.
1. Error 6705 is returned when the number of stored data entries is out of range.
2. Error 6706 is returned when n > [D].
3. Error 6706 is returned when n ≤ 0.
4. Error 6706 is returned when [D] ≤ 0.