7
OPERATION EXAMPLES
This chapter describes the programming procedure and the basic program of the A/D converter module.
7.1
Programming Procedure
Take the following steps to create a program for running the A/D converter module:
1.
Set parameters.
Page 31 Parameter settings
2.
Create a program.
Page 35 Program examples
Using function blocks (FBs) reduces load at programming and improves the readability of programs. For
details on the function blocks, refer to the following.
MELSEC iQ-R Analog-Digital Converter Module/Digital-Analog Converter Module Function Block
Reference
7.2
Program Examples
System configuration
The following figure is an example of the system configuration.
(1)
(1) Power supply module (R61P)
(2) CPU module (R120CPU)
(3) A/D converter module (R60AD6-DG)
(4) Input module (RX10)
Conditions in the program
This program reads digital output values from the A/D converter module's CH1, CH3, CH5, and CH6 where A/D conversion is
enabled.
The A/D conversion takes place in CH1 and CH6 by means of sampling processing; in CH3 by means of averaging
processing for 50 samples; and in CH5 by means of moving average for 10 samples.
7 OPERATION EXAMPLES
30
7.1 Programming Procedure
(2)
(3)
(4)