6 - 1 6 - 1
MELSEC-Q
6 PROGRAMMING
66 PROGRAMMING
Using a sample system configuration shown be low, details of the A/D converter
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 ex planation

(1) System configuration

Power supply module
QnCPU
Q64AD
QX10
QY10
X/Y0
to
X/YF
X10
to
X1F
Y20
to
Y2F

(2) Program conditions

This program reads the digital output values that hav e b een A/ D conv e rte d u si ng
CH 1 to CH3 of the Q64AD. CH1 performs sampling processing, CH2 performs
averaging processing every 50 times, and CH3 per forms averaging processing
every 1000 ms. An error code appears in BCD form at if a write error occurs.
(a) Contents of initial setting
• A/D conversion enable channel
........................................CH1 to CH3
• Channel performing averaging processing us ing number of times
........................................The average number of times set for CH2 is 50.
• Channel performing averaging processing using time
........................................The average time set f or CH3 is 1000 ms
(b) Devices used by the user
• Error reset signal ................................................................ X10
• Input signal for digital output value rea d 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