Chapter 7 Function Block
7-1
Chapter 7 Function Block
7.1 Common Issues of Function Block
(1) The functions and directions of the following I/O parameter are common for positioning function block.
Category Parameter
Data
Type
Description
REQ BOOL
Execution request of function block
- Function block is executed if “0Æ1” (edge or level) as long as the
connection condition is met during the program.
BASE USINT
Base position number
- This is the area where the base number on which positioning module is
installed is set.
- Setting range: 0 ~ 7
SLOT USINT
Base position number
- This is the area where the slot number on which positioning module is
installed is set.
- Setting range: 0 ~ 7
Input
AXIS USINT
Axis number used
- 1 ~ 4 : axis1 ~ axis4
“Error 6” is generated if a value out of the setting range is set
DONE BOOL
Indicates function block execution end state
- “1” is outputted if function block is executed completely without error and
maintained until the next execution; if an error occurs, it outputs “0”
Output
STAT USINT
Error state indication
- If an error occurs during function block execution, it generates the error
number.
(2) For the data types which usually used on function block are as follows.
No. Initial Data Types Size(Bit) Range
1 BOOL Boolean 1 0, 1
2 SINT Short Integer 8 -128 ~ 127
3 USINT Unsigned Short Integer 8 0 ~ 255
4 INT Integer 16 -32,768 ~ 32,767
5 UINT Unsigned Integer 16 0 ~ 65,535
6 DINT Double Integer 32 -2,147,483,648 ~ 2,147,483,647
7 UDINT Unsigned Double Integer 32 0 ~ 4,294,967,295