Output The Analog Input Value By 7-Segment Display - LG G3F-AD3A User Manual

Programmable logic controller
Table of Contents

Advertisement

Chapter 8 MK Programming

8.2.2 Output the analog input value by 7-segment display

1) System configuration
GM6-
PAFB
Initialize A/D module
Read digital value
Output digital value to
BCD display
2) Initial setting for A/D module
No
1
Channel to be used
2
Analog input type and range
3
Averaging processing enable
4
5
3) Description of program
① When the P0000 is on, initialize the A/D module.
② When the P0001 is on, read the digital value of channel 0 from buffer memory of A/D
module and store it into the D0008.
③ When the P0002 is on, output the contents of D0008 to the 7 -segment display.
P000
P001
K3P-
G6I-
G6Q-
07AS
D22A
TR2A
P0000
P0001
P0002
Item
Averaging count
Validate setting
P002
G6F -
(A/D module is mounted on slot 2)
AD2A
Channel 0 : Analog input (DC4 ~ 20mA
7-segment display
Buffer memory
Setting
address
Ch 0
DC4~20mA
Ch 0
Ch 0 : 10 times
8 - 5
Data to be
written
0
h0001
1
h0000
2
h0001
3
h000A
7
h0001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

G4f-ad3aG6f-ad2a

Table of Contents