
Chapter 4. FUNCTION BLOCK
4 - 5
4.3 Remote Function Block
4.3.1 Module Initialization :
(G3F-AD4A: ADR4INI, G4F-AD2A: ADR2INI, G3F-AD4B: ADR4BINI)
Module Initialization function block is a program for the use in setting the location number of the slot on
which the communication module of A/D conversion module of the master station is mounted, the address
number of communication module which a remote I/O station has, the base location number, and the slot
location number, and specifying the available channel enable, a data type for A/D conversion, filter process
data, and average process data.
Function
Block
I/O
Variable Data
type
Descriptions
REQ
BOOL
Function Block Execution Request Area on Rising Edge.
- The execution of write function block is requested in this area.
- If the status to be connected with this area is satisfied on the program operation and input
condition changes from low(0) to high(1), function block initialization for the module is executed.
NET_
NO
USINT
The location number of the slot on which the transmission module of the master station is
mounted. -Setting range: 0 to 7
ST_NO
USINT
Station number of the communication module which a remote I/O station has.
- Setting range : 0 to 63
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 to 3
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
[Array]
*note1
Available Channel Specification Area
- Available channels are specified in this area.
- Enabled channels are specified to 1 and disabled channels are specified to 0.
IN_
SEL*note3
BOOL
[Array]
Analog Input Type(current/voltage) Specification Area
- 0 is for the select of current input. – 1 is for the select of voltage input.
DATA
TYPE
BOOL
[Array]
*note1
Output Data Type Specification Area
- Output digital data type for each channel is specified in this area.
- 0 is for the range of -192 to 16191. (G3F-AD4B : 0 ~ 16000)
- 1 is for the range of -8192 to 8191. (G3F-AD4B : -8000 ~ 8000)
FILT
_EN
BOOL
[Array]
*note2
Filter Process En able Specification Area
- 0 is for the sampling processing. - 1 is for the filter processing.
FILT
_VAL
USINT
[Array]
*note2
Filter Constant Setting Area
- Setting range: 1 to 99
AVG_
EN
BOOL
[Array]
*note2
Average Process Enable Specification Are a
- 1 is for the average processing. - 0 is for the sampling process.
AVG_
SEL
BOOL
[Array]
*note2
Average process Type Specification Area
- 1 is for the time average. - 0 is for the number average.
Inpu
t
NUM/
TIME
USINT
[Array]
*note2
Average Number or Average Time Set Area
- The number or time is set in accordance with the average process type
specified on the AVG_SEL.
- Average number :2 to 4000 (count)
- Average time : G3F-AD4A/G3F-AD4B: 96 to12,000(ms), G4F-AD2A: 40 to 20,000(ms)
NDR
BOOL
When function block execution is completed with no error, 1 is written. During the scan which the
execution condition has been made, 1 is continuing and at the next scan. 0 is written.
ERR
BOOL
Error Data Display Area
- When error occurs during function block initialization, 1 is written and the operation comes
to stop. During the scan which the execution condition has been made, 1 is continuing
and at the next scan, 0 is written.
STAT
USINT
Error Code Display Area
- When error occurs during function block initialization, the error code number is written.
- Error code is referred to Section 4.4.
Output
ACT
BOOL
[Array]
*note1
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
*note 1 : The number of array is G3F-AD4A of 16, G3F-AD4B of 16 and G4F-AD2A of 4 .
*note 2 : The number of array is G3F-AD4A of 4, G3F-AD4B of 16 and G4F-AD2A of 4.
On the G3F-AD4A, the element number (0) is specified to channel 0, 1, 2, 3 in block,
the element number (1) is specified to channel 4, 5, 6, 7, in block.
the element number (2) is specified to channel 8, 9, 10, 11 in block.
the element number (3) is specified to channel 12, 13, 14, 15 in block.
On the G4F-AD2A, the element numbers means the channel ones.
*note 3 : Only on the G3F-AD4B, the number of array is 16, the element numbers means the channel ones.
REQ
BASE
SLOT
CH
AVG_
EN
AVG_
SEL
ADR4INI
(ADR2INI)
ACT
NDR
NUM/
TIME
FILT
_EN
FILT
_VAL
G3F-AD4A
(G4F-AD2A)
NET_
NO
ST_N
O
ERR
STAT
DATA
TYPE
REQ
BASE
SLOT
CH
IN_
SEL
AVG_
EN
AVG_
SEL
ADR4BINI
ACT
NDR
NUM/
TIME
FILT
_EN
FILT
_VAL
G3F-AD4B
NET_
NO
ST_N
O
ERR
STAT
DATA
TYPE