FP2 Analog Unit
Sample Program for Analog Input Average Processing Setting
10 - 3
10.1 Sample Program (CPU Unit with Analog I/O)
10.1 Sample Program (CPU Unit with Analog I/O)
Program outline
After averaging the analog input data for ch 0 to ch 2 (set for no execution of input
conversion processing) of the CPU unit with analog I/O, this program reads the averages
to the data registers DT100 to DT102 using the preparation completion flag.
(V)
(t)
(K)
(t)
(K)
(t)
Averages the analog values that were read
and stores the averages in the conversion
value area (input relay area).
By the move instruction F0 (MV), the
contents of input relay area WX0 to
WX2 are read to the data registers
DT100 to DT102.
CPU
unit
with
analog
I/O
Analog input
Sampling
processing
Minimum
value
Average processing
Maximum
value
Stores the average value
(excluding the maximum
and minimum values) to
conversion value area.
Settings
Channels that execute analog input conversion processing
H111: ch 0 to ch 2 are set for execution and ch 3 is not set for execution
I/O allocation
I/O number
Contents
WX0
Analog input data for ch 0
WX1
Analog input data for ch 1
WX2
Analog input data for ch 2
Shared memory
Address 10
Preparation completion flag for ch 0 to ch 3 analog inputs
Address 16
No execution of conversion processing setting for ch 0 to ch 3 analog inputs
Address 22 to 24
Average processing times setting for ch 0 to ch 2
For detailed information
section 14.3.1
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]