2) g6f-ad2a, Remark – LG G4F-AD3A User Manual
Page 30
Chapter 4. FUNCTION BLOCK
4 - 3
2) G6F-AD2A
Module Initialization function block is used in a program with setting of A/D conversion module located
base number, slot number of located module on base, specifying a channel enable, analog input data
type and information of average processing.
Function
block
I/O
Variable
Data
type
Descriptions
REQ
BOOL
Function Block Execution Request Area
- The execution of function block initialization is requested in this area.
- If the status of condition connected with this area is changed from low(0) to high(1),
function block initialization for the module is executed.
BASE
USINT
Base Location Number Area
- The base No. on which A/D conversion module is mounted is written on this area.
- Setting range : 0
SLOT
USINT
Slot Location Number Area
- The slot No. on which A/D conversion module is mounted is written on this area.
- Setting range: 0 to 7
CH
BOOL[4]
Available Channel Specification Area
- Enabled channels are specified to 1 and disabled channels are specified to 0.
DATA
TYPE
BOOL[4]
Digital Output Data Type Specification Area
- 0 is for the range of –48 ~ 4047
- 1 is for the range of –2048 ~ 2047
AVG_
EN
BOOL[4]
Enable / Disable of Average processing
- 0 is for the sampling processing.
- 1 is for the average processing for the number of times.
Input
AVG_
NUM
USINT[4]
Set a constant of the average processing of the number of times.
- Setting range : 2 ~ 255
DONE
BOOL
Function Block Execution Complete Area
- When function block initialization is executed with no error, 1 is written and 1 is
kept until next execution. When error occurs, 0 is written and operation come to
stop.
STAT
USINT
Error Code Display Area
- When error occurs during function block initialization, the error code number is
written.
Output
ACT
BOOL[4]
Channel Operation Display Area
- The channel specified after executing the function block initialization with no error
is right, 1 is written and, on the non-specified channel, 0 is written.
REMARK
BOOL[4] and USINT[4] of data type means that the number of element is 4, and also this means the whole number of channels and channel
number.
REQ
BASE
SLOT
CH
DATA
TYPE
AVG_
EN
AVG_
NUM
AD2INI
STAT
ACT
DONE