3 ) programming example – Yaskawa MP900 Series Ladder Programming Manual User Manual
Page 290

5.9 Table Manipulation Instructions
5.9.8 Write Queue Table (QTBLW and QTBLWI)
5-221
Instructions
5
[ a ] Parameter Table Configuration
[ b ] Error Codes
[ c ] Setting the Relative Row Number of Table Elements
( 3 ) Programming Example
In the following programming example, the data from MW00000 to MW00002 is written to the specified column ele-
ments in array table data TBL1 when switch 1 (DB000001) turns ON.
Initialize table data TBL1 before executing this type of programming.
The column data types are given in parentheses.
Address
Data
Type
Symbol
Name
Specification
I/O
0
L
ROW
Relative row number of
table elements
Relative row number of table elements at destina-
tion (1 to 65,535)
IN
2
L
COLUMN
First column number of
table elements
First column number of table elements at destina-
tion (1 to 32,767)
IN
4
W
CLEN
Number of column ele-
ments
Number of column elements to move (1 to 32,767)
IN
5
W
Reserved.
6
L
RPTR
Read pointer
Read pointer of the queue after execution
OUT
8
L
WPTR
Write pointer
Write pointer of the queue after execution
OUT
Error Code
Error Name
Meaning
0001 hex
Table undefined
The target table is undefined.
0002 hex
Outside range of row numbers
The row number of the table element is outside the target table.
0003 hex
Outside range of column num-
bers
The column number of the table element is outside the target table.
0004 hex
Incorrect number of elements
The number of target elements is invalid.
0005 hex
Insufficient storage area
The storage area is insufficient.
0006 hex
Insufficient element type
The data type specified for the element is wrong.
0007 hex
Queue buffer error
An attempt was made to read from an empty queue buffer, or to write to a
full queue buffer by advancing the pointer.
0008 hex
Queue table error
The specified table is not a queue table.
0009 hex
System error
An unexpected error was detected in the system during instruction execu-
tion.
Relative Row
Number
Row That Is Read
Remarks
0
Write pointer row
The pointer is advanced only for the QTBLWI instruction.
1
Write pointer row
Pointer is not advanced.
2
Write pointer row – 1
Pointer is not advanced.
3
Write pointer row – 2
Pointer is not advanced.
:
:
n
Write pointer row – (n – 1)
Pointer is not advanced.
Column
Row
1
(W)
2
(W)
3
(W)
1
0
0
0
2
0
0
0
3
0
0
0