LG G3F-AD3A User Manual page 29

Programmable logic controller
Table of Contents

Advertisement

Chapter 4. FUNCTION BLOCK
4.2 Function Block for Local
4.2.1 Module Initialization
1) G3F-AD3A, G4F-AD3A
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 the information of average processing.
Function
I/O
block
Input
AD3INI
REQ
DONE
BASE
STAT
SLOT
ACT
CH
TYPE
AVG_
EN
AVG_
NUM
Output
REMARK
BOOL[8] and USINT[8] of data type means that the number of element is 8, and also this means the whole number of channels and channel
number.
Data
Variable
type
Function Block Execution Request Area
- The execution of function block initialization is requested in this area.
REQ
BOOL
- 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 Location Number Area
BASE
USINT
- The base No. on which A/D conversion module is mount e d is written on this area.
- Setting range : 0 to 3
Slot Location Number Area
SLOT
USINT
- The slot No. on which A/D conversion module is mounted is written on this area.
- Setting range: 0 to 7
Available Channel Specification Area
CH
BOOL[8]
- Enabled channels are specified to 1 and disabled channels are specified to 0.
Analog Input Data Type Specification Area
- Output digital data type for each channel is specified in this area.
TYPE
BOOL[8]
- 0 is for the range of 1 ~ 5VDC and DC4 ~ 20mA.
- 1 is for the range of 0 ~ 10VDC
Enable / Disable of Average processing
AVG_
BOOL[8]
- 0 is for the sampling processing.
EN
- 1 is for the average processing of the number of times.
AVG_
USINT
Set a constant of the average processing of the number of times.
NUM
[8]
- Setting range : 2 ~ 255
Function Block Execution Complete Area
- When function block initialization is executed with no error, 1 is written and until
DONE
BOOL
next execution, 1 is continuing. When error occurs, 0 is written and operation come
to stop.
Error Code Display Area
STAT
USINT
- When error occurs during function block initialization, the error code number is
written.
Channel Operation Display Area
- After execution the function block of initialization with no error, if the setting
ACT
BOOL[8]
condition of specified channel is normal then output '1', or if abnormal, output 0'.
- No specified channel is '0'.-
4 - 2
Descriptions

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

G4f-ad3aG6f-ad2a

Table of Contents