Alpha 2 XL Programming Manual
Alpha 2 XL Programming Manual
This manual confers no industrial property rights or any rights of any other kind, nor does it
confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any
problems involving industrial property rights which may occur as a result of using the contents
noted in this manual.
2 SIMPLE APPLICATION
CONTROLLERS
PROGRAMMING MANUAL
: Aug. 2005
Mitsubishi Electric....
.....................................................................
America
(01) 847-478-2253
Australia
(02) 638-7072
.....................................................................
Germany
(0 21 02) 4 86-1 12
Your location:................................................
Spain
(34) 93-589-1579
.....................................................................
United Kingdom
(01707) 278-695
Good
Minor damage
No
Unfriendly
Yes
Unusable
Unusable
Yes
No
If so,which: ..................................................................................................................................
What do you think to the manual layout?
Good
Unhelpful
If there one thing you would like to see improved, what is it? .....................................................
....................................................................................................................................................
....................................................................................................................................................
Could you find the information you required easily using the index and/or the contents, if
possible please identify your experience: ...................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
Do you have any comments in general about the Mitsubishi manuals? .....................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
Thank you for taking the time to fill out this questionnaire. We hope you found both the product
and this manual easy to use.
ii
2 Simple Application
This manual provides information for the use of 2 Simple Application controllers. The manual
has been written to be used by trained and competent personnel. The definition of such a
person or persons is as follows;
a) Any engineer who is responsible for the planning, design and construction of automatic
equipment using the product associated with this manual should be of a competent
nature, trained and qualified to the local and national standards required to fulfill that
role. These engineers should be fully aware of all aspects of safety with regards to
automated equipment.
b) Any commissioning or service engineer must be of a competent nature, trained and
qualified to the local and national standards required to fulfill that job. These engineers
should also be trained in the use and maintenance of the completed product. This
includes being completely familiar with all associated documentation for the said product.
All maintenance should be carried out in accordance with established safety practices.
c) All operators of the completed equipment (see Note) should be trained to use this
product in a safe manner in compliance to established safety practices. The operators
should also be familiar with documentation which is associated with the operation of the
completed equipment.
Note : Note: the term completed equipment refers to a third party constructed device which
contains or uses the product associated with this manual.
Notes on the Symbols Used in this Manual
At various times throughout this manual certain symbols will be used to highlight points of
information which are intended to ensure the users personal safety and protect the integrity of
equipment. Whenever any of the following symbols are encountered its associated note must
be read and understood. Each of the symbols used will now be listed with a brief description of
its meaning.
Hardware warnings
1 ) Indicates that the identified danger WILL cause physical and property damage.
2 ) Indicates that the identified danger could POSSIBLY cause physical and property
damage.
3 ) Indicates a point of further interest or further explanation.
Software warning
4 ) Indicates special care must be taken when using this element of software.
5 ) Indicates a special point which the user of the associate software element should
be aware of.
6 ) Indicates a point of interest or further explanation.
iii
iv
Table of Contents
Safety Guidelines ................................................................................ iii
1. Introduction ............................................................................... 1-1
1.1 Special Features of the Controller ........................................................ 1-1
1.2 Model Name .......................................................................................... 1-2
vi
vii
viii
1.
Introduction 1
Introduction
The 2 Series Controllers provides supervisory control for use in the home, office, factory or
wherever you need it. The 2 Series Controllers offers flexible I/O control for varied
applications:
Applications
The 2 Series is designed to be used for automatic applications including:
- Lighting, air-conditioning or watering control
- Opening and closing gates
- Security systems
- Domestic systems
- Temperature control
However, the 2 Series Controllers is not designed to be used in the following applications:
- Applications where high reliabilities such as nuclear power control, railway facilities,
airline facilities, vehicles, combustion equipment and medical equipment are required.
- Applications in life critical situations
Please contact a Mitsubishi distributor for more information.
1.1
1-1
Introduction 1
1.2
Model Name
The 2 Series Controllers can be identified using the following format:
AL2- ** M R - A/D
AL2 - Series Controller
** - Total number of I/O
M - Main Unit
A - 100-240 VAC
D - 24 VDC
R - Relay Type Output
1-2
2.
I01
O01
One Shot
I02
I03
1 B002
2
3 OR
4
S B003
R SR
O02
Set/Reset
O03
I0n
O0n
OR
SR
OS
- Input n
- Output n
- OR Boolean Function Block
- Set/Reset Function Block
- One Shot Function Block
The user can build a complex circuit in small, easy steps by starting at the input and working
forward in a logical manner. The 2 will gather and process information and provide the
necessary control for the application according to the system algorithm. Each function block
provides specific control parameters, accessible by the user, to tailor each program for
complete application suitability. The function blocks are connected together to form a circuit
using the Function Block Diagram (FBD.)
2.1
2-1
Inputs
The 2 Series Controller will accept both digital (On/Off) and analog (mV value based)
electrical information through the system Inputs. Please refer to the 2 Hardware Manual for
electrical information, wiring diagrams and input specifications. Depending on the specific
controller there are either 14 or 24 input version types of the 2 Series Controller. The Inputs
are referenced to I01, I02, ..., I15.
Table 2.1: Input type for the AL2-10MR-* Controller
Input
Input Number
Signal
I01 - I06
Analog
(AL2-10M*-D)
A01 - A06
Description
Maximum of 6 Inputs are allocated for use.
Maximum of 6 Analog inputs are allocated for use on input I01 to I06.
2.1.2
Input
Input Number
Description
Signal
I01 - I15
AS-i
E01 - E04
Analog
(AL2-**M*-D)
A01 - A08
Maximum of 8 Analog inputs are allocated for use on input I01 to I08.
Extension
EI01 - EI04
Key number
Key Function
OK
K01
Used to enter menu options, confirm data entry, and manually force
inputs ON/OFF in the monitor function.
ESC
K02
K03
Used to connect (or add) function blocks, increase Direct Set input
values or times, or move through programs or menus.
K04
( )
K05
( )
K06
Scroll down through menu options (menus, keys, FB, Inputs, Outputs,
etc.)
( )
K07
( )
K08
If the front panel keys are used as auxiliary inputs on the FBD, their primary function, as front
panel display navigators, will be disabled.
2-2
AL2-10M AL2-14M
AL2-24M
M01
Always ON.
M02
Always OFF.
M03
M04
M05
M06
M07
M08
M09
Pulses OFF when Stop mode turns to Run mode in the 2 Series.
M10
M11
M12
M13
M14
M15
M16
M17
M18
M19
M20
M21
M22
M23
M24
2.1.4
Description
Function Blocks
Programming the 2 Series Controller is based upon the combination of different function
blocks. They process the information received from the previously mentioned inputs and
control the system Outputs. They can also provide input signals or information to other function
blocks using word outputs pins. To make programming easier, the Function Blocks have all
been preprogrammed. However, parameters within each function block dialog box can be set
according to the intended application. There are 40 Function Blocks available, they are
described in detail throughout Chapters 5 and 6.
2-3
Outputs
Table 2.5: Outputs for the AL2-10MR-* Controller
Outputs
O01 - 04
N01
Description
Signal output
No
N02*1
N03*1
N04
The user screen is controlled by the setting of Display Manager with AL-PCS/
WIN-E.
OFF: The user screen is controlled by user program.
Note: *1 When both N02 and N03 are ON and hence the back light is ON because N03 is
given the priority.
Table 2.6: Outputs for the AL2-14MR-*, AL2-24MR-* Controller
Outputs
Description
O01 - 09
Signal output
A01 - 04
AS-interface Output
EO1 - E04
N01
Extension Output
ON: Disconnected to AS-interface network
OFF: Connect to AS-interface network
N02*1
N03*1
N04
The user screen is controlled by the setting of Display Manager with AL-PCS/
WIN-E.
OFF: The user screen is controlled by user program.
Note: *1 When both N02 and N03 are ON and hence the back light is ON because N03 is
given the priority.
2.1.6
2-4
2.2
Programming Methods
2.2.1
Direct Programming
Direct Programming uses the keys on the front panel to create the program and enter any
required data values. The method for Direct Programming is explained in Chapter 4 of this
manual.
2.2.2
Note: Do not simultaneously program the 2 Series Controller from the direct
programming keys and AL-PCS/WIN-E Ver 2.00 methods as this may result in
unexpected operation and possibly cause harm.
2-5
MEMO
2-6
3.
System Menu
3.1
System Menu 3
There are Systems Menus to help guide the user through the options available in the 2. The
TopMenu has a Run Mode that is accessed while the 2 is in operation or a Stop Mode that is
accessed when the 2 is idle.
The Edit Menu and the Function Block Edit Menu can be accessed when in either ProgEdit or
Monitor. These menus can be used to create and/or change programs steps or values.
Use the OK key to enter a programming option or to enter data into memory.
Set all the data on the screen before using the OK key to write the data to the system
memory. If there are multiple data screens in an option, enter the required data and accept
each screen with the OK key.
The ESC key will move the screen back to a higher menu option. It will cancel any data input
that has not been accepted with the OK key.
Note:
Use the ESC key to exit the option to the higher menu; at times, it will be necessary to press
the ESC key a number of times to move through multiple programming layers.
3-1
3.2
3.2.1
Top Menu
System Menu 3
When the 2 is first turned On, the Input/Output Image Table will appear. Press the OK and
ESC keys simultaneously to move to the TopMenu.
(If the TopMenu cannot be accessed the Menu Key has been set to Not Use),
Run:
Places the controller in Run mode.
Parameter:
Provides a simple method to edit Time Switches (TSm), Short Message Receive (SMRm)
and Call Detect (CDm) from the Top Menu.
ProgEdit:
Allows program editing/creation on the display using the front panel keys. The current
memory will be overwritten as changes are made to the program. Programs can be saved
on an AL2-EEPROM-2 memory cassette or in the AL-PCS/WIN-E software Version 2.0 or
above.
ClockSet:
Set the Real Time Clock or input a daily clock adjustment. The RadioClock function is also
available here.
LANGUAGE:
Choose from 6 onscreen languages: English, German, French, Italian, Spanish, or
Swedish.
Others...
Figure 3.1: TopMenu in Stop Mode operation
OK
ESC
T o p Me n u
I :
O:
E:
A:
10 : 19 F r i
2 5 9
1 5
1 4 8
1 4
23
Ru n
Ru n / S t o p
S t o p R u n
OK
or
Run Mode
ESC
11
12
P a r a ma t e r
EI :1 4
EO : 2 3
P r o gEd i t
1
2
C l o c kSe t
9
10
LANGUAGE
Ot he r s
L ANGUAGE
En g l i s h
G e r ma n
F r ench
I t a l i an
Sp a n i s h
Sw e d i s h
3
4
3-2
System Menu 3
11
12
Cl ockse t
Cl ockse t
Cl ockse t
d d / mm / y y y y
29 / 6 / 2003
7 : 5 9 Su n
Co r r e c t
Co r r e c t
0 . 00s / d
GMT Z o n e
C l o c kSe t
GMT Z o n e
0h00n
Ra d i o C l o c k
Ra d i o C l o c k
Ra d i o C l o c k
Ra d i o C l o c k
No t Us e
DC F 7 7
Ra d i o C l o c k
Ra d i o C l o c k
I npu t
T i me D i f f e r
Ra d i o C l o c k
I npu t
I 01
Ra d i o C l o c k
Ra d i o C l o c k
I npu t
T i me D i f f e r
Ra d i o C l o c k
T i me D i f f e r
0 . 0h r s
Ra d i o C l o c k
I npu t
T i me D i f f e r
Ma n u a l
Ma n u a l
S t op Ac t .
P a r a ma t e r
Se t u p TS
OK
or
E SC
Se t u p TS
NoDa t a
S e t u p SMR
S e t u p SMR
NoDa t a
S e t u p CD
S e t u p CD
NoDa t a
3-3
System Menu 3
The Others...
Version:
Displays CPU Version of the 2 Series Controller.
Scan Time:
Monitor the Current, Maximum, or Minimum program scan times. Upon controller reset
current, Maximum and Minimum values for scan times are reset to 0.
Password:
Restrict entry to the ProgEdit and Monitor mode with a four digit password.
DispPass:
Set up to three Passwords for Display function blocks.
Menu Key:
Two settings are possible, Not Use or OK + ESC. Not Use is designed so that
unauthorized people cannot access the 2 Top Menu in Run mode. If the OK + ESC key
setting is selected, simultaneously depress the OK and the ESC keys to access the Top
Menu.
Summertime:
Choose the preferred daylight savings time: Cancel, Manual On, Date Type, UK type, US
type, or EU type.
Serial Com:
Choose the type of communication to be used for the right hand side serial communication
port - Not Use, Modem, GSM or Other Com.
Light Time:
Set the backlight off delay time.
Analog In:
Indicates the current modes (Normal, TC or PT100) of the Analog inputs and the menu
item for changing the temperature scale (C or F) that the controller displays. Also
contains the menu items for calibration and offset adjust.
ProgClear:
Completely clears the system memory including Password protected programs. Only the
active memory is cleared, i.e. if a memory cassette is installed, the memory cassette
program will be erased but the controller memory will be retained.
ProgTran. (only appears if a cassette is installed):
Verify, Cassette (the cassette writes to the 2), Cassette (the cassette reads from
the 2), and ProtectSW are the options available.
3-4
System Menu 3
Ve r s i o n
Ve r s i o n
Ve r * . * *
S c a n T i me
S c a n T i me
Mo n i t o r
Re s e t
S c a n T i me
Cu r .
0 ms
Ma x .
1 2 ms
Mi n
0 ms
S c a n T i me
Mo n i t o r
Re s e t
Re s e t
S c a n T i me
OK
Pa s swo r d
D i s pPa s s
Me n u K e y
S u mme r T i me
Se r i a l
L i gh t
An a l o g
D i s pPa s s
Leve l 1
Leve l 2
Leve l 3
Se t u p
D i s pPa s s
Leve l 1
Me n u K e y
No Us e
ON + E SC
Ke y
S u mme r T i me
31 / 03
~30 / 10
+ 6 0m i n
S u mme r T i me
Ca n c e l
Ma n u a l On
Da t a T y p e
UK T y p e
US T y p e
EU T y p e
F r ee Type
S u mme
03 / 1
~10
02 : 00
Se t u p
L i gh t
T i me
2m
11
12
P r o g r am
C l ea r
OK
P r ogT r an
r T i me
. Su n
/ 1 . Su n
6 0m i n
5
6
In
Pr ogc l ea r
E SC
Se t u p
Pa s swo r d
C om *
T i me
or
or
ESC
AL2-14MR-*, AL2-24MR-*
3-5
System Menu 3
S e r i a l Com
No t Us e
Mo d e m
Mo d e m I n i t
C o mma n d
D e l a y T i me
Mo d e m I n i t 0 1
C o mma n d
[
]
yz { | } ! " #$
Mo d e m I n i t
C o mma n d
D e l a y T i me
Mo d e m I n i t
D e l a y T i me
0s
GSM
C o m f o r ma t
GSM I n i t
GS MR e mo t e
P I NC o d e
S e t SMS
GSMS t a t u s
GSM
O t h e r Com
7
8
O t h e r Com
C o m f o r ma t *
S t a t i o nNo
L i nkB l oc k
O t h e r Com
S t a t i o nNo
O t h e r Com
C o m f o r ma t *
S t a t i o nNo
L i nkB l oc k
O t h e r Com
L i nkB l oc k
No . 0
0.
8, 7
Parity
Stopbit (bit)
1, 2
Baudrate (bps)
3-6
System Menu 3
C o m f o r ma t *
GSM I n i t
GSM I n i t
C o mmn d
D e l a y T i me
GS MR e mo t e
GS MR e mo t e
Fo r b i t
Pe r m i t
P I NC o d e
P I NC o d e
Se t u p
[ **** ]
Arrow key
P I NC o d e
Se t u p
[ " **** " ]
Arrow key
S e t SMS
SMSC 1
SMSC 2
DA 1
DA 2
DA 3
VP
S e t SMS
GSMS t a t u s
GSMS t a t u s
St a t us
CME E r r o r
CMS E r r o r
S i gSe i n g
8, 7
Parity
Stopbit (bit)
1, 2
Baudrate (bps)
3-7
System Menu 3
I 01
Mo d e
I 01
N o r ma l
TC
PT 1 0 0
I 0 2 : TC
I 02
Mo d e
Ca l i b r a t e
Of f s e t F i ne
I 02
Ca l i b r a t e
- 50 C
450 C
I 0 3 : PT 1 0 0
I 03
Mo d e
Ca l i b r a t e
Of f s e t F i ne
I 03
Ca l i b r a t e
- 50 C
200 C
I 03
Mo d e
Ca l i b r a t e
Of f s e t F i ne
I 03
O f f s e t F i ne
0 . 0C
An a l o g
I 01
In
T e mp . S c a l e
An a l o g I n
T e mp . S c a l e
Ce l c i u s
Fah r en he i t
3-8
System Menu 3
01
In
01
FBS e l e c t
AND
Add FB
O 01
Connect EO 04
De l a y e dAL
(OK, ESC, +, -,
, , , )
*1
*2
*3
F B P a r a me t e r
S e t u p F B *1
C h a n g e N o *2
D e l e t e F B *3
Function Block Specific
Changes Function Block Number
Deletes Function Block from
FBD
E d i t Me n u
Bl ock
0 FB
P r ogS i z e
Me mo r y
J u mp
NewF B
0%
J u mp
M I OK E A NE I EOB
FBS e l e c t
AND
De l a y e dAL
Ex i t
M0 1 Mn e mo n i c
3-9
3.3
System Menu 3
10 : 19 F r i
2 5 9
1 5
1 4 8
1 4
23
S t op
Ru n / S t o p
R u n S t o p
OK
or
Stop Mode
ESC
P a r a ma t e r
11
12
Mo n i t o r
1
2
C l o c kSe t
9
10
EI :1 4
EO : 2 3
LANGUAGE
Others
L ANGUAGE
En g l i s h
G e r ma n
F r ench
I t a l i an
Sp a n i s h
Sw e d i s h
3
4
3 - 10
System Menu 3
Mon i t o r S c r een
01
B002
B003
In
003
01
=S P - I
In
RSR
(OK, ESC, +, -,
, , , )
FBS e t t i n g
Se t u p
02
Out
*1
E d i t Me n u
Bl ack
4 FB
P r o gS i z e
Me mo r y
J u mp
1%
J u mp
M I OK E A NE I EOB
Ex i t
3 - 11
System Menu 3
Ve r s i o n
Ve r s i o n
Ve r * . * *
Scan
T i me
S c a n T i me
Mo n i t o r
Re s e t
S c a n T i me
Cu r .
0 ms
Ma x .
1 2 ms
Mi n
0 ms
S c a n T i me
Mo n i t o r
Re s e t
Re s e t
S c a n T i me
OK
Pa s swo r d
D i s pPa s s
Me n u
Ke y
S u mme r T i me
Ana l o g
T i me
In
P r ogT r an
E SC
Se t u p
Pa s swo r d
D i s pPa s s
Leve l 1
Leve l 2
Leve l 3
Se t u p
D i s pPa s s
Leve l 1
Me n u K e y
No Us e
ON + E SC
Ke y
S u mme r T i me
Ca n c e l
Ma n u a l O n
Da t a T y p e
UK T y p e
US T y p e
EU T y p e
F r ee Type
S u mme r T i me
31 / 03
~30 / 10
+ 6 0m i n
S u mme r T i me
0 3 / 1 . Su n
~1 0 / 1 . Su n
0 2 : 0 0 6 0m i n
S e r i a l C om*
L i gh t
or
5
6
Se t u p
L i g h t T i me
2m
An a l o g I n
T e mp . S c a l e
Ce l c i u s
Fah r en he i t
An a l o g I n
I 01
I 02
I 03
I 04
I 05
I 06
I 07
I 08
T e mp . S c a l e
AL2-14MR-*, AL2-24MR-*
3 - 12
System Menu 3
S e r i a l Com
No t Us e
Mo d e m
Mo d e m I n i t
C o mma n d
D e l a y T i me
Mo d e m I n i t 0 1
C o mma n d
[
]
yz { | } ! " #$
Mo d e m I n i t
C o mma n d
D e l a y T i me
Mo d e m I n i t
D e l a y T i me
0s
GSM
C o m f o r ma t
GSM I n i t
GS MR e mo t e
P I NC o d e
S e t SMS
GSMS t a t u s
GSM
O t h e r Com
7
8
O t h e r Com
C o m f o r ma t *
S t a t i o nNo
L i nkB l oc k
O t h e r Com
S t a t i o nNo
O t h e r Com
C o m f o r ma t *
S t a t i o nNo
L i nkB l oc k
O t h e r Com
L i nkB l oc k
No . 0
0.
8, 7
Parity
Stopbit (bit)
1, 2
Baudrate (bps)
3 - 13
System Menu 3
C o m f o r ma t *
GSM I n i t
GSM I n i t
C o mm a n d
D e l a y T i me
GS MR e mo t e
GSR e mo t e
Fo r b i t
Pe r m i t
P I NC o d e
P I NC o d e
Se t u p
[ **** ]
Arrow key
P I NC o d e
Se t u p
[ " **** " ]
Arrow key
S e t SMS
SMSC 1
SMSC 2
DA 1
DA 2
DA 3
VP
S e t SMS
GSMS t a t u s
GSMS t a t u s
St a t us
CME E r r o r
CMS E r r o r
S i gS t r i n g
8, 7
Parity
Stopbit (bit)
1, 2
Baudrate (bps)
9600, 19200
3 - 14
3.4
System Menu 3
3.5
3 - 15
3.6
System Menu 3
3.6.1
ProgEdit
Refer to chapter 4, Direct programming, for detailed instructions on programming the 2
Series Controller.
3.6.2
3.6.3
ClockSET
To set the Clock:
1 ) From the TopMenu, scroll to ClockSet and press the OK key.
2 ) From the options that appear, choose ClockSet and press the OK key.
3 ) Use the arrow keys to move to an area that needs to be changed.
4 ) Adjust with the + or - keys.
5 ) Repeat steps 3-4 until ALL changes have been completed.
6 ) Press the OK key to accept all the changes or the ESC to discards the changes.
7 ) Press the ESC key to return to the Top Menu.
To set the daily correction:
1 ) From the TopMenu, scroll to ClockSet and press the OK key.
2 ) From the options that appear, choose Correct and press the OK key.
3 ) Set the daily correction time with the + or - keys.
4 ) Press the OK key to accept the value and press the ESC key to return to the Top Menu.
Note:
The date setting can be displayed as yyyy/mm/dd, dd/mm/yyyy, or mm/dd/yyyy by
manipulating the + and - keys. The day of the week will update automatically as the date is
changed.
3 - 16
System Menu 3
3 - 17
System Menu 3
SummerTime
The Summertime menu will display six choices when entered.
Cancel - Turns off the Summertime clock setting.
Manual On - Moves the clock one hour ahead immediately and will remain ON until cancelled.
Date Type - Set the On date, Off date, and Time adjustment.
UK Type - Last Sunday of March to the last Sunday of October.
US Type - First Sunday of April to the last Sunday of October.
EU Type - Last Sunday of March to the last Sunday of October.
Free Type - Set the On/Off date among each Sundays, Hour of time change, and Adjust time.
The time changes for the UK timezone take place at 1:00 AM in the Spring and 2:00 AM in the
Autumn. Time changes in the US and EU setting take place at 2:00 AM in the Spring and 3:00
AM in the Autumn.
If the controller time has been adjusted for Summertime, an s will precede the hour number
on the display screen.
Setting the controller for Summertime operation:
1 ) From the TopMenu, scroll to Others... and press the OK key.
2 ) From the options that appear, scroll to Summertime and press the OK key.
3 ) Scroll to the desired setting (see above for information on settings).
4 ) Press the OK key to accept the setting.
5 ) If the display time has been adjusted, an s will precede the hour number on the display
screen. If the date is outside of the summertime range, no visible sign will appear.
Figure 3.15: Changeover Date and Time
Changeover Date and Time (a.m.) for 2002
Modes
3.31.02
US
EU
UK
2:00 3:00
1:00 2:00
4.7.02
10.27.02
2:00 3:00
S U M M E R
M E
add 1 hour
Mode
Free
3:00 2:00
3:00 2:00
2:00 1:00
subtract 1 hour
On date
Off date
S U M M E R
Month (1~12)
Sunday (1st, 2nd, 3rd, 4th, 5th)
M E
Month (1~12)
Sunday (1st, 2nd, 3rd, 4th, 5th)
Note:
When Summertime is in effect, the clock should not be set to the changeover time. For
example, the clock should not be set to 2:00 a.m. on March 7, 2002 when US Summertime is
enabled. There will be an error in the displayed time.
3 - 18
System Menu 3
DispPass
DispPass provides the 2 Series Controller with three distinct security levels, limiting the users
ability to make changes to program parameters (i.e. the SetPeriod parameter of the
SpeedDetect FB). A non-authorized user will be able to navigate the display screen from field
to field, but will not be able to make changes without, first, entering the appropriate password.
There are three passwords that can be set from the front panel or the VLS software. Each
password can control access to many different displayed parameters.
The security level for a displayed parameter must be assigned with the VLS software but, the
actual password can be set, changed or removed with the front panel keys. The following is the
step-by-step process for modifying password settings.
To set the Level 1, Level 2 or Level 3 Password:
1 ) From the TopMenu, scroll to Others... and press the OK key.
2 ) From the options that appear, scroll to DispPass and press the OK key.
3 ) Select Level 1, Level 2 or Level 3
4 ) Enter the Password with the +, - and directional buttons.
5 ) Press OK to activate the password.
To remove the Level 1, Level 2 or Level 3 passwords:
1 ) From the TopMenu, scroll to Others... and press the OK key.
2 ) From the options that appear, scroll to DispPass and press the OK key.
3 ) Select a security level with a key icon by it.
4 ) Enter the appropriate level Password with the +, - and directional buttons.
5 ) Press OK to deactivate the password.
To change a password:
To change a password perform the To remove the Level 1, Level2 or Level 3 Passwords
procedure then the To set the Level 1, Level 2 or Level 3 Passwords procedure from above.
The example window below shows how to assign a password to a function block parameter
being displayed on the front panel. In this example, the SpeedDetect function block has been
used.
1 ) Select the parameter that will be displayed, in this example, SetPeriod.
2 ) Select the security level.
3 ) Assign the password in the Password Dialog Box.
3 - 19
System Menu 3
Password
The password consists of four digits and will prohibit entry into the ProgEdit, Monitor, Disp
Pass and Serial Com modes only. All other menu options can be accessed when a Password
is used.
To Enter a Password:
1 ) Select Others... Menu Option.
2 ) Select Password from the Others... Menu Options
3 ) Use the + and - keys to enter the desired password.
4 ) Press the OK key to accept and activate the password.
5 ) A key symbol will now be displayed at the top of the 2 display.
To Cancel a Password:
1 ) Select the Others... Menu Option.
2 ) Select Password from the Other Menu Options. Cancel Password should appear on
the top of the screen.
3 ) Use the + and - keys to enter the current password.
4 ) Press the OK key to accept and deactivate the password.
5 ) The key symbol will be removed from the 2 display.
Note 1: A Password protected program in an AL2-EEPROM-2 Cassette can be run from and
be downloaded into the main body of the controller.
Note 2: A controller containing a Password protected program can accept or transfer
programs to an AL2-EEPROM-2.
Note 3: The Password can also be set/deleted from the AL-PCS/WIN-E software or deleted by
the PROGCLEAR command.
3.6.8
3 - 20
System Menu 3
Note:
When the program read protection function is used and the password is forgotten, the program
can't be recovered by any methods. So, please take care to handle the function.
The following table shows the possible and prohibited actions in case the Program Read
Protection is set.
Action
Program Download (VLS to 2)
Program Upload (2 to VLS)
VLS
Switch RUN/STOP
9
9
9
9
Monitoring
Program Parameter Change
Others
Monitoring
Comment
9
9
-
(9)
Dedicated Communication
3 - 21
System Menu 3
Serial Com
The modem function capability of the 2 allows remote monitoring via a PC and program
upload/download. The communication must take place using Visual Logic Software (VLS) and
the communication must be initiated accordingly. (The modem connected to the 2 is
initialized upon the 2 start-up. Dialing options from a command or specific conditions are not
available).
Command - Enter the AT command for the modem to be connected to the controller.
Reference the Modem User manual for details on that units AT command. Choose the first
letter or symbol by using the ( ) and ( ) arrows. When the symbol is showing in the command
line, use the ( ) and ( ) arrows to move to adjoining spaces. Enter up to 64 letters/symbols
and accept the whole string with the OK key when finished inputting the data. (There is no
need to accept each letter with the OK key).
Delay - The Delay function sets the length of time the 2 will wait after power on before setting
the setup AT command to the modem. Choose a value of 0 - 10 seconds using the + or -
keys. The modem connected to the Personal Computer with VLS software must be set ON
prior to the 2 modem turning on.
The GSM function allows a SMS (Short Message Service) message to be sent to either a
mobile telephone or an email account. The short message provides the remote user with the
identical LCD screens data. By recieving a short message by 2, SMR FB bit output or word
output can be changed this remote switch commands carried out. Refer to the 2
Communication Manual for detailed explanation concerning GSM parameters.
The OtherCom function provides the user with an on-line programming feature using
dedicated protocol. Refer to the 2 Communication Manual for detailed explanation
concerning Dedicated Protocol parameters.
3 - 22
System Menu 3
Install the AL2-EEPROM-2. Refer to the AL2-EEPROM-2 instruction manual for help.
Select Others... in the Top Menu.
Select ProgTran.
Select Verify.
Choose OK to proceed or ESC to exit.
If the program is successfully verified, the work Completed will blink on screen.
If the programs are not the same, the words Verify Error will blink onscreen.
Install the AL2-EEPROM-2. Refer to the AL2-EEPROM-2 instruction manual for help.
Select Others... in the Top Menu.
Select ProgTran.
Select Cassette.
Choose OK to proceed or ESC to exit.
When the program is successfully transferred, Completed will blink on the display.
In case of an 2 version 2.20 controllers in VLS programming software the "Copy to Memory
Cassette protection" can be set. If this option is set, the copy of a program from 2 version
2.20 controller to Memory casette is prohibited.
3 - 23
System Menu 3
3 - 24
System Menu 3
Note:
In Run Mode, the temperature scale can be checked but cannot be changed.
Note:
System flags, M17 through M24, correspond to the 8 possible temperature input channels, I01
through I08. When the analog input is configured for TC or PT100 input, these system flags will
detect a defect in the ADP modules operation. An input voltage of more than 11 volts will set
the corresponding flag and indicates a sensor problem. An input voltage of 0 volts will also set
the corresponding flag, but indicates a power failure at the ADP module.
3.7
LCD Displays
There are a number of types of data and/or information that can be displayed on the LCD
display besides the menus listed previously.
3.7.1
Image Table
The first LCD display to appear is the Input/Output image table and the Real Time Clock. The
clock shows the current time as set by the user. The Summertime mode is shown by an s
preceding the time if activated.
3.7.2
LCD Function
Display up to 12 different letters or characters on each of four lines. Options include character
strings (design your own message), function block data, or analog data.
3 - 25
3.8
System Menu 3
Block Items
Each block item contains an individual diagram that shows the block number, available number
of input pins, the output pin if applicable, and the block mnemonic. Connections between
blocks can be viewed at the pin locations when connected blocks are shown individually on the
LCD.
3.8.1
Input Blocks
The Input Blocks consist of System Inputs (I01 - I15), Key Inputs (K01-K08), System Bits (M01M24) or Link Inputs (E01 - E04). The input number is shown in the top right hand corner, the
type of input in the lower right hand corner, and the output pin is shown on the far right of the
block. Input Blocks provide information to the Function Blocks or Outputs.
3.8.2
Function Blocks
The individual Function Blocks are described in detail in Chapters 5 and 6. Function Blocks
can have 0 to 4 input pins shown on the left of the diagram and an output shown on the far
right. Some function blocks have data that can be used for comparison purposes only or are
used to display data onscreen. These blocks have no output pins. The number and block
mnemonic are shown in the top right and bottom right locations respectively.
3.8.3
Output Blocks
Output Blocks have one input and one output pin. They only have the capacity for one input
signal through the input pin. The Output Block number and Mnemonic are shown in the top
right and lower right hand corner of the diagram respectively.
3.8.4
Connected Blocks
Blocks that are connected can be shown simultaneously onscreen. The block providing the
output signal will be shown on the left of the screen. The input pin accepting the signal will
flash. Any input pin that is already connected will be shown as a solid triangle.
3 - 26
4.
Direct Programming 4
Direct Programming
The 2 can be programmed using the front panel keys on the 2 series controller. The
following sections will describe how to connect/disconnect function blocks, set program
parameters, add Function Blocks, and move around within the program.
The ProgEdit mode in the Stop Menu has full programming capability. The Monitor mode in the
Run Menu has the capability to manipulate Function Block values and settings but cannot edit,
change, or delete the existing program.
4.1
Block Availability
The number of System Inputs and Outputs is determined by the type of controller being
programmed. Configurations include 6 In/4 Out, 8 In/6 Out and 15 In/9 Out. Up to 200
Function Blocks can be used in a program or 5000 bytes of memory. The Function Blocks must
be added in the course of programming. The 8 Keys and the 24 system M bits are
automatically available for every program.
Inputs, Outputs, System Memory Bits, Extended Inputs, Extended Outputs, AS-i Outputs,
Control Bits, and Keys do not count in the Function Block total.
4.2
Connecting Blocks
Any block that has an output pin can be connected to any block that has an (unused) input pin.
System Inputs, Keys, and Memory M bits have output pins only.
Function Blocks and Outputs both contain input and output pins (the Display and TimeSwitch
Blocks are exceptions). Blocks can be connected beginning with an output pin, from left to
right on the display, or beginning with an input pin, from right to left on the display.
4.2.1
To connect the blocks from the left (signal provider) block to right (signal
receiver) block.
It is necessary to choose the block to provide the output (step 1), the block to accept the signal
(step 2), and the pin with which to accept the signal (step 3).
1 ) Step 1: Select the block providing the data to be output and move to the right until the
output pin is flashing. Press the + button to add a block.
01
In
2 ) Step 2: Choices will appear on the right side of the screen that include System Outputs (if
available), existing Function Blocks that have free input pins, and the option to add a new
function block (AddFB, see section 4.4). Scroll to the preferred option and select using the
OK key.
01
Ad d FB
O0 1
Co n n e c t
4-1
Direct Programming 4
3 ) Step 3: The block accepting the signal will display as many of its input pins as possible (at
times they will not all fit on-screen). Pins that have been used will show as filled triangles;
pins that are open will show as > signs. A Connect prompt will appear on-screen, either
above or below the left hand block. The current input choice will flash. Scroll to the desired
pin and press the OK key to accept. The process is complete.
01
001
P
Co n n e c t
4.2.2
To connect the blocks from the right (signal receiver) block to left (signal
provider) block.
It is necessary to choose the block input pin (Step 1), the signal provider (Step 2), and to
accept the connection (Step 3).
1 ) Step 1: Select the block that will be receiving the signal and move left until an input pin is
flashing. Scroll to the desired unused input pin (>). Press the + key to begin the
connection process.
01
001
P
In
CN
2 ) Step 2: Because output pins may have multiple connections, all the Keys, Function Blocks,
System Inputs, Outputs will show on the left of the screen as well as an option to AddFB.
Scroll to the preferred option and Press the OK key.
Co n n e c t
P
Ad dFB
M0 1
CN
3 ) Step 3: The chosen connection will be flashing on-screen along with the Connect prompt.
Press the OK key to accept.
Co n n e c t
P
CN
In
4.3
4-2
4.4
Direct Programming 4
4.4.1
New FB
To use the New FB option, proceed to the Edit Menu (Chapter 3) using the ESC key. Scroll to
the New FB option and press the OK key. Scroll to the desired Function Block and press the
OK key to create a New FB. The block will appear on the Function Block Diagram board.
FB Se l e c t
A ND
OR
Bo o l e a n
Se t / Re s e t
R e t e n t SR
De l a y e dAL
4.4.2
AddFB
When connecting a Function Block, scroll to the AddFB prompt and press the OK key. This
invokes the Function Block list. Scroll to the desired Function Block and choose by pressing
the OK key. The Function Block will be shown on the screen with the connecting block.
4.5
4.5.1
4.5.2
4.5.3
Delete FB
This menu option will Delete the current Function Block. After the Delete FB is chosen, confirm
the delete operation with OK or use the ESC key to cancel the function. All connections to
the Function Block will be removed with the block.
4-3
4.6
Direct Programming 4
4.6.1
4.6.2
4.6.3
4.7
4-4
Direct Programming 4
4.8
4.8.1
Abbreviated Terms
Forcing Conditions
EI
E0
Key
System bit
Control bit
Function Block
Input
Output
4-5
Direct Programming 4
001
Ou t
\
O0 2
?
_M
4.8.3
4-6
5.
Logic
Block
State
Logic Block
Displayed
AND
1
2
3
4
OR
1
2
3
4
00
O
AND
00
O
OR
00
NOT
1
NT
00
XOR
1
2
XOR
NAND
NOR
1
2
3
4
1
2
3
4
00
O
NAND
00
O
NOR
Description
Memory
Use
Section
Reference
T h i s f u n c t i o n exe c u t e s l o g i c a l A N D
operation on given input signals. The input
signals connected should be of bit input
type only. 4 Bit input pins and 1 Bit output
pin. If all the inputs are ON then the output
is ON, otherwise output is OFF.
19 Byte
5.1
19 Byte
5.2
This function executes logical NOT operation on given input signal. The input signal
connected should be of bit input type only. 1
Bit input pin and 1 Bit output pin. Output is
negation of Input given.
10 Byte
5.3
This function executes logical XOR operation on given input signals. The input signals connected should be of bit input type
only. 2 Bit input pins and 1 Bit output pin.If
both the inputs are either OFF or ON then
out put is OFF, otherwise output is ON
13 Byte
5.4
19 Byte
5.5
19 Byte
5.6
5-1
5.1
Output
1
2
3
4
00
O
AND
AND
Input 2
Input 3
Input 4
Output
On
On
On
On
On
On
On
On
Off
Off
On
On
Off
On
Off
On
Off
On
On
Off
Off
On
On
On
Off
On
On
Off
Off
Off
On
Off
Off
On
Off
Off
Off
On
On
Off
Off
On
On
Off
Off
On
Off
On
Off
Off
Off
On
Off
On
Off
On
Off
Off
Off
Off
Off
On
Off
Off
Off
Off
Off
On
Off
Off
Off
Off
Off
On
Off
Off
Off
Off
Off
Off
5-2
5.2
The OR Block
01
Output
1
2
3
4
00
O
OR
3
4
OR
Input 2
Input 3
Input 4
Output
On
On
On
On
On
On
On
On
Off
On
On
On
Off
On
On
On
Off
On
On
On
Off
On
On
On
On
On
On
Off
Off
On
On
Off
On
Off
On
On
Off
Off
On
On
Off
On
On
Off
On
Off
On
Off
On
On
Off
Off
On
On
On
On
Off
Off
Off
On
Off
On
Off
Off
On
Off
Off
On
Off
On
Off
Off
Off
On
On
Off
Off
Off
Off
Off
5-3
5.3
5.4
Input
Output
On
Off
Off
On
00
O
1
NT
Input 2
Output
On
On
Off
On
Off
On
Off
On
On
Off
Off
Off
00
O
1
2
XOR
5-4
5.5
1
2
3
4
00
O
NAND
01
Output
2
3
4
NAND
.
Table 5.6: NAND Logic gate
Input 1
Input 2
Input 3
Input 4
Output
On
On
On
On
Off
Off
Off
Off
Off
On
On
On
On
Off
On
On
On
Off
On
On
On
Off
On
On
On
Off
On
On
On
On
On
On
Off
Off
On
On
Off
On
Off
On
On
Off
Off
On
On
Off
On
On
Off
On
Off
On
Off
On
On
Off
Off
On
On
On
On
Off
Off
Off
On
Off
On
Off
Off
On
Off
Off
On
Off
On
Off
Off
Off
On
On
5-5
5.6
1
2
3
4
00
O
NOR
01
Output
2
3
NOR
Input 2
Input 3
Input 4
Output
Off
Off
Off
Off
On
On
On
On
On
Off
On
On
On
Off
Off
On
On
Off
On
Off
On
Off
On
On
Off
Off
On
On
On
Off
On
On
Off
Off
Off
On
Off
On
Off
Off
On
Off
Off
On
Off
Off
On
On
Off
Off
Off
On
Off
On
Off
Off
Off
On
On
Off
On
Off
Off
Off
Off
Off
On
Off
Off
Off
Off
Off
On
Off
Off
Off
Off
Off
On
Off
5-6
6.
Function Blocks 6
Function Blocks
The 2 series controller is fundamentally based on function block programming. The blocks
provide a wide range of possible operations and have been preprogrammed for ease of use.
Some Function Blocks have parameters that can be tailored to meet individual requirements in
the programs. Each function block will have a description of the Blocks purpose, a diagram of
how the Block will appear on-screen, and a description of the inputs, outputs, and available
options.
Table 6.1: Function Block List
FB Name
FB Symbol
1
2
3
4
Boolean
[BL]
Set/Reset
[SR]
S
R
Pulse
[PL]
000
P
O
BL
000
P
O
SR
000
P
O
PL
000
Alternate
[AL]
I
C
Delay
[DL]
I
C
One Shot
[OS]
Flicker
[FL]
O
AL
000
P
O
DL
I
C
000
P
O
OS
000
P
O
FL
Memory
Use
Section
*1
6.3
14 Byte
6.4
10 Byte
6.5
13 Byte
6.6
19 Byte
6.7
17 Byte
6.8
19 Byte
6.9
6-1
Function Blocks 6
FB Name
FB Symbol
000
P
O
Time
Switch
[TS]
TS
000
P
Time
Switch m
[TSm]
T Sm
000
P
O
Counter
[CN]
I
C
U/D
Counter
[UD]
U
D
C
P
UD
Compare
[CP]
000
P
O
Analog
Output
M
E
Offset
Gain
[OG]
Display
[DP]
Zone
Compare
[ZC]
CN
000
P
O
CP
000
P
AO
000
P
OG
000
P
DP
000
P
O
ZC
Memory
Use
Section
*2
6.10
*2
6.10
16 Byte
6.11
22 Byte
6.12
17 Byte
6.13
17 Byte
6.14
22Byte
6.15
*4
6.16
20 Byte
6.17
6-2
FB Name
Schmitt
Trigger
[ST]
Hour
Meter
[HM]
Speed
Detect
[SPD]
PWM
[PWM]
PID
Function Blocks 6
FB Symbol
000
P
O
ST
I
C
000
P
O
HM
I
U
C
000
O
P
SPD
000
P
O
PWM
A
E
E
A
C
00 00 00
OO
PP
PP II DD
000
Retentive
Alternate
[RAL]
I
C
Addition
[ADD]
Subtractio
n
[SUB]
O
RA L
000
O
P
A DD
000
O
P
SUB
Memory
Use
Section
T h e S c h m i t t Tr i g g e r F u n c t i o n B l o ck
compares an input value to preset high and
low limits. The output is ON when the input
value reaches the high limit and then falls
below the lower limit. The function only
processes the data when the function block
is receiving an input signal.
19 Byte
6.18
19 Byte
6.19
25 Byte
6.20
16 Byte
6.21
52 Byte
6.22
13 Byte
6.23
T h e A D D F u n c t i o n B l o ck i s u s e d t o
summate two input values
20 Byte
6.24
20 Byte
6.25
6-3
Function Blocks 6
FB Name
FB Symbol
Multiplicati
on
[MUL]
Division
[DIV]
Calculatio
n
[CAL]
Shift
[SFT]
SMS
[SMS]
Short
Message
Receiving
[SMR]
MU L
000
O
P
DIV
000
O
P
CA L
I
T
S
R
SFT
000
O
P
000
O
S MS
E
R
000
P
O
SMR
Short
Message
Receiving m
[SMRm]
E
R
Call
Detect
[CD]
E
R
Call
Detect m
[CDm]
000
P
O
000
P
O
SMRm
000
P
O
CD
E
R
000
P
O
CDm
Memory
Use
Section
20 Byte
6.26
20 Byte
6.27
*3
6.28
19 Byte
6.29
*6
6.30
*7
6.31
*7
6.31
30 Byte
6.32
30 Byte
6.32
6-4
Function Blocks 6
Memory
Use
Section
19 Byte
6.33
20 Byte
6.34
16 Byte
6.35
14 Byte
6.36
Control
Display
[CDP]
*5
6.37
Connect
[ _B ]
10 Btye
6.38
10 Btye
FB Name
FB Symbol
Random
One Shot
[ROS]
I
C
Delayed
One Shot
[DOS]
I
C
Delayed
Alternate
[DAL]
I
C
Retentive
Set/Reset
[RSR]
000
P
O
RO S
000
P
O
DO S
000
P
O
DA L
S
R
000
P
O
RSR
000
I
O
_B
System
Outputs
6-5
Function Blocks 6
Note:
*1 Number of bytes used = 19 + 1 x (Characters in equation)
*2 Number of bytes used = 8 + 4 x (Number of time switches)
*3 Number of bytes used = 30 + 1 x (Characters in equation)
*4 Number of bytes used is decided by the displayed item.
Displayed Item
Characters
Analog, FB value
Value
17
Graph
23
Time, Date
14
Time Switch
17
6-6
6.1
Function Blocks 6
Definitions
DirectSet - Enter a value using the + and - keys.
Analog In - An analog input value from a System Input (A01, A02, A03,... A08).
FB Value - A value contained in a Function Block (T, t, N, n, Direct set, etc.)
Word Comparison - a 16 bit output value from a Function Block.
6.2
Abbreviations
Table 6.2: Abbreviated terms used in describing function block
Term
Description
1,2,3,4
The actual count value. This value c an be set to a one time offset value,
range: 0 - 32767
The elapsed time since the function set ON, range: 0 - 32767sec
Note: The following function block information, details specific explanation concerning
front panel programming using the 2 Series Controller. However, it is assumed the
user has read and understood Direct Programming Chapter 4. Thus, is capable of
connecting function blocks together using the dedicated front panel keys. Hence, each
function block provides step by step instructions for direct input having ignored the
initial key presses detailed in Chapter 4.
6-7
6.3
Function Blocks 6
Boolean block
The function block creates a logical operation using Boolean algebra consisting of AND, OR,
NAND, XOR and NOT gates. It is possible to express the Logic functions in the form of an
equation. Refer to Chapter 5 for detailed information concerning Boolean Logic operation.
Table 6.3: Boolean Function Block
Function
1
2
3
4
000
P
O
BL
Set Item
1,2,3,4
FB
Description
Numbered Input pins for boolean operation to control
User-defined logical boolean operation
Output
Display
Description
AND
Intersection
OR
Disjunction
XOR
XOR
NOT
NOT
Left parenthesis
Right parenthesis
Output signal
1 ) Boolean Operation
1
01
Output
2
3
O=1 * 2 + 3
BL
AND OR
6-8
Function Blocks 6
Setup of the Boolean Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B001 : BL
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Select Setup FB using the and keys and press the OK key. The boolean function
block edit screen is displayed as shown.
B001 : BL
[ O=
and
3
]
6-9
6.4
Set/Reset Block
Function Blocks 6
The function block will set or reset an output according to the input condition. When the SET
input is energised, the Output is ON. When the RESET input is energised, the Output is OFF.
When both inputs are energised simultaneously, the Output will follow the Priority Setting
signal. A latched Output does not depend on the constant signal to retain its status.
Set Priority - When the Set input comes ON, the Output comes ON and remains ON until the
Reset pin receives a signal. Once the Output is ON, the Set input signal can turn OFF without
effecting the Output. If both the Set and Reset pins are ON, the Output is ON.
Reset Priority - The operation is the same as the Set Priority except that when both pins are
ON, the Output is OFF.
Table 6.5: Set/Rest Function Block
Function
S
R
Set Item
000
P
O
Description
FB
Allocates priority to either the set or reset function when both pins are
ON
The output of the function block operates in either an ON or OFF
state.
SR
Output
OFF
Input pin R
OFF
ON
Output
ON
OFF
OFF
Input pin R
OFF
ON
Output
ON
OFF
6 - 10
Function Blocks 6
Setup of the Set/Reset Function Block directly from the 2 Series Controller
1 ) Allocate the set and reset pins for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : SR
Se t u p FB
Ch a n g e No
De l e t e FB
and
6 - 11
6.5
Function Blocks 6
Pulse Block
The function block emits a single pulse at any of the following user defined times:
Table 6.6: Pulse Function Block
Function
Set Item
I
FB
000
P
O
Description
Input pin for pulse operation
Sends a single pulse depending on the function block conditional
setup.
The function block sends a single pulse depending on the chosen
pulse operation
PL
Output
1) From ON to OFF
2) From OFF to ON
3) From ON to OFF and OFF to ON
Input pin I
Output
2 pulse width
1 operation cycle
(time to process program once)
6 - 12
Function Blocks 6
Setup of the Pulse Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B001 : PL
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Select Setup FB using the and keys and press the OK key. Select using the
and keys the initiation type for the pulse operation.
B001 : PL
R i s eEdge
Fa l l Edge
Bo t hEdge
6 - 13
6.6
Function Blocks 6
Alternate Block
The function block inflicts a reversal of the ON and OFF state of the output as and when the
input is given to the input pin.
Table 6.7: Alternate Function Block
Function
Set Item
000
I
C
Description
Clear input pin resets the state of the output regardless of the input
given.
FB
N/A
The output is affected in the following operation:
AL
Output
1 ) Alternate Operation
Input pin I
ON OFF
ON
Input pin C
Output
OFF
ON OFF
6 - 14
6.7
Function Blocks 6
Delay Block
The function block delays the signal to an output for a set length of time. The On or Off delays
can be set individually or in combination. Example: The On Delay Time is set to 5 seconds.
The Delay Block Input signal comes ON; five seconds later the Delay Block Output will come
ON. The Output signal stays ON as long as the Input signal is ON. The Output signal turns
OFF at the same time the Input signal turns OFF. The Clear Input will turn the Output OFF and
cancel the current operation. The Clear pin over-rides the Input pin if both signals are ON
simultaneously.
The On Delay option will delay the Output from turning ON for a set time after the Input comes
ON. The Off Delay will delay the Output from turning OFF for a set time after the Input has
turned OFF.
Table 6.8: Delay Timer Function Block
Function
Set Item
Description
Clear input pin resets the state of the output regardless of the input
given.
FB
I
C
1) The lag time setting for energising the output from a given input
signal can be given a controlled delay time; The starting value has a
range from 0s to 32767s
000
P
O
2) The lag time setting for denergising the output from a given input
signal can be given a controlled delay time; The starting value has a
range from 0s to 32767s
DL
Output
3) If the clear signal of the input pin C is turned on while the delay
function block is in operation consequentially the current value of the
ON delay timer and OFF delay timer resets to 0. Thus, the output is
turned OFF.
4) The following items are available for other function blocks:
a) On Delay
b) Current On Delay
c) Off Delay
d) Current Off Delay
Note: The ON/OFF delay time cannot be less than one scan time for the controller;
otherwise, the Delay Function Block will not perform its assigned task for the time
specified. Users can monitor the scan time from the 2 Series Controller. Scan time is
dependent on the user-program; therefore, caution is needed as and when time units
are selected.
1 ) Delayed Operation
In p u t p in I
ON
ON
In p u t p in C
O u tp u t
ON
O n d e la y
Tim e
OFF
O ff d e la y
Tim e
S h o rte r th a n
O n d e la y tim e
O n d e la y
Tim e
O n d e la y
Tim e
S h o rte r th a n
O ff d e la y tim e
6 - 15
Function Blocks 6
2 ) ON delay timer
Input pin I
ON
ON
Input pin C
Output
ON OFF
On delay
Time
Shorter than
On delay time
On delay
Time
On delay
Time
Setup of the Delay Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B0 0 1 : DL
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK key to set the Time unit for the delayed output.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
4 ) Press the OK key having selected the value for the delayed time unit and return to the
function block edit screen. Using the and keys highlight the Setup FB and press the
OK key. The screen displayed is shown.
B0 0 1 : DL
OnDe l a y
O f f De l a y
6 ) Press the OK key to accept the time figures and subsequently press the ESC key to
return to the function block edit screen.
6 - 16
6.8
Function Blocks 6
Set Item
Description
Clear input pin resets the state of the output regardless of the input
Time units: 10ms, 100ms or 1s (*Note)
FB
I
C
000
P
O
The One Shot time T and t can be set using the chosen time units.
A Time or Input priority can be set.
The following items are applicable for the one shot function block:
OS
Output
Note: The set time cannot be less than one scan time for the controller; otherwise, the
One Shot Function Block will not perform its assigned task for the time specified.
Users can monitor the scan time from the 2 Series Controller. Scan time is
dependent on the user-program; therefore, caution is needed as and when time units
are selected.
One Shot Operation
1 ) Time Priority
Input pin I
Input pin C
Output
ON OFF
set time
set time
2 ) Input priority
Input pin I
Input pin C
Output
set time
6 - 17
Function Blocks 6
Setup of the One Shot Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : OS
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK key to set the Time unit for the delayed output.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
4 ) Press the OK key having selected the value for the one shot time unit and return to the
function block edit screen. Using the and keys highlight the Setup FB and press the
OK key. The screen displayed is shown.
B 0 0 1 : OS
On e Sh o t
Pr i or i t y
5 ) Select the One Shot or Priority option using the and Keys and press the OK key.
The One Shot time can be entered using the + or - keys.
B 0 0 1 : OS
On e Sh o t
T=
0 . 1s
t=
0 . 0s
or
keys.
B 0 0 1 : OS
Pr i or i t y
T i me
I npu t
7 ) Press the OK key to accept the time figures and subsequently press the ESC key to
return to the function block edit screen.
6 - 18
6.9
Function Blocks 6
Flicker Block
The function block provides a method to give a patterned ON/OFF Output signal. The user can
set independent ON and OFF times for the Output. The output pattern can be dependent on an
input signal, or can be performed for a preset cycle time or number of repetitions.
Table 6.10: Flicker Function Block
Function
Set Item
Description
FB
3) Blinking operation
a) Cycles count (frequency assigned operation) maximum
number of cycles to be set is 32767
b) Time count maximum 32767
c) Continuous control
000
P
O
FL
Output
Note: The set time cannot be less than one scan time for the controller; otherwise, the
Flicker Function Block will not perform its assigned task for the time specified. Users
can monitor the scan time from the 2 Series Controller. Scan time is dependent on
the user-program; therefore, caution is needed as and when time units are selected.
Flicker Operation
1 ) Continuous control action
Input pin I
ON OFF
ON
Output
OFF
Off time
On time
Off time
On time
Off time
On time
ON OFF
once
once
twice
Off time
Off time
On time
On time
6 - 19
Function Blocks 6
Output
Off time
On time
On time
Off time
On time
On time
Setup of the Flicker Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B0 0 1 : FL
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK key to set the Time unit for the delayed output.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
4 ) Press the OK key having selected the value for the flicker time unit and return to the
function block edit screen. Using the and keys highlight the Setup FB and press the
OK key. The screen displayed is shown.
B001 : FL
O n T i me
O f f T i me
Pe r i o d
5 ) Select the On Time, Off Time or Period option using the and
OK key. The On Time can be entered using the + or - keys.
and
Keys.
B001 : FL
T i me
Co u n t
Co n t i n u o u
6 - 20
Function Blocks 6
8 ) Using the and keys highlight the Time option and press the OK key. The Time can
be entered using the + or - keys.
B001 : FL
T i me
T=
0 . 0s
t=
0 . 0s
10 )Press the OK key to accept the time values and subsequently press the ESC key to
return to the function block edit screen.
6 - 21
Function Blocks 6
6.10
TimeSW Block
The real time clock within the TimeSW block can be programmed for date or weekly schedule
operation. Up to 50 time settings can be programmed into each Function Block and up to 200
function blocks can be used in any program. The total memory for a 2 program is 5000 bytes;
the number of time switches available will be limited by the program memory. Switch setting
numbers must be created with the NewData option. To input or update the data, scroll to the
desired time switch, press the OK key, and use the EditData function.
The difference between TS and TSm is allowable maintenance (m) from the TopMenu
Parameter in the 2 controller for direct programming.
Table 6.11: Time Switch Function Block
Function
Set Item
Description
FB
000
P
O
TS
Output
After choosing the type of time switch, a screen will appear with a time switch number flashing
in the top right corner. This screen is used to select the time switch to edit by using the + or keys. The only time switch available to begin is TS #01. Press the OK key to display the
option screen shown at right.
B0 0 1 : TS # 0 1
Ed i t Da t a
N e wD a t a
De l Da t a
EditData - Edit the data for the time switch number shown in the top line.
NewData - Add a new time switch. Time switch numbers will increment from the highest
current number.
DelData - Deletes a time switch. Higher numbered time switches will decrement.
Choose EditData and enter data as described in the following sections:
6 - 22
Function Blocks 6
The example shows a time switch that will turn ON on August 3rd, 2002 at 9:00 AM (Note 9:00 PM is designated on the 24 hour clock as 21:00). The day of the week is automatically
updated when the date is changed.
B0 0 1 : TS # 0 2
Fr i
03 / 08 / 2002
0 9 : 0 0 o n
A Monthly mode is also available to the user for direct per month setting. The user can set an
ON or OFF condition for a specified date of the month. The time switch can also be
programmed to perform on a yearly basis. Reduce the year to below 1998; the numbers
signifying the year will display as "*" and the day of the week message will appear as Yearly.
The operation will perform each year on the specified date.
The example screen shown at the right shows that the Output will turn ON at the following
times:
B0 0 1 : TS # 0 1
1 - 34 - M - W- - S
1 1 : 2 0 o n
The first week of the month on Monday, Wednesday, and Saturday at 11:20 AM.
The third week of the month on Monday, Wednesday, and Saturday at 11:20 AM.
The fourth week of the month on Monday, Wednesday, and Saturday at 11:20 AM.
6 - 23
Function Blocks 6
Choose the EditData option to view the selected time switch data.
Update data as required and accept with the OK key.
6 - 24
6.11
Function Blocks 6
Counter Block
The function block counts input pulses and turns the Output ON when a preset limit is reached.
The counter counts up only to a maximum value of 32767 and increments on the rising pulse.
Normal inputs count to a maximum of 20Hz, however, with an extension module attached
inputs EI1 or EI2 can count to a maximum of 1KHz.
Table 6.12: Counter Function Block
Function
I
C
Set Item
Description
Clear input pin resets the state of the output regardless of the input
given if reset has been given priority.
FB
000
P
O
1) When the current incremental value reaches the set value of the
counter function block the status of the output is ON.
CN
Counter Operation
ON
Input pin I
OFF
ON
Input pin C
OFF
Current value of
counter
0
Output
5
(=set value)
0
3
0
OFF ON
Setup of the Counter Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown
B 0 0 1 : CN
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the counter function block settings using the +, -,
keys.
and
B 0 0 1 : CN
Co u n t
N=
1
n=
0
4 ) Press the OK Key and return to the function block edit screen.
6 - 25
Function Blocks 6
6.12
Set Item
U
FB
U
D
C
P
Description
000
P
O
UD
4) The ON status of the output is set from the current value equaling
or exceeding the set value.
5) The current value becomes the set value if the preset pin P
receives a signal; the status of the output becomes ON.
6) The following item is available for other function blocks:
a) Current Up Down Count
1 ) Counter Operation of input pin U, input pin D, current value and output
ON
Input pin U
OFF
Input pin D
OFF ON
Current value of
up-down counter
1
0
Output
1
0
-1
-2
-2
-3
ON
-4
-5
-4
-1
-1
-3
OFF
6 - 26
Function Blocks 6
2 ) Counter Operation of input pin U, input pin D, input C, input pin P, current value and output
Input pin U
Input pin D
Input pin C
Input pin P
Current value of
up-down counter
0
2
0
Output
2
-3
-4
ON
-2
0
-4
-5
-4
-6
-7
-5
-8
OFF
Setup of the Up/Down Counter Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : UD
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the Up/Down counter function block settings using the +, -,
and keys. The Direct Set of the count s ettings can be entered.
B 0 0 1 : UD
D i r e c t Se t
N=
0
n=
0
4 ) Press the OK Key and an Analog In function block value can be entered.
B 0 0 1 : UD
D i r e c t Se t
Ana l o g I n
FB Va l u e
5 ) Press the OK key and using the ESC key return to the function block edit screen.
6 - 27
Function Blocks 6
6.13
Compare Block
The function block compares value 1 (V1) with value 2 (V2) using an operational based
instruction based upon the following conditions: =, >, >=, <, <= or <>. If current values satisfy
the operational expression then the output status is ON.
Table 6.14: Compare Function Block
Function
Set Item
I
Description
Input pin for compare operation
The following three set items exist:
000
P
O
CP
Setup of the Compare Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : CP
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
and
keys.
B 0 0 1 : CP
Cmp V a l 1
V1 =
V2
0
4 ) Pressing the OK key invokes the menu that lists the function block input data type.
B 0 0 1 : CP
D i r e c t Se t
Ana l o g I n
FB Va l u e
6 - 28
Function Blocks 6
6 ) Or press the ESC key to return to the function block data input type menu, select the
Analog In selection and press the OK key
B 0 0 1 : CP
Cmp V a l 1
Ana l o g I n
0
A0 1
7 ) Or press the ESC key to return to the function block data input type menu, select the FB
Value selection and press the OK key.
B 0 0 1 : CP
Cmp V a l 1
No t Ex i s t
Va l i d FB
8 ) Using either the OK key or the ESC key depending on the acceptance of the setting.
Press the OK key when the Condition is highlighted. Thus, selecting the correct
comparator from the range.
B 0 0 1 : CP
Co n d i t i o n
V1 =
V2
9 ) Having set the V1, condition and V2 simultaneously use the ESC key to return to the
function block edit screen.
6 - 29
Function Blocks 6
6.14
Analog Output
The digital value on the word input pin is converted to a corresponding output voltage or
current on the specified channel on the AL2-2DA module. One of two output modes can be
selected, voltage or current output. In voltage output mode, digital values from 0 to 4000 are
mapped onto analog values from 0 to 10 volts. In the current voltage mode, digital values from
0 to 2000 are converted to a range of 4 to 20 mA. If a digital value less than the lower limit of 0
is input on the word input pin, the analog output will default to the lower limit of the analog
range (0 V or 4mA) for the specified output mode. If a digital value greater than the upper limit
is input, the analog output will default to the upper limit of the analog range (10V or 20mA) for
the specified output mode. The acceptable data types for the word input pin are constants,
analog inputs or FB output values. When more than one Analog Output FB is configured to use
the same channel, all FBs will be executed if their enable pins are active. The FB that is
executed last in the program will control the operation of the AL2-2DA board. The user cannot
know which FB will be executed last due to lack of knowledge of the controllers processing
algorithms. Care should be taken to avoid situations in which two or more analog output
function blocks may conflict.
Table 6.15: Analog Output Function Block
Function
000
P
M
E
Set Item
Description
AO
FB
Output
1) Bit Output pin. When converting digital to analog, this pin is ON.
Output Characteristics
10V
10.1V
10V
Analog
Analog
output
output
0
4000
0 Digital input
4000 4040
Digital input
20mA
20.16mA
20mA
Analog
Analog
output
output 4mA
4mA
2000
0 0 Digital input 2000 2020
Digital input
Set up of the Analog Output Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
6 - 30
Function Blocks 6
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown
B 0 0 1 : CN
Se t u p FB
Ch a n g e No
De l e t e FB
5 ) If a constant output voltage is required, highlight DirectSet and press OK. If not, skip to
step 7.
B 0 0 1 : AO
A n a l o gOu t
D i r e c t Se t
0
6 ) Enter a Direct Set value using the + and - keys and press the OK key to accept the
value. Skip to Step 11.
B 0 0 1 : AO
I npu t Va l
Ch a n n e l
7 ) If an analog input will be used, highlight AnalogIn and press OK. If not, skip to step 9.
B 0 0 1 : AO
A n a l o gOu t
An a l o g I n
A01
0
8 ) Select the appropriate analog input and press OK. Skip to Step 11.
B 0 0 1 : AO
I n pu t Va l
Ch a n n e l
9 ) If an FB word output will be used as the input value for the Analog Output FB, highlight FB
Value and press OK. If not, skip to step 11.
B 0 0 1 : AO
A n a l o gOu t
Co u n t e r
B0 0 2
6 - 31
Function Blocks 6
10 )Select the appropriate FB output and press OK using the + and - keys. After selecting
the appropriate function block, select the FB value to be used. The controller will return to
the Setup FB menu.
Co u n t e r
Co u n t Va l
13 )After setting up the function block, use the ESC key to return to the function block edit
screen.
6 - 32
6.15
Function Blocks 6
OFFSET Block
The function block is used to adjust an Analogue Input value according to the following linear
expression: Y=A/BX+C from which the values obtained through the analogue input channels
X:A01-A08 are set.
Table 6.16: Offset Gain Function Block
Function
Set Item
I
FB
I
Description
000
P
OG
Output
6 - 33
Function Blocks 6
Setup of the Offset Gain Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : OG
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the and keys. The
parameters A, B, X, C, Low limit and High limit have to be specified for the linear
expression to operate correctly..
B 0 0 1 : OG
y =A / B x +C
L imi t : L ,H
0
4 ) Using the and arrows highlight A and press the OK key. A Direct Set using the +
and - keys can be entered, subsequently press the OK key to accept the Direct Set
value. (Repeat operation for B)
B 0 0 1 : OG
Co n s t a n t A
D i r e c t Se t
1
and
6 ) The Analog In channel can be selected using the + and - keys, subsequently press the
OK key to accept the channel.
B 0 0 1 : OG
I npu t Va l
Ana l o g I n
A0 1
0
and
8 ) A Direct Set using the + and - keys can be entered, subsequently press the OK key to
accept the Direct Set value.
B 0 0 1 : OG
Co n s t a n t C
D i r e c t Se t
0
6 - 34
and
Function Blocks 6
10 )Press the OK and a Directset of the Low limit can be entered using the + and - keys.
B 0 0 1 : OG
L i m i t L ow
D i r e c t Se t
- 32767
11 )Press the OK key to accept the value and use the and arrows to highlight the high
limit value. Press the OK key and a directset value can be entered using the + and -
keys.
B 0 0 1 : OG
L imi t H i gh
D i r e c t Se t
32767
6 - 35
Function Blocks 6
6.16
Display Block
The function block displays the specified information from the connected function block. Allows
information to be displayed on the LCD screen. The Position line sets the starting point for the
data or message to be displayed. There are 12 columns and 4 rows that can be utilised.
Table 6.17: Display Function Block
Function
Set Item
I
Description
Input pin for Display operation
1) The data is positioned using an X,Y plot
a) X axis : setting range:1-12
b) Y axis : setting range:1-4
c) Length : setting range:1-12
The following Data items can be viewed using the display function
block:
000
P
DP
FB
2) Analog In
a) Value
b) Graph : Minimum : -32768 to 32767
Maximum : -32768 to 32767
Length
: 1 to 12
3) Function Block Value
4) Time Switch Data
5) Date : mm/dd/yyyy
6) Time : hh:mm
P ump
Is
On
6 - 36
Function Blocks 6
3 ) Press the OK Key and enter the function block settings using the
position element and type of data is required.
and
keys. The
B 0 0 1 : DP
Po s ( 1 , 1 )
NoDa t a
4 ) Press the OK key having highlighted Pos( 1,1) and a X and Y interger can be entered
using the + and - keys. The X and Y values represent the location coordinates for the
displayed data. Press the OK key to accept the coordinate values..
B 0 0 1 : DP
Po s i t i on
X = 12
Y =
1
5 ) Using the
and
6 - 37
Function Blocks 6
6 ) Highlight the Strings option using the and arrows and press the OK key to accept.
Either a Flicker or Scroll option can be selected to represent the string. If neither is elected
then a fixed position is indirectly chosen..
B00
Po
F l
Sc
1
s
i
r
: DP
(12 , 1 )
cke r
o l l
7 ) Press the OK key when either the Flicker or Scroll option is required. Set the Length (L)
and the Time (T) of the string using the + and - keys.
B 0 0 1 : DP
Po s ( 1 2 , 1 )
L=
1
T=
0 . 0s
8 ) Press the OK key to enter the character string for the Display Function Block. A
combination of and and the and arrows is needed to enter the entire string.
Press the OK key to accept. .
B 0 0 1 : DP
Po s ( 1 2 , 1 )
[
]
! " #$
10 )Press the OK key with A01 channel is flashing and either a value or graph can be viewed
for incoming analog data. Press the OK key for value and return to the previous screen ,
otherwise, highlight graph using the and and similarly press the OK key to set the
graphical parameters.
B 0 0 1 : DP
Ana l o g
Va l ue
Gr aph
In
11 )The graph option allows graphical representation of data in the form of a horizontal
bargraph, therefore, three parameters need to be entered to define the limitations. The
Length (LEN) value of the bargraph can be entered using the + and - keys. Use the
and to hightlight the MAX and MIN options accordingly. The Maximum (MAX) and
Minimum (MIN) values can be entered using the + and - keys. Refer to Table 6.16 for
range settings for each parameter.
B 0 0 1 : DP
L EN=
MA X =
M I N=
1
0
0
12 )If a Function Block Value is required to be displayed press the OK when FB Value is
highlighted in step 5.
B 0 0 1 : DP
FB Se l e c t
No t Ex i s t
Va l i d FB
6 - 38
Function Blocks 6
13 )If a Time Switch is required to be displayed press the OK when TS Data is highlighted in
step 5.
B 0 0 1 : DP
TS Se l e c t
T i me S W m
B0 0 1
14 )If Date is required to be displayed press the OK when Date is highlighted in step 5.
B 0 0 1 : DP
Po s ( 1 2 , 1 )
Da t e
02 / 14 / 2002
15 )If a Time is required to be displayed press the OK when Time is highlighted in step 5.
B 0 0 1 : DP
Po s ( 1 2 , 1 )
T i me
20 : 45
16 )Press the ESC key and return to the FBd for further programming.
6 - 39
Function Blocks 6
6.17
Set Item
I
Description
Input pin for zone compare operation
The following conditions apply to the function block:
1) Low (compare value L)
a) Range: -32768 to +32767 with initial value set at 0
b) Analogue data A01-A08
c) Other function block data
FB
I
000
P
O
ZC
Output status:
Output
1) ON in the zone
The value from the input pin is compared with the preset high and low
values and sets the output ON when the zonal compare condition is
satisfied.
Otherwise the output is OFF.
2) OFF in the zone
The value from the input pin is compared with the preset high and low
values and sets the output OFF when the zonal compare condition is
satisfied. Otherwise the output is ON.
6 - 40
Function Blocks 6
Setup of the Zone Compare Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : ZC
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
and
keys.
B 0 0 1 : ZC
Cmp V a l L
L < = I < =H : S
0
7 ) Press the OK key and data from another function block can be entered.
B 0 0 1 : ZC
Cmp V a l L
No t E x i s t
Va l i d FB
8 ) Having set the L and H condition using the same procedure and specified the Set or Reset
while in zone compare area use the ESC key to return to the function block edit screen.
6 - 41
Function Blocks 6
6.18
Set Item
I
Description
Input pin for Schmitt Trigger operation
The following conditions apply to the function block:
1) Low (compare value L)
a) Range: -32768 to +32767 with initial value set at 0
b) Analogue data A01-A08
c) Other function block data
000
P
O
FB
ST
Output
Output Status:
refer to the operation time charts for schmitt trigger condition.
6 - 42
Function Blocks 6
OFF ON
Limit (H)
Output
ON OFF
OFF ON
Limit (L)
Output
OFF ON
ON OFF
ON OFF
*1
Note: *1For Analog or FB value inputs, the lower and upper limits are not equal.
6 - 43
Function Blocks 6
Setup of the Schmitt Trigger Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B0 0 1 : ST
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
and
keys.
B0 0 1 : ST
I np u t Va l
L imi t =L , H
0
4 ) Press the OK key with the InputVal highlighted and the user can enter a the appropriate
Input Val data from either a DirectSet, Analog In or other FB Values.
B0 0 1 : ST
D i r e c t Se t
Ana l o g I n
FB Va l u e
5 ) The Low and High limit can be given Input Val data from either a DirectSet, Analog In or
other FB Values. Press the ESC key to return the edit screen for the function block and
the user can change the low or high limits either by DirectSet, Analog In or FB Value.
6 - 44
6.19
Function Blocks 6
Set Item
Description
FB
000
P
O
I
C
HM
3) The current time value is reset if the clear pin receives a signal.
4) The following items are available for other function blocks:
a) Set Hour
b) Current Hour
a) Set Minute
b) Current Minute
Start
Start
Restart
timekeeping timekeeping timekeeping
Input pin I
Suspend
timekeeping
Input pin C
Output
Timekeeping
Corresponds
with set time
Timekeeping
Suspending
timekeeping
Current value
6 - 45
Function Blocks 6
Setup of the Hour Meter Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : HM
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK key to set the Time unit for the delayed output.
T i me u n i t
h h : mm
mm : s s
4 ) Press the OK key having selected the correct time unit and return to the function block
edit screen. Using the and keys highlight the Setup FB and press the OK key.
B 0 0 1 : HM
Ho u r
Mi nu t e
6 - 46
6.20
Function Blocks 6
Set Item
Description
I
U
C
000
P
O
FB
SPD
Output
Note: The Speed Detect function (SPD) block can use only 1 high speed frequency
(Max.1kHz) in any one program. Subsequent SPD function blocks can only use a
maximum of 20Hz for high speeding counting.
6 - 47
Function Blocks 6
OFF
ON
Current value of
counter
5
1
5
4
1
4
1
Set cycle
9
Upper limit: 7
Lower limit: 4
Speed output
value
4 0
ON
Output pin
ON
Current value of
counter
10
6
5
4
0
Set cycle
Processing timing
Upper limit: 7
Lower limit: 4
Speed output
value
Output pin
1 scan
time
10
6
0
OFF
ON
OFF
6 - 48
Function Blocks 6
OFF
ON
Current value of
counter
5
1
5
4
1
4
1
Set cycle
9
Lower limit: 7
Upper limit: 4
Speed output
value
4 0
ON
Output pin
Current value of
counter
10
6
5
4
0
Set cycle
Processing time
Lower limit: 7
Upper limit: 4
Speed output
value
Output pin
1 scan
time
0
10
6
0
ON
ON
6 - 49
Function Blocks 6
OFF
ON
Current value of
counter
5
1
5
4
1
4
1
Set cycle
9
Upper limit: 5
Lower limit: 5
Speed output
value
4 0
ON
Output pin
Current value of
counter
10
6
5
4
0
Set cycle
Processing time
Upper limit: 6
Lower limit: 6
Speed output
value
Output pin
1 scan
time
10
6
ON
6 - 50
Function Blocks 6
Setup of the Speed Detect Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block.
The function block edit screen is displayed as shown.
B 0 0 1 : SPD
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
and
keys.
B 0 0 1 : SPD
Pe r i o d
Spe ed ( L , H )
4 ) Press the OK key with Period highlighted and the user can enter a T and t value using the
, , + and - keys.
B001
Pe r
T=
t=
: SPD
i od
1 . 00s
0 . 00s
5 ) Press the OK key to return to the function block settings screen. Highlight the Speed(L,H)
option using the and keys. The limits can be set by highlighting L or H and pressing
the OK key. A Directset value, Analog In or FB value can be entered.
B 0 0 1 : SPD
D i r e c t Se t
Ana l o g I n
FB Va l u e
6 ) Press the ESC key until the user returns to the function block diagram.
6 - 51
Function Blocks 6
6.21
Set Item
I
Description
Input pin for the pulse width modulation function block
1) The PWM function operates concurrently with the input pin status
set ON.
2) The width of the pulse is dominated by the duty and value of the
period.
FB
000
O
P
PWM
Output
1) The bit output pin is set on for the length of the duty specified.
2) The following items are available for other function blocks:
a) Set Period
b) Current Period
Note:
The ON/OFF time cannot be less than one scan time for the controller; otherwise, the PWM
Function Block will not perform its assigned task for the time specified. Users can monitor the
scan time from the 2 Series Controller. Scan time is dependent on the user-program;
therefore, caution is needed as and when time units are selected.
1 ) PWM operation time chart.
Input pin
OFF
ON
Output pin
OFF
ON
OFF
Duty: 70%
(ON Time: 70%)
Set cycle
Current value
in cycle
Note:
10ms step for minimum resolution.
6 - 52
Function Blocks 6
Setup of the Pulse Width Modulation Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : PWM
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the Up and Down keys.
B 0 0 1 : PWM
Pe r i o d
Du t y
4 ) Press the OK key with Period highlighted and the user can enter a T and t value using the
, , + and - keys.
B 0 0 1 : PWM
Pe r i o d
T=
1 . 0s
t=
0 . 0s
5 ) Press the OK key to return to the function block settings screen. Highlight the Duty option
using the 0 and keys. The Duty can be entered by pressing the OK key. A Directset
value, Analog In or FB value can be entered.
B 0 0 1 : PWM
D i r e c t Se t
Ana l o g I n
FB Va l u e
Press the ESC key until the user returns to the function block diagram.
6 - 53
Function Blocks 6
6.22
PID Block
The PID Function Block contains the 2 implementation of PID, a control method used to
obtain stable control over a system variable. The chapter describes, in detail, the necessary
parameter adjustments for using the PID Function Block properly. A simpler alternative is to
run the Auto-tuning function, which automatically adjusts the parameters for the specific
system. The following terms will be used throughout this chapter, Process Value (PV), Set
Value (SV) and Manipulated Value (MV). The PV is the current measured value of the system
parameter that PID is controlling. SV is the desired value of the parameter being controlled and
MV is the output of the PID Function Block used to drive the PV to the SV. Up to 20 PID
Function Blocks may be used in a program.
Table 6.23: PID Block
Function
E
A
C
000
O
P
PID
Set Item
Description
Enable pin for the PID Block. The Error output is reset when the pin
goes OFF. If left unconnected, the function block will always be
enabled.
Clears all output signals and stops Auto-tuning, when turned ON. If
left unconnected, the pin is considered to be OFF.
SV
The word input pin for the set value. If left unconnected a set value of
0 is used in the control calculations.
PV
The word input pin for the process value. If left unconnected a
process value of 0 is used in the control calculations.
FB
Output
operation performed
with new parameter
EN
PID operation
AT
CLEAR
AT RUNNING
6 - 54
Function Blocks 6
Clear
EN
PID operation
AT
CLEAR
AT RUNNING
3) Error Occurance
Error occured
EN
MV
ERROR
Proportional gain
Range
Default
-32768 - 32767
-32768 - 32767
0 - 4000
1 - 32767
50
1 - 32767
75
Unit
10 ms
0.1%1
0.01%2
TI
Integration time
0 - 32767
40
100 ms
KD
Derivative gain
0 - 100
50
TD
Derivative time
0 - 32767
100
10 ms
Noise filter
0 - 99
50
ULV
LLV - 4000
4000
LLV
0 - ULV
AT Bias
Auto-tuning Bias
-32768 - 32767
Direction
Direction of operation
forward or reverse
reverse
Control
Response
normal
PID
1. Units
of 0.1% are used for analog inputs, FB word outputs, and temperature inputs using a
Celsius scale.
2. Units of 0.01% are used for temperature inputs using a Fahrenheit scale.
6 - 55
Function Blocks 6
SV fn =
1
(TS SVn + TI (SVn SVn1 ) + TI SV fn 1 )
TS + TI
EVn = PV fn SV fn
In =
Integration Value
Derivative Value
Dn =
TS
EVn
TI
TD
(PV fn 2PV fn1 + PV fn2 + K D Dn1 )
TS + K DTD
C o n t r o l Va l u e C h a n g e i n
Forward Operation
C o n t r o l Va l u e C h a n g e i n
Reverse Operation
Manipulation Value
Description
EVn
EVn-1
In
KD
Derviative Gain
KP
Proportional Gain
MVn
PVfn
PVfn-1
PVfn-2
PVn
SVfn
SVfn-1
SVn
SVn-1
TD
Dervative Time
6 - 56
Function Blocks 6
Description
TI
Integration Time
TS
Sample Time
MVn
6 - 57
Function Blocks 6
Note:
Other PID systems may calculate proportional control based on the magnitude of the current
deflection only.
Table 6.27: Units for KP
Units
Default Value
Range
0.1%
Analog input
Function Block word output
Temperature input using the
Celsius scale.
7.5%
0.1% to 3276.7%
0.01%
0.75%
0.01% to 327.67%
PV
offset error
KP3
Integration Time, TI. A common problem with P-control is that it tends to stabilize the PV at a
value not equal to the SV (this is called an offset error). With PI-control, a temporal integration
factor is added to deal with this problem. The idea behind PI-control is to ramp up the effect of
P-control, if an offset error persists over time. The T I parameter can be set manually or
automatically with the Auto-tuning function. The default value for TI is 40 (4 seconds) but can
be set to any value within the range of 1 to 32767 (in 100ms units). When a small value for TI is
set, the PV will reach the SV within a relatively short amount of time with greater searching
(e.g. more overshoot and more undershoot) for the SV.
Note:
Setting zero for this variable disables the integration effect.
TI1
0 < TI3 < TI2 < TI1
Time
6 - 58
Function Blocks 6
Derivative Time and Derivative Gain, T D and K D. D-control acts together with the
proportional part of PID-control. For changes in the PV, the Derivative component will
supplement the P-control depending on the rate of change of the PV. Derivative Control initially
outputs a large corrective action which dissipates rapidly over time. The outcome is that the PV
reaches the SV more quickly and does not fluctuate as much as with PI-control. There are two
ways to adjust the Derivative control of the PID Function Block, Derivative Time (TD) and
Derivative Gain (KD). TD can be set manually or automatically with the Auto-tuning function.
The default value for TD is 100 (1 second) but can be set to any value within the range of 1 to
32767 (in 10ms units). For small values of T D, D-control will have a small effect. For large
values, there will be a short stablization time with some searching (overshoot and undershoot)
for the SV. The second parameter, KD, cannot be set by the Auto-Tuning function and should be
adjusted manually. The default value for KD is 50% but can be set to any value within the range
of 0 to 100%. Increasing KD will make the D-control more responsive (shorter stablizaton time)
to sharp changes in PV.
Figure 6.22c. Characteristic response for different TD parameters
PV
TD3 > TD2 > TD1
PI action (without derivative action)
TD1(PID action)
TD3
(PID action)
TD2(PID action)
Time
Sampling Time, TS. TS is the period of time between two measurements of the PV. Values for
TS range from 1 to 32,767 (in 10ms units). The default value for TS is 50 (500 ms).
Noise Filter, f. The f coefficient determines the level at which the PID Function Block
ignores noise from the input sensors on the input signal, PV. The coefficient can be adjusted to
a value ranging from 0 to 99%. Setting f to 0% disables the filter and passes the raw PV (PVn
= PVnf) to the PID calculations. The default value for f is 50%.
Auto-tuning Bias, AT Bias. This value is an offset applied to the SV during Auto-tuning. The
SV, plus the AT bias, is the threshold during Auto-tuning where the output is switched from on
to off. During the Auto-tuning calibrations, the MV will be turned OFF when the PV passes the
SV plus AT bias point and not the usual SV point (without AT bias). Refer to the Auto-tuning
section for more details. The allowable range for the AT bias is -32768 to 32767. The default
value for AT bias is 0.
Note:
In some cases, a physical limitation may make it undesirable for PV to exceed SV too greatly.
This feature is useful in those applications that require that the PV stay below (or above) the
actual SV. AT-Bias allows the user to offset the SV to a point where overshooting and
undershooting may occur without undesirable results.
Direction. The direction of the system refers to the response of the PV as the MV is applied. If
an MV is applied and the response of the PV is in the positive direction, the system is said to
be a Reverse type system. Whereas, if a the PV responds in the negative direction then the
system is a Direct type of system. The default setting for Direction is Reverse.
6 - 59
Function Blocks 6
Control Response. When changes in the SV are necessary, the user can select whether the
changes from the initial SV to the final SV should be immediate or gradual. There are three
options for speed at which SV changes: slow, normal and fast. With immediate, or fast,
response, the controller tends to overshoot its target. With Normal Response there is less
overshoot. And, finally, with Slow Response, there should be no overshoot at all.
Table 6.28: Coefficient Values for Different Response Times
FAST
100%
100%
NORMAL
40%
135%
SLOW
0%
100%
Response
Note:
In certain systems, changing this parameter will have no effect on the response behavior of the
controller.
PID Control after Auto-tuning. P, PI, PID. The controller can be setup to run in one of three
modes: P-control, PI-control or PID-control. The desired control type will only become effective
after auto-tuning has completed. The choice of control type should be made depending on the
application. For example, if P-control is a sufficient control method for the application, then the
more resource-intensive I- and D-control can be switched off to shorten the scan time.
Changing the MV Current Value. This function is only available in the VLS Programming
Language. Click Change Current Value to force the MV to another value. This function is
useful when manually fine tuning the PID parameters.
MV
Lower Limit
6 - 60
Function Blocks 6
PV
time/s
PV
Set value
Set value + AT bias *
a
on
time/s
The figures above indicate the behavior of the MV and the PV for a Reverse Direction example
system and a Direct Direction example system. During Auto-tuning, the MV is driven to its
upper limit value and to its lower limit value periodically and the response of the PV is
monitored. The controller then calculates the parameters, KP, TI, and TD, from the behavior of
the PV over time.
6 - 61
Function Blocks 6
The controller then records the way that the PV behaves and derives the correct parameter
using the Ziegler and Nichols formulas below. See Figures 6.22e and 6.22f for the definintions
of a, and on.
Table 6.29: The Ziegler and Nichols formulas
Proportional gain KP
Integration time TI
PI
PID
Unit
1
a
0.9
a
1.2
a
33W on (1
W on
)
W
Derivate time TD
0
W on
)
W
100 ms
W
50W on 1 on
W
10 ms
20W on (1
a, and on.
Consequently, if the system is moderately linear, the Auto-tuned parameters will be sufficient to
control the PV if the SV is changed. Auto-tuning will not need to be performed again.
The following parameters should be adjusted before starting the Auto-tuning:
Direction of operation (to ensure that MV drives PV in the correct direction)
Set Value (Changes during Auto-tuning are not effective.)
Sample Time (Must be larger than the maximum system scan time!)
Noise filter
Desired control characteristic after Auto-tuning (P-, PI- or PID-control)
Output Upper and Lower limit values
AT bias
The following parameters may also be set before Auto-tuning, but they do not influence the
process:
Derivative gain
Control Response type (fast, normal, slow)
Note concerning the VLS Programming Language: Upon the completion of
Auto-Tuning, the program in the controller will be updated with the new PID
parameters. If VLS was monitoring the controller before the Auto-Tuning function was
started, monitoring will STOP, a message box will appear and VLS will return to the
Editing mode. The updated program must be uploaded to the PC to begin monitoring
again.
6 - 62
Function Blocks 6
b1
b2
b3
b4
b52
State of processing
AT ends
1.
This is the maximum change in PV when the input filter is 0%. In the case of a higher input
filter, the maximum change in PV can be higher.
2.
Bit 5 of the error code is set when the calculated PID parameters are out of range. Bit 5 is not
set when AT is stopped by the user.
Setup of the PID Function Block directly from the 2 Series Controller
3 ) Press the OK button to setup the parameters for the PID function block.
B0 0 1 : P I D
Se t Va l u e
P r o c e s s Va l
S a mp l e T i me
4 ) Highlight SetValue and select it using the OK button. Choose from DirectSet, Analog In,
or FB Value for the Set Value of the PID function block.
B0 0 1 : P I D
D i r e c t Se t
An a l o g I n
FB Va l u e
6 - 63
Function Blocks 6
5 ) After selecting the appropriate constant, analog input or word output, press the OK
button to return to the function block settings menu.
B0 0 1 : P I D
Se t Va l u e
P r o c e s s Va l
S a mp l e T i me
6 ) Highlight and select Process Val using the OK button. Choose from DirectSet, Analog In
or FB Value for the Process Value of the PID function block.
B0 0 1 : P I D
D i r e c t Se t
An a l o g I n
FB Va l u e
7 ) After selecting the appropriate constant, analog input or word output, press the OK
button to return to the function block settings menu.
B001 :P ID
Se t Va l ue
P r oces s Va l
S amp l e T i me
9 ) Press the OK button and enter a value using the + and - buttons.
B0 0 1 : P I D
S a mp l e T i me
0 . 50 s
10 )Press the OK button to return to the function block settings menu. Highlight KP using the
and button.
B0 0 1 : P I D
P r o c e s s Va l
S a mp l e T i me
Kp
11 )Press the OK button and enter a KP value using the + and - buttons.
B0 0 1 : P I D
Kp
7.5 %
12 )Press the OK button to return to the function block settings menu. Highlight Ti using the
and button.
B0 0 1 : P I D
S a mp l e T i me
Kp
Ti
6 - 64
Function Blocks 6
13 )Press the OK button and enter a Ti value using the + and - buttons.
B0 0 1 : P I D
Ti
4.0 s
14 )Press the OK button to return to the function block settings menu. Highlight Td using the
and button.
B0 0 1 : P I D
Kp
Ti
Td
15 )Press the OK button and enter a Td value using the + and - buttons.
B0 0 1 : P I D
Td
1 . 00 s
16 )Press the OK button to return to the function block settings menu. Highlight Kd using the
and button.
B0 0 1 : P I D
Ti
Td
Kd
17 )Press the OK button and enter a Kd value using the + and - buttons.
B0 0 1 : P I D
Kd
50 %
18 )Press the OK button to return to the function block settings menu. Highlight NoiseFilter
using the and button.
B0 0 1 : P I D
Td
Kd
No i s e F i l t e r
19 )Press the OK button and enter a NoiseFilter value using the + and - buttons.
B0 0 1 : P I D
No i s e F i l t e r
50 %
20 )Press the OK button to return to the function block settings menu. Highlight Upper Limit
using the and button.
B0 0 1 : P I D
Kd
No i s e F i l t e r
Up p e r L i m i t
6 - 65
Function Blocks 6
21 )Press the OK button and enter an Upper Limit value using the + and - buttons.
B0 0 1 : P I D
Up p e r L i m i t
4000
22 )Press the OK button to return to the function block settings menu. Highlight Lower Limit
using the and button.
B0 0 1 : P I D
No i s e F i l t e r
Up p e r L i m i t
L owe r L i m i t
23 )Press the OK button and enter a Lower Limit value using the + and - buttons.
B0 0 1 : P I D
L owe r L i m i t
0
24 )Press the OK button to return to the function block settings menu. Highlight AT Bias using
the and button.
B0 0 1 : P I D
Up p e r L i m i t
L owe r L i m i t
AT B i a s
25 )Press the OK button and enter an AT Bias value using the + and - buttons. Press the
OK button.
B0 0 1 : P I D
AT B i a s
0
27 )Press the OK button to select Response. Select the type of PID response that will be
used. The choices are Normal, Fast and Slow.
B0 0 1 : P I D
Re s p o n s e
N o r ma l
Fa s t
28 )Press the OK button to return to the function block settings menu. Highlight Direction to
choose the direction of operation for the PID function block.
B0 0 1 : P I D
AT B i a s
Re s p o n s e
D i r ec t i on
6 - 66
Function Blocks 6
30 )Highlight AT Result to select the type of control to be employed after auto-tuning finishes. .
B0 0 1 : P I D
Re s p o n s e
D i r ec t i on
AT Re s u l t
31 )Press the OK button and highlight the desired control type from the list: P-, PI- or PIDcontrol.
B0 0 1 : P I D
AT Re s u l t
P I D Co n t r o l
P I Co n t r o l
6 - 67
Function Blocks 6
6.23
000
I
C
Set Item
Description
Clear input pin resets the state of the output regardless of the input
given
FB
O
RA L
Output
Run mode
OFF
ON
OFF
ON
Clear pin
Output pin
Keep ON/OFF
state of Output pin
6 - 68
6.24
Function Blocks 6
Addition Block
The function block is used to summate inputs A and B hence produce the resultant Y.
Table 6.32: Addition Function Block
Function
Set Item
I
Description
Input pin for addition function block
This function block operates the expression Y=A+B.
FB
I
000
O
P
A DD
Output
2) Bit Output
- Operation result Y<-32768: Output pin turned ON and the operation
result Y will be set to -32768
- Operation result Y>32767: Output pin turned ON and the operation
result Y will be set to 32767
Setup of the Addition Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : ADD
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
Addition operation Y=A+B must be specified.
and
keys. The
B 0 0 1 : ADD
Ou t p u t Va l
y =A+B
0
4 ) Using the and keys highlight Constant A and press the OK key to enter either a
Directset, Analog In or FB Value.
B 0 0 1 : ADD
D i r e c t Se t
Ana l o g I n
FB Va l u e
5 ) Repeat step 4 for Constant B and return to the FBd using the ESC key.
6 - 69
Function Blocks 6
6.25
Subtraction Block
The function block is used to subtract inputs B from A hence produce the resultant Y.
Table 6.33: Subtraction Function Block
Function
Set Item
I
Description
Input pin for subtraction function block
This function block operates the expression Y=A-B.
FB
000
O
P
SUB
Output
2) Bit Output
- Operation result Y<-32768: Output pin turned ON and the operation
result Y will be set to -32768
- Operation result Y>32767: Output pin turned ON and the operation
result Y will be set to 32767
Setup of the Subtraction Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : SUB
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
Subtraction operation y=A-B must be specified.
and
keys. The
B 0 0 1 : SUB
Ou t p u t Va l
y =A - B
0
4 ) Using the and keys highlight Constant A and press the OK key to enter either a
Directset, Analog In or FB Value.
B 0 0 1 : SUB
D i r e c t Se t
Ana l o g I n
FB Va l u e
5 ) Repeat step 4 for Constant B and return to the FBd using the ESC key.
6 - 70
6.26
Function Blocks 6
Multiplication Block
The function block is used to multiply inputs A and B hence produce the resultant Y.
Table 6.34: Multiplication Function Block
Function
Set Item
I
Description
Input pin for multiplication function block
This function block operates the expression Y=AB.
FB
000
O
P
MU L
Output
2) Bit Output
- Operation result Y<-32768: Output pin turned ON and the operation
result Y will be set to -32768
- Operation result Y>32767: Output pin turned ON and the operation
result Y will be set to 32767
Setup of the Multiplication Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : MU L
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
Multiplication operation y=AB must be specified.
and
keys. The
B 0 0 1 : MU L
Ou t p u t Va l
y =A B
0
4 ) Using the and keys highlight Constant A and press the OK key to enter either a
Directset, Analog In or FB Value.
B 0 0 1 : MU L
D i r e c t Se t
Ana l o g I n
FB Va l u e
5 ) Repeat step 4 for Constant B and return to the FBd using the ESC key.
6 - 71
Function Blocks 6
6.27
Division Block
The function block is used to divide inputs A and B hence produce the quotient Q and
remainder R.
Table 6.35: Division Function Block
Function
Set Item
I
Description
Input pin for division function block
This function block operates the expression Q=A/B, R=A%B
FB
000
O
P
DIV
Output
2) Bit Output
- Input value (B) = 0: Output pin is turned ON and the quotient Q and
R will reset to 0.
- Quotient (Q) > 32767: Output pin is turned ON and the quotient Q
will be set to 32767.
Setup of the Division Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B001 : D I V
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
Division operation Q=A/B must be specified.
and
keys. The
B001 : D I V
Qu o t i e n t
q = A / B , r = A%B
0
4 ) Using the and keys highlight Constant A and press the OK key to enter either a
Directset, Analog In or FB Value.
B001 : D I V
Di r ec t se t
Ana l o g I n
FB Va l u e
5 ) Repeat step 4 for Constant B and return to the FBd using the ESC key.
6 - 72
6.28
Function Blocks 6
Calculation Block
The function block creates an expression using up to four input word data (A, B, C and D) using
five operators (+, -, * , /, %) and outputs the calculation result to Y. A maximum of 64 terms can
be included in the calculation expression. Nesting using parenthesis is available up to 6 times.
Table 6.36: Calculation Function Block
Function
Set Item
7
FB
Description
Input pin for multiplication function block
This function block creates an expression using up to 4 input words
(A, B, C, D), 5 operators (+, /, , /, %) and outputs the calculation
result to Y. A maximum of 64 terms can be included in the calculation
expression. Nesting using parenthesis is available up to a maximum
of 6 levels.
Input values A, B, C, and D set the following values
- Constant value (Setting range:-32768 to 32767
- Analog value
- FB value
000
P
O
CA L
Output
2) Bit Output
- Operation result Y<-32768: Output pin is turned ON and the
Quotient (Q) will be set to -32768.
- Operation result Y>32767: Output pin is turned ON and the
Quotient (Q) will be set to 32767.
- The divisor is 0: Output pin is turned ON and the Quotient (Q) will
be reset to 0
Description
Operation result
Input value
6 - 73
Function Blocks 6
Setup of the Calculation Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block.
The function block edit screen is displayed as shown.
B 0 0 1 : CA L
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK Key and enter the function block settings using the
Calculate operation [y=
] must be specified.
and
keys. The
B 0 0 1 : CA L
[ y=
3
]
4 ) While the cursor is flashing, use the and keys to select the appropriate character or
constant for your intended calculation. The following items are offered: A, B, C, D, +, -, *, /,
%, ( or )
B 0 0 1 : CA L
3
[ y =A
]
Co n s t a n t A
0
5 ) DirectSet values, Analog In or FB Value can all be entered for each constant.
B 0 0 1 : CA L
D i r e c t Se t
Ana l o g I n
FB Va l u e
6 - 74
6.29
Function Blocks 6
Shift Block
The function block uses a shift control signal (T) to map the current ON/OFF state of the input
pin (I) to the ouput pin. The operation of this FB is similar to the behavior of a D flip-flop. The
function block can set or reset the status of the output with the input pins, Set (S) and Reset
(R). The Shift Function block retains the state of the output pin after power has been reset.
Table 6.38: Shift Function Block
Function
I
T
S
R
Set Item
000
Description
FB
This FB transfers the ON/OFF state of the bit input pin (I) to the output
at the rising edge of the shift control pin (T). There are no function
block settings for this block.
1) The output will turn ON or OFF at the rising edge of the shift control
pin (T) depending on the ON/OFF state of the bit input pin (I).
SFT
ON(Run mode)
ON
ON
OFF
(Stop mode)
ON
Shift pin
ON
Output pin
ON
ON ON
Set pin
ON
Reset pin
ON
6 - 75
Function Blocks 6
SFT
Shift pin
I02
Reset pin
I03
O02
SFT
SFT
O03
O01
O02
O03
Shift pin
I01
NOR
OR
SFT
O01
O02
SFT
I02
SFT
O03
OFF ON
I02
O01
O02
O03
OFF
OFF ON
ON
OFF
OFF ON
OFF ON
OFF
OFF
6 - 76
6.30
Function Blocks 6
GSM/SMS Block
The GSM/SMS function block, when used with a GSM modem, provides SMS (Short Message
Service) communication between the 2 Series Controller and a mobile device or computer.
Pin code. Gateway and Mobile access information from an SMS Service Provider is necessary
to use the SMS function properly. The GSM/SMS function block can also be used to provide
remote access from a computer running VLS software to the remote 2 Series Controller.
Using the remote access option disables SMS capabilities.
Table 6.39: GMS Function Block
Function
Set Item
I
Description
Bit input pin for GSM/SMS function block operation
Refer to the Communication Manual for detailed explanations
concerning the GSM functionality of the 2 Series controllers.
1) Detects the ON/OFF status of an input and subsequently sends
the SMS (Short Message Service) to the predefined user destination.
2) The SMS message will continue to send regardless of the input
switching OFF.
3) The input will be ignored if it turns on during:
a) an SMS transmission
b) the waiting period.
000
O
P
FB
4) Communication failure (e.g. busy line) will tell the SMS function
block to retry three times in a period of two minutes.
5) If the message was not sent after the third retry, the output status
will switch to ON and an error message will be generated through the
word pin of the function block.
S MS
6 - 77
Function Blocks 6
SMS Message
SMS
Message
Output pin
1 scan time
*Communication failure will tell the GSM/SMS FB to retry three times in two minutes.
2 ) Sample VLS Program: SMS - Retry Sending Data
Completed
Send
Request
I01
PL
From Off
to On
Stop Retry
I02
1
2
OR
3
O01
CP
S
R SR
FL
SMS
Current status=1
(Bit 0=ON)
O02
CP
Current status=2
(Bit 1=ON)
O03
ZC
4Current status7
(Bit 2=ON)
O04
ZC
8Current status15
(Bit 3=ON)
1
2
OR
3
O05
O06
CP
Current status16
(Bit 4 = ON)
The GSM Function block will send the SMS packet when the input pin is activated. To input or
edit the GSM/SMS parameters, double click on the GSM/SMS icon to open the Short Message
Service dialog box in AL-PCS/WIN-E. When two or more Function Blocks are trying to send a
message at the same time, the one to connect first will send its SMS message or attempt to
send its message three times. The other GSM/SMS FB(s) will be placed in Wait status. All
the FBs will send their messages in turn.
6 - 78
Function Blocks 6
Description
b0
Transmission is Complete
b1
b2
b3
Transmission Failed
b4
b5 - b15
*1 - The most common Wait status conditions are when 1) another GSM FB is transmitting a
message, 2) the GSM modem has not been initialized, or 3) Remote Access by the VLS
software is taking place. After the Output is turned OFF, the Word output status will also be
reset to 0.
Note: The Word Value will be displayed in hexadecimal format but the Table is given in
binary form. If b2 is On, for example, the Output Word will display a value of 00x4
(hex). It is possible that more than one bit will be ON simultaneously.
6 - 79
Function Blocks 6
6.30.6 Setting
This box will open the SMS Setting Dialog box. The information for the destination locations is
entered in the SMS Setting dialog box but the final destination is chosen in the Destination
area described below.
6.30.7 Destination
The Destination telephone numbers and e-mail Gateway parameters are shown. Choose the
desired destination phone number or Gateway setting for the specific GSM/SMS Function
Block. The choice of a mobile phone number will complete the selection process. If the
Gateway setting is chosen, the destination e-mail address must be entered in the E-mail box.
Every GSM/SMS FB can have a different e-mail address. Press the OK button to accept the
settings.
6 - 80
Function Blocks 6
6.30.11 Destination
Click the Mobile Phone option to input data for a mobile phone. Use the Name # as an
optional memo area. Enter the Destination phone number in the Phone Number # box.
Please verify with the Service Provider whether the International code is needed at the
beginning of the phone number. Click the Gateway option to input data in order to send an email. Use the Name # as an optional memo area. Enter the e-mail access code from the
Service Provider in the Phone Number # box.
These destination numbers will be valid for all SMS function blocks. E-mails can be
sent to as many addresses as the 2 memory allows. SMS messages can be sent to a
maximum of three telephone numbers.
6 - 81
Function Blocks 6
The CME and CMS Error boxes give information to the functioning of Mobile Equipment (ME),
please refer to the GSM modem manual for more details.
Modem Settings/Front Panel Keys
The settings required to send SMS packets via a GSM modem or to set up the 2 controller for
remote access can be accomplished with the front panel keys. It is possible to perform remote
operations with a standard modem but it is not possible to send SMS packets.
The numerous parameters and options for using the GSM modem can
be set using the front panel keys. However, the procedure is much
easier to perform with the AL-PCS/WIN-E software than with the front
panel display and buttons.
To begin the process from the Top Menu, scroll down to Others/Serial
Com/GSM and view the options shown at right.
S e r i a l C om
No t Us e
Mo d em
GSM
O t h e r C om
GSM
C o mF o r ma t
GSM I n i t
GSM R e mo t e
P I N Co d e
S e t SMS
GSM S t a t u s
C o mF o r ma t
Da t a L e n g t h
Pa r i t y
S t op b i t
Ba u d r a t e
De f a u l t
6 - 82
Parity
Select from three options for Parity - None, Odd or Even.
Stop Bits
Choose the number of stop bits - 1 bit or 2 bits.
Baud Rate
Select the baud rate - 9600 or 19200 bps.
Function Blocks 6
Da t a L e n g t h
8 bi t s
7 bi t s
Pa r i t y
No n e
Od d
Ev en
S t op b i t
1b i t
2b i t s
Ba u d r a t e
9600 bps
19200 bps
Default
The controller can be returned to the default communication settings DataLength = 8 bits; Parity = None; Stop Bits = 1; and Baud Rate = 9600 bps - by pressing the
OK when the pointer is on the Default option.
GSM Init Command (GSM Initialization Command)
The GSM modem must have an initialization command string. After
choosing the GSM Init option, the Command and Delay Time settings
will appear.
GSM I n i t
C o mma n d
D e l a y T i me
Command Setting
GSM I n i t 0 1
Choose Command to enter the AT command. Details for the AT
C o mma n d
command should be included in the literature for the modem. Enter the
[A
]
string by choosing the correct characters with the and arrows.
< = > ? @A BCDE
When a desired letter is shown onscreen, move to the right by pressing
the key. The character will remain in the previous cursor space. Do not press the OK key
until the command has been entered in its entirety. Move to the left for editing purposes with
the key.
Delay Time
The Delay Time Setting will delay the transmission of the initialization
command while the modem completes its power up. Use the + key to
increment the value and the - to decrement the value within the range
of 0 - 10 seconds. Enter the value by pressing the OK key.
GSM Remote Command
Remote access from a computer running the VLS software is allowed
when Permit is chosen.
SMS packets cannot be sent under the Permit setting but can be sent
when Forbid is used.
GSM I n i t
D e l a y T i me
0s
GSM R e mo t e
Fo r b i d
Pe r m i t
6 - 83
Function Blocks 6
P IN Code
Can ce l
OK
o r
ESC
S e t SMS
SMS C 1
SMS C 2
DA 1
DA 2
DA 3
VP
S e t SMS
01
SMS C 1
[
]
9+ - ( ) 0123
S e t SMS
01
DA 1
[
]
9+ - ( ) 0123
Three destination mobile telephone numbers can be entered, one in each DA address.
Alternately, two mobile phone numbers and one e-mail gateway access code can be entered.
Only one e-mail access code needs to be entered and then multiple e-mail addresses can be
input, one each per GSM/SMS Function Block.
6 - 84
Function Blocks 6
Validity Period
S e t SMS
The Validity Period is a request to the SMS Service Provider to keep
VP
the message on their Server for a length of time. Each Service
24 . 0h r s
Provider may have their own policies on the allowable time messages
can be kept. Please check with your local Service Provider to obtain
these details. Use the + and - keys to change the value within the range of 5 minutes to 63
weeks.
GSM Status
Check the status of the GSM communication in the following
categories.
GSM S t a t u s
St a t us
CME E r r o r
CMS E r r o r
S i gS t r e n g
GSM S t a t u s
St a t us
0 0 0 0H
Check the Status of the GSM modem settings and SMS message
transmissions through the table below.
Table 6.41: GSM Modem Status
Bit
Status
On (1)
Off (0)
b0
Yes
No
b1
Yes
No
b2
Yes
No
b3
Network Registration.
Registered
Not Registered
b4
Yes
No
b5
Yes
No
b6
Yes
No
b7
Yes
No
b8-11
Reserved
b12
b13
b14
b15
Reserved = 0
Message
No Message
Transmitting
Off
Yes
No
Yes
No
Note: *1This bit is not linked to the Remote Access Setting which only enables remote
access. This bit checks if Remote Access is currently in progress.
6 - 85
Function Blocks 6
CME Error
This CME Error status gives information to the functioning of Mobile
Equipment (ME), please refer to the GSM modem manual for more
details.
GSM S t a t u s
CME E r r o r
-1
Description
Value
Description
-1
No Error
17
Phone Failure
18
No Connection to Phone
20
Memory Full
21
Invalid Index
22
Not Found
23
Memory Full
24
10
SIM Failure
25
11
26
12
27
13
SIM Failure
30
No Network Service
14
SIM Busy
31
Network Timeout
15
SIM Wrong
100
Unknown
16
Incorrect Password
CMS Error
This value gives error information relevant to the Mobile Equipment
(ME) or Network, please refer to the GSM modem manual for more
details.
GSM S t a t u s
CMS E r r o r
-1
Description
Value
Description
No Error
315
SIM Wrong
316
317
300
ME Failure
318
301
320
Memory Failure
302
321
303
322
Memory Full
304
330
305
331
No Network Service
310
332
Network Timeout
311
340
312
500
Unknown Error
313
SIM Failure
... 511
314
SIM Busy
512 (+)
Manufacturer Specific
0 - 127
128 - 256
6 - 86
Function Blocks 6
GSM S t a t u s
S i gS t r e n g
0%
Receiving Level
-111 dBm
2 - 30
31
99
Not known
6 - 87
Function Blocks 6
6.31
Set Item
E
Description
Bit input pin for the function block operation
Refer to the Communication Manual for detailed explanations
concerning the GSM functionality of the 2 Series controllers.
1) Cmnd String(Cmmand String)
In case of Word output mode, only one command text can be setup.
In case of Bit output mode, a command text for switching bit output
ON and a command text for switching bit output OFF can be setup.
2)SM Age(Short Massage age)
Setup maximum age of received short message.
a) 5 to 720minutes(Unit:5minutes)
b) 12.5 to 24Hours(Unit:30minutes)
c) 2 to 30day(Unit:1day)
d) 5 to 63week(Unit:1week)
E
R
000
P
O
SMR
FB
3) Phone Number
Setup short message senders phone number.
By setting the phone number in FB parameter, only the Shor t
Message Entity(SME) with the setup phone number can manipulate a
SMR FB.
Up to 28 characters,including + , - * 0 1 2 3 4 5 6 7 8 9 .
4) Password
Setup authentication password (4 digit code). The password is
common for all SMR FB and stored in Programm Parameter area.
5) Acknowledge
If this parameter is set and the FB output was manipulated by SM, a
acknowledge message is send back to the sender.
6) Retention
If this flag is set, the SMR FB keeps it's output states at the time of
controller power down.
7) Upper Limit (Word output mode)
In case the transmitted value is bigger than the max. value, max.
value becomes active. Max. Value can be [(min.value + 1)...32767].
8) Lower Limit (Word output mode)
In case the transmitted value is smaller than the min. value, min.
value becomes active. Min. Value can be [-32768...(max. value - 1)]
6 - 88
Function
Function Blocks 6
Set Item
R
Description
Reset pin for the function block
The SMR FB can be operated in one of two different modes.
Output
1) Bit output.
a) The output is set ON, when the switch ON command is found
in the received short message.
b) The output is set OFF, when the switch OFF command is found
in the short message.
c) When R ON, the bit output is reset (OFF). R takes priority over E.
When E is OFF the bit output value is hold.
2) Word output.
a) Word output for transferred values. The output is set to the
transmitted value, when the set word output command is found
and the value after = is valid.
b) When R is ON, the word output is set to zero.
When E is OFF, the word output is hold. R takes priority over E.
FB Output
+49 21 02 12 34 56 7
+49 21 02 12 34 56 7
changed
+49 21 02 12 34 56 7
+49 21 02 12 34 56 8
no change
+49 21 02 12 34 56 7
+49 21 02 12 34
no change
+49 21 02 12 34 56 7
+49 21 02 12 34 56 78
no change
+49 21 02 12 34 56 7*
+49 21 02 12 34 56 7
no change
+49 21 02 12 34 56
+49 21 02 12 34 56 7
no change
+49 21 02 12 34 56 *
+49 21 02 12 34 56 7
changed
+49 21 02 12 3*
+49 21 02 12 34 56 7
changed
+49 21 02 12 3*
+49 21 02 12 34 56 8
changed
+49 21 02 12 3*
+49 21 02 12 34 56 78
changed
changed
+*
changed
6 - 89
Function Blocks 6
A system for plant irrigation can be switched ON and OFF by short message (B10). The start
of irrigation can be delayed. The delay time (in minutes) is transferred by short message. Also
the duration of irrigation can be set by short message.
6 - 90
Function Blocks 6
6.31.2 SM Commands
The commands included in a short message can be either for switching the bit output of a FB
or setting the value output.
Bit Output Mode / Word Output Mode
In bit output mode two commands texts can be set, one command text (cmd1) to switch the bit
output ON, and an optional command text (cmd2) to switch the bit output OFF.
In word output mode, the command text (cmd3) can be set as FB parameter.
Each command can consist of up to 32 characters.
In the transmitted SM the cmd3 must be followed by the equal character ('=') and a value, e.g.
cmd3=100.
The value can be positive and negative ('-') and must be in the range -32768...32767. Space
characters or the delimiter character can follow the value.
Mode
Description
FB parameter
SM text
Bit Output
cmd1
cmd2
cmd1
cmd2
Word Output
cmd3
cmd3
cmd3=value
In case the '=' character is not followed by the '-' or the '+' character or a number, the command
is invalid. Multi commands can be transmitted in one short message, but not more than 10. All
commands have to be separated by the delimiter '.' (dot). Blank characters directly before and
after the delimiter are disregarded. A terminating delimiter character is not needed.
In case a short message contains more than one command for one FB, e.g. switch bit output
ON and switch bit output OFF, the first command in the short message becomes active. In
case of setting the same command text for bit output ON and bit output OFF command and
including this command in a short message, the bit output is switched ON.
The following characters can be used to build a command.
Table 6.47: Command Characters
Group
Code
Character
Unicode 16bit
Example of received SM
Example: 1443.Heater ON. Light on .switch xmastree. water = 1233 . CntDown=-23.
This SM contains
-the password 1443
-the command "Heater ON" (FB bit output ON or OFF, depending on FB setup)
-the command "Light on" (FB bit output ON of OFF, depending on FB setup)
-the command "switch xmastree" (FB bit output ON of OFF, depending on FB setup)
-the command "water=1233", which setts the word output of a SMR FB to the value 1233
-the command "CntDown=-23", which sets the word output of a SMR FB to the value -23
6 - 91
Function Blocks 6
"OK"
"Error"
"No access"
"No access"
For sending of report short messages, the Short Message Service Center (SMSC) must be
setup by using the GSM SMS FB.
Receive Time Out
After sending the short message read command (AT+CMGR) to the modem, Alpha waits for 1s
for receiving the short message. In case the modem doesn't transmit the received short
message to alpha within this time, Alpha sets the bit b7 in the GSM status word. This bit can
only be checked by Alpha GSM Status display. Once set, it can be reset by Cursor Down Key
operation.
6 - 92
Function Blocks 6
6 - 93
Function Blocks 6
6.32
Set Item
E
Description
Bit input pin for the function block operation
1) Retention
If this flag is set, the CD FB keeps it's output state at the time of
controller power down.
E
R
000
P
O
2) Phone Number
Setup short message senders phone number.
By setting the phone number in FB parameter, only the SME with the
setup phone number can manipulate a SMR FB.
Up to 28 characters,including + , - * 0 1 2 3 4 5 6 7 8 9 .
FB
CD
3) Number of RING
Setup number of RING before call detection(Program Parameter,
common for all CD FBs)
Range:1 to 20
R
Output
The output is set ON, when the caller's number is equal to the stored
phone number and E is ON.
The output state is hold, when E is OFF, and it is reset (set OFF),
when R input is ON.
FB Output
+49 21 02 12 34 56 7
+49 21 02 12 34 56 7
Switched ON
+49 21 02 12 34 56 7
+49 21 02 12 34 56 8
no change
+49 21 02 12 34 56 7
+49 21 02 12 34
no change
+49 21 02 12 34 56 7
+49 21 02 12 34 56 78
no change
+49 21 02 12 34 56 7*
+49 21 02 12 34 56 7
no change
+49 21 02 12 34 56
+49 21 02 12 34 56 7
no change
+49 21 02 12 34 56 *
+49 21 02 12 34 56 7
Switched ON
+49 21 02 12 3*
+49 21 02 12 34 56 7
Switched ON
+49 21 02 12 3*
+49 21 02 12 34 56 8
Switched ON
+49 21 02 12 3*
+49 21 02 12 34 56 78
Switched ON
Switched ON
+*
Switched ON
6 - 94
Function Blocks 6
The phone number detection is inactive for 15 seconds after the last RING. A new incoming
call within this guard time has no effect.
4 ) Sample VLS Program: Open roller shutter by phone call
X=Y
X<Y
X>Y
When number of RING reached Y, the modem answers the call. Even if
X is bigger than Y, the CD FB detects the phone number.
6 - 95
Function Blocks 6
6.33
Set Item
Description
I
C
3) The clear signal input reset the output, random one shot value and
current time.
000
P
O
RO S
FB
Output
Note: The set time cannot be less than one scan time for the controller; otherwise, the
Random One Shot Function Block will not perform its assigned task for the time
specified. Users can monitor the scan time from the 2 Series Controller. Scan time
is dependent on the userprogram; therefore, caution is needed as and when time
units are selected.
Setup of the Random One Shot Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block.
The function block edit screen is displayed as shown.
B 0 0 1 : RO S
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
6 - 96
Function Blocks 6
3 ) Press the OK key to set the Time unit for the random delayed output.
Choose either a 10ms, 100ms or 1s time interval using the and keys to highlight the
option and press the OK key when ready.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
and
5 ) A RandomVal in conjunction with the specified time units allocated earlier can be entered
from pressing the OK key having highlighted the RandomVal option using the and
keys. Press the key hence highlighting the 0s time value and use the + or - keys to
enter a time value. Press the OK key to accept and return to the function block setting
screen.
B 0 0 1 : RO S
R a n d o mV a l
0 . 0s
t=
0 . 0s
6 ) Highlight the Limit:L,H option and press the OK key. A high and low limit can be set for
the Random One Shot function block. Using the , , + and - keys enter values for the
high and low limits in accordance with the time intervals specified earlier.
B 0 0 1 : RO S
L imi t : L ,H
L=
0 . 1s
H=
0 . 1s
7 ) Press the OK key to accept the High and Low limit subsequently. Use the ESC key to
return to the FBd.
6 - 97
Function Blocks 6
6.34
Set Item
Description
I
C
000
P
O
DO S
Output
Note: The set time cannot be less than one scan time for the controller; otherwise, the
Delayed One Shot Function Block will not perform its assigned task for the time
specified. Users can monitor the scan time from the 2 Series Controller. Scan time is
dependent on the user-program; therefore, caution is needed as and when time units
are selected.
1 ) Delayed One-Shot (Delay starts when OFF to ON)
Input pin
OFF
ON
OFF
Clear pin
Output pin
OFF
Delayed
Time
ON
One-shot
Time
ON
Not
active
Reset
operation
OFF
Delayed less than set time of
Time
One-shot time
6 - 98
Function Blocks 6
Input pin
ON
OFF
Clear pin
OFF
Output pin
ON
Reset
operation
ON
OFF
Not active
Delayed One-shot
Time
Time
Delayed
Time
shorter than set time
of One-shot time
I
CL
I02
O01
DOS
PL
SR
R
From On to Off
(From Off to ON) *
I02
Reset priority
OS
DL
CL
On Delay:
1s(10 100ms)
Off Delay:
0s(0 100ms)
O01
CL
One-Shot Time
<Control time>: 1s(10 100ms)
Output Clear Condition: None
1
2
OR
Setup of the Delayed One Shot Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : DO S
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK key to set the Time unit for the random delayed output. Choose either a
10ms, 100ms or 1s time interval using the and keys to highlight the option and press
the OK key when ready.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
6 - 99
Function Blocks 6
4 ) Return to the function block edit screen. Using the Up and Down keys to highlight the
Setup FB and press the OK key.
B 0 0 1 : DO S
D e l a y T i me
On e Sh o t
Co n d i t i o n
5 ) Highlight DelayTime from the list of options and press the OK key. The Delay Time can
be entered using the , , + and - keys.
B 0 0 1 : DO S
D e l a y t i me
0 . 1s
T=
t=
0 . 0s
6 ) Highlight OneShot from the list of options and press the OK key to enter times. The One
Shot Time can be entered using the , , + and - keys.
B 0 0 1 : DO S
On e s h o t
T=
0 . 1s
t=
0 . 1s
7 ) Highlight Condition from the list of options and press the OK key to enter either a
RiseEdge or a FallEdge for the Delayed One Shot Operation.
B 0 0 1 : DO S
Co n d i t i o n
R i s eEdg e
Fa l l Edg e
8 ) Press the OK key to accept and use the ESC key to return to the FBd.
6 - 100
6.35
Function Blocks 6
Set Item
Description
FB
2) Delay Time range: 0 to 32767
I
C
000
P
O
DA L
Output
2) Bit output
a) The delay action occurs after the function block sees the rising
edge of the input signal.
b) After the specified Delay time, the Output signal changes state
c) When the Clear Input signal sets ON, the Current Delay Time is
cleared and the Output signal will reset OFF.
Note: The delay time cannot be less than one scan time for the controller; otherwise,
the Delayed Alternate Function Block will not perform its assigned task for the time
specified. Users can monitor the scan time from the 2 Series Controller. Scan time is
dependent on the user-program; therefore, caution is needed as and when time units
are selected.
1 ) Delayed Alternate Operation
Input pin
Clear pin
OFF
Output pin
OFF
ON
Delayed
Time
Delayed
Time
Reset
Output pin
Reset delayed timer
(shorter than set time)
I
CL
O02
DAL
Delay Time: 1s
I02
I02
CL
I
DL
CL
AL
O02
ON Delay Time:
1s (10 100ms)
OFF Delay Time:
0s (0 100ms)
6 - 101
Function Blocks 6
Setup of the Delayed Alternate Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : DA L
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) Press the OK key to set the Time unit for the delayed alternate output. Choose either a
10ms, 100ms or 1s time interval using the and keys to highlight the option and press
the OK key when ready.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
and
5 ) Press the OK to accept subsequently use the ESC key to return to the FBd.
6 - 102
6.36
Function Blocks 6
S
R
Set Item
Description
FB
1) Priority
a) Set
b) Reset
000
O
P
RSR
OFF
ON
OFF
Reset pin
Output pin
OFF
ON
Power supply
(Run mode/
Stop mode)
ON (Run mode)
ON
OFF
*
OFF
(Stop mode)
Output pin
Power supply
(Run mode/
Stop mode)
ON (Run mode)
OFF
(Stop mode)
6 - 103
Function Blocks 6
Setup of the Retentive Set/Reset Function Block directly from the 2 Series Controller
1 ) Allocate the input pin to be used for the function block.
2 ) Press the OK key with the cursor in the function block. The function block edit screen is
displayed as shown.
B 0 0 1 : RS R
Se t u p FB
Ch a n g e No
De l e t e FB
3 ) The function block operates on a Set or Reset priority. Select the priority using the
keys and subsequently press the OK key.
B 0 0 1 : RS R
Pr i or i t y
Se t
Re s e t
4 ) Press the OK key and use the ESC key to return to the FBd.
6 - 104
and
6.37
Function Blocks 6
6 - 105
Function Blocks 6
W h e n N 0 4 is tu rn ed O F F , d isp la y
th e statu s scre e n or u se r scre en b y
d isp la y fu n ctio n b lock o n th e F B D
b a se .
W h e n N 0 4 is tu rn ed O N ,
d isp la y u se r scre e n b y th e
co n trolle d d isp la y m a n a g e r.
C o n trol sig n a l
fo r ch an g in g
u se r scre e n
C o n trol sig n a l
fo r ch an g in g
u se r scre e n
C o n trol sig n a l
fo r ch an g in g
u se r scre e n
C o n trol sig n a l
fo r ch an g in g
u se r scre e n
C o n trol sig n a l
fo r ch an g in g
u se r scre e n
C o n trol sig n a l
fo r ch an g in g
u se r scre e n
6 - 106
Function Blocks 6
2) Click the Insert CDP button to Insert CDP function block for the control user screen
function
6 - 107
Function Blocks 6
3) Choose the CDP (Control Display Function) icon to add a DP (Display function block) for
each user screen.
4) Click the Add DP button to add DP function block(s) for the CDP function block. It is
possible to add a maximum of 10 DPs into 1 CDP.
6 - 108
Function Blocks 6
5) Choose the Display icon for indication FB (Function Block) or Analog value, and click
Connect button.
When not displaying them, please go to step 7).
6) Click the Connect button to display the FB value or the Analog Input value
- Free: Displays the Text, Date or Time. (Default setting)
- FB Word Output: Displays FB value. Choose function blocks from list.
- Analog Input: Displays Analog Input value. Choose Analog Input port.
When completing connection, click the "OK" button.
6 - 109
Function Blocks 6
7) Double-click the Display icon or click the Open button to set parameters. Further
information about parameters of the Display function block can be found in the
programming manual and Help on the AL-PCS/WIN-E.
On completion of the parameter settings, click the OK button.
Choosing Free on step 6)
6 - 110
Function Blocks 6
6 - 111
Function Blocks 6
8) Double-click the CDP icon or click the Open button to set parameter.
C h a n ge scre e n sign a l
9) Select the signal for changing user screens from the pull-down menu options.
6 - 112
Function Blocks 6
10) Select the next displayed user screen from the pull-down menu options.
When completing the control key setting, click the "OK" button.
11) When completing the control keys setting, click the OK button.
6.38
Connect Block
The Connect function block is an internal device used to show the memory used by input bits,
system bits, AS-interface bits, and the operation keys. No function block appears on screen or
shows as being used in the Memory Configuration Usage dialog box, the purpose is only to
calculate the memory that is used by the bits listed above.
Table 6.55: Connect Function Block
Function
Set Item
I
000
I
Description
Output
1) The output signal will be high if the input signal is ON. The output
signal will be low if the input signal is OFF.
_B
6 - 113
Function Blocks 6
MEMO
6 - 114
7.
7.1
Option Settings
Before starting to program, we can set any desired options from the following list.
Refer to Chapter 3 for option settings
Language
Real Time Clock Set
Others...: Password, Dispass, Summertime Clock, Menu Key, Light Time and Serial
Communication
For the program below, none of the above options need be set. Use the ProgClear to erase the
current memory contents with OK. To confirm the memory erase, press OK" again.
7.2
S B001
C OS
I01
O01
One Shot
I02
I03
1 B002
2
3 OR
4
S B003
R SR
O02
Set/Reset
O03
The input pins are shown on the left side of the FB and the output pins are shown on the right
side of the blocks. Note that each input pin can receive only one signal but the output pins can
provide signals to multiple sources.
7-1
7.3
7.3.1
In
Press + to attach a function block to Input I01. The options available to connect to the Input
block will be shown on the right hand side of the screen. Use the ( ) and ( ) arrows to move
to the option to select, AddFB. Enter OK.
01
Ad d FB
O0 1
Co n n e c t
The FB select menu containing all 35 Function Blocks (including logic blocks) will appear
(picture). Again, use the ( ) and ( ) arrows to scroll to the desired Function Block, in this
case the One Shot (OS) Function Block. Use the OK button to accept.
FB Se l e c t
Re t e n t AL
F l i cker
On e Sh o t
The OS block has two input pins, the Input Pin on top and the Clear Pin beneath. Use the ( )
and ( ) arrows to choose the desired pin, in this case the Input pin. Confirm using the OK
button.
01
001
P
In
OS
Use the ( ) arrow twice to move right until the OS output pin is flashing (picture). Enter the +
key to add a block. There is no need to enter the AddFB mode because O01 will appear on
the list of blocks to add. Use the ( ) and ( ) arrows to scroll to O01, accept with the OK key,
and then confirm with the OK key.
001
P
OS
7-2
7.3.2
01
OS
Ou t
Move to the right one space so that the output pin is flashing. Connect I02 to the OR block,
(the same procedure as connecting I01 to the One Shot Block). The input pins for the OR
Block are equivalent so that any input pin can be chosen. [The key sequence for the OR Block
addition is OK, scroll to AddFB, OK, scroll to OR, OK, OK].
Move right until the OR output pin is flashing. Connect Output O03 in the same manner that
O01 was added. [The key sequence will be OK, scroll to O03, OK, OK].
002
03
OR
Ou t
With the OR output pin still flashing (see diagram at right), press the + key again. The output
pin of the OR block can be connected to another location.
Scroll to B01OS and press OK. The OR block and the OS block can now be connected
through the Clear pin (picture). Since the OS Input pin on top has already been filled, there
can be no further connection to that pin.
Co n n e c t
P
OR
OS
Press OK to accept the connection to the C, or Clear pin. They are now connected together.
7.3.3
002
001
P
OR
OS
Connect to the OR block [( ), +, scroll to B02OR (it should not be necessary to move in this
case), OK, OK].
7-3
7.3.5
Use the ( ) arrow to move down to the Reset pin. Connect the OR block using the same
procedure. [+, scroll ( ) to B02OR, OK, OK]
Move to the SR output pin and connect Output O02 using the Left to Right method of
connecting blocks. [( ), ( ), +, scroll to O02, OK, OK].
Move back to the left one space. The following diagram should now be showing on the LCD.
003
001 P
O0 2
002
SR
7-4
7.4
This is the only option in the SR Function Block. Use the ESC key to return to the Function
Block Diagram board.
The OR Block, like all the Logic Blocks, does not have any parameters that can or need to be
set.
Proceed to the One Shot Function Block. Use either the Jump command, trace the path
through the Set pin, or simply press the + key to scroll through the Function Blocks. When
the One Shot Function Block number (01) is flashing, press the OK key once to enter the FB
Edit Menu.
B 0 0 1 : OS
T i me u n i t
Se t u p FB
Ch a n g e No
De l e t e FB
Select the Time unit option from the menu using the OK button. The One Shot Function Block
allows for three different time increment settings: 10ms, 100ms or 1s.
T i me u n i t
1 0 ms
1 0 0 ms
1 s
Select the 100ms time increment using the OK button. The controller will return to the FB Edit
Menu. Select the Setup FB option from the Edit Menu. There are two option screens to be set.
B 0 0 1 : OS
On e Sh o t
Pr i o r i t y
Enter the OneShot option screen using the OK button. The One Shot screen has two timers
that can be set. The T timer is the Set Time for the One Shot block Output signal. The t timer
is the elapsed time or actual time the OneShot has been ON. If a value is input for t, the first
time the One Shot block is activated it will begin timing from the input value.
B 0 0 1 : OS
On e Sh o t
T=
0 . 1s
t=
0 . 0s
7-5
Use the + button to enter a value of 20.0 seconds in the T timer. Move down to the t timer
and enter the value of 5.0 seconds. The OK button will accept the data for the entire screen.
If the OK button is pressed before all the data on the screen is input, re-enter the screen and
input the data. Data can be changed or edited in the same manner.
B 0 0 1 : OS
On e Sh o t
T=
20 . 0s
t=
0 . 0s
Press the OK button to accept the values above. Move down to the Priority option and press
the OK button. The Priority can be set for either Time or Input.
B 0 0 1 : OS
Pr i o r i t y
T i me
I npu t
Move to the Time option and press the OK button. All the screen data has now been set.
Return to the FBD using the ESC button. See Chapter 6 for details on the One Shot FB.
7.5
7-6
8.
Appendix
8.1
Associated Manuals
Manual Name
~
2 Hardware Manual
Software Manual
<English only>
2 Series Communication
Appendix 8
Manual No.
Description
Users Manual
<English only>
JY992D97501
AL2-4EX, AL2-4EX-A2,
AL2-4EYR, AL2-4EYT
Installation Manual
AL2-EEPROM-2
Hardware Manual
JY992D96801
AL-232CAB
Hardware Manual
JY992D76001
AL2-GSM-CAB
Hardware Manual
JY992D97201
AL2-2DA
Installation Manual
JY997D09301
AL2-2PT-ADP
Installation Manual
JY997D09401
AL2-2TC-ADP
Installation Manual
JY997D09501
AL-ASI-BD, AL2-ASI-BD
Hardware Manual
8-1
8.2
Appendix 8
System Keys
Key Name Key number
8.3
Key Function
OK
K01
Used to enter menu options, confirm data entry, and manually force inputs
ON/OFF in the monitor function.
ESC
K02
K03
Used to connect (or add) function blocks, increase Direct Set input
values or times, or move through programs or menus.
K04
( )
K05
Scroll up through menu options (menus, keys, FB, Inputs, Outputs, etc.)
( )
K06
Scroll down through menu options (menus, keys, FB, Inputs, Outputs, etc.)
( )
K07
( )
K08
System Bits
System Bit
Description
M01
Always ON.
M02
Always OFF.
M03
M04
M05
M06
M07
M08
M09
Pulses OFF when Stop mode turns to Run mode in the 2 Series.
M10
M11
M12
M13
M14
M15
M16
M17
M18
M19
M20
M21
M22
M23
M24
8-2
8.4
Appendix 8
Boolean Gates
Logic
Block
State
AND
OR
Logic Block
Displayed
1
2
3
4
1
2
3
4
00
O
AND
00
O
OR
00
NOT
1
NT
00
XOR
1
2
XOR
NAND
NOR
1
2
3
4
1
2
3
4
00
O
NAND
00
O
NOR
Description
Memory
Use
Section
Reference
T h i s f u n c t i o n exe c u t e s l o g i c a l A N D
operation on given input signals. The input
signals connected should be of bit input
type only. 4 Bit input pins and 1 Bit output
pin. If all the inputs are ON then the output
is ON, otherwise output is OFF.
19 Byte
5.1
19 Byte
5.2
T h i s f u n c t i o n exe c u t e s l o g i c a l N OT
operation on given input signal. The input
signal connected should be of bit input type
only. 1 Bit input pin and 1 Bit output pin.
Output is negation of Input given.
10 Byte
5.3
T h i s f u n c t i o n exe c u t e s l o g i c a l X O R
operation on given input signals. The input
signals connected should be of bit input
type only. 2 Bit input pins and 1 Bit output
pin.If both the inputs are either OFF or ON
then out put is OFF, otherwise output is ON
13 Byte
5.4
19 Byte
5.5
T h i s f u n c t i o n exe c u t e s l o g i c a l N O R
operation on given input signals. The input
signals connected should be of bit input
type only. 4 Bit input pins and 1 Bit output
pin. If all the inputs are OFF then out put is
ON, otherwise output is OFF
19 Byte
5.6
8-3
Appendix 8
Function Blocks
FB Name
FB Symbol
1
2
3
4
Boolean
[BL]
Set/Reset
[SR]
S
R
Pulse
[PL]
000
P
O
BL
000
P
O
SR
000
P
O
PL
000
Alternate
[AL]
I
C
Delay
[DL]
I
C
One Shot
[OS]
Flicker
[FL]
AL
000
P
O
DL
I
C
000
P
O
OS
000
P
O
FL
000
P
O
Time Switch
[TS]
TS
000
P
Time Switch
m
[TSm]
Counter
[CN]
T Sm
I
C
000
P
O
CN
Memory
Use
Section
*1
6.3
14 Byte
6.4
10 Byte
6.5
13 Byte
6.6
19 Byte
6.7
17 Byte
6.8
19 Byte
6.9
*2
6.10
*2
6.10
16 Byte
6.11
8-4
FB Name
FB Symbol
U
D
C
P
UD
Compare
[CP]
000
P
O
Analog
Output
U/D Counter
[UD]
000
P
O
CP
000
P
AO
Offset
Gain
[OG]
Display
[DP]
Zone
Compare
[ZC]
Schmitt
Trigger
[ST]
Hour Meter
[HM]
Speed
Detect
[SPD]
M
E
000
P
OG
000
P
DP
000
P
O
ZC
000
P
O
ST
I
C
000
P
O
HM
I
U
C
000
O
P
SPD
Appendix 8
Memory
Use
Section
22 Byte
6.12
17 Byte
6.13
17 Byte
6.14
22Byte
6.15
*4
6.16
20 Byte
6.17
T h e S c h m i t t Tr i g g e r F u n c t i o n B l o ck
compares an input value to preset high and
low limits. The output is ON when the input
value reaches the high limit and then falls
below the lower limit. The function only
processes the data when the function block
is receiving an input signal.
19 Byte
6.18
19 Byte
6.19
25 Byte
6.20
8-5
FB Name
PWM
[PWM]
PID
Appendix 8
FB Symbol
000
P
O
PWM
E
A
C
000
O
P
PID
000
Retentive
Alternate
[RAL]
I
C
Addition
[ADD]
Subtraction
[SUB]
Multiplication
[MUL]
Division
[DIV]
Calculation
[CAL]
Shift
[SFT]
SMS
[SMS]
O
RA L
000
O
P
A DD
000
P
O
SUB
000
O
P
MU L
000
O
P
DIV
000
P
O
CA L
I
T
S
R
000
SFT
000
O
P
S MS
Memory
Use
Section
16 Byte
6.21
52 Byte
6.22
13 Byte
6.23
T h e A D D F u n c t i o n B l o ck i s u s e d t o
summate two input values
20 Byte
6.24
20 Byte
6.25
20 Byte
6.26
20 Byte
6.27
*3
6.28
19 Byte
6.29
*6
6.30
8-6
Appendix 8
FB Name
FB Symbol
Short
Message
Receiving
[SMR]
E
R
000
P
O
SMR
Short
Message
Receiving m
[SMRm]
E
R
Call Detect
[CD]
E
R
000
P
O
SMRm
000
P
O
CD
Call Detect
m
[CDm]
E
R
000
P
O
CDm
Random One
Shot
[ROS]
I
C
Delayed One
Shot
[DOS]
I
C
Delayed
Alternate
[DAL]
I
C
Retentive
Set/Reset
[RSR]
Control
Display
[CDP]
000
P
O
RO S
000
P
O
DO S
000
P
O
DA L
S
R
000
O
P
RSR
Memory
Use
Section
*7
6.31
*7
6.31
30 Byte
6.32
30 Byte
6.32
19 Byte
6.33
20 Byte
6.34
16 Byte
6.35
14 Byte
6.36
*5
6.37
8-7
FB Name
Appendix 8
000
Connect
[ _B ]
Memory
Use
Section
10 Btye
6.38
10 Btye
FB Symbol
O
_B
System
Outputs
Note:
1 ) Number of bytes used = 19 + 1 (Characters in equation)
2 ) Number of bytes used = 8 + 4 (Number of time switches)
3 ) Number of bytes used = 30 + 1 (Characters in equation)
4 ) Number of bytes used is decided by the displayed item.
Displayed Item
Characters
Analog, FB value
Value
17
Graph
23
Time, Date
14
Time Switch
17
8-8
8.5
Appendix 8
PID Formulas
Table 8.1: PID Equations
SV fn =
EVn = PV fn SV fn
In =
Integration Value
Derivative Value
1
(TS SVn + TI (SVn SVn1 ) + TI SV fn 1 )
TS + TI
Dn =
TS
EVn
TI
TD
(PV fn 2PV fn1 + PV fn2 + K D Dn1 )
TS + K DTD
C o n t r o l Va l u e C h a n g e i n
Forward Operation
C o n t r o l Va l u e C h a n g e i n
Reverse Operation
Manipulation Value
MVn = MVn
8-9
Appendix 8
Description
EVn
EVn-1
In
KD
Derviative Gain
KP
Proportional Gain
MVn
PVfn
PVfn-1
PVfn-2
PVn
SVfn
SVfn-1
SVn
SVn-1
TD
Dervative Time
TI
Integration Time
TS
Sample Time
MVn
Operation
FAST
100%
100%
NORMAL
40%
135%
SLOW
0%
100%
8 - 10
JY992D97101C
(MEE)