6 - 4
MELSEC-Q
6 PROGRAMMING
6.2 Programming Example without Using the Utility Package
(1) Programming example using the FROM/TO commands
Set the A/D conversion enabled channel (initial setting)
0
X10
139
Error
reset
signal
X0F
Error
flag
170
END
Read digital output values for
CH1 to 3
X0
Module
READY
Error code display and reset processing
BCD
D14
K3Y20
Error code
SET
Y0F
Error clear
request
Y0F
167
Error
clear
request
X0F
Error
flag
RST
Y0F
Error clear
request
Output the error code to Y20
to Y2B by BCD code.
T0
H0
K1
K0
H8
CH1 to CH3 are A/D conversion
enabled
T0
H0
K1
K2
K50
Set the average number of times
for CH2 to 50 times
T0
H0
K1
K3
K1000
Set the average time for CH3 to
1000 ms
T0
H0
K1
K9
H604
Specify averaging processing
Y9
SET
Operating
condition
setting request
Y9
101
Operating
condition
setting
request
X9
Operating
condition
setting completed
RST
Y9
Operating
condition
setting request
X11
104
Read
digital
values
X0
Module
READY
CH1
Digital
output
Digital output value read processing
X0E
A/D
conversion
completed
flag
FROM
H0
K1
K11
D11
CH2
Digital
output
FROM
H0
K1
K12
D12
CH3
Digital
output
FROM
H0
K1
K13
D13
Error code
FROM
H0
K1
K19
D14
Set Y9 (operating condition
setting request) from ON to OFF
and enable the initial setting
Clear the error code.
Summary of Contents for Q64AD
Page 11: ...1 2 MELSEC Q 1 OVERVIEW MEMO...
Page 13: ...2 2 MELSEC Q 2 SYSTEM CONFIGURATION MEMO...
Page 31: ...3 18 MELSEC Q 3 SPECIFICATIONS MEMO...
Page 43: ...4 12 MELSEC Q 4 SETUP AND PROCEDURES BEFORE OPERATION MEMO...
Page 61: ...5 18 MELSEC Q 5 UTILITY PACKAGE SW0D5C QADU E MEMO...
Page 67: ...6 6 MELSEC Q 6 PROGRAMMING MEMO...
Page 76: ...Index 3 MEMO...