LG G3F-AD4A User Manual page 85

Programmable logic controller
Table of Contents

Advertisement

Chapter 8. MK PROGRAMMING
4) Programming Example
P0020
0
Initial setting command
Code number of A/D conversion module
The slot number of loading communication
module of the master station
P0020
P0020
P0021
F0090
The slot number of A/D conversion module
[ RPUT
h8000
h0001
The station number of communication module
which a remote I/O station has been mounted
[ RPUT
h8000
h0001
Write the value stored on D7, D8 and D9 onto the address 7, 8, and 9 of buffer memory
of A/D conversion module on the slot "0" of the remote station No. "1"
[ RPUT
h8000
h0001
Write the value stored on D13 onto the address 13 of buffer memory of A/D
conversion module on the slot "0" of the remote station No. "1"
[ RGET
h8000
h0001
D0100
Read the A/D conversion value of channel 0 on the address 14 of buffer memory A/D
conversion module on the slot "0" of the remote station No. "1" onto D100.
[ <
D0100
08000 ]
Digital value less than 8000 of channel 0 turns P0010 on
[ >=
D0100 08000 ]
[< D0100
Digital value 8000 or more and 10000 or less of channel 0 turns P0011 on
[ >=
D0100 10000 ]
[< D0100
Digital value 10000 or more and 12000 or less of channel 0 turns P0012 on
[ <
D0100
12000 ]
Digital value 12000 or more of channel 0 turns P0013 on
8 - 8
[ MOVP
00001
D0000 ]
Specify channel 0 to enable channel
[ MOVP
00000
D0001 ]
The first address of device which stores data to write
D0000
00000
00002
M000 ]
The first address of buffer
Number of words data to write
memory on which data of A/D
conversion module is written
[ MOVP
00001
D0007 ]
Specify average processing to channel 0
[ MOVP
00001
D0008 ]
Specify time average to channel 0
[ MOVP
01000
D0009 ]
Set time average to 1000ms
D0007
00007
00003
M001 ]
[ MOVP
00001
D0013 ]
Specify SET data to channel 0.
D0013
00013
00001
M002 ]
00014
00001
M003 ]
P0010
( )
P0011
10000 ]
( )
P0012
12000 ]
( )
P0013
( )
[ END ]
The communication infornation
Write the value stored
on D0 and D1 onto the
address 0 and 1 of buffer
memory of A/D conversion
module on the slot "0" of the
rem ote station No. "1".

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

G3f-ad4bG4f-ad2a

Table of Contents