Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 961

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

Ex.
When registering a record with ID = 0003H to the product information table (proInfo) in the database using the DBINSERT(P)
instruction
[Product information table (proInfo)]
ID
0001H
0002H
0003H
ID
WORD type
WSTRING type (15 characters)
Product
Size(x)
WORD type
Size(y)
WORD type
Size(z)
WORD type
[Program]
DBINSERT
D0
"proInfo"
Table name
The program registers the information of
ID 0003H by using the DBINSERT instruction.
(1) WSTRING type (16 words) + WORD type (1 word)  4 = 20 words
(2) Setting value in field "ID"
(3) Setting value in field "Product"
(4) Setting value in field "Size(x)"
(5) Setting value in field "Size(y)"
(6) Setting value in field "Size(z)"
Product
Size(x)
"AAA1"
80
"BBB2"
40
"CCC3"
40
·
Database
D100
D300
M0
D500
[Number of fields]
D100 0005H
[Field name]
D101 I
D165 S
D
i
0000H
z
e
·
(
D132 0000H
x
D133 P
)
r
D172 0000H
o
·
d
u
D196 0000H
c
S
t
i
D140 0000H
z
e
·
(
D164 0000H
y
)
D204 0000H
·
D228 0000H
Size(y)
Size(z)
100
60
90
40
80
40
[Number of records to be registered]
D300 0001H
[Record size]
D229
S
D301 K20
i
[Setting value]
z
e
(
D302 0003H
z
D303
C
)
C
D236 0000H
C
D306 3
·
D307 0000H
D260 0000H
·
D318 0000H
D319 K40
D320 K80
D321 K40
7 APPLICATION INSTRUCTIONS
7.21 Database Access Instructions
1 record
→(1)
→(2)
(3)
→(4)
→(5)
→(6)
959
7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents