Mitsubishi AJ65SBT2B-64AD User Manual page 67

Analog-digital converter module. a melsec
Table of Contents

Advertisement

5
PROGRAMMING
(3) Program example
Checking the connection status of the AJ65SBT2B-64AD
Initial setting
*1
Changing the initial setting
Processing on completion of the initial setting
Reading a digital output value
Figure 5.14 Program example (when using the QnACPU) 1/2
* 1 The program enclosed by the dotted line is required only when changing the initial settings.
5.5 Program Example When Using the QnACPU
Reads the data link status
Turns on MC contact (M100) when the
data link is normal
Turns on Y60 when a data link
error occurs
CH1 A/D conversion enable/disable
setting (RY00): A/D conversion enable
CH2 A/D conversion enable/disable
setting (RY01): A/D conversion enable
CH1 Input range setting
(RY04 to RYn6): 0 (-10 to 10V)
CH2 Input range setting
(RY07 to RY09): 1 (0 to 5V)
CH1 Average processing setting
(RWw0): Moving average (16 times)
CH2 Average processing setting
(RWw1): Count average (16 times)
Initial data processing completion flag
(RY18): ON
Initial data setting request flag (RY19)
: ON
CH1 A/D conversion enable/disable
setting (RY00): A/D conversion disable
CH2 A/D conversion enable/disable
setting (RY01): A/D conversion disable
Initial data setting request flag
(RY19): ON
Initial data processing completion
flag (RY18): OFF
Initial data setting request flag
(RY19): OFF
Reads CH1 Digital output value
(RWr0) to D500
Reads CH2 Digital output value
(RWr1) to D501
5
1
2
3
4
5
6
- 15

Advertisement

Table of Contents
loading

Table of Contents