Mitsubishi Electronics JY992D97701 User Manual

COMMUNICATION MANUAL
2
α
SIMPLE APPLICATION CONTROLLER
2 Simple Application Controllers
α
Foreword
2 series controller.
α
Before attempting to install or use the understood.
If in doubt at any stage of the installation of the professional electrical engineer who is qualified and trained to local and national standards which apply to the installation site.
If in doubt about the operation or use of the Mitsubishi Electric distributor.
Under no circumstances will Mitsubishi Electric be liable or responsible for any consequential damage that may arise as a result of the installation or use of this equipment.
All examples and diagrams shown in this manual are intended only as an aid to understanding the text, not to guarantee operation. Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples.
Owing to the very great variety in possible application of this equipment, you must satisfy yourself as to its suitability for your specific application.
Please contact a Mitsubishi Electric distributor for more information concerning applications in life critical situations or high reliability.
This manual is subject to change without notice.
2 Series Controller this manual should be read and
α
2 Series Controller always consult a
α
2 Series Controller please consult the nearest
α
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.
2005 MITSUBISHI ELECTRIC CORPORATION
©
2 Simple Application Controllers
α
2
α
SIMPLE APPLICATION
CONTROLLERS
COMMUNICATION MANUAL
Manual number : JY992D97701
Manual revision : F
Date : 3/2008
i
2 Simple Application Controllers
α
ii
2 Simple Application Controllers
α
FAX BACK
Mitsubishi has a world wide reputation for its efforts in continually developing and pushing back the frontiers of industrial automation. What is sometimes overlooked by the user is the care and attention to detail that is taken with the documentation. However, to continue this process of improvement, the comments of the Mitsubishi users are always welcomed. This page has been designed for you, the reader, to fill in your comments and fax them back to us. We look forward to hearing from you.
Fax numbers: Your name:...................................................
Mitsubishi Electric.... .....................................................................
America (01) 847-478-2253 Your company: .............................................
Australia (02) 638-7072 .....................................................................
Germany (0 21 02) 4 86-1 12 Your location:................................................
Spain (34) 93-589-1579 .....................................................................
United Kingdom (01707) 278-695
Please tick the box of your choice
What condition did the manual arrive in?
Will you be using a folder to store the manual?
What do you think to the manual presentation?
Are the explanations understandable?
Which explanation was most difficult to understand: ..................................................................
....................................................................................................................................................
Are there any diagrams which are not clear?
If so,which: ..................................................................................................................................
What do you think to the manual layout?
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: ...................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
....................................................................................................................................................
Good
Ye s
Tidy
Ye s
Ye s
Good
Minor damage
No
Unfriendly
Not too bad
No
Not too bad
Unusable
Unusable
Unhelpful
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.
iii
2 Simple Application Controllers
α
iv
2 Simple Application Controllers
α
Guidelines for the safety of the user and protection of
α
Simple Application
2
Controllers
This manual provides information for the setup and use of that are being used in data communication applications. The manual has been written to be
used by trained and competent personnel. The definition of such a person(s) 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.
Simple Application Controllers
2
α
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
2 ) Indicates that the identified danger could
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.
WILL
cause physical and property damage.
POSSIBLY
cause physical and property
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.
v
2 Simple Application Controllers
α
vi
2 Simple Application Controllers
α

Table of Contents

Guideline of Safety ...............................................................................v
1. Communication Capabilities..................................................................1-1
1.1 System Configurations ........................................................................................ 1-2
1.1.1 Send an SMS Message to a Mobile Phone............................................................... 1-3
1.1.2 Receive the Short Message from a PC and phone ................................................... 1-3
1.1.3 Detect The Phone Ringing ........................................................................................ 1-4
1.1.4 Send an E-mail Message .......................................................................................... 1-5
1.1.5 Program/monitor from remote PC using a GSM Modem........................................... 1-6
1.1.6 Program/Monitor from remote PC using a standard Modem..................................... 1-6
1.1.7 RS - 232C Straight Cable .......................................................................................... 1-7
1.2 Dedicated Protocol Communication .................................................................... 1-8
1.2.1 Dedicated Protocol Configuration.............................................................................. 1-8
1.2.2 Diagram for RS-232C Cross Cable ........................................................................... 1-8
2. SMS/SMR/CD Functions and the Modem Setting.................................2-1
2.1 Set the parameters of the GSM modem from VLS software. ..............................2-1
2.1.1 GSM & Serial Communication Dialog Box ................................................................ 2-2
2.1.2 The “Initialize Modem...” Setting................................................................................ 2-3
2.1.3 Pre-Configured GSM Modem Initialization Setting .................................................... 2-3
2.2 The GSM/SMS Function Block ............................................................................ 2-6
2.2.1 The Short Message Service (SMS) ........................................................................... 2-7
2.2.2 SMS Setting Dialog Box ............................................................................................ 2-8
2.3 The SMR Function Block................................................................................... 2-10
2.3.1 The Short Message Receiving (SMR)..................................................................... 2-11
2.4 The CD Function Block...................................................................................... 2-14
2.4.1 Call Detect (CD) ...................................................................................................... 2-15
2.5 Set GSM Modem Parameters from the Front Panel Keys................................. 2-17
2.5.1 ComFormat ............................................................................................................. 2-17
2.5.2 The GSM Init Command (GSM Initialization Command) ......................................... 2-18
2.5.3 Pin Code.................................................................................................................. 2-18
2.5.4 Set SMS .................................................................................................................. 2-19
2.5.5 GSM Status ............................................................................................................ 2-20
2.6 Characters in GSM Protocol .............................................................................. 2-21
2.6.1 The GSM Character Table ...................................................................................... 2-21
2.6.2 French GSM Characters ......................................................................................... 2-22
2.6.3 Italian GSM Characters ........................................................................................... 2-22
2.7 AL-PCS/WIN-E Program Example .................................................................... 2-23
2.7.1 SMS Function Block Example ................................................................................. 2-23
2.7.2 SMR Function Block Example ................................................................................. 2-26
2.7.3 CD Function Block Example.................................................................................... 2-29
vii
2 Simple Application Controllers
α
3. Remote Access .....................................................................................3-1
3.1 GSM Remote Access .......................................................................................... 3-1
3.1.1 Set Parameters from the VLS software ..................................................................... 3-1
3.1.2 GSM & Serial Communication Dialog Box ................................................................ 3-2
3.1.3 GSM Modem Settings ............................................................................................... 3-3
3.1.4 The GSM Init Command (GSM Initialization Command) ........................................... 3-3
3.1.5 Command Setting ..................................................................................................... 3-4
3.1.6 Delay Time ................................................................................................................ 3-4
3.1.7 GSM Remote Command ........................................................................................... 3-4
3.1.8 The PIN Code............................................................................................................ 3-4
3.2 Standard Modem Remote Access....................................................................... 3-5
3.3 Set Parameters from VLS software ..................................................................... 3-5
3.3.1 GSM & Serial Communication Dialog Box ................................................................ 3-6
3.3.2 Standard Modem Settings......................................................................................... 3-7
3.3.3 The Command Setting .............................................................................................. 3-7
3.3.4 The Delay Time Setting ............................................................................................. 3-7
3.3.5 Standard Preconfigured Modems.............................................................................. 3-8
4. SMS Messaging Diagnostics.................................................................4-1
4.1 Check points for Mobile Phone Communication Problems.................................. 4-1
4.2 Check points for E-mail Communication Problems ............................................. 4-1
4.3 GSM Status ........................................................................................................ 4-2
4.3.1 GSM Status .............................................................................................................. 4-2
4.3.2 CME Error ................................................................................................................. 4-3
4.3.3 CMS Error ................................................................................................................. 4-4
4.3.4 Signal Strength (Sigstreng) ....................................................................................... 4-4
5. Computer Link - Dedicated Protocol .....................................................5-1
5.1 Data Flow by Link ................................................................................................ 5-1
5.2 Configuration Diagram......................................................................................... 5-3
5.2.1 Cross-Cable Diagram ................................................................................................ 5-3
5.3 How to read Dedicated Protocol.......................................................................... 5-4
6. AL-PCS/WIN-E Settings for Dedicated Protocol ...................................6-1
6.1 GSM and Serial Communication Setting .............................................................6-1
6.2 Function Blocks ................................................................................................... 6-6
6.3 Settings for Dedicated Protocol - Front Panel Keys .......................................... 6-11
6.3.1 Top Menu Setting/Serial Com Settings ................................................................... 6-11
6.3.2 The “Other Com” Settings ....................................................................................... 6-11
6.3.3 The Comformat (Communication Format)............................................................... 6-11
6.3.4 Data Length............................................................................................................. 6-11
6.3.5 Parity ....................................................................................................................... 6-11
6.3.6 Stop Bits ..................................................................................................................6-11
6.3.7 Baud Rate ............................................................................................................... 6-11
6.3.8 Default ..................................................................................................................... 6-12
6.3.9 Station Number ....................................................................................................... 6-12
6.3.10 Link Block ................................................................................................................6-12
6.3.11 Function Block Bit and Word Data .......................................................................... 6-12
viii
2 Simple Application Controllers
α
7. The Command String ............................................................................7-1
7.1 Format “A” ........................................................................................................... 7-2
7.2 Format “B” Message ............................................................................................ 7-3
7.3 Control Protocol elements ................................................................................... 7-5
7.3.1 Control Codes ........................................................................................................... 7-6
7.3.2 No. of Communication Bytes..................................................................................... 7-6
7.3.3 Format Number ......................................................................................................... 7-7
7.3.4 Station Number ......................................................................................................... 7-8
7.3.5 Command .................................................................................................................. 7-8
7.3.6 Number of Devices .................................................................................................... 7-9
7.3.7 Device Code ............................................................................................................ 7-11
7.3.8 Device Number........................................................................................................ 7-12
7.3.9 Device Status .......................................................................................................... 7-12
7.3.10 Sum Check .............................................................................................................. 7-13
7.3.11 Error Codes ............................................................................................................. 7-14
7.4 Communication Timing Chart ............................................................................ 7-15
7.4.1 Read/Write Data from the Controller ....................................................................... 7-15
7.4.2 Communication Time .............................................................................................. 7-15
7.5 Character Area Data Transmission ................................................................... 7-16
7.5.1 Read Data Transmission ......................................................................................... 7-16
7.5.2 Write Data Transmission ......................................................................................... 7-17
7.5.3 Time Switch Data Transmission.............................................................................. 7-19
7.6 Commands ........................................................................................................ 7-20
7.6.1 Communication Line Check .................................................................................... 7-21
7.6.2 Read Command ...................................................................................................... 7-22
7.6.3 Write Command ...................................................................................................... 7-24
7.6.4 Remote RUN/STOP Operation ............................................................................... 7-26
7.6.5 Time Switch Settings ............................................................................................... 7-27
7.6.6 VLS Time Switch Settings (Sample) ....................................................................... 7-36
7.6.7 RTC Read Command (Ver. 2.20 or later)................................................................ 7-38
7.6.8 RTC Write Command (Ver. 2.20 or later) ................................................................ 7-39
7.6.9 Display Read Command (Ver.3.00 or later) ............................................................ 7-40
7.7 Sample Visual Basic program ........................................................................... 7-45
8. Dedicated Protocol Error Diagnostics ...................................................8-1
8.1 Check points for Dedicated Protocol .................................................................. 8-1
ix
2 Simple Application Controllers
α
MEMO
x
2 Simple Application Controllers
α

1. Communication Capabilities

The α2 Simple Application Controller has a wide range of communication capabilities that include remote programming, sending SMS messages to mobile telephones or e-mail accounts, and reading/writing data using a dedicated protocol. These powerful features bring a new era of information transfer possibilities to the simple application controllers.
Communication Capabilities 1
The maintenance personnel in case of machine error or emergency situations. Remote monitoring
through the AL-PCS/WIN-E software (version 2.00 onwards), hereafter referred to as VLS, can provide machine production and status updates as well as enable programming or parameter updates without the necessity of local access.
The Dedicated Protocol option gives the user the ability to transfer and monitor data from a peripheral device without the use of VLS software. Programmers familiar with C, C++, Visual Basic, or similar packages can write specialized communication programs.
Both standard and GSM modems can connect to the
The most powerful function is the ability to send SMS packets to e-mail accounts or mobile phones. The new functional block which strengthens the communication from external equipment was
added to The new functional blocks is "Short Message Receiving(SMR) "and" Call Detect (CD)."
"Short Message Receiving (SMR)" changes an output by the character string of a mail account. And "Call Detect (CD)" By GSM modem or an analog modem that supports"Calling Line Identification Presentation(CLIP)", an output is changed by call RING of a telephone. This functionality enables messages to be sent from remote locations to maintenance person­nel or the appropriate staff thus reducing downtime for machines and the necessity for on site
personnel at each location. The dard modem to provide remote program upload/download, to monitor devices, set Function Block parameters, or change the I/O status. Program upload/download can be performed remotely by a PC that is using VLS software.
2 can be used to monitor and control machines in remote stations and notify
α
2 controller.
α
2 Controller (version 2.20 or later).
α
2 Series Controller can connect to a GSM modem or stan-
α
The procedure for Dedicated Protocol, which can remotely monitor or set parameters without using the VLS software, is discussed in Chapters 5 - 9.
Error messages can be prepared and placed on the Please refer to section 2.3 to view the available character set for SMS/GSM communication.
The connection port on the right side.
Note: The a GSM modem.
2 Series Controllers communicates with a GSM or Standard modem from the
α
controller communicates to a modem via the left side port and cannot connect to
α
2 display to be sent as the SMS packet.
α
1 - 1
2 Simple Application Controllers
α

1.1 System Configurations

There are four methods of modem communication available in the α2 (AL2-14MR-*, AL2-24MR-*) Series Controllers 1 ) Send an SMS packet to a Mobile phone.
2 ) Send an SMS packet (inside an e-mail) to an e-mail account. 3 ) Remote access via GSM modem. 4 ) Remote access via standard Modem. 5 ) RS-232C Communication for Dedicated Protocol.
The configurations and equipment are listed below.
Using Dedicated Protocol
2
α
Series
Remote Maintenance (Using Telephone Line)
Modem Modem
Communication Capabilities 1
Remote Maintenance (Using Radio Wave), Sending E-Mail
Modem
GSM
Modem
Sending SMS Message
Cellular Phone
(Supporting SMS message)
Personal computer
- Programming Software (AL-PCS/WIN-E)
- Dedicated protocol
- E-Mail application
1 - 2
2 Simple Application Controllers
α

1.1.1 Send an SMS Message to a Mobile Phone

The contents of the display screen will be sent as an SMS packet to a mobile telephone.
Communication Capabilities 1
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT1
OUT2 OUT4
OUT3
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
9
6 5
8
7
OUT
SMS Provider
Table 1.1:SMS Message Setup
No. Description
1
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
2 AL2-GSM-CAB
3 GSM Modem (with SIM card and Antenna)
4SMS Provider
5 Mobile Telephone

1.1.2 Receive the Short Message from a PC and phone

The GSM short message (SM) can be sent from a Mobile phone, a Normal Phone (with SM functionality) or PC to a GSM modem that is connected to an
controller.
2
α
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT1
OUT2 OUT4
Table 1.2:SMS Message Setup
No. Description
1
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
2 AL2-GSM-CAB
3 GSM Modem (with SIM card and Antenna)
4SMS Provider
5 Mobile Telephone, Normal Phone (with SM functionality), PC
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
9
6 5
8
7
OUT3
OUT
SMS Provider
1 - 3
2 Simple Application Controllers
α

1.1.3 Detect The Phone Ringing

In case a GSM modem or an analog modem that supports Calling Line Identification Presenta­tion (CLIP) is called, the number of the calling partner is sent by the modem by the AT notifica­tion "+CLIP" attached to the RING notification.
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT1
OUT3
OUT2 OUT4
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT1
OUT3
OUT2 OUT4
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
9
6 5
8
7
OUT
DC INPUT
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
9
6 5
8
7
OUT
Communication Capabilities 1
CALL
Table 1.3:SMS Message Setup
No. Description
1
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
2 AL2-GSM-CAB
3 GSM Modem (with SIM card and Antenna)
4 RS-232C Straight Cable (See Section 1.1.7)
5 Standard Modem
6 Mobile Telephone, Normal Phone
1 - 4
2 Simple Application Controllers
α

1.1.4 Send an E-mail Message

The SMS packet can be placed inside an e-mail as text. The e-mail address is entered into α2 system parameters through the VLS software or the controller main menu. Refer to chapter 2
to 4 for further detailed information.
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT2 OUT4
OUT1
OUT3
Table 1.4:GSM Modem E-mail Setup
No. Description
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
6 5
8
7
9
OUT
GSM Gateway Service Provider
Communication Capabilities 1
1
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
2 AL2-GSM-CAB
3 GSM Modem (with SIM card and Antenna)
4 GSM Gateway Provider
5 Standard modem
6 Straight cable
7 PC with VLS software
The SMS packet will be the contents of the Display screen as the Input pin for the SMS/GSM Function Block comes ON.
The display screen consists of 4 rows of 12 columns as shown at right.
4 Rows
12 Columns When the Display contents are placed into the SMS message or the e-mail message, they col­umns will be lined up as a continuous string of 48 characters.
1 - 5
2 Simple Application Controllers
α

1.1.5 Program/monitor from remote PC using a GSM Modem

Use the VLS software to monitor and set parameters and bit devices or to upload/download programs.
Communication Capabilities 1
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT2 OUT4
OUT1
OUT3
Table 1.5:GSM Modem Program/Monitor Setup
No. Description
1
2AL2-GSM-CAB
3 GSM Modem (with SIM card and antenna)
4 GSM Gateway Service Provider
5 Standard Modem
6 RS-232C Cable specified by Modem Manufacturer
7 PC with VLS software
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
6 5
8
7
9
OUT
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
GSM Gateway Service Provider

1.1.6 Program/Monitor from remote PC using a standard Modem

VLS
Program
7
Use the VLS software to monitor and set parameters and bit devices or to upload/download programs. The Modem on the PC end must be a serial communication modem.
c d
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT2 OUT4
OUT1
OUT3
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
6 5
8
7
9
OUT
e
f
Table 1.6:Standard Modem Setup
No. Description
1
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
2 AL2-GSM-CAB
3 RS-232C Straight Cable (See Section 1.1.7)
4 Standard Modem
5 Standard Modem
6 RS-232C Cable as specified by Modem manufacturer
7 PC with VLS software
g
h
VLS
Program
i
1 - 6
2 Simple Application Controllers
α

1.1.7 RS - 232C Straight Cable

The cable pinout and connector information is given below.
Communication Capabilities 1
AL2-GSM-CAB Side
(9-pin D-Sub fem ale)
1
2
3
4 20
5
6
7
8
9
Modem Side
(25-pin D-Sub male)
1
8
3
2
7
6
4
5
22
1 - 7
2 Simple Application Controllers
α

1.2 Dedicated Protocol Communication

The α2 (AL2-14MR-*, AL2-24MR-*) Series Controller can transfer data To/From a personal computer, HMI, or other peripheral equipment via Dedicated Protocol. Programs for Dedicated
Protocol can be written in C++. Visual Basic, or similar high-level programming languages. Please see the information in Chapters 5 for more information on Dedicated Protocol.

1.2.1 Dedicated Protocol Configuration

The peripheral equipment acts as the Master in the Dedicated Protocol configuration. The communication takes place via a 1:1 RS-232C communication link.
c
d e
DC INPUT
(B) (A)
+ -
POWER 24V DC
AL2-24MR-D
OUT2 OUT4
OUT1
OUT3
Table 1.7:Dedicated Protocol Setup
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
6 5
8
7
9
OUT
Communication Capabilities 1
f
No. Description
1
2 (AL2-14MR-*, AL2-24MR-*) Series Controller
α
2 AL2-GSM-CAB Cable
3 RS-232C Cross Cable (see section 1.2.2)
4 PC or other peripheral device

1.2.2 Diagram for RS-232C Cross Cable

The pinouts and connector types for the RS-232C cross cable are shown in the figure below. Both the connectors and the wiring are equivalent so that either side can be connected to the AL2-GSM-CAB or the peripheral device.
(9-pin D-Sub female) (9-pin D-Sub female)
2
3
4
5
6
7
8
2
3
4
5
6
7
8
1 - 8
2 Simple Application Controllers
α
SMS/SMR/CD Functions and the Modem Setting 2

2. SMS/SMR/CD Functions and the Modem Setting

SMS messages can be sent to mobile phones and e-mail accounts via a GSM modem if certain parameters in the The output of SMR changes, when the command text is exactly included in Short Message. The output of CD changes, when called from the modem that supports Calling Line Identifica-
tion Presentation (CLIP). These parameters can be set quickly and easily in the VLS software or from the front panel
keys. Refer to section 1.1 for the system configuration.

2.1 Set the parameters of the GSM modem from VLS software.

The Visual Logic Software (VLS) provides the easiest method to set the parameters and download them to the controller. The communication method is the first setting necessary in the VLS software. When use a standard modem by CD Funcion Block, see section
3.3.
2 controller are correctly configured.
α
Open or start a new program and then choose “Option” on the menu bar. Click “GSM dialog box necessary to begin parameterisation.
and Serial Communication” to open the
2 - 1
2 Simple Application Controllers
α

2.1.1 GSM & Serial Communication Dialog Box

The GSM and Serial Communication Dialog Box is used to set the equipment and communication type for the controller. Refer to the AL-PCS/WIN-E Software Manual for further information concerning VLS. Click the “GSM” option to enable GSM telemetric functionality.
)
A
)
B
)
C
)
D
)
H
SMS/SMR/CD Functions and the Modem Setting 2
)
E
)
F
)
G
)
I
A) Not Use
This default setting is for situations in which no communication will be used. The AT command is not activated.
B) Modem
This setting is used when a standard modem will be connected to the Access.
SM
C) G
This setting is used when a GSM modem will be connected either to send an SMS message or for Remote Access.
ther
D) O
This setting is used for Dedicated Protocol communication.
in Code
E) P
The GSM PIN (Personal Identification Numbers for use of GSM)
F) Pin Code with the quotation mark
GSM SIM PIN is sent to the modem in quotation marks (necessary for Sony Ericsson GSM modem)
G) Remote Access
Setting to allow GSM modems to have Remote Access.
H) Data Format
Settings for Com ports and message protocol.
I) Initialize Modem
AT Command used to initialize a modem. See section 2.1.2 for more details.
2 for use in Remote
α
2 - 2
2 Simple Application Controllers
α

2.1.2 The “Initialize Modem...” Setting

When the “Initialize Modem...” button is clicked, the “Initialize Controller Modem” dialog box is displayed. This box is used to enter the AT command for the modem and the “Power On Delay” time.
)
A
)
B
A) Initialize Command
Enter the AT command for the modem. This setting will be automatically entered if one of the preconfigured modems is chosen, see section 2.1.3.
SMS/SMR/CD Functions and the Modem Setting 2
B) Power On Delay
The Power On Delay will set the time in seconds that the sending the Modem Initialization command. The delay can help to ensure that the modem is ready to receive the signal from the power-up each item.
2 in case there is a difference in the time necessary to
α

2.1.3 Pre-Configured GSM Modem Initialization Setting

If using the Modem or GSM option, a preconfigured modem can be used. Choose the down arrow to view the modem options.
2 will wait on power-up before
α
Choose one of the listed modems and the AT command will be automatically entered into the software parameter settings in “Initialize Modem...” The frame above shows a preconfigured setting for a GSM modem. The option for the GSM modems is listed below.
2 - 3
2 Simple Application Controllers
α
GSM Preconfigured Modems
Please refer to the Table 2.1 for information on the pre-configured modems available in AL­PCS/WIN-E for GSM modems.
Table 2.1: GSM Preconfigured Modem Setting
Maker name Model name Modem command (AT command)
Mitsubishi MIM-G01 AT+IPR=9600;+CICB=0;+IFC=0,0;+CMEE=1;E0S0=2&W
Siemens TC35i AT+IPR=9600;+IFC=0,0;+CMEE=1;E0S0=2&W
Siemens MC35i AT+IPR=9600;+CMEE=1;E0S0=2&S0\Q0&W
Siemens Siemens M20T AT+IPR=9600;+IFC=0,0;+CMEE=1;E0S0=2&W
Sony Ericsson GM29 AT+IPR=9600;+IFC=0,0;+CMEE=1;E0S0=2&W
Tixi HNG1 AT+IPR=9600;+CICB=0;+IFC=0,0;+CMEE=1;E0S0=2&W
Wavecom WMOD2 AT+IPR=9600;+IFC=0,0;+CMEE=1;E0S0=2&W
AT Command Profile for GSM Modems
Please refer to the Table below for information on the AT command for GSM modems.
SMS/SMR/CD Functions and the Modem Setting 2
Table 2.2: AT Command Reference for GSM Modems
Item Content
Enable command echo Echo mode OFF E0
Set number of rings before automatically answering the call
Set circuit data set ready (DSR) function mode
Set TE-TA local data flow control
Report mobile equipment error Enable result code and use numeric value +CMEE=1
Set fixed local rate Baud Rate: 9600 bps +IPR=9600
Store current parameter to use defined profile
Enable automatic answering on the ring twice
DSR always ON &S0
Specifies the method which will be used by TE when data is received from TA: None
Specifies the method which will be used by TA when data is received from TE: None
The user profile is stored in non-volatile memory
Example Setting
Siemens M20T
S0=2
+IFC=0,0
&W
Note: Additional parameters for the Siemens M20T GSM modem can be included via editing the GSM.ini file.
2 - 4
2 Simple Application Controllers
α
Note: The Siemens M20T GSM modem has been used as the default modem for the
Controller, however, if the user has installed a GSM modem of their choice with a different AT command then additional AT commands can be included.
Having installed VLS to the Program files directory.
SMS/SMR/CD Functions and the Modem Setting 2
2 Series
α
C:\Program Files\Alvls\BIN
please choose the GSM.ini file that contains AT information for GSM modem selection in VLS.
Contents of the GSM.ini file:
; This is GSM.ini File, used to Display GSM Modem Models ; and their Initialization commands. This file is used ; while Initializing the Controller GSM. ; ; Please add any new Modem models and Initializing commands ; only at the end of the file. An example is given below: ; ;1="USRoboticsXXX","AT&F" ; Here "1" is serial number in increasing order ; "USRoboticsXXX" is GSM Modem model ; "AT&F" is the initializing command (Max 64 Chars). ; [Modem]
1="New","" 2="SIEMENS M20T","ATE0S0=2&S0;+IFC=0,0;+CMEE=1;+IPR=9600&W"
Simply follow the instruction listed above, subsequently, the additional GSM modem will be included with attached AT command string.
2 - 5
2 Simple Application Controllers
α

2.2 The GSM/SMS Function Block

The GSM/SMS Function block is the trigger to send SMS messages. To enter or edit the GSM/ SMS parameters, double click on the icon to open the Short Message Service dialog box described in Section 2.2.2. When two or more Function Blocks are trying to send a message at the same time, the first to connect will send its SMS message. The other GSM/SMS FB(s) will be placed in “Wait” status. All the FBs will send their messages in turn.
A)
A) The Input Signal
The activated. Even if the Input pin is turned OFF during the process, the operation will continue
until the message is sent or three retries have been completed.
2 controller will send the SMS message to the chosen destination when the input pin is
α
SMS/SMR/CD Functions and the Modem Setting 2
(B
(C
Input signals will be ignored when the Output pin is On or the when the Function Block is in “Wait” status.
B) The Output Signal
The Output signal comes ON when the SMS message has been successfully sent or the final retry has taken place.
If the Input signal that began the operation remains ON, the Output will remain ON. If the Input signal turns OFF during the send operation, the Output signal will remain ON for one program scan after the send operation is complete and then turn OFF.
C) The Word Output
Check the status of the transmission by checking the Output Word data. The data can be checked in the program or by connecting the Output Word data to a Display FB.
Table 2.3: Output Word Value
Bit Description
b0 Transmission is Complete
b1 Transmission or retry in Progress
b2 Transmission is in “Wait” status
b3 Transmission Failed
b4 Transmission did not occur due to an SMS Parameter Error
b5 - b15 Reserved, will always be 0
2 - 6
2 Simple Application Controllers
α
After the Input Pin is turned OFF, the Word Output will also be reset to 0 when the communication is complete.
Note: The Word Value will display a hexadecimal number. Convert the hexadecimal number to
binary form to check the values against Table 2.5 Output Word Value parameters. It is possible that multiple bits will be ON simultaneously.
The status of the entire controller can be seen in the Diagnosis of Controller dialog box described in Chapter 4.
Note: Transmission of UCS2 encoded short messages to an email account is not necessarily sup-
ported for a SMS Gateway. In the event no support by the SMS Gateway, UCS2 encoded short messages cannot be sent to an email account and a fax machine. Please contact the used GSM network provider.

2.2.1 The Short Message Service (SMS)

The Short Message Service dialog box is used to choose whether to send the SMS message to a mobile phone or an e-mail address. If an e-mail message is chosen, the address is entered in the E-mail entry block at the bottom of the box.
entered per GSM/SMS Function Block
SMS/SMR/CD Functions and the Modem Setting 2
Only one e-mail address can be
.
A
D
E
F
)
)
B
C
)
)
)
)
A) Comment
Input a comment to label the function block. The comment will be shown on the VLS software display if the “D
B) Display Signal Number
Check this box to display the Function Block number on the VLS software display.
isplay Comment” block is checked.
2 - 7
2 Simple Application Controllers
α
C) Setting
This box will open the SMS Setting Dialog box described in Section 2.2.2. The SMS message destinations are input in the SMS Setting dialog box.
D) SMS Service Center
This box shows information regarding access to the SMS Provider. The information is entered in the SMS Setting Dialog Box described in section 2.2.2.
E) Destination
The possible Destination telephone numbers and the e-mail Gateway parameter are shown. Choose the desired Destination phone number or Gateway setting for the specific GSM/SMS Function Block by clicking the appropriate circle. 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.
-Mail
F) E
Enter the destination E-mail address for the SMS message.
SMS/SMR/CD Functions and the Modem Setting 2
-

2.2.2 SMS Setting Dialog Box

The SMS Setting Dialog box is accessed from the Short Message service (SMS) dialog box in any GSM/SMS Function Block. The SMS Setting dialog box is not specific to a single Function Block. The parameters entered here apply to all Function Blocks.
The parameter settings are the data required by the SMS provider to set up the destination locations. Messages can be sent to 1) three telephone numbers or 2) two telephone numbers and one Gateway number. The same Gateway can be used for multiple
e-mail accounts so that the only limit on e-mails is the 5000 bytes). Each GSM/SMS Function Block can service a single e-mail address.
A)
B)
D)
2 programming memory (200 FBs,
α
(C
E)
2 - 8
2 Simple Application Controllers
α
A) SMS Service Center - Mobile
Enter the number given by the SMS Provider for M number will be used for G International code is needed at the beginning of the phone number.
B) SMS Service Center - Gateway
Enter the number given by the SMS Service Provider for G the same number will be used for M whether the International code is needed at the beginning of the phone number.
SMS/SMR/CD Functions and the Modem Setting 2
obile access. It is possible that the same
ateway access. Please verify with the Service Provider whether the
ateway access. It is possible that
obile access. Please verify with the Service Provider
C) Valid Period
This is the requested period for the message to exist on the Server. The time can be set from a minimum of five minutes to a maximum or 63 weeks. This parameter is ultimately under the control of the Service Provider and the time period will be decided according to their company policy.
D) Destination - Mobile Phone
Click the Mobile Phone circle 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.
E) Destination - Gateway
Click the Gateway circle to input data in order to send an e-mail. Use the “Name #
” as an optional memo area. Enter the e-mail server 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.
2 - 9
2 Simple Application Controllers
α

2.3 The SMR Function Block

The GSM short message (SM) can be sent from a cell phone, a normal phone (with SM func­tionality) or PC to a GSM modem that is connected to an
2 controller detects the delivery of SM by the modem and downloads the SM from the
α
modem.The Short Message Receive FB (SMR FB) searches for the occurrence of a command in the SM.
The command is given as text string in the FB parameter.In case the command text is exactly included in the SM, outputs are changed.
To enter or edit the SMR parameters, double click on the icon to open the Short Message Receiving dialog box described in Section 2.3.1.
SMS/SMR/CD Functions and the Modem Setting 2
2 controller.
α
A)
B)
A) The Input Signal
The For normal operation the input must be ON.When Input is OFF, all output values are hold and
the function block doesn't care an incoming short message.Input is ON when left open(not connected).When Reset and Input are ON at the same time, only Reset becomes active.
B) The Reset Signal
Resets the outputs when ON. Reset takes priority over Input and takes priority over a command in an incoming short message.Reset is OFF when not connected.
C) The Output Signal
The output is set ON, when the switch ON command is found in the received short message. The output is set OFF, when the switch OFF command is found in the short message. When Reset is ON, the bit output is reset (OFF).When Input is OFF the bit output value is hold.
2 controller will receive a message when the input pin is activated.
α
(C
(D
D) The Word Output
Word output for transferred values. The output is set ON, when the switch ON command is found in the received short message. The output is set OFF, when the switch OFF command is found in the short message. When Reset is ON, the bit output is reset (OFF).When Input is OFF the bit output value is hold.
2 - 10
2 Simple Application Controllers
α

2.3.1 The Short Message Receiving (SMR)

The Short Message Service dialog box is used for a parameter setup when receiving a short message.
)
A
)
D
)
E
SMS/SMR/CD Functions and the Modem Setting 2
)
B
)
C
)
F
)
G
)
H
)
I
A) Comment
This edit box is used to enter a comment that will be displayed above the SMR icon and only when the "Display Comment" box is checked.
B) Display Signal Number
If this check box is checked the signal number will be displayed next to the function icon.
C) Display Monitor Information
If this check box is checked the monitor information will be displayed below the function icon. This information is displayed only in monitor and simulation mode.
D) Phone Number
This phone number is compared with a phone number of an incoming call.
Asterix Character in phone number The asterix character '*' can be used to terminate phone number or can be stand-alone.
It takes place for any combination of numbers. Using the '*', one SMR FB can switch for a group of phone numbers.
2 - 11
2 Simple Application Controllers
α
Table 2.4: Phone numbers and Outputs
FB number Caller's phone number 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
* Any phone number changed
+* Any international phone number changed
E) - Acknowledge
If this check box is checked, then an Acknowledge flag will be set.
SMS/SMR/CD Functions and the Modem Setting 2
Report short message handling
GSM
Short Message
Short Message
Modem
New Short Message received,stored in memory
Request Short Message
Transfer Short Message
Erase SM
Transfer report SM. See Message Table
Acknowledge messages
Condition
α
2
Check Password
Check Commands
Transmitted
Short Message
2
in Run Mode, all commands of SM successfully processed
α
2
in Run Mode, some commands in SM were erroneous.
α
2
in Run Mode, Sender of SM has no authorization
α
2
in Run Mode, Password Protection Set, Password invalid or not Set
α
"OK"
"Error"
"No access"
"No access"
2 - 12
2 Simple Application Controllers
α
- Retentive
Check the "Retentive" checkbox is store the output value even after a Power cut.
- Maintenance
If this check box is checked the maintenance mode will be initiated.
F) Short Message Age
This value defines the duration of time that the short message is stored. User can click "+" or "-" button to increase or decrease the short message age.
G) Word Output Range
This parameter is only used for when the word output mode is active.
-Min. value
Lower limit of the word output value. In case the word output value is smaller than the min. value set, thus, the min. value will become active. Min. Value range: -32768 (max. value -1)
-Max. Value
Upper limit of word output value. In case the word output value is greater than the max. value, thus, the max. value will become active. Max. Value range: 32767 (min. value +1)
SMS/SMR/CD Functions and the Modem Setting 2
H) Short Message Command
-Bit Output
The Bit output can be switched ON and OFF by the appropriate short message command.
-Word Output
The word output value can be set by the appropriate value held in the short message command.
I) SMR Password
Setting the SMR password in this dialog box will create a common password for all equivalent SMR Function blocks.
Setting Range: 0 and 9999.
In order to avoid serious injury and the machine damage caused by unintended SMR FB operation, provide safety devices as countermeasure.
2 - 13
2 Simple Application Controllers
α

2.4 The CD Function Block

In case a GSM modem or an analog modem that supports Calling Line Identification Presentation (CLIP) is called, the number of the calling partner is sent by the modem by the AT
notification "+CLIP" attached to the RING notification. given number of RING notifications. In case the numbers of digits of both phone numbers and the phone numbers itself are equal, the CD FB output is switched on. To enter or edit the SMR parameters, double click on the icon to open the Short Message Receiving dialog box described in Section 2.4.1.
A)
SMS/SMR/CD Functions and the Modem Setting 2
2 extracts the callers's number after a
α
B)
A) The Input Signal
Enables the CD FB operation.For normal operation the Input must be ON. When Input is OFF, the output is hold and the function block doesn't check caller's number. Input is ON when left open (not connected).When Reset and Input are ON at the same time,
only Reset becomes active.
B) The Reset Signal
Resets the bit output when ON Reset takes priority over Input and takes priority over an incoming call.Thus, when Reset is
ON, an incoming call has no affect. Reset is OFF when not connected.
C) The Output Signal
Bit output. The output is set ON, when the caller's number is equal to the stored phone number and Input is ON.The output state is hold, when Input is OFF, and it is reset (set OFF), when Reset is ON.
(C
2 - 14
2 Simple Application Controllers
α

2.4.1 Call Detect (CD)

The Call Detect dialog box is used for a Phone Number and Number of rings setup..
)
A
)
B
)
C
)
D
SMS/SMR/CD Functions and the Modem Setting 2
)
E
)
F
)
G
A) Comment
This edit box is used to enter a comment that will be displayed above the CD icon and only when the "Display Comment" box is checked.
B) Display Signal Number
If this check box is checked the signal number will be displayed next to the function icon.
C) Display Monitor Information
If this check box is checked the monitor information will be displayed below the function icon. This information is displayed only in monitor and simulation mode.
D) Phone Number
Length: 28 characters, including " +,-,(,),*,0,1,2,3,4,5,6,7,8,9 "
Asterix Character in phone number The asterix character '*' can be used to terminate phone number or can be stand-alone. It takes place for any combination of numbers. Using the '*', one CD FB can switch for a group
of phone numbers.
2 - 15
2 Simple Application Controllers
α
Table 2.5: Phone numbers and Outputs
FB number Caller's phone number 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
* Any phone number changed
+* Any international phone number changed
E) Maintenance
If this check box is checked maintenance mode will be selected.
SMS/SMR/CD Functions and the Modem Setting 2
F) Retentive
Check the "Retentive" checkbox is store the output value even after a Power cut.
G) Number of RING before call detect
Range: 1-20
Cautions for the use of both Call Detec and remote access
- When it remotely accesses from the same telephone number for Call Detect, CD and FB operate.
Cautions for misoperations
- CD FB operates also by a misoperation of a telephone.
In order to avoid serious injury and the machine damage caused by unintended CD FB operation, provide safety devices as countermeasure.
2 - 16
2 Simple Application Controllers
α
SMS/SMR/CD Functions and the Modem Setting 2

2.5 Set GSM Modem Parameters from the 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.
To begin the process from the Top Menu, scroll down to “Others/Serial Com/GSM” and press “OK” to view the options shown at right.

2.5.1 ComFormat

Upon entering the GSM option, the ComFormat dialog will be the first option. The ComFormat allows the user to set the communication settings for Data Length, Parity, Stop Bit, and Baudrate. Most communications can be accomplished with the Default settings.
Scroll to the setting to be adjusted.
Se r i a l Co
No t Us e Modem GSM Other
GSM
ComFo r ma t GSM I n i t GSM Remo
PIN Code Se t SMS
GSM Status
ComFo r ma t
Da t aLeng t
Pa r i t y Stop bi t Baudr a t e
De f a l t
Com
u
m
te
h
Data Length
Select a Data length parameter of 7 or 8 bits.
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.
Da t aLeng t h
8bits 7bits
Pa r i t y
Non
e
Odd
Eve
n
Stop b t
1b iit 2b i t s
Baudr a e
960 bp 192 bps00
t
0s
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 “OK” when the pointer is on the Default option shown in the ComFormat box.
2 - 17
2 Simple Application Controllers
α
SMS/SMR/CD Functions and the Modem Setting 2

2.5.2 The 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.
Command Setting
Choose “Command” to enter the AT command. Details for the AT command should be included in the literature of the modem.
Enter the string by choosing the characters using the “ ” arrows. When a desired letter is shown onscreen, move to the right by pressing the “ ” key. The character shown will remain and the cursor will move to the right. 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.
and “ ”
GSM I i tn
Command De l ayT i me
GSM
<
GSM I n i t
Ini t01
Command
[A ]
@
=>? ABCDE
De l ayT i me
0s

2.5.3 Pin Code

Enter the PIN (Personal Identification Number)
It is necessary to enter a PIN received from the Service Provider when the keys to choose the digits of the code and the “ ” and “ ” keys to move
to adjoining digits. SIM PIN setup “****” or **** can be activated and deactivated by the cursor U and cursor soft key.
All the numbers must be set to an integer value or a PIN Error will be received. Press the “OK” or “ESC” key to return to the PIN entry display. Finish entering all integer values into all four digits and press “OK” to enter the PIN.
Cancel the PIN
To Cancel an existing PIN, enter the PIN option and confirm with the “OK” button the intent to Cancel the code. The PIN does not have to be entered in order to Cancel the PIN.
Use the “ESC” button to return to the GSM menu.
2 controller is used to send SMS packets. Use the “+” and “-”
α
PIN Co e
Se t p
PIN Co e
Can edcl
OKor ES
d
u
∗∗∗
V
C
2 - 18
2 Simple Application Controllers
α

2.5.4 Set SMS

SMS/SMR/CD Functions and the Modem Setting 2
The SMS menu is used to set the telephone numbers for the Service Provider, the destination numbers for mobile phones, the access code for e-mail messages, and the Validity Period of the messages.
SMS Provider Mobile Access Number (SMSC1)
The SMSC1 is the number used to access the Service Provider section for mobile phones. Choose the digits and symbols using the “ ”
and “ ” arrows. After the digit is set, move to the left or right with the “ ” and
“” keys. Do not press the “OK” button until the command has
Se t SM
SMS 1SC
SMS 2C DA1 DA2 DA3
VP
Se t SM
SMS 1SC
[]
9+- ) 0 3(12
01
been entered in its entirety.
SMS Provider Gateway Access Number (SMSC2)
The SMSC2 is the number used to access the E-mail gateway telephone number of the SMS Service Provider. Choose the digits and symbols using the “ ” left or right with the “ ” and
and “ ” arrows. After the digit is set, move to the
“” keys. Do not press the “OK” button
Se t SMS
SMSC2
[]
9+- ) 0 3(12
10
until the command has been entered in its entirety. This number might be the same as used in SMSC1.
Destination Address (DA1, DA2, DA3)
Enter the mobile telephone number or the Service Provider e-mail
ateway code in this window. The number entered here can be
G accessed by a GSM/SMS Function Block in the user program when
Se t SMS
DA1
[]
9+- ) 0 3(12
10
trying to send an SMS message.
Choose the digits and symbols using the “ ” left or right with the “ ” and “ ”
keys. Do not press the “OK” button until the command has
and “ ” arrows. After the digit is set, move to the
been entered in its entirety.
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 Gateway access code needs to be entered and then the individual e-mail addresses can be entered separately in each GSM/SMS Function Block.
Validity Period
The Validity Period is a request to the SMS Service Provider to keep the message on their Server for a length of time. Each Service
Se t SMS
V
P
.0h24 r s
Provider may have their own policies with regard to this time period. Please check the details with your local Service Provider.
Use the “+” and “-” keys to change the value within the range of 5 minutes to 63 weeks.
2 - 19
2 Simple Application Controllers
α
SMS/SMR/CD Functions and the Modem Setting 2

2.5.5 GSM Status

Check the status of the GSM communication in the following categories.
Status
The status is given in hexadecimal numbers, convert to binary numbers to check against the Status Table shown in Section **. Error codes are provided in Chapter 4.
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. Reference error Tables are located in Chapter 4 of this manual.
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. Reference error Tables are located in Chapter 4 of this manual.
GSM S t
Sta tus CME CMS E r r o r
Si g t r engS
GSM S t tasu
St tasu
GSM S t tasu
CME rE1-ror
GSM S t tasu
CMS rE1-ror
atus
Er ro r
000H0
Signal Strength (Sigstreng)
Check the signal strength of the GSM modem signal.
Table 2.6: Signal Strength Reference Table
Val ue% Receiving Level
0 -113 dBm or less
3 -111 dBm
6-96 -109 to -53 dBm
100 -51 dBm or greater
GSM S t tasu
SigSt re
0
%
ng
2 - 20
2 Simple Application Controllers
α

2.6 Characters in GSM Protocol

The following table gives the characters available for GSM/SMS communication as defined by GSM standard 03.38. The code numbers are for reference only and do not need to be entered
by the User. The Tables are given for each language to show the unsupported characters and how they will appear if used in a GSM message. Languages where all characters are supported do not have GSM character transposition tables.

2.6.1 The GSM Character Table

The Table below gives the characters that can be sent by the α2 controller in a GSM message.
Table 2.7: GSM 03.38 Default Alphabet
Number (Hex)
2 controller supports more characters than appear in the GSM protocol.
α
0
1 2 3 4 5 6 7
SMS/SMR/CD Functions and the Modem Setting 2
0@
1
2$
3
4
5
6
7
8
9
ALF
B
C
DCRæ-=M
E
F
£
¥
è é ù
ì
ò
Ç
Ø
øÆ
Åß
åÉ
_!1AQaq
Φ
Γ
Λ
Π
Ψ
Σ
Θ
Ξ
1) + ; K
SP 0
“2BRbr
#3CScs
¤
%5EU e u
&6FV f v
‘7GWgw
(8HXhx
)9IYi y
*:JZjz
,<L
.>N
/?O
4DTd t
¡
Ä Ö Ñ Ü
P
§
¿
k
l
m
n
o
p
ä ö ñ ü
à
2 - 21
2 Simple Application Controllers
α

2.6.2 French GSM Characters

The following table shows the unsupported French characters in the GSM protocol and how those characters will appear in a GSM message.
However these characters are supported Ver. 3.00 or later of
Table 2.8: French Characters in GSM Protocol
Character Type
SMS/SMR/CD Functions and the Modem Setting 2
Display Character
α
2.
2 Character
α
GSM Character a e i o u e i c
вкофылпз

2.6.3 Italian GSM Characters

The following table shows the unsupported Italian characters in the GSM protocol and how those characters will appear in a GSM message.
However these characters are supported Ver. 3.00 or later of
Table 2.9: Italian Characters in GSM Protocol
Character Type
2 Character
α
GSM Character
áíóú àìòù
Display Character
α
2.
2 - 22
2 Simple Application Controllers
α

2.7 AL-PCS/WIN-E Program Example

2.7.1 SMS Function Block Example

Table 2.10: GSM Function Block
SMS/SMR/CD Functions and the Modem Setting 2
Function
I
W
O
Set
Item
I Bit input pin for GSM/SMS function block operation
1) Detects the high status of an input and subsequently sends the SMS message to the predefined user destination.
2) The SMS message will continue to send regardless of the input switching to a low state.
3) The incoming high input will be ignored: a) During a SMS message transmission b) During the waiting period.
4) Communication failure (e.g. busy line) will tell the SMS function block to retry on two further occasions in a period of two minutes.
FB
5)On the third retry the output status will switch to ON and an error message generated through the word pin of the function block.
6) The user may experience incorrect validity period timings. Please check with your Service Provider.
7) If both the Mobile (SMSC1) and Gateway (SMSC2) numbers are entered the number for the SMS in conjunction with the destination chosen. The
destination being either to a mobile phone or an email address.
1) The output status will set ON: a) In succeeding in sending a SMS message b) In failing to send a SMS message after three retries.
α
2 controller will automatically choose the correct path
Description
Output
2) If more than one SMS function block exists on the program, a FIFO (First In First Out) sequence is performed. *1
3) The following items are available for other function blocks: a) SMS message sent/SMS failed to be sent after 3 attempts b) Current Status
Note: *1 If a number of SMS Function Blocks have been used in one program the user must take
care when calculating the message sending order. The first message to be sent depends on the first input signal turning ON. Thus, if other messages are waiting to be sent they are then placed in a waiting queue. However, since the waiting queue is scan dependant, if after one scan the controller has failed to send the first message due to a busy line, thus, the following message order is no longer dependant on input signals turning ON but is solely dependant on the Function Block order.
Table 2.11: Abbreviated terms
Term Description
I SMS Function Block Input pin
O SMS Function Block Output pin
W SMS Function Block Word Output pin
2 - 23
2 Simple Application Controllers
α
Table 2.11: Abbreviated terms
FB Function Block
SMS Short Message Service
Timing chart for the SMS function block
Input pin
SMS Message
Output pin
VLS program example for the SMS function block
SMS Message
SMS/SMR/CD Functions and the Modem Setting 2
Transmission request is ignored while sending SMS Message.
* SMS Message
1 scan time
* *
I01
I02
Send Request
Stop Retry
PL
From Off to On
1 2
OR
3
S
SR FL
R
Reset priority
SMS
• Output: Continous
• On time:
120.1s (1201 × 100ms)
• Off time:
0.1s (1 × 100ms)
Completed
CP
Current status=1 (Bit 0=ON)
CP
Current status=2 (Bit 1=ON)
ZC
4≤Current status≤7 (Bit 2=ON)
ZC
8≤Current status≤15 (Bit 3=ON)
CP
Current status≥16 (Bit 4 = ON)
O01
O02
O03
O04 1 2
OR
3
O05
O06
2 - 24
2 Simple Application Controllers
α
SMS/SMR/CD Functions and the Modem Setting 2
2 - 25
2 Simple Application Controllers
α

2.7.2 SMR Function Block Example

Table 2.12: SMR Function Block
Function Set Item Description
E Bit input pin for the function block operation
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)
3) Phone Number Setup short message senders phone number.
E
R
O
W
FB
By setting the phone number in FB parameter, only the Short 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 “.
Asterix Character in phone number The asterix character '*' can be used to terminate phone number or can be stand-alone. It takes place for any combination of numbers. Using the '*', one SMR FB can switch for a group of phone numbers.(See Table 2.14)
SMS/SMR/CD Functions and the Modem Setting 2
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.(See Table 2.15)
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)]
2 - 26
2 Simple Application Controllers
α
Function Set Item Description
Table 2.13: Abbreviated terms
Term Description
E SMR Function Block Input pin
R SMR Function Block Reset pin
O SMR Function Block Output pin
W SMR Function Block Word Output pin
FB Function Block
SMS Short Message Service
SMS/SMR/CD Functions and the Modem Setting 2
R Reset pin for the function block
The SMR FB can be operated in one of two different modes.
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.
Output
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.
Table 2.14: Phone numbers and Outputs
FB number Caller's phone number 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
* Any phone number changed
+* Any international phone number changed
2 - 27
2 Simple Application Controllers
α
Report short message handling
Short Message
GSM Modem
New Short Message received,stored in memo ry
Request Short Message
SMS/SMR/CD Functions and the Modem Setting 2
α
2
Check Password
Check Commands
Short Message
Transfer Short Message
Erase SM
Transfer report SM. See Message Table
Table 2.15:Acknowledge messages
Condition
2
in Run Mode, all commands of SM successfully processed
α
2
in Run Mode, some commands in SM were erroneous.
α
2
in Run Mode, Sender of SM has no authorization
α
2
in Run Mode, Password Protection Set, Password invalid or not Set
α
Trans mi tt ed
Short Message
"OK"
"Error"
"No access"
"No access"
Application Example: Switch an irrigation system by SM
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.
2 - 28
2 Simple Application Controllers
α

2.7.3 CD Function Block Example

Table 2.16: CD Function Block
Function Set Item Description
E 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.
2) Phone Number
Setup short message senders phone number.
E
O
R
FB
R Reset pin for the function block
Output
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 “.
Asterix Character in phone number The asterix character '*' can be used to terminate phone number or can be stand-alone. It takes place for any combination of numbers. Using the '*', one CD FB can switch for a group of phone numbers.(See Table 2.18)
3) Number of RING
Setup number of RING before call detection(Program Parameter, common for all CD FBs) Range:1 to 20
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.
SMS/SMR/CD Functions and the Modem Setting 2
Table 2.17: Abbreviated terms
Term Description
E CD Function Block Input pin
R CD Function Block Reset pin
O SMR Function Block Output pin
FB Function Block
Table 2.18: Phone numbers and Outputs
FB number Caller's phone number 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
* Any phone number changed
+* Any international phone number changed
2 - 29
2 Simple Application Controllers
α
Application Example: Open roller shutter by phone call
A roller shutter gates the entrance to a company field. Normally pedestrians only can pass this gate. Four employees need to pass the gate with a company car. These employees can open the gate by simply calling a phone number with their cell-phone. Opening the gate by phone call is enabled only during normal workdays and business times (Time Switch). Outside the business times the company owner can enable the function for a fixed time to give an employee the chance to open the gate.
SMS/SMR/CD Functions and the Modem Setting 2
2 - 30
2 Simple Application Controllers
α

3. Remote Access

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.
Remote Access 3
Certain parameters in the Remote Access from an external PC. These parameters can be set quickly and easily in the VLS software or with slightly more effort from the front panel keys. The equipment and configuration for this style of communication is listed in section 1.1 of this manual.
2 controller and GSM modem must be set in order to perform
α

3.1 GSM Remote Access

3.1.1 Set Parameters from the VLS software

The Visual Logic Software (VLS) provides the easiest method to set the parameters and download them to the controller. The communication method is the first setting necessary in the VLS software. Open or start a new program and then choose “Option” on the menu bar. Click “GSM dialog box necessary to begin parameter input.
and Serial Communication” to open the
3 - 1
2 Simple Application Controllers
α

3.1.2 GSM & Serial Communication Dialog Box

The “GSM and Serial Communication” dialog box is used to set the equipment and communication type for the controller. A short explanation of each parameter is given below.
Remote Access 3
In order to obtain remote access using a GSM modem, the G Remote Access box checked, and the GSM Pin Code entered.
)
A
)
F
SM circle must be clicked, the
)
G
)
B
)
C
)
D
)
E
SM
A) G
message or for Remote Access communication.
B) P C) Pin Code with the quotation mark
marks (necessary for Sony Ericsson GSM modem)
D) Remote Access ­E) Initialize Modem ­F) Data Format ­G) Registered GSM Modems -
however, this list can be extended by writing to the GSM.ini file.
Refer to the section 2.1 for further detailed information concerning VLS settings for remote access using GSM.
- This setting is used when a GSM modem will be connected either to send an SMS
in Code
- The GSM PIN (Personal Identification Numbers for use of GSM)
- GSM SIM PIN is send to the modem in quotation
Setting to allow GSM modems to have Remote Access capability.
AT Command used to initialize a modem.
Settings for Com ports and message protocol.
List of available GSM modems for the user to choose from,
3 - 2
2 Simple Application Controllers
α
Remote Access 3

3.1.3 GSM Modem Settings

The numerous parameters and options for using the GSM modem can be set using the front panel keys although this procedure is significantly more difficult than using the AL-PCS/WIN-E software.
To begin the process from the Top Menu, scroll down to “Others/Serial Com/GSM” and view the options shown at right.
Comformat (Communication Format)
Upon entering the GSM option, the ComFormat dialog will be the first option. The Comformat allows the user to set the communication settings for Data Length, Parity, Stop Bit, and Baudrate.
Scroll to the setting to be adjusted.
Data Length
Select a Data length send parameter of 7 or 8 bits.
Se r i a l Co
No t Us e Modem GSM Other
GSM
ComFo r ma t GSM I n i t GSM Remo
PIN Code Se t SMS
GSM Status
ComFo r ma t
Da t aLeng t
Pa r i t y Stop bi t Baudr a t e
De f a l t
Da t aLeng t h
8bits 7bits
Com
u
m
te
h
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.
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 “OK” when the pointer is on the Default option.

3.1.4 The 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.
Pa r i t y
Non
e
Odd
Eve
n
Stop b t
1b iit 2b i t s
Baudr a e
960 bp 192 bps00
GSM I i tn
Command De l ayT i me
t
0s
3 - 3
2 Simple Application Controllers
α
Remote Access 3

3.1.5 Command Setting

Choose “Command” to enter the AT command. Details for the AT command should be included in the literature of the modem.
Enter the string by choosing the characters with the “ ” arrows. 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.

3.1.6 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.

3.1.7 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.
and “ ”
GSM
<
GSM I n i t
GSM Remo t e
Ini t01
Command
[A ]
@
=>? ABCDE
De l ayT i me
0s
Fbid
or
Pmiter

3.1.8 The PIN Code

Enter the PIN Code
It is necessary to enter a PIN code received from the Service Provider when the “-” keys to choose the digits of the code and the “ ” and “ ” keys to
move to adjoining digits. SIM PIN setup “****” or **** can be activated and deactivated by the cursor U and cursor soft key.
All the numbers must be set to an integer value or a PIN Code Error will be received. Press the “OK” or “ESC” key to return to the PIN Code entry display. Finish entering all integer values into all four digits and press “OK” to enter the code.
Cancel the PIN Code
To Cancel an existing PIN code, enter the PIN Code option and confirm with the “OK” button the intent to Cancel the code. The PIN Code does not have to be entered in order to Cancel the code.
Use the “ESC” button to return to the GSM menu.
2 controller is used to send SMS packets. Use the “+” and
α
PIN Co e
Se t p
d
u
∗∗∗
V
PIN Co e
Can edcl
OKor ES
C
3 - 4
2 Simple Application Controllers
α

3.2 Standard Modem Remote Access

Certain parameters in the α2 controller and standard modems must be set in order to perform Remote Access from an external PC. These parameters can be set quickly and easily in the
VLS software or with slightly more effort from the front panel keys. The equipment and configuration for this style of communication is listed in section 1.2 of this
manual.
Cautions for the use of both Call Detec and remote access
- When it remotely accesses from the same telephone number for Call Detect, CD and FB operate.
Cautions for misoperations
- CD FB operates also by a misoperation of a telephone.
In order to avoid serious injury and the machine damage caused by unintended CD FB operation, provide safety devices as countermeasure.
Remote Access 3

3.3 Set Parameters from VLS software

The Visual Logic Software (VLS) provides the easiest method to set the parameters and download them to the controller. The communication method is the first setting necessary in the VLS software.
Open or start a new program and then choose “Option” on the menu bar. Click “GSM dialog box necessary to begin parameter input.
and Serial Communication” to open the
3 - 5
2 Simple Application Controllers
α

3.3.1 GSM & Serial Communication Dialog Box

The “GSM and Serial Communication” dialog box is used to set the equipment and communication type for the controller. A short explanation of each parameter is given below.
Remote Access 3
In order to perform Remote Access using a Standard modem, click the M settings for Pin Code, Remote Access, and Data Format cannot be accessed when the M
odem circle is selected.
)
A
odem circle. The
)
B
)
C
A) Modem
in Remote Access.
B) Modem selection C) Initialize Modem -
Refer to section 2.1 for further detailed information concerning VLS settings for remote access using standard modems.
- This setting is used when a standard modem will be connected to the
- Select from the default modem stored in the Modem.ini file. AT Command used to initialize a modem.
2 for use
α
3 - 6
2 Simple Application Controllers
α

3.3.2 Standard Modem Settings

A standard modem can setup from the front panel keys but must be accessed from the VLS software package. Once the Modem option is entered, only two settings are required - the AT command and the power On Delay setting. This is enough informa-
tion to initialize the modem connected to the
In the Top Menu, scroll down to the “Others/Serial Com/Modem” option and Press “OK”.

3.3.3 The Command Setting

The modem option contains the “Command” and the “Delay Time” setting. Choose “Command” to input the AT command. Details for the AT command should be included in the literature of the modem. For additional reference information, please see section 2.3 of this manual.
Enter the command by choosing the characters with the “ ” arrows. When the desired letter is shown on screen, move to the right “”
to add the next character. Do not press the “OK” key until the
command has been entered in its entirety.
2 upon powerup
α
and “ ”
Remote Access 3
Se r i a l Co
No t Us e Modem GSM Other
ModemI i t
Com and De l ay
ModemI i t
Com and
[
y{|}!#$"
z
Com
n
m
Time
n
m
m
01
]
Move to the left for editing purposes with the “ ” key.

3.3.4 The Delay Time Setting

The Delay Time parameter 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.
ModemI i t
Com and De l a y
ModemI i tn
De l ayT i me
n
m
Time
0s
3 - 7
2 Simple Application Controllers
α

3.3.5 Standard Preconfigured Modems

Please refer to the Table below for information on the Preconfigured modems available in the
2 controller for standard modems.
α
Table 3.1: Standard Preconfigured Modem Settings
Maker name Model name Modem command (AT command)
3com SP560V-P ATE0Q1&B1&D0&H0&I0&R1&S0S0=2S15=8&W
OMRON ME3314 ATE0S0=2Q1&D0S15=8&R1&H0&W
AIWA PV-AF3360 ATE0S0=2Q1&D0&M5\Q0\J0&W
AT Command Profile for Standard Modems
Please refer to the Table below for information on the AT command for Standard Modems.
Table 3.2: AT Command Reference for Standard Modems
Item Content
Setting of command echo None E0 E0 E0
Call frequency of auto-answering Twice S0=2 S0=2 S0=2
Displayed result code None Q1 Q1 Q1
DTR control Always on &D0 &D0 &D0
DSR control Always on &S0 - -
Communication mode V.42 bis mode S15=8 S15=8 &M5
Speed of terminal fixed dimension Fixed &B1 - \J0
Terminal flow control scheme None - &R1 \Q0
Flow control of transmission data None &H0 &H0 -
Flow control of received data (software)
Flow control of received data (RTS control)
Writing to nonvolatile memory
nonvolatile memory.
Remote Access 3
Example Setting
SP560V-P ME3314 PV-AF3360
None &I0 - -
None &R1 - -
Write to the
&W &W &W
Combination of the "AT" command
Table 3.3: Combination and action
Init string Action
ATE0S0=2&S0;+IPR=9600;+CMEE=1;&W Will be send at once to modem
ATE0S0=2&S0;+IPR=9600;AT+CMEE=1;&W
ATE0S0=2&S0;AT+IPR=9600;AT+CMEE=1;&W
AT E 0 S 0 = 2 & S 0 ; AT + I P R = 9 6 0 0 ; AT + C ME E = 1 ; AT & W
Will be send to modem in 2steps: ATE0S0=2&S0;+IPR=9600 AT+CMEE=1;&W
Will be send to modem in 3steps: ATE0S0=2&S0 AT+IPR=9600 AT+CMEE=1;&W
Will be send to modem in 4 steps: ATE0S0=2&S0 AT+IPR=9600 AT+CMEE=1 AT&W
3 - 8
2 Simple Application Controllers
α
Note: The 3COM (SP560-V), OMRON (ME3314) and AIWA (PV-AF3360) standard modems have
been used as the default modem for the a standard modem of their choice with a different AT command then additional AT commands
can be included.
Having installed VLS to the Program files directory.
Remote Access 3
2 Series Controller, however, if the user has installed
α
C:\Program Files\Alvls\BIN
please choose the Modem.ini file that contains AT information for standard modem selection in VLS.
Contents of the Modem.ini file:
; This is Modem.ini File, used to Display Modem Models ; and their Initialization commands. This file is used ; while Initializing the Controller Modem. ; ; Please add any new Modem models and Initializing commands ; only at the end of the file. An example is given below: ; ; 1="USRoboticsXXX","AT&F" ; Here "1" is serial number in increasing order ; "USRoboticsXXX" is modem model ; "AT&F" is the initializing command (Max 64 Chars). ; [Modem] 1="New","" 2="3COM SP560V-P","ATE0Q1&B1&D0&H0&I0&R1&S0S0=2S15=8&W" 3="OMRON ME3314","ATE0S0=2Q1&D0S15=8&R1&H0&W" 4="AIWA PV-AF3360","ATE0S0=2Q1&D0&M5\Q0\J0&W"
Simply follow the instruction listed above, subsequentially, the additional standard modems will be included with attached AT command string.
3 - 9
2 Simple Application Controllers
α
Remote Access 3
MEMO
3 - 10
2 Simple Application Controllers
α
SMS Messaging Diagnostics 4

4. SMS Messaging Diagnostics

The α2 controller has a number of Diagnostic messages in both the controller and the VLS software.

4.1 Check points for Mobile Phone Communication Problems

Table 4.1: Check Points for a Mobile Phone SMS Error
Error Check Points
Check that the SMS function block been activated
Check that the wiring connections are properly made
Check that the AT command in the GSM modem is correct
Check that the PIN code has been entered correctly
The SMS message has not been sent to a mobile phone
Check that the SMS Service Center Mobile phone number has been entered correctly
Check that the destination phone number has been entered correctly
Check that the proper destination has been chosen in the GSM function block
Check the GSM Status in the controller or VLS software for error messages

4.2 Check points for E-mail Communication Problems

Table 4.2: Check Points for a E-mail SMS Error
Error Check Points
Check that the SMS function block been activated
Check that the wiring connections are properly made
Check that the AT command in the GSM modem is correct
Check that the PIN code has been entered correctly
The SMS message has not been sent to an E­mail account
Check that the SMS Service Center Gateway phone number has been entered correctly
Check that the destination e-mail address has been entered correctly
Check that the Gateway destination has been chosen in the GSM function block
Check the GSM Status in the controller or VLS software for error messages
4 - 1
2 Simple Application Controllers
α
SMS Messaging Diagnostics 4

4.3 GSM Status

Check the status of the GSM communication in the following categories.

4.3.1 GSM Status

Check the Status of the GSM modem settings and SMS message transmissions through the table below.
Table 4.3: GSM Modem Status
Bit Status On (1) Off (0)
b0 Response from GSM Modem No Yes
b1 Initial successful Yes No
b2 Set Pin Code Yes No
b3 Network Registration failed Registered Not Registered
b4 GSM CME Error. Yes No
b5 GSM CSM Error. Yes No
b6 Remote Access successful *1 Yes No
b7 SMR Receive Time out Yes No
b8-11 Reserved Reserved = 0
b12 SMS is sending or retrying Message No Message
b13 SMS is waiting for sending) Transmitting Off
b14 SMS failed in sending Yes No
b15 SMS failed in sending due to wrong setting Yes No
GSM S t
Sta tus CME CMS E r r o r
Si g t r engS
GSM S t tasu
St tasu
atus
Er ro r
000H0
Note: *1 - This bit is not linked to the Remote Access Setting which only enables remote access. This
bit checks if Remote Access is currently in progress.
4 - 2
2 Simple Application Controllers
α
SMS Messaging Diagnostics 4

4.3.2 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.
Table 4.4: Mobile Equipment Error Codes
Val ue Description Valu e Description
-1 No Error 17 SIM PIN2 Required
0 Phone Failure 18 SIM PUK2 Required
1 No Connection to Phone 20 Memory Full
2 Phone-Adaptor Link Reserved 21 Invalid Index
3 Operation Not Allowed 22 Not Found
4 Operation Not Supported 23 Memory Failure
5 PH-SIM PIN Required 24 Text String Too Long
10 SIM not inserted 25 Invalid Characters in Text String
11 SIM PIN Required 26 Dial String Too Long
12 SIM PUK Required 27 Invalid Characters in Dial String
13 SIM Failure 30 No Network Service
14 SIM Busy 31 Network Time-out
15 SIM Wrong 100 Unknown
16 Incorrect Password ...256
GSM S t tasu
CME rE1-ror
All other values below 256 are reserved.
4 - 3
2 Simple Application Controllers
α
SMS Messaging Diagnostics 4

4.3.3 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.
Table 4.5: Mobile Equipment and Network Error Codes
Val ue Description Value Description
-1 No Error 315 SIM Wrong
0 - 127 GSM 04.11 Annex E-2 Values 316 SIM PUK Required
128 - 256
300 ME Failure 318 SIM PUK2 Required
301 SMS Service of ME reserved 320 Memory Failure
302 Operation Not Allowed 321 Invalid Memory Index
303 Operation Not Supported 322 Memory Full
304 Invalid PDU Mode Parameter 330 SMSC Address Unknown
305 Invalid Text Mode Parameter 331 No Network Service
310 SIM not Inserted 332 Network Time-out
311 SIM PIN Required 340 No +CNMA acknowledgement expected
312 PH-SIM PIN Required 500 Unknown Error
313 SIM Failure ... 511
314 SIM Busy 512 (+) Manufacturer Specific
GSM 03.40 Subclause 9.2.3.22 values
GSM S t tasu
CMS rE1-ror
317 SIM PIN2 Required
Unused Values in the range from 256 to 511 are Reserved.

4.3.4 Signal Strength (Sigstreng)

Check the signal strength of the GSM modem signal. Generally good operation is possible with a signal strength of 10% or more.
Table 4.6: Signal Strength Reference Table
Val ue % Receiving Level
0 -113 dBm or less
3 -111 dBm
6-96 -109 to -53 dBm
100 -51 dBm or greater
GSM S t tasu
SigSt re
0
%
ng
4 - 4
2 Simple Application Controllers
α
Note 1 ) During GSM communication, the RS-232C pins 4 and 7 must be set high otherwise no
data will transferred and the GSM modem will appear to hang or experience a state of suspension.
SMS Messaging Diagnostics 4
2 ) The
3 ) Having configured the GSM communication settings before operation, when the
Controller and GSM modem are on-line, then the user must not change any settings from VLS or the front panel keys. If such modifications have been made to the GSM communi­cation settings, thus, the modem.
4 ) The power to the
settings. If modifications have been made to the communication settings, then please cycle the power again.
5 ) Please check with your service provider concerning the @ symbol within an E-mail
address. The @ symbol can be replaced with a difficulties with sending E-mail messages from the
6 ) The Validity period of SMS messages is specified from the GSM function block or from the
front panel keys, however, if a certain time period is entered the user should not always expect the same duration as the Service Provider can delete the message from their server without notice.
2 Series Controller and GSM modem must be powered ON simultaneously.
α
2 Series Controller will stop communication with the GSM
α
2 Series Controller must be cycled to accept the initial communication
α
!
symbol if the user experiences some
2 Series Controller.
α
2 Series
α
4 - 5
2 Simple Application Controllers
α
SMS Messaging Diagnostics 4
MEMO
4 - 6
2 Simple Application Controllers
α

5. Computer Link - Dedicated Protocol

The α2 Series Controller can transfer data To/From a personal computer, HMI, or other peripheral equipment via Dedicated Protocol. The structure of the
24MR-*) Series computer link protocol is based upon 8-bit binary interpretation and not an ASCII coded string.

5.1 Data Flow by Link

The computer reads data from the α2 (AL2-14MR-*, AL2-24MR-*) Series Controller
Computer Link - Dedicated Protocol 5
2 (AL2-14MR-*, AL2-
α
Computer
(1) (10)
Communication
Program
OS
RS-232
Cross cable
(2)
(9)
(1) Request Command
(2) RS-232 Cross Cable Connection
(3) AL2-GSM-CAB Cable Connection
(4) α2 Controller RS-232 Interface
(5) Operating System → Device Memory
AL2-GSM-CAB
(3)
(8)
S
T
X
Read
FBD
(4)
(7)
Data
Device
Memory
α
2 Controller
RS-232
(6)
OS
(5)
Read
(6) Device Memory → Operating System
(7) α2 Controller RS-232 Interface
(8) AL2-GSM-CAB Cable Connection
(9) RS-232 Cross Cable Connection
(10) Response Data
Data
E T X
5 - 1
2 Simple Application Controllers
α
The computer writes data to the α2 (AL2-14MR-*, AL2-24MR-*) Series Controller
Computer Link - Dedicated Protocol 5
Computer
(1) (9)
Communication
Program
OS
RS-232
Cross cable
(2)
(8)
(1) Request Command
(2) RS-232 Cross Cable Connection
(3) AL2-GSM-CAB Cable Connection
(4) α2 Controller RS-232 Interface
AL2-GSM-CAB
(3)
(7)
S
T
X
FBD
(4)
(6)
Device
Memory
α
2 Controller
RS-232
OS
(5)
Write
(5) Operating System → Device Memory
(6) α2 Controller RS-232 Interface
(7) AL2-GSM-CAB Cable Connection
(8) RS-232 Cross Cable Connection
(9) Acknowledge Command
The 8-bit binary computer link string is sent from peripheral equipment to the
Write
2 Series
α
Controller using a combination of a AL2-GSM-CAB and user-made cross-cable. The Transmit message consists of either Format A or Format B. Refer to section 5.3 for further outline
information. The reply generated from the
2 Series Controller informs the user of the status
α
of the communication line, erroneous messages, status of function block bit data, status of function block word data and the status of the Time Switch settings.
Accessible devices include: System Bits, Input/Output Terminals, Key Inputs, Link Inputs/ Outputs, Analog Inputs and Control (N) bits. Additional parameters must be entered for information exchange with Function Block data (Bit or Word) to be enabled.
5 - 2
2 Simple Application Controllers
α

5.2 Configuration Diagram

The Peripheral equipment acts as the Master in all configurations, hence, messages are never initiated from the
as the Master and the
2 Series Controller. This configuration involves a personal computer acting
α
2 Series Controller the slave unit.
α
Computer Link - Dedicated Protocol 5
Currently the
2 Series Controller contains an RS-232C interface, thus, only 1:1
α
communication is available.
c
d e
DC INPUT
(B) (A)
+ -
POWER
24V DC
AL2-24MR-D
OUT2 OUT4
OUT1
OUT3
Table 5.1: Configuration Table
No. Description
1
2 AL2-GSM-CAB
3 RS-232C Cross Cable
4 PC or other peripheral equipment
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
ESC
+
-
OK
RELAY OUTPUT
6 5
8
7
9
OUT
α
2 Series Co
ntroller
f

5.2.1 Cross-Cable Diagram

The pinouts and connector types for the RS-232C cross cable are shown in the figure below. Both the connectors and the wiring are equivalent so that either side can be connected to the AL2-GSM-CAB or the peripheral device.
(9-pin D-Sub female) (9-pin D-Sub female)
Note: The 4 and 7 signals must be set to high-level on the personal computer side. If these signals
are not set, the personal computer will to communicate with the
2
3
4
5
6
7
8
2
3
4
5
6
7
8
2 Series Controller.
α
5 - 3
2 Simple Application Controllers
α

5.3 How to read Dedicated Protocol

Format A for computer link is used for checking the communication line between the computer and the identical. Refer to section 7.1 for detailed 8-bit binary string structure.
Format A: Communication Line Check
2 Series Controller. Thus, the read/write format for the structure of the string is
α
Computer Link - Dedicated Protocol 5
Computer
α
2 Controller
S
T
X
E N Q
S T X
A
C
K
Format B for computer link is generally used for reading/writing to all internal devices, reading/ writing to function block bit/word data, run/stop mode and configuring the Time Switch settings. Thus, the command string is more complex compared to the Format A equilvalent.Refer to section 8.3 for detailed 8-bit binary string structure.
Format B: Computer READS from the
Computer
α
2 Controller
S T X
E T X
Format B: Computer WRITES to the
2 Series Controller
α
S T X
2 Series Control
α
S T
flag
X
Complete
E T X
Computer
α
2 Controller
S T X
E T X
S T X
Format B: Computer RUN/STOP operation for the
Computer
α
2 Controller
S T X
E T X
S T X
S T
flag
X
Complete
2 Series Controller
α
S T
flag
X
Complete
A C K
A C K
5 - 4
2 Simple Application Controllers
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6

6. AL-PCS/WIN-E Settings for Dedicated Protocol

The personal computer and α2 Series Controller acts as a master slave relationship accordingly. Therefore, all communication starts from the computer side (master) and cannot
be started from the essary AL-PCS/WIN-E (version 2.00 or above) required settings for Dedicated Protocol.
2 Series Controller side (slave). The following chapter will outline the nec-
α
(1) Select Project (new or existing)
(2) Set Default Communication Settings
(3) Set Bit data for function blocks
(4) Set Word data for function blocks
(5) Download project
(6) Cycle power

6.1 GSM and Serial Communication Setting

1 ) Open a new or existing file for the α2 Series Controller. 2 ) From the Option menu select the “GSM and Serial Communication.” option.
6 - 1
2 Simple Application Controllers
α
3 ) Choose “Other”. Thus, enabling dedicated protocol communication between the computer
and the
2 Series Controller. Click the “OK” button to accept.
α
A)
B)
AL-PCS/WIN-E Settings for Dedicated Protocol 6
A) O
ther
- This setting is used for Dedicated Protocol communication.
B) Data Format -
From selecting the “Other” option, AL-PCS/WIN-E automatically sets the default communica­tion settings between the personal computer and the
Table 6.1: Default Communication settings
Parameter Communication Setting
Data Bit 8
Parity None
Stop Bit 1
Baud Rate 9600
Note: AL-PCS/WIN-E Version 2.00 or above is necessary for dedicated protocol functionality.
Settings for Com ports and message protocol.
2 Series Controller.
α
6 - 2
2 Simple Application Controllers
α
4 ) From the Option menu select the “Dedicated Communication.” option.
AL-PCS/WIN-E Settings for Dedicated Protocol 6
5 ) The Dedicated Communication dialog box will appear.
)
A
)
B
)
C
)
D
A) Station Number
Set the Station Number of the controller from 0 to 15. The default station is 0. Communication is possible to a single may have a station number higher than 0.
Setting range: 0 - 15
2 Controller when sending messages via RS-232. A networked α2
α
6 - 3
2 Simple Application Controllers
α
B) Communication Memory
The Communication Memory option allocates a section of the user-program memory for Communication Bit Devices or Communication Word Devices.
Table 6.2: Communication Memory usage
Communication
Bit Device
000
50 50 300
100 100 600
A maximum of 100 Function Block Bit Devices and 100 Function Block Words can be accessed. Total memory available to the user is 5000bytes with a 200 function block limit.
C) Communication Function Block Bit Device
Communication Word
Device
AL-PCS/WIN-E Settings for Dedicated Protocol 6
Memory Usage (bytes)
To Set a Communication Bit Device choose a number in the right hand “Communication Bit Device” block, then highlight the Function Block in the “FB to be Specified” box. Click on the “Set” button to match the Function Block to the data transmission address.
To release a Function Block, highlight the Function Block line in the right hand box and then press the “Release” button. The Communication Bit Device Number will be cleared.
The transmit data will show whether the Function Block output signal is On or Off. Function Blocks without outputs will not appear in the display.
Note:
No device can be chosen if the Communication Memory is specified as 0
.
6 - 4
2 Simple Application Controllers
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6
D) Communication Function Block Word Device
To set a Communication Word Device choose a number in the right hand “Communication Word Device” block, then highlight the Function Block in the “FB Word Output parameter to be specified” box. Click on the “Set” button to match the Function Block to the data transmission address.
To release a Communication Word Device, highlight the Parameter line in the right hand box and then press the “Release” button. The Communication Word Device will be cleared.
The transmit data will show the word value of the parameter chosen.
Function Block without Word parameters will not appear in the display.
Note:
No devices can be chosen if the Communication Memory is specified as 0
After the parameters are entered, the program must be downloaded to the controller and the power cycled before the Dedicated Protocol can be used. Cycling the power saves the settings
into the method (Not Use, Modem, GSM, Other) is changed.
2 internal EEPROM memory. Please cycle the power whenever the communication
α
.
6 - 5
2 Simple Application Controllers
α

6.2 Function Blocks

AL-PCS/WIN-E Settings for Dedicated Protocol 6
FB Name FB Symbol Description of Function Block Wo rd Device
Boolean
[BL]
Set/Reset
[SR]
0001
O2
P
3
LB
4
000
OSRP
RS
The Boolean Function Block uses Boolean algebra to control the ON/OFF state of an output. An operational expression consists of either the AND, OR, XOR or NOT form.
The Set/Reset Function Block either holds an output ON (set) or releases the output OFF (reset.) Priority can be given to either input pin if both inputs have been energised simultaneously. The default priority setting
-
-
is dedicated to the reset input pin.
Pulse
[PL]
000
OI P
LP
The Pulse Function Block sends a single pulse to the output pin if the input pin receives either an “ON to OFF”, “OFF to ON” or “ON to OFF And OFF to ON” input
-
operation.
The Alternate Function Block is used to reverse the ON and OFF state of the output
OI
as and when the input pin receives a signal. The output will be set ON when the input pin goes high and remain ON until the input
-
Alternate
[AL]
000
C
LA
receives the second rising edge.
Bit
Device
Delay
[DL]
One Shot
[OS]
Flicker
[FL]
Time
Switch
[TS]
000
000
000
000
The Delay Function Block provides an ON delay timer and an OFF delay timer. Time
OICP
intervals for either situation can be set. The
LD
time unit can be set to 10ms, 100ms or 1s increments.
Set ON Delay Current ON Delay Set OFF Delay Current OFF Delay
The One Shot Function Block awaits a signal supplied to the input pin thereafter setting the output according to the specified
OICP
time. The timing parameters control the
SO
state of the output (depending on the
Set One Shot Current One Shot
priority setting). The time unit can be set to 10ms, 100ms or 1s increments.
Cycle or Time
The Flicker Function Block changes the ON
OI P
and OFF state of the output according to a
LF
preset flicker time. The time unit can be set to 10ms, 100ms or 1s increments.
Current Cycle or Time ON Flicker Current ON Flicker OFF Flicker
Current OFF Flicker
OP
ST
The Time Switch Function Block uses a predefined time schedule to control the ON and OFF status of the output.
*1
6 - 6
2 Simple Application Controllers
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6
FB Name FB Symbol Description of Function Block Wo rd Device
The Time Switch maintenance Function Block uses a predefined time schedule to
O
control the ON and OFF status of the output. The function block can be setup from the TopMenu “Parameter” via the front
*1
Time
Switch m
[TSm]
000
P
TSm
panel keys.
The Counter Function Block increments the current value by one as and when the input pin receives a signal. When the current value reaches the set value the output is set ON. The counter current value is reset as
Count Current Count
Counter
[CN]
000
OICP
NC
and when the clear pin receives an input.
The Up/Down Function block positively or
U/D
Counter
[UD]
000U
OD
P
C
DU
P
negatively increments the counter until a set value is reached thereby setting the output ON. A preset signal can also equal the set value regardless of the current value for the function block and thereby setting
Up/Down Count Current Up/Down Count
the output ON.
The Compare Function Block monitors the current value of the input pin in relation to a
OI P
preset expression. The expression consists of =,>,>=,<,<= or <>. If the compared value satisfies the expression subsequently the
-
Compare
[CP]
000
PC
output pin is set on.
Bit
Device
Analog
Ouput
[AO]
Offset
Gain [OG]
Display
[DP]
Zone
Compare
[ZC]
Schmitt
Tr i g g e r
[ST]
M P
E
I P
I P
000
000
A
000
000
000
The Analog Output function takes a digital value input and delivers a corresponding
O
analog voltage or current to a selected channel on the AL2-2DA module.
--
The Offset Gain Function Block is based upon a linear function Y=A/B∗X+C to which
GO
the value obtained from an analog input (X:A01-A08) is set.
Gain Analog Value -
The Display Function Block is used as an interface between the user and the devices
PD
timer messages, user-defined messages
held within the controller. Current values,
--
can be read.
The Zone Compare Function Block
OI P
CZ
identifies whether the input value lies within a specified upper and lower limited zonal area and if so changes the status of the
-
output accordingly.
The Schmitt Trigger Function Block compares an input value to preset high and
OI P
TS
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.
6 - 7
2 Simple Application Controllers
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6
FB Name FB Symbol Description of Function Block Wo rd Device
The Hour Meter Function Block holds the
Hour
Meter
[HM]
000
OICP
MH
output status ON for a maximum of 32767 hours, 59 minutes and 59 seconds. If the input pin is turned OFF the elapsed time will hold its value until either the clear pin resets the time or the input pin is turned ON
Set Hour Current Hour Set Minute
Current Minute again.
The Speed Detect Function Block is used to count the incoming pulses max. 20Hz (with an extension module max. of 1kHz) for a
OU
set period of time. The upper and lower lim­its can be set from -32768 to +32767 and the Period interval’s set range is 1 to 32767
Current Period
Speed
Per iod
Speed Detect
[SPD]
000
I
P
C
PS
D
in 10ms increments.
The Pulse Width Modulation Function Block changes the output status according to a set period of time with a minimum of 100ms and a maximum of 3276700ms in increments of 100ms. The percentage duty for the function controls the amount of
Current Period
Per iod
PWM
[PWM]
000
P
W
POIM
elapsed time before the output status is changed.
The PID Function Block is the AL2 implementation of PID, a method used to obtain stable control over a system variable. It is equipped with an Auto-tuning function, which automatically adjusts the Function
Manipulated Value
Error Code
PID
[PID]
000
E
OA
P
C
IP
D
Block parameters for the specific applica­tion.
The Alternate Function Block is used to reverse the ON and OFF state of the output
Retentive
Alternate
[RAL]
000
C
LA
R
as and when the input pin receives a signal. The output will be set ON when the input
OI
pin goes high and remain ON until the input receives the second rising edge. When the
-
power is turned OFF the function block will use the last alternation operation to control the output.
Bit
Device
Addition
[ADD]
Subtrac-
tion
[SUB]
Multiplica-
tion
[MUL]
000
P
000
P
000 P
DAOID
USOIB
UMOIL
The ADD Function Block is used to summate two input values
The SUB Function Block is used to subtract two input values.
The MUL Function Block is used to multiply two input values.
Sum
Difference
Product
6 - 8
2 Simple Application Controllers
000I
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6
FB Name FB Symbol Description of Function Block Wo rd Device
000
Division
[DIV]
Calcula-
tion
[CAL]
P
000 P
IDOIV
ACOIL
The DIV Function Block is used to divide two input values.
The CAL Function Block is used to perform a calculation from the combination of different Arithmetic function blocks.
Quotient
Remainder
Result
This Shift Function Block is used to transfer
Shift
[SFT]
SMS
[SMS]
OT S R
000 P
F
MSOIS
TS
the Shift Input status just before the Input signal is set ON.It has a bit input pin, a shift input pin, a set input pin, a reset input pin and a bit output pin.
The GSM SMS Function Block sends the LCD screen as a SMS message to either a mobile phone handset or an E-mail account for remote maintenance purposes.
-
Current Status
Bit
Device
Short
Message
Receiving
[SMR]
Short
Message
Receiving m
[SMRm]
Call
Detect
[CD]
Call
Detect m
[CDm]
000
OERP
SMR
The Short Message Receive Function Block searches for the occurrence of a command in the SM. In case the command text is exactly included in the SM, outputs are changed.
Word Output
The Short Message Receive maintenance
000
RS
MPm
OE
R
Function Block searches for the occurrence of a command in the SM. In case the com­mand text is exactly included in the SM, outputs are changed. The function block can be setup from the TopMenu "Parame-
Word Output
ter" via the front panel keys.
000
OERP
CD
The Call Detect Function Block in case the numbers of digits of both phone numbers and the phone numbers itself are equal, the CD Function Block output is switched on.
-
The Call Detect Function Block in case the
000
OE
P
R
mC
D
numbers of digits of both phone numbers and the phone numbers itself are equal, the CD Function Block output is switched on. The function block can be setup from the TopMenu "Parameter" via the front panel
-
keys.
Random
One Shot
[ROS]
000 P
C
OROIS
The Random One Shot Function Block emits a random length single pulse to the output.
Random One Shot Cur Random One Shot
6 - 9
2 Simple Application Controllers
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6
FB Name FB Symbol Description of Function Block Wo rd Device
Delayed
One Shot
[DOS]
Delayed
Alternate
[DAL]
000
P
C
ODOIS
000 P
C
ADOIL
The Delayed One Shot Function Block emits a single pulse after a controlled delay to the output.
The Delayed Alternate Function Block alternates the status of the output with each pulse after a controlled delay.
One Shot Current One Shot Delay Current Delay
Delay Current Delay
The Set/Reset Function Block either holds an output ON (set) or releases the output
Retentive
Set/Reset
[RSR]
000 P
R
SR
R
OFF (reset.) Priority can be given to either input pin if both inputs have been
OS
energised. The default priority setting is dedicated to the reset input pin. When the
-
power is turned OFF the function block will use the last set or reset operation to control the output.
The Control Display Function allows the
Control Display [ CDP ]
-
user to control the LCD image screens. The fucntion block can only be set in AL-PCS/
α
Win-E software for
Series Controllers.
When control bit N04 in ON, it is possible to
--
control the displayed User Screen.
Bit
Device
Connect
[ _B ]
System
Outputs
The Connect function block is an internal device used to show the memory used by
00
0
B_
input bits, system bits, AS-interface bits, and the operational keys. No function block
OI
appears on screen or is shown 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.
-
Control for external devices through relays and transistors.
--
Note: 1 ) Communication Word Devices will only appear if new settings are created using AL-PCS/
WIN-E. New settings cannot be created using dedicated Protocol, hence, only modification of time switch settings is possible.
6 - 10
2 Simple Application Controllers
α
AL-PCS/WIN-E Settings for Dedicated Protocol 6

6.3 Settings for Dedicated Protocol - Front Panel Keys

The α2 Controller must be set up to use the Dedicated Protocol. The settings can be performed from the front panel keys or downloaded from the VLS software. The VLS settings
are the simplest and most convenient method to enter the required settings but they can also take place from the front panel.
After the settings are changed in the controller, the power MUST be cycled for the Dedicated Protocol settings to take effect.

6.3.1 Top Menu Setting/Serial Com Settings

In the α2 Controller Top Menu, please scroll to the “Others/Serial Com” option shown at right. To use Dedicated Protocol, the “Other Com”
setting must be chosen.

6.3.2 The “Other Com” Settings

Parameters for ComFormat, Station No., and Link Block can be set in this option. These settings provide the complete range of options available to set with the front panel keys.

6.3.3 The Comformat (Communication Format)

The ComFormat dialog will allow the user to set the communication settings for Datalength, Parity, Stop Bit, Baudrate and includes a setting for default values.
Scroll to the setting to be input or changed.

6.3.4 Data Length

Change the Data Length send parameter to be 7 bits or 8 bits.
Choose 8bits for Dedicated Protocol communication.
Se r i a l Co
No t Us e Modem GSM Other
Othe Co
ComFo r ma t Sta t i on oN
Link bl kco
ComFo r ma t
Da t aLeng t
Pa r i t y Stop bi t Baudr a t e
De f a l tu
Da t aLeng t h
8bits 7bits
Com
rm
m
h

6.3.5 Parity

Select from three settings for Parity - None, Odd or Even.
Choose None for Dedicated Protocol communication.

6.3.6 Stop Bits

Choose the number of stop bits - 1 bit or 2 bits.
Choose 1 bit for Dedicated Protocol communication.

6.3.7 Baud Rate

Choose the baudrate from 300, 600, 1200, 2400, 4800, 9600, 19200bps
Choose 9600bps for Dedicated Protocol communication.
Pa r i t y
Non
e
Odd
Eve
n
Stop b t
1b iit 2b i t s
Baudra e
240 bp 480 bps0
960 bps0
t
0s
6 - 11
2 Simple Application Controllers
α

6.3.8 Default

The default values are DataLength = 8 bits; Parity = None; Stop Bit = 1 bit; and Baud Rate = 9600 bps.

6.3.9 Station Number

AL-PCS/WIN-E Settings for Dedicated Protocol 6
Set the Station Number of the controller from 0 to 15. The default station is 0.
Communication is possible to a single messages via RS-232. A networked PLC might have a station number higher than 0.

6.3.10 Link Block

The Link Block setting specifies the amount of Function Block data that can be used in the Dedicated Protocol. The data for the three options is given in the table below.
Table 6.3: Link Block Settings
Link
Number
00 0
150 50
2 100 100
Note The user must not change the memory allocation for Communication BIT/WORD device during the computer link operation, otherwise, the settings created in the VLS software will be deleted.
Communication
Bit Devices
2 Controller when sending
α
Communication
Word Devices
Oth r C
Sta t i
Oth r C moe
Lin l kokb c
on No
No . 0
2
moe

6.3.11 Function Block Bit and Word Data

The Function Block data must be given addresses in memory for the Dedicated Protocol command string. The addresses can only be set in the VLS software.
6 - 12
2 Simple Application Controllers
α

7. The Command String

The following chapter explains the structure of both types of dedicated protocol format for the
2 Series Controller. The 8-bit binary protocol is available in two different formats:
α
1 ) Format A 2 ) Format B
The Command String 7
The Dedicated Protocol is based on a PC or Peripheral device sending messages to the controller and in return receiving replies to those commands. The string of data that
accomplishes these tasks is called the Command String. The Command String can be used to check the communication line, read/write from/to internal bit/word data, perform remote Run/ Stop operation with the controller, and to edit Time Switch data. The data contained in the Command String varies with the type of action to be accomplished.
Two formats have been designed to carry the data - Format “A” for simple Communication line checks and Format “B” for the more involved data processing instructions. The information to construct and read Command Strings is explained in this chapter.
Communication between the computer and the interrupts. The Transmit/Receive process is completed after the last operation has been
completed in the Function block sequence order. Refer to the Communication Timing section for further information concerning response delay time.
Notes:
Communication requirements
a ) Power to the
b ) Switching the Serial Com mode to Dedicated Protocol. Using the front panel keys select
“Serial Com” from the “others...” menu. Select “Other Com” then proceed to cycle the power to accept the setting. Or, using AL-PCS/WIN-E please refer to Chapter 6.
2 Series Controller
α
2 Series Controller is handled using
α
α
2
Communication Settings
a ) Baud Rate: 9600bps
b ) Datalength: 8bits
c ) Parity: None
d ) Stop bit: 1
e ) Synchronous method: Half-Duplex
f ) Framing, Overrun or communication errors will occur if the default communication
dedicated protocol setting have not been entered. Using the front panel keys, select “Serial Com” from the “others...” menu. Select “Other Com” and adjust the “ComFormat, Station No. and Link Block” accordingly. Refer to Chapter 6 for detailed information concerning Front panel screen. However, the user can also set the default communication dedicated protocol settings from the VLS software.
7 - 1
2 Simple Application Controllers
α
Section 7.1 and 7.2 describe protocol elements used with Format A and B. Refer to section 7.3 for detailed explanation concerning all dedicated protocol elements within both types of
formats. Refer to section 7.6 for detailed information concerning

7.1 Format “A”

Table 7.1: 1.1 Format A message structure
Control Protocol
The Command String 7
2 Series Commands.
α
S T X
Computer
α
2 Controller
LINE CHECK
Format A LINE CHECK mode
E
bytes
No. comm
Format No.
FORMAT A
No. of Communication bytes
N Q
Station No.
S T X
S T X
Control Code
No. comm
No. comm
bytes
bytes
or
Format No.
Format No.
A C K
Station No.
N A K
Station No.
Error Code
Format No.
Station No.
Control Code
7 - 2
2 Simple Application Controllers
α

7.2 Format “B” Message

Table 7.2: Format B message structure
Transmit
The Command String 7
Control Protocol
READ
Computer
α
2 Controller
Receive
Transmit
S T X
S
T
X
S
T
X
No. comm
No. comm
No. comm
bytes
bytes
bytes
No. of
devices
Command
Station No.
Format No.
S T X
Station No.
Format No.
or
Format No.
Station No.
Complete flag
N A K
Error Code
(LB)
Device No.
Device code
bytes
No. comms
E T
(HB)
X
Device No.
Format No.
(LB)
(HB)
Sum check
Sum check
E
No. of
devices
Command
Station No.
T
X
Device status
(LB)
(HB)
Sum check
Sum check
Receive
WRITE/(RUN/STOP) OPERATION
Computer
α
2 Controller
S T X
S
T
X
S
T
X
No. comm
No. comm
No. comm
bytes
bytes
bytes
Format No.
Station No.
Format No.
or
Station No.
Format No.
No. of devices
S T X
Complete flag
N A K
Error Code
FORMAT B
Command
Station No.
(LB)
(HB)
Device No.
Device No.
Device code
bytes
No. comm
Format No.
E T X
Device status
A C K
Startion No.
(LB)
(HB)
Sum check
Sum check
7 - 3
2 Simple Application Controllers
α
Note: 1 ) Format B WRITE/(RUN/STOP) operation can produce an error code even though a
standard complete flag has been sent. If the Transmit message contains the correct syntax then a complete flag will be sent, however, if the reply data is corrupt then a NAK message will be generated.
2 ) The write message string is intended for BIT data accessing, therefore, only one byte has
been allocated to the Device Status setting. To write to WORD data, 2 bytes must be allocated to the Device setting. Thus, caution in setting the No. of communication bytes and the sum code check must be taken.
Read/Write operation for Format B follows a different structure to Format A. Format B uses a more complex string to access internal devices. However, the write operation contains the Device Status parameter used to indicate the ON/OFF state of the intended device.
Time Switch settings follow Format B protocol, however, the structure and content of the string differs from the standard READ/WRITE mode operation. Refer to section 7.6.5 for further detailed information concerning Time Switch settings for Format B. Format B READ Mode Format B WRITE mode (BIT)
The Command String 7
Control Code
No. of Communication bytes
Format No.
Station No.
Command
No. of devices
Device Code
Device N o. (LB)
Device N o. (H B )
Control Code
Control Code
No. of Communication bytes
Format No.
Station No.
Command
No. of devices
Device Code
Device N o. (LB)
Device N o. (H B )
Device Status
Sum Check (LB)
Sum Check (HB)
Control Code
Sum Check (LB)
Sum Check (HB)
7 - 4
2 Simple Application Controllers
α

7.3 Control Protocol elements

The following section will explain the control elements used in the α2 Series Dedicated protocol Transmit/Receive message. Refer to section 7.6 for detailed information concerning
the commands available with this protocol.
Table 7.3: Format A and B protocol elements
Control Element Description Section
The Control codes are one byte hexadecimal
1) Control Codes
ASCII representation of standard protocol terminology.
The Command String 7
7.3.1
2) No. Communication Bytes
3) Format No.
4) Station No.
5) Command
6) No. of Devices
7) Device Code
8) Device No.
9) Device Status
10) Sum Check
11) Error Code
Standard number of bytes in one transmit/ receive message.
Format number used to identify Format A or Format B type protocol message.
Assigned station number for controller identification.
Read, Write or Remote RUN/STOP operation are declared as the commands.
Total number of internal devices or I/O that are to be read/written from/to the controller.
Each individual internal device has been given a device code. The single byte code cannot be changed from original default setting.
Head address of the internal device or I/O being read or written from/to the controller.
Available only to Transmit message in write mode for Format B and reply sent from the controller when in Read mode for Format B.
Sum check used to verify that the data in a message has not been corrupted.
Specific error coded relating to either sum check, protocol, device or remote error.
7.3.2
7.3.3
7.3.4
7.3.5
7.3.6
7.3.7
7.3.8
7.3.9
7.3.10
7.3.11
The
2 Series Controller is not a ASCII generated format, but comprised of a 8-bit binary
α
structure.
7 - 5
2 Simple Application Controllers
α

7.3.1 Control Codes

The Control codes are listed below:
Table 7.4: Control Codes
The Command String 7
Signal
STX 02H
ETX 03H
ENQ 05H
ACK 06H
NAK 15H
! 21H Completion
Code (Hex)

7.3.2 No. of Communication Bytes

The number of communication bytes is used to check the validly of the message syntax. When using Format A the number of communication bytes for the Transmit message starts from the Format No. and finishes with the ENQ control code. The number of communication bytes for a Receive message starts from the Format No. and finishes with the ACK control code. In the situation of receiving an error message the number of communication bytes for a Receive message starts from the Format No. and finishes with the appropriate error code.
Format A Type - Line Check
Description
S
tart of TeXt
E
nd of TeXt
ENQ
uiry
ACK
nowledge
N
egative AcKnowledge
Computer
2 Controller
α
S T X
bytes
No. comm
03H
03 = 01 + 01 + 01
Format No.
E N Q
Station No.
(bytes)
S
T
X
S
T
X
bytes
No. comm
Station No.
No. comm
bytes
or
Format No.
Format No.
Station No.
03H
03 = 01 + 01 + 01 (bytes)
04H
04 = 01+01 + 01 (bytes)+01
A C K
N A K
Error Code
7 - 6
2 Simple Application Controllers
α
The Command String 7
Read message command
- When using Format B the number of communication bytes starts
from the Format No. and finishes with the Higher Byte of the Device No.
Write message command
- When using Format B the number of communication bytes starts
from the Format No. and finishes with the Device Status of the last device.
Run/Stop command -
When using Format B the number of communication bytes starts from
the Format No. and finished with the RUN/STOP command.
Received message command
- When using Format B The number of communication bytes starts from the Format No. and finishes with the! completion control code. The number of commutation bytes for the response data message starts from the Format No. and finishes with the Device Status.
Error message command
- When using Format B the number of communication bytes starts from the Format No. and finishes with the appropriate error code. Format B Type - READ message
Computer
α
2 Controller
S T X
bytes
No. comm
Station No.
07H
07 = 01 + (bytes)
Format No.
01 + 01 + 01 + 01 + 01 + 01
Command
No. of
01H
devices
(LB)
Device No.
Device code
(HB)
Device No.
E
T
X
(LB)
(HB)
Sum check
Sum check
S T X
S T X
The maximum number of Communication Bytes for a given message is 250 bytes. Refer to section 7.3.6 for further details for maximum devices to be accessed.

7.3.3 Format Number

The Format number is used to differentiate format type. Either Format A or Format B is used for the intended task.
Table 7.5: Format Type command
S
bytes
No. comm
Station No.
03H
03 =
04H
04 = 01 + 01 +
Format No.
01 + 01 + 01 = 01 + 01 + 01 + 01 + 01
or
bytes
No. comm
Format No.
Complete flag
N A K
Station No.
01 + 01 (bytes)
T X
Error Code
No. comm
05H
05
bytes
Station No.
Format No.
Command
No. of
01H
E
devices
T
X
Device status
(bytes)(bytes)
(LB)
(HB)
Sum check
Sum check
Format Type Instruction Command
Format A 40
Format B 41
7 - 7
2 Simple Application Controllers
α

7.3.4 Station Number

The personal computer and α2 (AL2-14MR-*, AL2-24MR-*) Series Controller follow as a master/slave relationship. All communication is initiated from the personal computer.
The station number set in the controller must match the station number in the command string. If the station number conflict, then a reply message will not be sent from the controller.
Computer
The Command String 7
RS-232C
AL2-GSM-CAB
RS-232C Interface
The
2 (AL2-14MR-*, AL2-24MR-*) Series Controller Version 1.00 is equipped with an RS-
α
232C interface, thus a 1:1 relationship can be achieved. A maximum of 00-0F(hex) can be set for the controller.

7.3.5 Command

The command defines if the type of transmission will be a Read/Write Command or a Remote Run/Stop command.
Table 7.6: Instruction Command Setting
Note: *1 The run/stop operation via dedicated protocol follows format B. However, number of
devices, device number and device code is not used as it is replaced by either of the following:
Table 7.7: RUN/STOP command code
Command
Read 00H Write 01H
Run/Stop
RTC Read
RTC Write
Display Read
Operation Hex Code
STOP 00H
*1
*2
*2
*3
RUN 01H
Command Code
Number (Hex)
10H
20H
21H
30H
Station No. 00
Refer to section 7.6.4 for detailed information concerning the command structure.
*2 Ver. 2.20 or later *3 Ver. 3.00 or later
7 - 8
2 Simple Application Controllers
α

7.3.6 Number of Devices

The Number of Devices is restricted by total number of Communication Bytes. The Transmit/ Receive data message contains a maximum of 250 bytes. Thus, caution must be taken when reading BIT/WORD data. Refer to the Note below for detailed caution information. Format B - READ message
The Command String 7
Computer
α
2 Controller
S T X
S T
X
S T
X
No. comm
No. comm
No. comm
bytes
bytes
bytes
Station No.
Format No.
Station No.
Format No.
or
N A K
Station No.
Format No.
No. of
devices
Command
02H
02 = +
S
T
X
Complete flag
Error Code
Device code
No. comm
Device No.
bytes
(LB)
(HB)
Device No.
*1
Station No.
Format No.
(LB)
Device No.
Device code
*1
01
No. of
Command
02H
E T
(HB)
X
Device No.
(devices)01
devices
Device status
(LB)
(HB)
Sum check
Sum check
E T X
Device status
(LB)
(HB)
Sum check
Sum check
Note: Format B cautions 1 ) READ Message - BIT data
The maximum number of BIT devices that can be read at any one time is restricted by the maximum number of communication bytes (250 bytes) contained in a single message. Each device is represented by the Device code, Device No, (LB) and Device No. (HB).
(Max No. of Comm. bytes - (Format No. + Stat No. + Command + No. of Devices)) / (Device code + Device No(LB) + Device No. (HB)) = (250 - 4) / 3 = 246 / 3 = 82
Therefore, the user can read 1 - 82 BIT devices at any one time.
2 ) READ Message - WORD data
The maximum number of WORD devices that can be read at any one time is restricted by the maximum number of communication bytes (250 bytes) contained in a single message. Each device is represented by the Device code, Device No, (LB) and Device No. (HB).
(Max No. of Comm. bytes - (Format No. + Stat No. + Command + No. of Devices)) / (Device code + Device No(LB) + Device No. (HB)) = (250 - 4) / 3 = 246 / 3 = 82
Therefore, the user can read 1 - 82 WORD devices at any one time.
7 - 9
2 Simple Application Controllers
α
3 ) WRITE Message - BIT data
The maximum number of BIT devices that can be written at any one time is restricted by the maximum number of communication bytes (250 bytes) contained in a single message. Each device is represented by the Device code, Device No, (LB), Device No. (HB) and Device Status (1byte).
(Max No. of Comm. bytes - (Format No. + Stat No. + Command + No. of Devices)) / (Device code + Device No(LB) + Device No. (HB) + Device Status) = (250 - 4) / 4 = 246 / 4 = 61
Therefore, the user can write 1 - 61 BIT devices at any one time.
4 ) WRITE Message - WORD data
The maximum number of WORD devices that can be written at any one time is restricted by the maximum number of communication bytes (250 bytes) contained in a single mes­sage. Each device is represented by the Device code, Device No, (LB), Device No. (HB), Device Status (LB) (1byte) and Device Status (HB) (1byte).
(Max No. of Comm. bytes - (Format No. + Stat No. + Command + No. of Devices)) / (Device code + Device No(LB) + Device No. (HB) + Device Status(LB) + Device Sta­tus(HB)) = (250 - 4) / 5 = 246 / 5 = 49
Therefore, the user can write 1 - 49 WORD devices at any one time.
5 ) Time Switch READ Message.
The READ operation of a Time Switch settings follows the identical structure to reading a Communication Word device in Format B. The maximum number of Time Switch devices that can be read at any one time is restricted by the maximum number of communication bytes (250 bytes) contained in the reply message.
(Max No. of Comm. bytes - (Format No. + Stat No. + Command + No. of Devices)) / (RTC0 + RTC1 + RTC2 + RTC3) = (250 - 4) / 4 = 246 / 4 = 61
Therefore, the user can read 1 - 61 Time Switch settings at any one time. Refer to section 7.6.5 for further infromation concerning Time Switch settings.
The Command String 7
6 ) Time Switch WRITE Message
The maximum number of Time Switch devices that can be read at any one time is restricted by the maximum number of communication bytes (250 bytes) contained in a sin­gle message. Each device is represented by the Device code, Device No, (LB), Device No. (HB), RTC+0, RtTC+1, RTC+2 and RTC+3.
(Max No. of Comm. bytes - (Format No. + Stat No. + Command + No. of Devices)) / (Device code + Device No(LB) + Device No. (HB) + RTC0 + RTC1 + RTC2 + RTC3) = (250 - 4) / 7 = 246 / 7 = 35
Therefore, the user can write 1 - 35 Time Switch settings devices at any one time. Refer to section 7.6.5 for further infromation concerning Time Switch settings.
A mixture of Time Switch, BIT and WORD data can be sent via one Transmit mes­sage.
7 - 10
2 Simple Application Controllers
α

7.3.7 Device Code

Each type of Bit or Word Device has a device code which corresponds to a memory location in the
2 series controller. Locations for the System Bits, Inputs, Outputs, Keys, Link Input, and
α
Link Output are permanent but the Function Block settings (Communication Bit and Word Devices) must be set in the “Options/Dedicated Communication” dialog box in the VLS software. Remember to set aside some memory in the same dialog box for these devices. Refer to section 6.1 for VLS settings.
Table 7.8: Device Code and Access Data
Device Name
System Bit (M) 40 1 - 24 00 01 - 00 18 Yes No
Input Terminal (I) 41 1 - 15 00 01 - 00 0F Yes Yes
External Input (EI) 41
Output Terminal (O) 42 1 - 9 00 01 - 00 09 Yes Yes
External Output (EO) 42
Key Input (K) 44
Link Input (E) 45 1 - 4 00 01 - 00 04 Yes Yes
Link Output (A) 46 1 - 4 00 01 - 00 04 Yes Yes
Control Device (N) 47 1 - 4 00 01 - 00 04 Yes Yes
Analog In 61 1 - 8 00 01 - 00 08 Yes No
Communication Bit Device (CB)
Communication Word Device (CW)
Device Code
(Hex)
48
69
Device Range
(Decimal)
129 - 132
129 - 132
1 - 8
1 - 100
1 - 100
*1
*2
*5
*4
*4
The Command String 7
Device Range
(Hex)
(HB LB)*3
00 81 - 00 84 Yes Yes
00 81 - 00 84 Yes Yes
00 01 - 00 08 Yes Yes
00 01 - 00 64 Yes Yes
00 01 - 00 64 Yes Yes
Read
Access
Write
Access
Note: *1 The settings for the
2 controller input extension boards: Where EI 01-04 for AL2-4EX
α
and AL2-4EX-A2 are 129 - 132 respectively.
*2 The settings for the
2 controller output extension boards: Where EO 01-04 for AL2-4EYR
α
and AL2-4EYT are 129 - 132 respectively.
*3 Each hexadecimal value is represented by a HB and LB. Where HB is the higher byte and
LB is the lower byte.
*4 The full 100 data range can only be accessed if the appropriate memory has been
allocated from either the front panel keys or VLS software.
*5 key input numerical order
Input No. (hex)
0001 “OK” 0002 “ESC” 0003 “+” 0004 “-”
0005
0006
0007
0008
Key
“”
“”
“”
“”
7 - 11
2 Simple Application Controllers
α

7.3.8 Device Number

The Device Number is used in conjunction with the Device Code. Once the Device has specified what the internal device represents, then the Device Number is used to select the appropriate device from the range mentioned above. Each Device Number is comprised of 2 bytes: Lower byte (LB) Higher byte (HB) Example - The user wants to check the status of Input 11. Converting input 11 to a four digit Hexadecimal number 00 0B. The Higher Byte (HB) = 00. The Lower Byte (LB) = 0B. Thus, the user will enter the Device Code followed by 0B 00 to read/write data from/to Input 11.

7.3.9 Device Status

1 ) BIT Device - A single byte is allocated to the Device Status when used for both READ and
WRITE operations.
Table 7.9: Byte representation of the BIT status
The Command String 7
State Device Status (Hex)
ON 01
OFF 00
2 ) WORD Device - Two bytes are allocated to the Device Status when used for both READ
and WRITE operations. Therefore, both the lowerbyte (LB) and Higherbyte (HB) of the device status when used in conjunction with a WORD application can allow the user to enter a maximum value of: 32767 (decimal) and minimum value of -32768 (decimal). The counter function block has a minimum value of 0 and the PWM function block has a minimum value of Period Time.
7 - 12
2 Simple Application Controllers
or
STX
STX
ETX
No. comm
bytes
03H
Format No.
40H
Station
No.
00H
Complete
flag
21H
No. comm
bytes
05H
Format No.
41H
Station
No.
00H
Command
00H
No. of
devices
01H
Device
status
00H
Sum check
(LB)
42H
Sum check
(HB)
00H
41H+00H+00H+01H+00H
STX
NAK
Format No.
Station No.
STX
Error Code
No. comm
bytes
04H
Sum Check = 00 42 H
Lower byte
Higher byte
α

7.3.10 Sum Check

The Sum Check is the four digit Hexadecimal total of the numbers between the Format No. and the ETX command. The Sum Check numbers are Hexadecimal numbers with the Lower byte written directly after the ETX command and the Higher byte as the last two digits in the Command String. The Sum check is used to verify the validity of the message. Format B - READ message
The Command String 7
Computer
α
2 Controller
S T X
bytes
No. comm
07H
41H
41H+00H+00H
Format No.
Station
00H
No.
00H
No. of
Device
devices
Command
01H
42H
+01H+42H+01H+00H
code
01H
(LB)
Device No.
Device No.
00H
E
(HB)
T X
Higher byte Lower byte
(LB)
Sum check
Sum check
85H
00H
Sum Check = 00 85 H
(HB)
7 - 13
2 Simple Application Controllers
α

7.3.11 Error Codes

If there is a problem in the communication line or in the command string, the α2 controller will return an error message. The error message will follow an NAK reply as shown below.
Table 7.10: Error Codes for Format “A” Transmissions
Code Error Error Description
01H Sum Check error There is an error in the Sum Check value used in Protocol Format “B”.
02H Protocol error
03H Device error
04H Remote error
05H Date/Time error The Date or Time is invalid.
The Command String 7
There is a discrepancy in the number of communication bytes in the message.
Command for READ, WRITE or RUN/STOP operation is incorrect.
The data stored in the device specification is outside the device range.
The Device Status setting value in out of the intended devices’s range
The write protection for the memory cassette is enabled.
There is a problem in the remote Start/Stop operation. Usually the cause of this error is an error in the controller program.
7 - 14
2 Simple Application Controllers
α

7.4 Communication Timing Chart

The communication time for α2 Series dedicated protocol is represented by the diagram below. The communication time is identical for Read and Write operations. Thus, only one
diagram has been used to demonstrate the possible delaytimes for sending and receiving 8-bit binary messages.

7.4.1 Read/Write Data from the Controller

Format B READ/WRITE operation
The Command String 7
Computer
α
2 Controller
STX
02H
T
ETX
03H
0

7.4.2 Communication Time

The calculation performed below are a guide to the approximate communication timing for dedicated protocol.
T0,T1,T2 = 1/Baud Rate x No. of bits in 1 character x No. of Characters = 1/9600 x [1 (Startbit) x 8 (datalength) x 0 (parity none) x 1 (stopbit] x No. of characters
21H
!
STX
02H
STX
02H
Tw TP T
T1
03H
2
Communication Line
ETX
Time Chart Line
TP = Process Time *1
maximum time of 2.5s
Tw = 5ms + maximum of 1 scan time
maximum time of 2.5s
Note: *1 Process Time - Represents the duration needed for the
2 Series Controller to process
α
with either READING the intended device or WRITING to the intended devices specified in the Command String. 1scan time + 5ms is the minimum time used for the Process Time.
7 - 15
2 Simple Application Controllers
α

7.5 Character Area Data Transmission

The Data Transmission area is the important segment of the message that the user must address correctly in order to read/write the from/to the address all internal devices is identical, Refer to section 7.3.7 for respective device codes.

7.5.1 Read Data Transmission

The READ Data Transmission area is identical in reading BIT or WORD information.
Format B - READ Message
Data Transmission
The Command String 7
2 Series Controller. The procedure to
α
S T X
bytes
No. comm
Format No.
No.
Station
Command
No. of devices
Data Transmission
Device No.
Device code
(LB)
E T
(HB)
X
Device No.
(LB)
(HB)
Sum check
Sum check
Example - READ Message
Data Transmission
(LB)
devices
41H
Device
code
Device No.
0CH
No. of
01H
Data Transmission
(HB)
Device No.
00H
Table 7.11: Data Transmission explained
Control
element
No. of devices 01H There is only one intended device to be READ from the controller
Device Code 41H The device code is for the Input Device.
Device No. (LB) 0CH
Device No. (HB) 00H
Hex Description
The lower byte in conjunction with the higher byte indicates Input 11 is the intended device.
The higher byte in conjunction with the lower byte indicates Input 11 is the intended device.
7 - 16
2 Simple Application Controllers
α

7.5.2 Write Data Transmission

The WRITE Data Transmission area is different in reading BIT and WORD information. The following illustration demonstrates the format structure for writing BIT data. The device status is a single byte.
BIT Data
Format B - WRITE Message - BIT data
The Command String 7
Data Transmission
Device status
E T X
(LB)
(HB)
Sum check
Sum check
S
T
X
bytes
No. comm
Format No.
No.
Station
Command
Device code
No. of devices Data Transmission
(LB)
(HB)
Device No.
Device No.
Example - WRITE Message - BIT data
Data Transmission
(LB)
Device No.
00H
(HB)
01H
Device
status
No. of
01H
code
Device
devices
Data Transmission
48H
Device No.
04H
Table 7.12: Data Transmission explained
Control element Hex Description
No. of devices 01H
Device Code 48H The device is from the Communication BIT Range.
Device No. (LB) 04H
Device No. (HB) 00H
Device Status 01H The Communication BIT device will be turned ON.
There is only one intended device to be WRITTEN to the controller
The lower byte in conjunction with the higher byte indicates Communication Word device 4 is the intended device.
The higher byte in conjunction with the lower byte indicates Communication Word device 4 is the intended device.
7 - 17
2 Simple Application Controllers
α
The following illustration demonstrates the format structure for writing word data. Writing word data requires the Device Status to contain a lower and higher byte, therefore, the data transmission area is extended by one byte when writing to WORD data
WORD Data
Format B - WRITE Message - WORD data
The Command String 7
Data Transmission
S T X
bytes
No. comm
Format No.
No.
Station
Command
Data Transmission
No. of devices
Device code
(LB)
Device No.
E T
(HB)
X
Device No.
(LB)
(HB)
Sum check
Sum check
Example - WRITE Message - WORD data
Data T ransm ission
(LB)
devices
69H
Device
code
Device No.
04H
No. of
01H
Data T ransm ission
Device No.
00H
(HB)
2BH
Status
Device
Device
12H
Status
Table 7.13: Data Transmission explained
Control element Hex Description
No. of devices 01H There is only one intended device to be READ from the controller
Device Code 69H The device is from the Communication Word Range.
Device No. (LB) 04H
Device No. (HB) 00H
Device Status (LB) 2BH
Device Status (HB) 12H
The lower byte in conjunction with the higher byte indicates Communication Word device 4 is the intended device.
The higher byte in conjunction with the lower byte indicates Communication Word device 4 is the intended device.
The lower byte in conjunction with the higher byte indicates a value of 4651 decimal
The higher byte in conjunction with the lower byte indicates a value of 4651 decimal
7 - 18
Loading...