6 - 1
MELSEC-Q
6 PROGRAMMING
6
6 PROGRAMMING
Using a sample system configuration shown below, details of the A/D conversion
module program are explained in the following two scenarios: when the utility package
is used and when the utility package is not used.
System configuration used in the program explanation
(1) System configuration
Po
we
r s
u
p
p
ly
m
o
d
u
le
QnCP
U
Q64A
D
QX
10
QY
1
0
X/Y0
to
X/YF
X10
to
X1F
Y20
to
Y2F
(2) Program conditions
This program reads the digital output values that have been A/D converted using
CH 1 to CH3 of the Q64AD. CH1 performs sampling processing, CH2 performs
averaging processing every 50 times, and CH3 performs averaging processing
every 1000 ms. An error code appears in BCD format if a write error occurs.
(a) Contents of initial setting
• A/D conversion enable channel
........................................CH1 to CH3
• Channel performing averaging processing using number of times
........................................The average number of times set for CH2 is 50.
• Channel performing averaging processing using time
........................................The average time set for CH3 is 1000 ms
(b) Devices used by the user
• Error reset signal ................................................................ X10
• Input signal for digital output value read command ........... X11
• Error code display (3-digit BCD) ........................................ Y20 to Y2B
• CH1 digital output value ..................................................... D11
• CH2 digital output value ..................................................... D12
• CH3 digital output value ..................................................... D13
• Error code ......................................................................... D14
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...