table of contentsmedia.klinkmann.ee/catalogue/content/data_en...vision oplcs and modems vi cable...

103
v Table of Contents About Modems and Unitronics OPLCs ................................................................ 7 Before you begin: Modem Tips....................................................................... 7 Modem Connection and Pinouts ..................................................................... 9 Connecting a Controller to a Modem ............................................................... 9 Modem to Controller Interface (DCE to DTE) ................................................... 9 Using Modem Kits ...................................................................................... 10 Using a Unitronics Adapter .......................................................................... 11 Constructing Adapters ................................................................................ 11 PC-Side Modems (Modem Services) ................................................................ 13 Initializing a PC-side Modem (Prepare Modem) .............................................. 13 Modem Service Options .............................................................................. 14 How to use the PC modem to access a PLC ................................................... 15 PLC-side Modems ......................................................................................... 17 How to enable a controller to communicate via landline or GSM/GPRS modem .. 17 How to enable a PLC to dial a remote modem (Ladder) ................................... 20 Landline modems ................................................................................... 20 How to terminate the link--Hang-up ............................................................. 21 Last Call, CLIP: Identifying Callers .................................................................. 23 The process............................................................................................... 23 The application .......................................................................................... 24 Preventing unauthorized calls ...................................................................... 24 Dial & Hang-up ............................................................................................ 27 Dialing from the Controller's Keypad ............................................................... 29 Initializing the COM port .......................................................................... 29 Building the Cursor ................................................................................. 30 Entering numbers: 'Convert' to ASCII ....................................................... 31 Placing entered numbers in the Phone Number vector ................................. 32 Dial and Hang-up ................................................................................... 33 Accessing a Networked PLC via PC .................................................................. 35 Accessing a Networked Controller via Modem ................................................ 35 Modems: Setting Up ................................................................................... 35 Online Test Mode & Remote Access........................................................... 37 COM Port/Modem Status, System Operands, & Error Messages .......................... 39 Modem Troubleshooting ................................................................................ 43 Cable Pin-out ......................................................................................... 45 Data Flow Direction ................................................................................ 45 RS-232 signal information ....................................................................... 45 Modem Troubleshooting Table ..................................................................... 46 Using Hyperterminal to check PC-PLC direct communications ............................. 49 Using Hyperterminal for COM Troubleshooting.................................................. 53 Modem Connections ................................................................................... 53 Vision OPLCs and Modems 3/2010

Upload: others

Post on 21-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

v

Table of Contents About Modems and Unitronics OPLCs ................................................................ 7

Before you begin: Modem Tips....................................................................... 7

Modem Connection and Pinouts ..................................................................... 9

Connecting a Controller to a Modem ............................................................... 9

Modem to Controller Interface (DCE to DTE) ................................................... 9

Using Modem Kits ...................................................................................... 10

Using a Unitronics Adapter .......................................................................... 11

Constructing Adapters ................................................................................ 11

PC-Side Modems (Modem Services) ................................................................ 13

Initializing a PC-side Modem (Prepare Modem) .............................................. 13

Modem Service Options .............................................................................. 14

How to use the PC modem to access a PLC ................................................... 15

PLC-side Modems ......................................................................................... 17

How to enable a controller to communicate via landline or GSM/GPRS modem .. 17

How to enable a PLC to dial a remote modem (Ladder) ................................... 20

Landline modems ................................................................................... 20

How to terminate the link--Hang-up ............................................................. 21

Last Call, CLIP: Identifying Callers .................................................................. 23

The process ............................................................................................... 23

The application .......................................................................................... 24

Preventing unauthorized calls ...................................................................... 24

Dial & Hang-up ............................................................................................ 27

Dialing from the Controller's Keypad ............................................................... 29

Initializing the COM port .......................................................................... 29

Building the Cursor ................................................................................. 30

Entering numbers: 'Convert' to ASCII ....................................................... 31

Placing entered numbers in the Phone Number vector ................................. 32

Dial and Hang-up ................................................................................... 33

Accessing a Networked PLC via PC .................................................................. 35

Accessing a Networked Controller via Modem ................................................ 35

Modems: Setting Up ................................................................................... 35

Online Test Mode & Remote Access........................................................... 37

COM Port/Modem Status, System Operands, & Error Messages .......................... 39

Modem Troubleshooting ................................................................................ 43

Cable Pin-out ......................................................................................... 45

Data Flow Direction ................................................................................ 45

RS-232 signal information ....................................................................... 45

Modem Troubleshooting Table ..................................................................... 46

Using Hyperterminal to check PC-PLC direct communications ............................. 49

Using Hyperterminal for COM Troubleshooting.................................................. 53

Modem Connections ................................................................................... 53

Vision OPLCs and Modems 3/2010

Page 2: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

vi

Cable Pin-out ......................................................................................... 53

Data Flow Direction ................................................................................ 53

RS-232 signal information ....................................................................... 53

Using Hyperterminal ................................................................................... 53

Modem Commands..................................................................................... 56

Initializing the modem to SMS mode via Hyperterminal .................................. 57

When a controller sends an SMS text message .............................................. 57

'The Sniffer'--Viewing communication strings ................................................ 58

GPRS ............................................................................................................ 1

Using GPRS ................................................................................................. 2

Downloading OS via GPRS............................................................................. 3

FB Operations .............................................................................................. 3

Examples .................................................................................................... 3

GPRS Configuration ........................................................................................ 5

GPRS Register to Network ............................................................................... 7

GPRS Run ...................................................................................................... 9

Start Call, End Call ....................................................................................... 11

Start Call .................................................................................................. 11

End Call .................................................................................................... 11

Listen to Remote Device, Stop Listening to Remote Device ................................ 13

Listen ....................................................................................................... 13

Stop Listening ........................................................................................... 13

Unregister from Network ............................................................................... 15

Check Signal Quality ..................................................................................... 17

GPRS Operands & Status Messages ................................................................ 19

Using SMS Messaging ..................................................................................... 1

FB Operations .............................................................................................. 1

How to Configure, Receive, and Send Messages ............................................... 1

Examples .................................................................................................... 4

SMS: Configuration ......................................................................................... 5

Creating SMS Messages & Variables ............................................................... 5

Message Properties ...................................................................................... 7

Phone Book ................................................................................................. 8

SMS Configuration and the Program Scan ........................................................ 11

SMS: Scan ................................................................................................... 13

SMS: Send .................................................................................................. 15

SMS Variables .............................................................................................. 19

SMS: Check GSM Signal Quality ..................................................................... 21

Sending SMS messages from a GSM cell phone ................................................ 23

Writing SMS messages in your cell phone ..................................................... 23

Sending the message to the PLC .................................................................. 23

Checking that the PLC has received the SMS message .................................... 23

Index .......................................................................................................... 25

Page 3: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

About Modems and Unitronics OPLCsUnitronics' controllers can be hooked up to PSTN (landline), or GSM/GPRS modemsvia the RS232 COM port. Unitronicsbeen tested by Unitronics and are supported for use with Vision, Jazz, and M90/91PLCs.

You can link a Vision PLC to a modem and enable it to communicate data using:

MODBUS (serial) commands.VisiLogic's Communication Protocol FB, which enables Vision controllers to communicate data with most external serial devices, such as barand frequency converters, via their proprietary protocols.SMS messages. The SMS FB enables text messabe sent and received via GSM modems.e-mail via GPRS (Enhanced Vision only).GPRS cellular network, to transmit IP packets of data

You can use a PC modem to access a remote, modemperform any task, just as you would if the PLC were directly connected to your PC.For example, you can:

Dial a remote PLC modem and receive calls from a PLC.Download, upload, and edit the controller program via the modem connection.Run Online test mode.

Download an OS to the controller via modem.Use OnLine test and Information Mode to troubleshoot problems in remotecontrollers and applications.Read and write data to/from controllers via Remote Access or Unitronics'communication .dll utilities.Receive and send SMS messages via SMS options.

Before you can use modems in your application,Services to initialize both theThis process is described beginning on page

Before you begin: Modem TipsNotes • The PC-modem cable is not the same type of cable used to connect

between the controller and the modem. Ensure thatconnect the PC to the modem provides connection pointmodem's pins.

• If calls are routed via a switchboard, note that the switchboard settingsmay interfere with communications. Consult with your switchboardprovider.

• If, within the modem initialization strings, the parameter S7 is too shortto permit the PLC's modem to answer, an error will result.For example, if this parameter is set as S7=30, the PC modem will wait for 3 seconds to receive an answer from the PLCmodem does not answer before the 3 seconds have elapsed, the S7=30parameter is exceeded, and the PC modem return

nd Unitronics OPLCsbe hooked up to PSTN (landline), or GSM/GPRS modemsnitronics provides kits that comprise modems that have nd are supported for use with Vision, Jazz, and M90/91

a modem and enable it to communicate data using:

ands.on Protocol FB, which enables Vision controllers to most external serial devices, such as barrs, via their proprietary protocols.S FB enables text messages, including variable data, to

GSM modems.ced Vision only).o transmit IP packets of data.

o access a remote, modem-linked Unitronics PLCou would if the PLC were directly connected to your PC.

m and receive calls from a PLC.edit the controller program via the modem connection.

controller via modem.ormation Mode to troubleshoot problems in remote ons.from controllers via Remote Access or Unitronics'ies.

messages via SMS options.

modems in your application, you must use Modemze both the PC and PLC-side modems.ribed beginning on page 13.

em Tipscable is not the same type of cable used to connect

ntroller and the modem. Ensure that the cable used toto the modem provides connection point

ed via a switchboard, note that the switchboard settingsith communications. Consult with your switchboard

odem initialization strings, the parameter S7 is too short LC's modem to answer, an error will result.this parameter is set as S7=30, the PC modem will wait receive an answer from the PLC's modem. If the PLC

t answer before the 3 seconds have elapsed, the S7=30ceeded, and the PC modem returns the No Carrier error.

7

M/GPRS modems odems that have azz, and M90/91

te data using:

ontrollers to ar-code readers

variable data, to

onics PLC and ected to your PC.

em connection.

ms in remote

Unitronics'

st use Modem ms.

ed to connect e cable used to nts for all of the

tchboard settingsswitchboard

ter S7 is too shortsult.

modem will wait dem. If the PLC apsed, the S7=30 e No Carrier error.

Page 4: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

Standard Vision DivisionControllers in this division can only support a single modem. Youcan connect a modem to any COM port. However, note that SB184 TX Success and SB 185 TX Failed indicate messagetransmission statusto the modem.Enhanced Vision DivisionControllers in this division can support aport. Each port is linked to a Succeed and Fail SB:COM1: SB 184 and SB 185, COM2: SB186 and SB 187, COM3: SB188 and SB 189.

When working with V570 and V290 (color):Set the baud rate in both Modem Services and in COM Init to57600. In addition, run the Prepare PLC Modem procedure with the baud rate set to 57600.Com Init:- Select Ignore Break- Time Out Reply: set to a minimum of 6 seconds.

• Known compatibility issue: Sony Ericsson Modems.Unitronics products are compatibleModems:

Model GT47 R5xxxx and higherModel GM29 R6xxxx and higher

Unitronics cannot guarantee compatibility with other models, such asSony Ericsson Modem model GM29 R4xxxx.

d Vision Divisionrs in this division can only support a single modem. You ect a modem to any COM port. However, note that SBuccess and SB 185 TX Failed indicate messagesion status regardless of the actual COM port connected odem.d Vision Divisionrs in this division can support a modem on each COMh port is linked to a Succeed and Fail SB:B 184 and SB 185, COM2: SB186 and SB 187, COM3: SBSB 189.

g with V570 and V290 (color):aud rate in both Modem Services and in COM Init ton addition, run the Prepare PLC Modem procedure with rate set to 57600.

gnore Breakut Reply: set to a minimum of 6 seconds.bility issue: Sony Ericsson Modems.ucts are compatible with the following Sony Ericsson

47 R5xxxx and higherM29 R6xxxx and higherot guarantee compatibility with other models, such as

Modem model GM29 R4xxxx.

8

ngle modem. You r, note that SB

message OM port connected

on each COM B:SB 187, COM3: SB

n COM Init to procedure with

s.

Sony Ericsson

models, such as

Page 5: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Modem Connection and PinoutsThe following figure shows you how to connect a controller to a modem.

Note • The programming cable is aVision all-in-one kits.

Below is the pinout diagram for the PLC RS232 port.

Connecting a Controller to a Mo

Unitronics' modem kitsUse with a Unitronics PLC programming cable, as shown in the figure above.Kits contain a modem that is compatible with Unitronics controllers andrelated hardware. The Products section of the Unitronics web site contains kit descriptions and specifications.

Other modems -Use a Unitronics PLC programming cable to connect the PLC to a modemadapter. You can order modem adapters from Unitronics.-Construct your own Dprogramming cable to the modem's serial port, according to the pinprovided below.

Modem to Controller Interface (DCE to DTE)The next figure shows the interface between the Data Communications Equipment (DCE; the modem) and the Data Terminal Equipment (DTE; the conThe arrows show the direction of data flow. Note that:

Transmitted data (TXD) is input to the modem, output from the PLCReceived data (RXD) is input to the PLC, but output from the modem

Modem Connection and Pinouts

d Pinoutsyou how to connect a controller to a modem.

cable is a 4-wire cable. The cable is included with thets.

m for the PLC RS232 port.

er to a Modem

kitsPLC programming cable, as shown in the figure above.

m that is compatible with Unitronics controllers ande Products section of the Unitronics web site contains kit cifications.

C programming cable to connect the PLC to a modemer modem adapters from Unitronics.D-type to D-type connector cable to connect theo the modem's serial port, according to the pin

terface (DCE to DTE)nterface between the Data Communications EquipmentData Terminal Equipment (DTE; the con

tion of data flow. Note that:

XD) is input to the modem, output from the PLCis input to the PLC, but output from the modem

onnection and Pinouts

9

odem.

included with the

the figure above. ntrollers and b site contains kit

C to a modem

onnect the o the pin-outs

tions Equipment ontroller or PC).

the PLCe modem

Page 6: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

Note • Unitronics controllers do not suppo• Modems must be initialized via the

procedure. This procedure:Turns the DSR signal ONSets the appropriate PLCare: 19200 bps, 8 bit, no parity, 1 stop bit

• Connecting DSR and RTS signals causes the modem to be always ready totransmit\receive data.

Using Modem Kits Kits contain all of the elements you need to connect a controller to a modem usingthe appropriate PLC programming cable, as shown in the first figure at thebeginning of this section.

Note that you must remove the PCadapter from the PLC programming cable and replace it with the modemadapter supplied in the kit.

In order to work with Unitronics controllers, you must initialize the modem via theprocedure detailed in the Prepare PLC Modem

The following list shows modem adapters supplied with the kits and their pinFor updated information, consult your Unitronics distributor.

Standard Landline and Siemens GSM/GPRS modems

Modem Adapter MJ10-22-CS76Adapter signals D-Type 9DSR (out) + RTS (in)

6+7

GND 5RXD (out) 2TXD (in) 3GND 5DCD (out) 1

Note • The cable connects RJ11 pins 2,3,4,5 to pins 5,4,3,2 respectively.

ers do not support all the control lines.nitialized via the Modem Services> Prepare Modem

rocedure:SR signal ONpropriate PLC-modem communication parambps, 8 bit, no parity, 1 stop bitnd RTS signals causes the modem to be always ready toata.

ents you need to connect a controller to a modem usingmming cable, as shown in the first figure at the

the PC amming e modem

onics controllers, you must initialize the modem via therepare PLC Modem topic.

dem adapters supplied with the kits and their pinonsult your Unitronics distributor.

M/GPRS modems

6 PLC Serial Port / Port Modulepin, male RJ11 RJ11

1 6

2 53 44 35 26 1

ts RJ11 pins 2,3,4,5 to pins 5,4,3,2 respectively.

10

epare Modem

parameters. These

e always ready to

o a modem usingre at the

e modem via the

d their pin-outs.

/ Port ModuleController signals DSR (in)

GND RXD (in) TXD (out) GND DTR (out)

pectively.

Page 7: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Modem Connection and Pinouts

11

Sony Ericsson GM29 and Enfora GSM/GPRS modems

Modem Adapter MJ10-22-CS72 PLC Serial Port / Port Module Adapter signals D-Type 9 pin, male RJ11 RJ11 Controller signals DSR (out) 6 1 6 DSR (in) GND 5 2 5 GND RXD (out) 2 3 4 RXD (in) TXD (in) 3 4 3 TXD (out) GND 5 5 2 GND DCD (out) + RTS (in)

1+7 6 1 DTR (out)

Note • The cable connects RJ11 pins 2,3,4,5 to pins 5,4,3,2 respectively.Wavecom GSM/GPRS modems

Modem Adapter MJ10-22-CS79 PLC Serial Port / Port Module Adapter signals D-Type 15 pin, male RJ11 RJ11 Controller signals DCD (out) 1 1 6 DSR (in) GND 9 2 5 GND RXD (out) 6 3 4 RXD (in) TXD (in) 2 4 3 TXD (out) GND 9 5 2 GND DSR (out) + RTS (in)

7+12 6 1 DTR (out)

Note • The cable connects RJ11 pins 2,3,4,5 to pins 5,4,3,2 respectively.• Wavecom modem kits do not contain the PC to modem cable, MJ10-22-

CS32, that is required for the Wavecom Prepare Modem procedure. This cable is available by separate order.

Using a Unitronics Adapter If you are using a modem from an independent source, you can order one of the modem adapters described in the preceding section from Unitronics, and use this adapter to connect your modem to the PLC via the PLC programming cable.

Constructing Adapters You can construct a D-type modem adapter yourself, using the appropriate pin-outs shown in the preceding section.

You can also construct a cable with 2 male D-type connectors, and then use it to connect a modem's serial port directly to the PC adapter on the PLC programming cable as shown in the next figure.

The tables below give the pin-outs of the programming cables, and show you an example of the pin connection you can use to construct a cable with 2 male D-type connectors to connect a PLC to a standard landline modem.

Page 8: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

12

Vision 4-wire Programming Cable

PC -side Adapter MJ10-22-CS25

PLC-side Programming port

PC signals

D-Type 9 pin, female

RJ11 RJ11 Controller signals

DTR (out) 4 1 6 DSR (in) Unused GND 5 2 5 GND TXD (out) 3 3 4 RXD (in) RXD (in) 2 4 3 TXD (out) GND 5 5 2 GND DSR (in) 6 6 1 DTR (out) Unused

Note • The 4-wire programming cable supplied with the controller connects RJ11 pins 2,3,4,5 to pins 5,4,3,2 respectively.

Example: D-type modem adapter cable to connect a Vision controller to a standard landline modem Modem-side (D-type 9-pin, male)

PLC-side (D-type 9-pin, male)

DSR (out) + RTS (in)

6+7

GND 5 5 GND RXD (out) 2 3 RXD (in) TXD (in) 3 2 TXD (out) GND 5 5 GND

Page 9: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

PC-Side Modems (Modem Services)Modem Services enables you to initialize modems for both PC and PLC. Once you have configured a PC-side modem, you can use a PC modem to access a remote, modem-linked controller and perform any task, just as you would if the PLC were directly connected to your PC

Download, upload, and edit the controller program via the modem connection.

Run Online test mode.Download an OS to the controller via modem.Use OnLine test and Information Mode to troubleshoot problems in remote controllers and applications.Read and write data to/from controllers via Remote Access or Unitronics' communication .dll utilities.

Before integrating modems into your applications, check the section Cautions.

Initializing a PC-side Modem (Prepare Modem)1. Connect the modem to a PC, using a

pinout, either supplied in the modem kit or supplied by the modem manufacturer.

Note that using a cable that does not comprise thecause the process to fail.

2. Open Modem Services from the Connection menu.

3. Select and enter the modem parameters:

a. At the top of Modem Services, select a tab; the Modem Type selection box shows the options.

b. Select the PC modem type;accordingly. Selecting TAPI displays the settings of telephony devices that appear in Windows>Control Panel>Phone and Modem Options.

c. If required, you can edit other parameters:

Initialization commands: click in the fielCom Port, baud rate, Time Out, and Timeboxes

PIN code: click to enter the number.4. When all parameters are set, click the Initialize PC Modem button; the PC

establishes communication with the modem and ini

(Modem Services)u to initialize modems for both PC and PLC. Once you

modem, you can use a PC modem to access a remote, d perform any task, just as you would if the PLC were

PC. For example, you can:

nd edit the controller program via the modem

e.he controller via modem.Information Mode to troubleshoot problems in remote cations.to/from controllers via Remote Access or Unitronics' tilities.into your applications, check the section

odem (Prepare Modem)to a PC, using a cable comprising the full RS232

plied in the modem kit or supplied by the modem

a cable that does not comprise the full RS232 pinout will fail.

s from the Connection menu.

modem parameters:

Modem Services, select a tab; the Modem Type selection options.

modem type; the initialization strings change electing TAPI displays the settings of telephony devices Windows>Control Panel>Phone and Modem Options.

u can edit other parameters:

nds: click in the field and enter text. Time Out, and Time-Out Reply: use the drop down

ter the number.are set, click the Initialize PC Modem button; the PC cation with the modem and initializes it.

13

PLC. Once you ccess a remote, if the PLC were

modem

lems in remote

or Unitronics'

on Modems-Tips &

e full RS232 by the modem

RS232 pinout will

m Type selection

hange elephony devices odem Options.

he drop down

button; the PC t.

Page 10: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

14

Modem Service Options In addition to modem initialization, Modem Services offer other options:

Option Description

Dial & Hang-Up

To dial: • Click the Number to Dial field; the Favorites list opens. • Enter or highlight the desired number. • Close Favorites, and click Dial. • To break the data link, click Hang-Up.

Dial Mode Selecting Auto enables the modem to adapt to the signal provided by the telephony service operator.

SMS Options This option is available if you have selected a GSM modem. • Select the destination number. • Enter the SMS text, then click Send SMS. • Note that an SMS can be used to cause the PLC to call the PC.

Wait for Incoming Call

Places the PC modem in auto-answer mode.

Prepare PLC Modem

Use this option to initialize a PLC-side modem. Full instructions are in the topic PLC-side Modems.

Page 11: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

PC-Side Modems

15

How to use the PC modem to access a PLC 1. Prepare and connect the PLC-side modem as described in the topic PLC-side

Modems, in the section 'How to enable a controller to communicate via landline or GSM/GPRS modems.

2. Dial the PLC to establish the communication link:

a. Favorites (Telephony). You can keep a list of frequently-used numbers in Favorites.

b. Click a line to enter or select a number and description.

c. To access outside lines, enter the access number required, a comma, and then the phone number.

Click Dial to establish the data link, then enter OnLine mode.

You can now perform any task that can be performed via a direct PC-PLC connection. Note that when the modem is connected, the Modem Connected icon appears on screen.

Page 12: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 13: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

PLC-side ModemsBefore integrating modems into your applications, check the section Cautions.

How to enable a controller to communicate via landline or GSM/GPRS modem Preparing the modem as described below initializes it so that it is compatible with Unitronics PLCs.

1. Connect the modem to a PC, using a pinout, either supplied in the modem kit or supplied by the modem manufacturer.

Note that using a cable that does not comprise the full RS232 pinout will cause the process to fail.

2. Prepare the PLC modem.

a. Connect the modem to a PC, using the manufacturer.

b. Open Connection>Modem Services, and select the modem type. If required, you can edit other parameters:

Com Port, Baud Rate, Time Out, and Timeboxes.

Enhanced Vision Division:Recommended Baud Rate is 57600.

PIN code: click to enter the number.

3. Click the Prepare PLC

4. If required, edit initialization commands by clicking in the field and entering text.

5. When all parameters are set, click the Init Modem button; the PC establishes communication with the modem and initializes it.

sinto your applications, check the section

oller to communicate via landline or GSM/GPRS

escribed below initializes it so that it is compatible with

to a PC, using a cable comprising the full RS232 plied in the modem kit or supplied by the modem

a cable that does not comprise the full RS232 pinout will fail.

em.

odem to a PC, using the cable supplied by the modem

on>Modem Services, and select the modem type. If can edit other parameters:

, Time Out, and Time-Out Reply: use the drop down

Division:Baud Rate is 57600.ter the number.

C-side Modem button; that dialog box opens.

alization commands by clicking in the field and entering

are set, click the Init Modem button; the PC establishes the modem and initializes it.

17

on Modems-Tips &

or GSM/GPRS

compatible with

e full RS232 by the modem

RS232 pinout will

by the modem

odem type. If

he drop down

pens.

eld and entering

he PC establishes

Page 14: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

18

6. Initialize the PLC port using a COM Init FB, located on the COM menu.

Page 15: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

PLC-side Modems

19

Parameter Name

Purpose

Com Port Select the physically linked Com Port.

Baud Rate Set the baud rate in COM Init to 57600:

When working with V570 and V290 (color) When working with V120/230/260/280/290 (monochrome) together with modems Enfora orTC65 In all other cases, 9600 is suitable.

RS232 Time Out

This is the time that the PLC will wait for the modem to reply.

Flow Control This is generally left OFF.

Ignore break When working with V570 and V290 (color), select Ignore Break

Modem Settings

Modem Type Click to select the desired modem.

Initialization strings

Click to edit if required.

Dial Type Set to Tone by default.

Time Out Reply When working with V570 and V290 (color), set a minimum of 6 seconds.

PIN Code If your provider requires a PIN code, enter a constant number or link to MI.

Clear SIM Select this to clear the SIM card when COM Init is activated.

Notes ♦ COM Init is generally performed once in a program. It is usually a power-up task, however a one-shot transitional contact may also be used.

♦ The initialization commands must match the commands used to initialize the PLC modem.

♦ You can cause the modem to delay between initialization commands by typing WAIT, followed by the number of seconds; up to nine seconds is supported.

Page 16: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

20

♦ Communications cannot flow through the port during initialization.♦ The PLC cannot answer incoming calls when it is in bootstrap mode.♦ The Answer Settings parameter, by default, enables the modem to answer

incoming calls. This enables you to download an OS to the PLC via modem. However, you can enable the PLC to answer instead. To do this, locate the initialization string ATS0=1 and enter 0( ATS0=0). When ATS0=0, an OS cannot be downloaded.

1. Build a Ladder program containing the correct conditions and elements.

Note • Communications cannot flow through the port during initialization. To avoid conflicts in your program, use COM Port initialization SBs 80-85.

♦ COM Init may take approximately a minute to complete.

2. Download the application to the PLC.

3. Connect the modem to the PLC.

After the modem is enabled and successfully initialized by the PLC (SBs 80, 82, 84 turn ON), the controller can either be accessed via modem or can dial a remote modem to establish a data link.

How to enable a PLC to dial a remote modem (Ladder) Landline modems

Note ♦ In the conditions used to activate the Dial function, include the appropriate Modem Initialized System Bit: SB 80, SB 82, or SB 84.

Page 17: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

PLC-side Modems

21

For more information regarding Ladder conditions and other details, refer to the topic Dial and Hang-up.

GSM modems

Note ♦ SMS operations can conflict with applications that use the modem for other data communication processes. To prevent conflicts, use the Modem Busy (GSM) MB, and use an MB to indicate when the modem is in use by another data communications process.

For more information on SMS messaging, refer to the SMS topics.

How to terminate the link--Hang-up This enables you to use Ladder conditions to break the connection.

Note ♦ Before activating Hang-up, check whether the connection exists, via the appropriate Modem Connection Status System Bit: SB 86, SB 87, or SB 88

Page 18: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 19: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Last Call, CLIP: Identifying CallersThe Last Call Received function is located on the COM> COM Port> mefunction enables a PLC to identify the caller number of an incoming call. Last Call uses the CLIP (Calling Line Identification and Presentation) feature offered by GSM modems.

CLIP is supported by:Enhanced Vision: from O/S 42

Standard Vision: from O/S 500-19

VisiLogic versions 5.15 and later, which contain the CLIP command: AT + CLIP=1.

You can use CLIP to identify callers to a PLC modem by:

Using the Last Call function to write the number of an incoming call to a register

Creating a list of authorized numbers in a Data TableUsing the Find Row function to check if that number exists in the Data Table

To see a working example, check the sample application GSM (CLIP).vlp.

The process The PLC must be connected t

1. Device modem calls a PLC modem. 2. PLC Modem sends the CLIP command to the

PLC, containing the Caller Number and Call Type (local or international) to the PLC.

3. PLC retains the data, and turns ON SB89 CLIP - Caller Number is here.Note that SB89 must be reset by the user.

4. The Last Call function stores the caller number into a vector. In the Ladder application, a Data Tables Find Row function searches for a matching number in the Data Table. If no such number exists, the application can breakactivating COM Init.

entifying Callerstion is located on the COM> COM Port> me

dentify the caller number of an incoming call. Last Call Identification and Presentation) feature offered by GSM

y callers to a PLC modem by:

nction to write the number of an incoming call to a

horized numbers in a Data Tableunction to check if that number exists in the Data Tablecheck the sample application GSM - Prevent Illegal Calls

d to a GSM modem.a PLC modem. e CLIP command to the

Caller Number and Call ational) to the PLC.

and turns ON SB89 r is here.

be reset by the user. n stores the caller . In the Ladder ables Find Row function ing number in the Data

mber exists, the k the connection by

23

> menu. This g call. Last Call e offered by GSM

ming call to a

n the Data Tableevent Illegal Calls

Page 20: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

The application Notes ♦ Last Call can store the number when:

V570/290 (Color): the modem begins to ringV120/230/260/280/290 (monochrome): the call is actually connected.

♦ If the call number is unidentifiable (meaning set by the caller as private or anonymous), no numbemost cases, Last Call will identify such a call as Type =128.

The ladder net that is shown below causes the following events when the PLC's modem receives a call from a remote modem:

SB89 turns ON when callThe Last Call Received element copies the caller number into a vector of MIs starting at MI10

Find Data Table Row looks up that number in the Data Table.If no such number exists, Find Row returns a value of

Reset SB 89 in the application. If SB 89 is not reset, you will not be able to write new CLIP dataPreventing unauthorized callsThe nets shown below guard against unauthorized callers:

If the caller number is not in the list, the Find Row output, MI21, will contain -1,

OR

If the call number is unidentifiable (meaning set by the caller as private or anonymous), 0 will be stored in the Last Call vector starting at MI 10

In either case, MB1 will turn OFF, breaking the connection by activating COM Init.

ore the number when:0 (Color): the modem begins to ring0/260/280/290 (monochrome): the call is actually

ed.

ber is unidentifiable (meaning set by the caller as private , no number will be stored in the Last Call vector. In st Call will identify such a call as Type =128.

n below causes the following events when the PLC's a remote modem:

caller number is present ed element copies the caller number into a vector of MIs

looks up that number in the Data Table.Find Row returns a value of -1.

on. If not ata

ed callsd against unauthorized callers:

s not in the list, the Find Row output, MI21, will contain

unidentifiable (meaning set by the caller as private or e stored in the Last Call vector starting at MI 10n OFF, breaking the connection by activating COM Init.

24

ll is actually

e caller as private Call vector. In =128.

hen the PLC's

o a vector of MIs

e.

MI21, will contain

er as private or at MI 10

vating COM Init.

Page 21: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Last Call (CLIP): Identifying Callers

25

Page 22: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 23: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

27

Dial & Hang-upThese functions are located on the Com menu. Via the Ladder application, they enable a PLC connected to a modem to establish or terminate a data link to another remote modem.

Before you dial, you must enable the Vision controller to communicate via modem.

DialThis enables you to use Ladder conditions to dial a modem.

Notes ♦ In the conditions used to activate Dial, include the appropriate Modem Initialized SB: 80, 82, or 84

♦ SMS operations can conflict with applications that use the modem for other data communication processes. To prevent conflicts, use the Modem Busy (GSM) MB, and use an MB to indicate when the modem is in use by another data communications process.

Hang-upThis enables you to use Ladder conditions to break the connection.

Note ♦ Before activating Hang-up, check connection status via a Modem Connection SB: 86, 87, or 88.

Page 24: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 25: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Dialing from the Controller's KeypadIf your controller is hooked up to a modem, a phone number may be dialed from the controller's keypad. This explanatiinstalled on your hard disk together with VisiLogic. To open this application, open the Help menu, click Examples, and then select

About the Application

When downloaded, this applicat

Displays a blinking cursor onnumber by pressing keys on the Vision keypad.'Converts' the entered numbers to ASCII, then saves them, as they are entered, into a vector of registers that starts at MIvector. One ASCII character is entered into the low byte of each register.A Transpose function is linked to the vector starting at MI1011. Transpose copies the low byteconsecutive bytes of a vector that starts at MI 1001, the Phone Number Vector. For example, Transpose can extract the low bytes from MI 1011,1012, 1013 & 1013 and store all 4 bytes into MI 1001 and 1002.Displays the numbers as they are entered, via the HMI vString, which displays the Phone Number vector starting at MI 1001.The character Carriage Return (ASCII value 13) is required by the modem as the final character in the number to be dialed. When the user has finished entering the number and presses Enter, the Carriage Return value is stored as the final character in the vector that provides the phone number.Finally, the number us dialed via a Dial FB. The FB dials the number contained in the vector of registers starting with MI 1vector.

Note ♦ In order to understand how this application works, you must be familiar with the Vector: Fill (Offset) and Vector: Transpose functions.

Ladder

Initializing the COM port The application is based on the Wavecom GSM modem. The Visionconnection is via COM 2.

The net shown below is the first net of the main program module. initialized, SB 82 Modem Initialized: COM 2 turns ON; this condition activates the Dial function in the next subroutine, Enter Phone Number.

Controller's Keypadup to a modem, a phone number may be dialed from the planation is based on a sample application that is together with VisiLogic. To open this application, open ples, and then select Dialing via Vision Keypad

lication:

ursor on-screen. This aids the user in entering a phone keys on the Vision keypad.d numbers to ASCII, then saves them, as they are r of registers that starts at MI 1011, the Phone Entry aracter is entered into the low byte of each register.is linked to the vector starting at MI1011. Transpose of each register in that vector, and stores it into the

of a vector that starts at MI 1001, the Phone Number Transpose can extract the low bytes from MI

1013 and store all 4 bytes into MI 1001 and 1002.s as they are entered, via the HMI variable Display ASCII s the Phone Number vector starting at MI 1001.ge Return (ASCII value 13) is required by the modem as the number to be dialed. When the user has finished and presses Enter, the Carriage Return value is stored

r in the vector that provides the phone number.us dialed via a Dial FB. The FB dials the number or of registers starting with MI 1001, Phone Number

nd how this application works, you must be familiar with the nd Vector: Transpose functions.

the Wavecom GSM modem. The Vision

first net of the main program module. itialized: COM 2 turns ON; this condition activates the broutine, Enter Phone Number.

29

be dialed from the tion that is pplication, open n Keypad.

entering a phone

as they are e Phone Entry each register.

011. Transpose res it into the

Phone Number rom MI and 1002.

able Display ASCII MI 1001.by the modem as er has finished n value is stored number.number hone Number

amiliar with the

n-to-modem

When COM 2 is on activates the

Page 26: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

30

Building the Cursor The ASCII values for 'underscore' and 'blank space' are alternately stored into MI 1008 at .5 second intervals. The current value is copied into the Phone Entry vector starting at MI 1011, via a Vector: Fill Offset FB.

The offset value is provided by a counter that increments after every number entered. The offset values ensures that the cursor value is included as the last character in that vector.

Every time a value is entered, Vector: Transpose copies the low bytes of the Phone Entry vector, which contains the ASCII values, to the Phone Number vector starting at MI 1001.

Page 27: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Dialing from the controller's keypad

31

Entering numbers: 'Convert' to ASCII When a key is pressed, its value is automatically stored into SI 6. In this application, whenever keys 0 to 9 are pressed, the value stored in SI 6 is 'converted' to an ASCII value by adding the constant value 8. The ASCII value can then be displayed. For example, if Key#4 is pressed, the value in SI 6 will be 44 (HEX 2C). Adding 8 'converts' the value to 52 (HEX 34), which is the ASCII value for 4. 4 can then be displayed on the screen.

Note ♦ MI 1010 is incremented whenever a legal value is entered. The incrementing value acts as a pointer, correctly placing entered numbers in the Phone Number vector.

Page 28: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

32

Placing entered numbers in the Phone Number vector Using the incrementing value of MI 1010 as a pointer, the Fill Vector function places each 'converted' number into the correct register in the Phone Entry vector, starting at MI 1011.

Via the Transpose function, the low byte of each register in the Phone Entry is copied into the Phone Number vector as shown in the figure below.

Page 29: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Dialing from the controller's keypad

33

Dial and Hang-up The Dial function is linked to the Phone Number vector starting with MI1001. This vector is also displayed on the controller's screen.

Note ♦ Since the Enter key is pressed when the user has finished entering the number, SB 53 is used as one of the Dial conditions, as is SB 82 Modem Initialized.

SB 87 Modem connected is used to activate the Hangup function, and to display text on the controller screen.

HMI Display

This application contains 1 display with 3 variables.

Disconnected\Connected: Binary Text variable

Page 30: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

34

Show the phone number: Display ASCII String

This variable is refreshed in the Ladder via MB 1000 Display String on HMI.

Save, Dial, Hangup?

While the number is being entered, the text Save will be displayed. Once the number has been entered, the status of SB 87 Modem connected determines whether Dial or Hangup will be displayed.

Page 31: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

35

Accessing a Networked PLC via PCUse a PC to access controllers within a network either via a direct connection, TCP/IP connection, GSM or landline modem.

Accessing a Networked Controller via Modem

Note ♦ In order to ensure successful operations, it is recommended that you use

an external PC modem. Internal modems may not support communications.

♦ Both PC and controller must use the same type of modem: either landline or GSM. Internal PC modems must be used in conjunction with the driver provided by the modem's manufacturer.

Modems: Setting Up PLC-Modem Connection

The Unitronics’ cable provided with modem kits does not provide a standard connection. This connection is adapted to support the fact that Unitronics controllers do not support the control lines. The cable shorts the DSR and the DTR together, which ensures that the terminal is always ready to receive data. For more information, refer to the topic Modem Connection and Pinouts.

Page 32: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

36

PC Modem Configuration

Open PC Modem Configuration from the Options menu.

Note ♦ If, within the modem initialization strings, the parameter S7 TimeOut, is to short to permit the PLC's modem to answer, an error will result.

Page 33: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Online Test Mode & Remote AccessYou can run Online Test mode and use Remote Access session to display the networked controller on your PC screen.

To do this, click the Online Tbutton.

The controller model that is shown on the display is Configuration.

During a Remote Access session, you can:

Use your cursor to operate the controller keypad and activate touchobjects (relevant models).Use your PC keyboard to operate the controller keypad (numeric kefunction keys <F1> to <F8>). Note that the Vision <ESC> key is <E> on the PC keyboard, and that <F9> is reserved for activating Online mode.Enter Information Mode by pressing the <i> key with your cursor.

Accessing a Networked PLC via PC

Accessode and use Remote Access session to display the ur PC screen.

Test button on the toolbar, then click the Remote Access

shown on the display is the one selected in Hardware

ssion, you can:

perate the controller keypad and activate touchdels).d to operate the controller keypad (numeric keo <F8>). Note that the Vision <ESC> key is <E> on the

at <F9> is reserved for activating Online mode.ode by pressing the <i> key with your cursor.

Networked PLC via PC

37

display the

he Remote Access

ed in Hardware

te touch-screen

meric keys, key is <E> on the

ne mode.cursor.

Page 34: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 35: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

39

COM Port/Modem Status, System Operands, & Error MessagesYou can check the status of the System Bits and Integers either via ON-line Test Mode or Information Mode.

COM Port/Modem initialization, SBs 80-85

Each port is linked to 2 SBs indicating COM Port/Modem initialization status following COM Init. Both SBs are initialized to OFF by the OS, at Power-up and at the beginning of COM Init process. When COM Init is complete, one is ON, the other OFF.

# Description

SB 80 Modem Initialized: COM Port 1 Example: COM Port 1

SB 81 COM Port/Modem Initialization Failed: COM Port 1 SB 80 SB

81

SB 82 Modem Initialized: COM Port 2 0 0 After Power-up, before COM Init

SB 83 COM Port/Modem Initialization Failed: COM Port 2

0 1 Modem Initialization attempt failed, Modem is not initialized

SB 84 Modem Initialized: COM Port 3 1 0 Modem Initialization attempt succeeded, Modem is initialized.

SB 85 COM Port/Modem Initialization Failed: COM Port 3 1 1 Not possible

Modem connection status, SB 86-88

Each port is linked to an SB indicating modem connection status. These can be used in conjunction with SBs 132-137, which indicate indicating whether incoming or outgoing data is flowing through the port, to troubleshoot problems as shown in the Help topic Modem Troubleshooting.

# Description Turns ON when: Turns OFF when: Reset by:

SB 86 Modem Connection Status: COM Port 1

PLC receives 'Connect' string from modem

Hang-up PLC receives string 'No Carrier' PLC receives break signal

OS, at Power-up

SB 87 Modem Connection Status: COM Port 2

SB 88 Modem Connection Status: COM Port 3

COM Ports, SBs 132-137

Each port is linked to 2 SBs indicating when incoming or outgoing data is flowing through the port. To troubleshoot problems, use these in conjunction with the Modem Connection Status SBs 86-88, as shown in the topic Modem Troubleshooting.

# Description Turns ON when: Turns OFF when: Reset by:

SB 132 COM Port 1, Data Transmission During data send When data is not being sent

OS

SB 133 COM Port 2, Data Transmission

SB 134 COM Port 3, Data Transmission

SB 135 COM Port 1, Data Receive During data reception

When data is not being received

OS

SB 136 COM Port 2, Data Receive

Page 36: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

40

SB 137 COM Port 3, Data Receive

SMS message transmission status, SBs 184-185

Operands that are linked by the user to SMS FBs may be found in the topic SMS Operands.

SB Description Turns ON when: Turns OFF when:

184 SMS: Transmission Succeeded Transmission succeeds Transmission begins

185 SMS: Transmission Failed Transmission fails Transmission begins

COM Port: Port/Modem Status, Error codes, SIs 80-85

Each COM Port is linked to 2 SIs; their values and messages are indicated below.

SI 80 Modem Status: COM 1 Error (SI 81,83,85,) Status ( SI 80, 82, 84)

Value Message Value Message

0 No error 0 Modem Idle

1 TimeOut exceeded: no reply 1 Initialization in Progress

2 Reply Error 2 Initialization OK

3 Wrong PIN number 3 Initialization Failed

4 Registration failed 4 Modem Connected

5 PUK number needed 5 Hang-up in progress

10 COM Busy 6 Dial in progress

11 Reply Busy

12 Reply No Dial

15 Attempted Initialization during active break signal. Note that a port cannot be initialized while the break signal is active

16 Error in reply to PIN number

17 Check: CREG failed

18 Check: CREG timeout

19 Check: slots timeout

20 Check: Format timeout

SI 81 Error Code: COM 1

SI 82 Modem Status: COM 2

SI 83 Error Code: COM 2

SI 84 Modem Status: COM 3

SI 85 Error Code: COM 3

Page 37: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

COM Port/Modem Status, System Operands, & Error Messages

41

GSM Cellular Modem, GSM Signal Quality, SI 185

SI Description Value

185 GSM Signal Quality The value is written during COM Init of the GSM modem. The value is updated whenever the user uses the GSM Signal Quality FB. A value of -1(FFFF)signifies a modem error. This may be due to a weak signal; try repositioning the antenna. If this has no effect, check the modem.

SDW: Last Received SMS

SDW Description

13 Phone number of last received SMS (last 9 digits)

Information on SMS messaging status and messages may be found in the topic SMS Operands.

Page 38: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 39: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

43

Modem TroubleshootingNote that Vision PLCs have a built-in communications 'sniffer'. This is accessible in Information Mode, under System.

Touch screen models: select Serial or Ethernet, then click Monitor. Note the button that allows you to toggle between Hex and ASCII.

Non-touch screen models: Select Communication, then select Serial or Ethernet> COM Buffer. Use F2 to toggle between Hex and ASCII. In addition, press Enter, and then the Down key to toggle between Tx and Rx.

Modem Commands

Note ♦ The modem must reply with either OK or READY to each command entered. If the modem fails to answer, the command has not been processed.

+++ Escape Sequence. This causes the modem to close connections and go back to command mode

AT This command means Attention; and is used to begin a session

AT&F Restores factory default settings

ATZ Resets the modem. This command may take time to implement, so the response from the modem may be delayed

ATE0 No Echo

V1 Enable Verbose (long) response

Q0 Respond

X4 Detailed answers

&D0 Ignore DTR

&S0 DSR always ON. Since the DSR can be permanently set to ON, connecting it to the RTS causes the terminal always be ready to transmit\receive data

&S1 DSR OFF in command and test modes

&C1 Give the user a signal for the DCD

ATS0=1 Auto-Answer after 1 ring

&W Burn the configuration into the modem’s non-volatile memory

PC-side modem, error messages

This deals with errors that may result from the PC's modem

Message Cause

COM Port not open, or modem does not exist

The PC was unable to access the PC port. The port may: -Already be in use. -Be damaged.

Modem not connected

The PC receives no reply from the modem following the 'AT' command. Check that: -The modem is connected to the same PC port you have defined in PC-modem Configuration. -The PC-modem cable is in proper order.

Modem not initialized

The modem was not successfully initialized, or The modem answered, but did not approve all strings.

Page 40: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

44

Check the topic: Using Hyperterminal for Modem Troubleshooting

The messages below describe the modem 's status if the PC dial attempt (ATD+ number) fails. Any one of these errors aborts the Dial process.

Modem Busy

Modem Error

No Dial Tone

No Carrier Note ♦ This can occur if, within the modem initialization strings, the parameter S7 TimeOut, is to short to permit the PLC's modem to answer. For example, if this parameter is set as S7=30, the PC modem will wait for 3 seconds to receive an answer from the PLC's modem. If, however, the PLC program's COM Init FB Answer Settings are set to 'Answer after 6 rings,' the PLC modem will not be able to answer before the 3 seconds have elapsed. In this case, the TimeOut parameter is exceeded, and the PC modem will return the No Carrier error.

Dial time-out exceeded

No reply was received from the modem within the defined time.

The messages below only relate to unsuccessful GSM modem initialization.

GSM SIM card blocked

GSM SIM card does not exist

Illegal GSM PIN code

GSM Network not found

CDMA Network not found

SMS message too long

A message containing only English characters may contain up to 160 characters. A message containing non-English characters may contain up to 70 characters.

Time-out exceeded

PLC modems

These errors may result from problems in the PLC-side modem

Message Possible cause Recommended action

Modem Busy Modem is engaged, or is being initialized

Check that the line is free. Use the SBs: Modem Initialization Status listed above to check the COM port status; communications cannot flow through the port during initialization. For more information check the topic COM Port Init.

Handshake between modems complete ('CONNECT'), PLC does not reply

Modem adapter cable

Check the PLC-to-modem connection and pin-out, particularly that the DSR is connected to the RTS on the modem side.

Problem SI Value (80, 82, 84)

Possible Cause & Recommended Action

Page 41: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Modem Troubleshooting

45

Modem fails to initialize (SB 81, 83, 85 ON)

3 PLC-to-modem cable: Make sure that the cable is securely connected. Check the modem connection and pin-out of the PLC-to-modem adapter cables. Note that if you use cables comprising this pin-out, you must set the parameter Flow Control to N (none) in the COM Port Init FB. Incompatible communication settings. Most modems automatically match the parameters of incoming data: baud rate, data bits, parity & stop bits. You may need to manually change your modem's communication settings.

0 You may have selected the wrong type of modem in the COM Port Init FB.

A complete list of error messages for SI 80, 92, 84, as well as other System Operands containing modem error is given in the topic COM Port/Modem Status, System Operands, & Error Messages.

Modem Connection

Cable Pin-out The Unitronics’ cable provided with modem kits does not provide a standard connection. This connection is adapted to support the fact that Unitronics controllers do not support the control lines. The cable shorts the DSR and the DTR together, which ensures that the terminal is always ready to receive data. For more information, refer to the topic Modem Connection and Pinouts.

Data Flow Direction Generally, when you transmit data, you send it out. Note, however, that transmitted data (TXD) is input to the DCE. A Receive Data signal (RXD) is input to the DTE, but output from the DCE.

Therefore, the RXD and TXD signals are crossed within the majority of modems. This means that a straight through "one to one" cable is generally all that is necessary between a modem and a controller or PC serial port.

RS-232 signal information

RXD Receive Data

Input for DTE devices (Receive), output for DCE devices. This is the data channel from the DCE device to the DTE device.

TXD Transmit Data

Output for DTE devices (Send), input for DCE devices. This is the data channel from the DTE device to the DCE device.

GND Signal Ground

Signal return for all signal lines.

RTS Request To Send

Terminal is ready to receive data. When the DTE is ready to receive data, the DTE serial port RTS signal is ON.

CTS Clear To Send

Terminal is ready --not related to data transfer.

DTR Data Terminal Read

It is an output for DTE devices and an input for DCE devices. This signal is typically used to show that the port has been activated or "opened".

DSR Data Set Ready

Detects if the RS232 is actually connected.

Page 42: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

46

DCD Data Carrier Detect

Turns ON when the modems connect.

RING Turns ON when someone is calling the DTE.

GSM modems

Problem SI Value (81, 83, 85)

Possible Cause & Recommended Action

Wrong PIN number 3 Check the PIN number in the COM Port Init FB; leave it empty if your SIM card has no PIN number.

Failed Registration 4 GSM modem did not register successfully, for example if no network was found, or if the modem antenna is not functioning.

PUK number needed 5 The SIM card is locked due to too many attempts to enter an incorrect PIN number.

Problem Possible Cause & Recommended Action

Cell phone does not receive message

Check the cell phone's SIM card; it may be full. You can clear the SIM card using the Clear option in the COM Port Init FB.

PLC modem does not respond to cell phone call

GSM modems generally recognize whether the incoming call is voice or data. If the modem has been set to answer (via the ATS0=x command, where x is set to a value greater than 0), the modem will not answer an incoming cell phone call, since it will be recognized as a voice message.

Note ♦ The appropriate Modem: Initialized SBs [80 (COM 1), SB 82 (COM 2), SB 84 (COM 3)] must turn ON before activating an SMS Config FB using that COM port; ideally the SBs should be used as an activating condition.

Changing Baud Rate

Note that baud rates for PC and PLC modems can be edited during the Prepare Modem process.

Modem Troubleshooting Table Note that in many cases, checking System Operand status can help you in the troubleshooting process.

Problem Possible cause Recommended Action

PLC stays connected when

A modem which is reset, or to which the power supply

Modem Connection and COM Port Transmit/Receive SBs can be used in conjunction with a timer to

Page 43: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Modem Troubleshooting

47

modem connection fails

is interrupted, may lose the connection and may not send a 'No Carrier string to the PLC. In this case, the SB remains ON, as though the data link still exists. (Note that Modem Connected SBs, 86-88, turn ON when the relevant COM port receives the 'Connect' modem string. Receiving a 'No Carrier' string causes the SB to turn OFF.)

check if the line is inactive; the timer state is used to trigger Hang-up as shown below.

VisiLogic is not able to communicate with the PLC:PLC has initialized a modem. The modem is disconnected, and a PC is plugged into the COM port.

Once the modem is connected to the PLC, and the modem is initialized, the Modem Initialized SB turns ON. As long as this SB is ON, the COM port stays initialized to the baud rate required in order to work with the modem. If VisiLogic attempts to access the PLC via a different baud rate, the attempt will fail. The Synchronization process (using break signals) is disabled while the SB is ON.

Either: Reset the PLC, which will reset the Modem Initialized SB, -or- Via Vision Communication PC Settings, set VisiLogic's baud rate to match the baud rate to which the COM port was initialized to communication with the modem.

Page 44: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 45: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

49

Using Hyperterminal to check PC-PLC direct communicationsIf the PC port is defective or in use by another application, you may be unable to access a directly connected controller with your PC.

Via Hyperterminal, you can check the PLC-PC communication connection by sending a simple text command, Get ID. If the connection is in order, the controller replies with its ID; if the connection is faulty, the controller will not reply.

1. Open Hyperterminal.

2. Enter a name for the new connection and select an icon, and then click OK.

The Connect To box opens.

3. Select the PC COM port that connects the PC to the controller, and then click OK.

Page 46: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

50

4. The Port Settings box opens as shown below. To enable your PC to communicate with the modem, set the COM port parameters to a BPS of either 9600 or 19200, Data bits=8, Parity=N, Stop bits=1, Flow control=None, and then click OK.

5. Open the Properties box by clicking on the Properties button, then open ASCII

Setup.

6. Select the options shown below, and then click OK.

Page 47: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Using Hyperterminal to check PC-PLC direct communications

51

7. To synchronize the controller's communication settings, enter Info mode.

Navigate to System>RS232>Restore Defaults, and then press the Enter key.

8. Open Notepad, enter the text /00IDED, press Enter, and save the file. This is the Get ID command, where 00 is the 'placeholder' for the controller's Unit ID number. 00 enables any directly controller to answer, no matter what it's actual ID number is. ED is the command's checksum.

Note ♦ Pressing Enter places a Carriage Return command at the end of the text. Although the Carriage Return is not visible, the command will not be processed without it.

9. Select Send Text file from the Transfer menu, and open the text file

.

Page 48: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

52

10.If you have configured everything according to the instructions above, and the port is functioning properly, the controller with its ID number. If the port is out of order, the controller will not reply.

In the figure above, the characters in the string that is returned by the controller, /A00IDR1 B30000E5 may be interpreted as follows:

A 00 ID (PLC model)

B (Hardware Version) E5 CR (ETX)

Answer Requested number

M90-R1 OS V3.00 (00) Checksum Not visible

Page 49: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

53

Using Hyperterminal for COM TroubleshootingYou can use a standard Windows application called Hyperterminal to perform certain tasks, such as changing a modem’s communication rate.

Note ♦ The modem driver does not need to be installed in order to access the modem via Hyperterminal.

Modem Connections Cable Pin-out The Unitronics’ cable provided with modem kits does not provide a standard connection. This connection is adapted to support the fact that Unitronics controllers do not support the control lines. The cable shorts the DSR and the DTR together, which ensures that the terminal is always ready to receive data. For more information, refer to the topic Modem Connection and Pinouts.

Data Flow Direction Generally, when you transmit data, you send it out. Note, however, that transmitted data (TXD) is input to the DCE. A Receive Data signal (RXD) is input to the DTE, but output from the DCE.

Therefore, the RXD and TXD signals are crossed within the majority of modems. This means that a straight through "one to one" cable is generally all that is necessary between a modem and a controller or PC serial port.

RS-232 signal information

RXD Receive Data

Input for DTE devices (Receive), output for DCE devices. This is the data channel from the DCE device to the DTE device.

TXD Transmit Data

Output for DTE devices (Send), input for DCE devices. This is the data channel from the DTE device to the DCE device.

GND Signal Ground

Signal return for all signal lines.

RTS Request To Send

Terminal is ready to receive data. When the DTE is ready to receive data, the DTE serial port RTS signal is ON.

CTS Clear To Send

Terminal is ready --not related to data transfer.

DTR Data Terminal Read

It is an output for DTE devices and an input for DCE devices. This signal is typically used in UNIX to show that the port has been activated or "opened".

DSR Data Set Ready

Detects if the RS232 is actually connected.

DCD Data Carrier Detect

Turns ON when the modems connect.

RING Turns ON when someone is calling the DTE.

Using Hyperterminal 1. Open Hyperterminal. The program can generally be located by clicking the

Start button in the lower left corner of your screen, then selecting

Page 50: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

54

Programs>Accessories>Communications>Hyperterminal. The New Connection window opens as shown below.

Note ♦ Hyperterminal generally starts by pointing to the internal modem, if one is installed on the PC.

2. Enter a name for the new connection and select an icon, and then click OK. The Connect To box opens.

3. Select a COM port for the modem, and then click OK.

4. The Port Settings box opens as shown below. To enable your PC to

communicate with the modem, set the COM port parameters to a BPS of either 9600 or 19200, Data bits=8, Parity=N, Stop bits=1, Flow control=None, and then click OK.

Page 51: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Using Hyperterminal for COM Troubleshooting

55

5. Open the modem’s Properties box by clicking on the Properties button, then

open ASCII Setup.

6. Select the options shown below, and then click OK.

Page 52: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

56

Hyperterminal is now connected to your PC via COM 1; the ASCII settings now enable you to enter commands via the PC keyboard and see the replies from the modem within the Hyperterminal window.

To test the connection, type AT; if the connection is valid the modem will respond 'OK'.

Typical initialization strings used with a Siemens M20-type modem are shown below.

Modem Commands Note ♦ The modem must reply with either OK or READY to each command entered. If the modem fails to answer, the command has not been processed.

+++ Escape Sequence. This causes the modem to close connections and go back to command mode

AT This command means Attention; and is used to begin a session

AT&F Restores factory default settings

ATZ Resets the modem. This command may take time to implement, so the response from the modem may be delayed

ATE0 No Echo

V1 Enable Verbose (long) response

Q0 Respond

X4 Detailed answers

&D0 Ignore DTR

&S0 DSR always ON. Since the DSR can be permanently set to ON, connecting it to the RTS causes the terminal always be ready to transmit\receive data

&S1 DSR OFF in command and test modes

&C1 Give the user a signal for the DCD

ATS0=1 Auto-Answer after 1 ring

&W Burn the configuration into the modem’s non-volatile memory

Page 53: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Initializing the modem to SMS mode via HyperterminalOnce the modem is successfully initialized, you can use Hyperterminal to initialize the modem to SMS mode.

Command Description

at+cpin=? Is a pin number required?

at+pin=”xxxx” xxxx

Is the pin number set in the application?

at+creg? Has the SIM card been registered with the local cellular provider?

at+cmgf=1 Go to text mode

Notes ♦ Commands including question marks are run for verificationis not verified during the second attemp

♦ If the SIM requests the PUK number, the SIM must be taken out of the modem and installed into a phone to enable the number to be entered.

♦ If the SIM is full, the SIM must be taken out of the modem and installed into a phone to enable the SIM to be cleared.

♦ The modem must be able to support Text mode. P.D.U. mode is not supported.

When a controller sends an SMS text messageIt uses the Send command, containing the number to be called: AT+CMGS= ”phone number”.

The controller then waits for the reply '>'.When the '>' is received, the controller sends the message, ending the line with CTRL_Z

Using Hyperterminal for COM Troubleshooting

to SMS mode via Hyperterminalsfully initialized, you can use Hyperterminal to initialize

Notes

ber required?

mber set in the

card been th the local cellular

Should return one of two answers:+CREG: 0,1 The SIM is registered with its local provider.

+CREG: 0,5 The SIM is in roaming

ode

g question marks are run for verification twicethe second attempt, the attempts stop.

ts the PUK number, the SIM must be taken out of the led into a phone to enable the number to be entered.the SIM must be taken out of the modem and installed nable the SIM to be cleared.be able to support Text mode. P.D.U. mode is not

ds an SMS text messagemmand, containing the number to be called: AT+CMGS=

waits for the reply '>'.ved, the controller sends the message, ending the line

COM Troubleshooting

57

minal to initialize

wo answers:

with its local provider.

mode.

ce. If the command

ken out of the to be entered.

em and installed

mode is not

lled: AT+CMGS=

ending the line

Page 54: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

If the message is successfully sent, the controller will receive a message of confirmation,+CMGS:xx. 184 turns ON. The confirmation message is acknowledged by OK.If : the message of confirmation is not received within 15 seconds, orthe '>' is not received within 3 seconds, SB 185 turns ON.

When the controller receives an SMS t

It receives the command: +CMTI: “SM” ,xx. controller's memory, 1 to 20.When the message is received, the controller asks the modem for the text via the command AT+CMGR=xxThe modem replies with +CMGR, including thand concluding with OK.

Note ♦ When a COM port has been successfully initialized, the relevant bit turns ON: SB 80 , 82, 83 or 84.If initialization fails, SB 81, 83, 85, or 87 will turn ON.

'The Sniffer'--Viewing communication stringsThe instructions below show you how to construdevice enables you to use Hyperterminal to view communication strings flowing between a PLC and an external, connected device such as a bar code reader.

‘Sniffer’ is connected to the external device.

The completed Sniffer is connected to a PLC communication port, PC and external device. Note that communication cables are the programming cable provided by Unitronics.

To make a Sniffer, you need:

An adapter.

ccessfully sent, the controller will receive a message of :xx. When this message is received by the controller, SB onfirmation message is acknowledged by OK.

rmation is not received within 15 seconds, ord within 3 seconds, SB 185 turns ON.s an SMS text message:

and: +CMTI: “SM” ,xx. Xx is a number in the 1 to 20.

s received, the controller asks the modem for the text via MGR=xxwith +CMGR, including the phone number, status, text, OK.

has been successfully initialized, the relevant bit turns 3 or 84.s, SB 81, 83, 85, or 87 will turn ON.

communication stringsw you how to construct a communications 'Sniffer'. This Hyperterminal to view communication strings flowing rnal, connected device such as a bar code reader.

‘COM’ is connectedthe PLC.

d:

58

ve a message of y the controller, SB by OK.

nds, or

r in the

em for the text via

er, status, text,

elevant bit turns

ns 'Sniffer'. This trings flowing

ode reader.

’ is connected to LC.

Page 55: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Two 1N4148 or 1N914 diodes.

1. Open the adapter carefully via the 4 snaps in its sides.

2. Cut the red and green wires as shown below.

3. Solder one diode to the red wire, and one diode to the green wire.The soldered point provides the anode.

4. Put isolating material on the soldered points.

Using Hyperterminal for COM Troubleshooting

4 diodes.

ires as shown

red wire, and wire.des the anode.

the soldered

COM Troubleshooting

59

Page 56: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Vision OPLCs and Modems

60

5. Solder both diodes’ cathodes to the red wire.

6. Put isolating material on the solder.7. Close the Sniffer. 8. Label the connectors as shown.

Note ♦ In order to run view the strings in Hyperterminal, you must set the program to display ASCII strings as described above in Using Hyperterminal.

Page 57: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

1

GPRSGPRS is a wireless data transmission service offered by some cellular providers. When a Unitronics' PLC is connected to a GPRS modem, the PLC can establish a data connection with a remote PC connected to the Internet and transmit IP packets of data over the GPRS cellular network.

You can then use your PC to access the PLC via VisiLogic, Remote Access or other communication .dll, as well as log PLC data via the DataXport utility.

The figure below shows GPRS communication elements.

Notes ♦ The PLC must be connected to a GPRS modem. GPRS service must be

supplied by the user's cellular service provider. ♦ To enable any GPRS operations to run, the PLC application must include

GPRS Configuration and GPRS Run FBs. ♦ You must prepare both the PLC and PC side modems by carrying out

the Prepare PLC-side Modem procedure detailed in the topic PLC-side modems, and the Initialize PC Modem detailed in the topic PC-side modems.

♦ The PLC must initiate the GPRS data link by calling the PC. A sample application showing how to establish PC-PLC communications is available for both Sony Ericsson and Wavecom modems. This application is intended to be used as a template, for you to simply copy and adapt to your own requirements. Sample applications are located under Help>Examples.

♦ Wavecom modems do not support the End Call function. In order to end a call, use the Unregister from Network function, and then re-register if required.

The Sony Ericsson GT47 GPRS modem must be used in conjunction with an appropriate cable and 5 pin connector.

♦ Not supported by the V120-12 series.

Page 58: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

GPRS

2

Using GPRS The PLC's Ladder application must contain the conditions and elements shown below.

FB Name Purpose

COM Port Init FB Configure this FB to initialize the PLC COM Port connected to the GPRS-modem. Within the COM Init FB, select the GSM modem type, and then the actual GPRS modem type, such as the Sony Ericsson GT47. COM Port Init is usually a Power-up task. Note ♦ To learn how to prepare the modem for PLC use, check the topic PLC-side Modems.

GPRS Configuration The Configuration is linked to the serial port initialized via the COM Port Init FB. Note ♦ The activating conditions should include the appropriate Modem Initialized SB for the COM Port.

GPRS

Register to Network

Register must follow the GPRS Configuration. Connect provides the parameters that enable the PLC to connect to the Internet via the cellular network.

GPRS Run This element enables data communications via GPRS. Note ♦ The activating conditions should include the appropriate Modem Initialized SB for the COM Port.

Page 59: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

GPRS

3

Downloading OS via GPRS Enhanced Vision controllers using Boot 2.00 and higher support OS download via GPRS modem.

Notes ♦ The TC65 does not support OS download.

The modem must be connected to COM2.

Once the download begins, the controller enters Boot mode. Any interruption in communication may result in the controller being 'stuck' in boot mode, without an installed OS. For this reason, it is it is recommended that someone be next to the PLC during the OS download in order to attend to any potential problems.

FB Operations GPRS Operations are located on the FBs menu.

G P R S C o n f i g u r a t i o n

G P R S R eg i s t e r t o N e t w o r k

G P R S R u n

S t a r t Ca l l

L i s t e n / S t o p L i s t e n i n g R e m o t e D ev i c e

U n r e g i s t e r ( D i s c o n n e c t ) f r o m N e t w o r k

C h e c k S i g n a l Q u a l i t y

G P R S O p e r a n d s & S t a t u s M e s s a g e s

Examples Sample applications may be found in the VisiLogic Examples folder. This folder contains field-tested VisiLogic (.vlp) sample applications. You can open this folder via the Help Menu.

The folder is typically located at: C:\ProgramFiles\Unitronics\VisiLogic\Examples\Verx.xx, where x.xx indicates the version of VisiLogic.

Page 60: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 61: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

5

GPRS ConfigurationThe GPRS Configuration must be included in all GPRS Ladder applications.

The Configuration is linked to the serial port connected to the GPRS modem and initialized via the COM Port Init FB.

Note ♦ The activating conditions should include the appropriate Modem Initialized SB for the COM Port.

Parameter Type Function

Name The name of the Configuration.

Port Number Constant Click the drop-down arrows to view available ports; click the port you want to use.

Status Messages

MI The value of the linked MI indicates GPRS status messages.

Call Status MB This bit turns ON when the remote device has been accessed and the GPRS connection is established.

Page 62: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 63: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

7

GPRS Register to NetworkThis FB provides the parameters that enable the PLC to connect to the Internet via the GPRS cellular network.

Parameter Type Function

Name Select the name of the GPRS Configuration that Connect will use to connect to the GPRS network.

Registration Status

MB Turns ON when the PLC is assigned an IP address and registered by the GPRS network.

IP Address MI When the PLC registers on the GPRS network, it is assigned a dynamic IP address. This is the start of a vector that contains the IP address that is assigned to the modem when the modem registers with the GPRS network. The vector is 4 MIs long. The low byte of each MI provides the number for an octet within the IP address. If, for example, the IP address is linked to MI 0, and the low bytes of MI 0 to MI 3 contain the values 192, 198, 192, 45, the IP address will be 192.198.192. 45.

APN Server Constant or MI

The name of the APN (Access Point Name) Server given by your GPRS service provider.

Dial Number (optional)

Constant or MI

These parameters are required by some GPRS service providers and GPRS modem manufacturers.

User Name (optional)

Constant or MI

Password (optional)

Constant or MI

Page 64: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 65: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

9

GPRS RunThis element enables data communications via GPRS and must be included in all GPRS applications. The activating conditions should include the appropriate Modem Initialized SB for the COM Port.

Page 66: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 67: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

11

Start Call, End CallStart Call

This FB provides the Port and IP address of the remote device, enabling the PLC to call the remote device and establish a data communications link.

Parameter Type Function

Name Select the name of the GPRS Configuration that Connect will use to connect to the GPRS network.

Remote TCP/IP Port

Constant or MI

The access port of the remote device.

IP Address Constant or MI

The address of the remote device.

End Call This FB ends the current data communications sessions with a remote device, but does not terminate the connection to the GPRS network.

Note ♦ Wavecom modems do not support the End Call function. In order to end a call, use the Unregister from Network FB, and then re-register to the network if required.

Page 68: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 69: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

13

Listen to Remote Device, Stop Listening to Remote DeviceListen

This FB provides the Port and IP address of the remote device, enabling the PLC to call the remote device and establish a data communications link.

Parameter Type Function

Name Select the name of the GPRS Configuration that Connect will use to connect to the GPRS network.

Remote TCP/IP Port

Constant or MI

The port the PLC uses to listen to the remote device.

Stop Listening This FB ends the current data communications sessions with a remote device, but does not terminate the connection to the GPRS network.

Parameter Type Function

Name Select the name of the GPRS Configuration that Connect will use to connect to the GPRS network.

Note ♦ Wavecom modems do not support the End Call function. In order to end a call, use the Unregister from Network FB, and then re-register to the network if required.

Page 70: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 71: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

15

Unregister from NetworkUse this to disconnect the PLC from the GPRS network, including a delay of a second or two to allow the socket time to close when de-registering.

Page 72: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 73: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

17

Check Signal QualityThe signal quality value is placed in SI 185 GSM Signal Quality.

A value of -1(FFFF)signifies a modem error. This may be due to a weak signal; try repositioning the antenna. If this has no effect, check the modem.

Page 74: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 75: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

19

GPRS Operands & Status MessagesOperands linked to GPRS FBs should be assigned Power-up Values; bits should be reset, and registers initialized to 0.

GPRS: Configuration FB

Call Status GPRS MB Turns ON when:

• Call successfully made

Turns OFF when

• Call is terminated

Status Messages

Initialized to 0 when GPRS: Configuration is activated.

MI Value Message

0 No message

1 GPRS network registration is in progress

2 Registration Complete: the modem successfully registered with and received an IP address from the GPRS network

3 Connected to GPRS network

4 Listen Mode: Initialization Begins

5 Listen Mode: Initialized

6 Listen Mode: Initialization Re-started

10 Start Call: Begins

11 Start Call: Complete

15 End call: Begins

16 End call: Complete

20 Unregistration Begins (Not during Call)

21 Unregistration Begins (During Call)

22 Unregistration Complete: the modem has successfully disconnected from the GPRS network

23 Listen Mode: Close process begins

24 Listen Mode: Closed

30 Check Signal Quality: Start

31 Check Signal Quality: End

40 Command not supported (When End Call is activated in an application using a Wavecom modem)

50 Modem reply error

51 Modem Timeout error

52 Network Registration: failled

Page 76: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

GPRS

20

GPRS: Register to Network

Registration Status MB Turns ON when:

• The modem successfully registers with and received an IP address from the GPRS network

Turns OFF when

• The modem disconnects from the network

IP Address MI This is the start of a vector that contains the IP address that is assigned to the modem when the modem registers with the GPRS network. The vector is 4 MIs long. The low byte of each MI provides the number for an octet within the IP address. If, for example, the IP address is linked to MI 0, and the low bytes of MI 0 to MI 3 contain the values 192, 198, 192, 45, the IP address will be 192.198.192. 45.

GPRS System Operands

SI Description Value

185 GSM Signal Quality • The value is written during COM Init of the GSM modem. The value is updated whenever the user uses the GSM Signal Quality FB.

• A value of -1 (FFFF)signifies a modem error. This may be due to a weak signal; try repositioning the antenna. If this has no effect, check the modem.

SBs 120-125 register the signals that each port receives from the DTR and DSR pins of a serial communication cable. The DTR SBs 120, 122, and 124 are also used by the OS to control the DTR signal during RS485 serial communications, and during GPRS communications using the Sony Ericsson GPRS modem.

SB# Description Turns ON when: Turns OFF when: Reset by:

SB100 GPRS modem connected

• Call Remote device begins

• GPRS incoming call is answered

• End Session succeeds

• Disconnect from Network succeeds

OS

SB 120 DTR COM Port 1 (signal output from PLC)

DTR signal present DTR signal absent OS, may also be reset by user

SB 121 DSR COM Port 1 (signal input to PLC)

DSR signal present DSR signal absent OS

SB 122 DTR COM Port 2 (signal output from PLC)

DTR signal present DTR signal absent OS, may also be reset by user

SB 123 DSR COM Port 2 (signal input to PLC)

DSR signal present DSR signal absent OS

SB 124 DTR COM Port 3 (signal output from PLC)

DTR signal present DTR signal absent OS, may also be reset by user

SB 125 DSR COM Port 3 (signal input to PLC)

DSR signal present DSR signal absent OS

Page 77: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Check Signal Quality

21

Page 78: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 79: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

1

Using SMS Messaging To enable a controller to use SMS messaging, connect it to a modem that supports connection to a cellular network with SMS messaging service. SMS messaging operations are located on the FBs menu.

To send or receive SMS messages:

1. Initialize one of the controller's communications ports using a COM Init FB.

Note ♦ Communications cannot flow through the port during initialization. To avoid conflicts in your program, use the Modem Initialization Status SBs.

♦ Before using a modem, prepare it as described in the help topic PLC-side Modems.

2. Place an SMS Configuration FB into your application. Link it to the port initialized via the COM Init FB. The SMS Configuration will use this port to receive and send messages.

The SMS Configuration contains a list of SMS messages and phone numbers.

Note ♦ COM Init and SMS Configuration must appear in the application and be activated before any SMS operations are activated. If this is not done, the application will not work.

To enable the controller to receive messages, place an SMS Scan FB in your application and link it to a Configuration. When activated, this causes the controller to scan the GSM modem's SIM card for incoming SMS messages

To enable the controller to send SMS messages, place an SMS Send FB in your application and link it to a Configuration. You can then either send one of the messages in that Configuration or create one for that specific Send FB.

In either case, the port defined in the Configuration will be used to send the message.

FB Operations S M S : Co n f i g u r a t i o n

S M S : S c a n

S M S : S e n d

S M S : Ch e c k G S M S i g n a l Q u a l i t y

How to Configure, Receive, and Send Messages 1. Initialize a COM Port. The initialization status of each port is indicated in

Modem Initialization Status SBs. These SBs can be used to activate an SMS configuration.

Page 80: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

2

2. Select SMS Configuration from the FBs menu and place the function in your application.

Note

♦The condition that activates the SMS Configuration must turn ON for a single program scan (positive transition recommended).

♦ Once an SMS Configuration is activated, it can process SMS messages. However, messages are sent or received only when the MB linked to Modem Busy (GSM) is OFF.This MB turns ON when the modem is processing a message, or is communicating data to another application such as VisiLogic.

♦ The appropriate Modem: Initialized SBs [80 (COM 1), SB 82 (COM 2), SB 84 (COM 3)] must turn ON before activating an SMS Configuration using that COM port; the SBs should be used as an activating condition.

The SMS configuration must be scanned during every program cycle--after the Configuration is activated. One way to ensure this is by placing the configuration in the first subroutine of the main module.

3. To receive messages, place a Scan FB in your application.

Note ♦ An SMS Scan generally uses a direct contact as an activating

condition. This enables the configuration to continually 'listen' for incoming messages. When the controller registers that a Scan has been activated, the MB linked to Modem Busy (GSM) turns ON, turning OFF only after the Scan is complete.

Page 81: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Using SMS Messaging

3

You can also write incoming messages to an operand vector, including messages that are not in the Configuration.

1. Turn SB 199.

2. Enter the Start of Vector address (MI) in SI 199. You can write to an XI vector by entering a negative value.

If SB 199 is ON, SB 198 will be SET when an SMS message is received, and the message will be stored in operand vector. The length of the message, in bytes, will be stored in SI 198.

4. To send messages, place a Send FB in your application.

Note

♦When the positive transition contact used to activate the Send FB rises, the MB linked to Modem Busy (GSM) turns ON.

The rest of the logic in the net is processed whether or not the Send operation is completed.

♦ Operands linked to SMS FBs, such as Modem Busy (GSM), should be assigned Power-up Values; bits should be reset, and registers initialized to 0.

♦ When an SMS message is sent, the Modem Busy (GSM) MB remains ON until the message has cleared the SIM card.

♦ Be careful when using positive transition contacts to activate a Send operation.

When a Send operation is in progress, the modem is busy. If another Send operation is activated while the modem is busy, the second Send operation will not be activated and the message will not be

Page 82: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

4

sent--even after the modem is no longer busy.

Examples Sample applications may be found in the VisiLogic Examples folder. This folder contains field-tested VisiLogic (.vlp) sample applications. You can open this folder via the Help Menu.

The folder is typically located at: C:\ProgramFiles\Unitronics\VisiLogic\Examples\Verx.xx, where x.xx indicates the version of VisiLogic.

Page 83: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

5

SMS: ConfigurationAn SMS Configuration contains a list of SMS messages with attached variables and a phone book that is unique to that configuration. SMS Configuration is also where you define Message Properties.

Note ♦ The appropriate

Modem: Initialized SB [80 (COM 1), SB 82 (COM 2), SB 84 (COM 3)] must turn ON before the application can activate an SMS Config FB using that COM port. A Modem Initialized SB should be used as an activating condition.

Creating SMS Messages & Variables A single SMS message can contain both fixed text and up to 10 variables. A message containing only English characters may contain up to 160 characters. A message containing non-English characters may contain up to 70 characters.

Note ♦ When you create messages in a Configuration, VisiLogic does not allow you to begin a message with a fixed text character that is not a numeral (0-9) or a number sign (#). These limitations do not apply to messages that you compose in an SMS Send FB, or to Indirect Messages. These may begin with variables or with any alphanumeric character.

♦ Although the PLC can send Binary Text, Numeric, and List of Texts variables, it can only receive Numeric variables..

Page 84: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

Binary Variable

This type of variable displays different text in the SMS variable field according to the status of a bit operand.

Number Variable

A Number Variable enables you to:

Show any numeric value within a message.Control the format in which that value is shown, including the placement of a decimal point and leading zeros.Use Linearization to show a converted value, sutemperature converted to degrees Celsius.

plays different text in the SMS variable field according erand.

bles you to:

value within a message.in which that value is shown, including the placement and leading zeros.o show a converted value, such as an analog rted to degrees Celsius.

6

field according

the placement

nalog

Page 85: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS: Configuration

7

List of Texts: by Pointer

This type of variable contains numbered lines of text. You link the Variable to an operand. The value within that operand 'points' to the number of a line within the list. When the operand value is equal to a particular line number, the text of that line is shown in the Display.

Message Properties This defines how the PLC deals with a specific SMS message that is received by the system. Note that a SMS Scan FB must be placed in the Ladder to enable the PLC to check a specific SMS Configuration for received messages.

Page 86: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

Phone Book Click on a line to either:

Directly enter a phone number in the phone book, orUse a vector of registers to indirectly dial a number. Variables can then be linked to this vector, enabling a user to dial a number from the controller keypad via HMI Entry Variables.

Indirect Vector

Each register byte contains 1 character. Note that the byte actually contains the ASCII value of the desired numeral. For example, the ASCII value of 1 is 049.

one number in the phone book, oristers to indirectly dial a number. HMIbe linked to this vector, enabling a user to dial a ontroller keypad via HMI Entry Variables.

ains 1 character. Note that the byte actually contains desired numeral. For example, the ASCII value of 1 is

8

Keypad Entry r to dial a s.

ually contains CII value of 1 is

Page 87: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS: Configuration

9

International Cell Phone Number Format

To work with international phone numbers, use the full GSM format, including the '+' in front of the country code.

Message Index Numbers

The messages in the Configuration are numbered consecutively. Inserting and deleting messages causes the index numbers to increment and decrement.

If your application contains Send functions that send messages from the Configuration, you must edit the message index number accordingly.

Example

In the following figure, the Send function is set to send the message with Index # 2.

In the next figure, the user inserted a line, causing the index number to increment. However, the user did not edit the Send function, and message Index # is now blank.

Page 88: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

10

Page 89: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Configuration and the Program ScanThe condition that activates the Configuration must be turn ON for a single program scan. (positive transition is recommended) However, the SMS configuration must be scanned program cycle--after the Configuration is activated. ensure this is by placing the configuration in the first subroutine of the main module.

The net containing the configuration

Be in a subroutine that is called during everapplication.

Be in a net that is never skipped over by a Jump to Label.This SMS Configuration will be activated once (SB82 rises), and then in every program scan that follows.

Unlike the example above, this Configurationrises), and is then not included

on and the Program Scanates the Configuration must be turn ON for a single e transition is recommended) nfiguration must be scanned during every the Configuration is activated. One way to ing the configuration in the first subroutine of the

configuration must:

that is called during every program scan of the

never skipped over by a Jump to Label.will be activated once (SB82 rises), and then hat follows.

ve, this Configuration is scanned only once (SB 82 ncluded in the following program scans.

11

N for a single

g every e way to broutine of the

n of the

d then included

once (SB 82 s.

Page 90: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 91: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

13

SMS: ScanTo enable the controller to receive messages, place an SMS Scan FB in your application and link it to a Configuration. When activated, this causes the controller to scan the GSM modem's SIM card for incoming SMS messages.

Before you can receive an SMS, you must initialize a COM port to use a GSM modem, create an SMS Configuration, and set conditions as explained in Using SMS Messaging.

Note ♦ Communications cannot flow through the port during initialization. To avoid conflicts in your program, use the Modem Initialization Status SBs.

♦ Although the PLC can send Binary Text, Numeric, and List of Texts variables, it can only receive Numeric variables.

♦ Use an MB activated by the SMS Configuration FB to activate the Scan, as shown in Using SMS Messaging

When the PLC receives a message, the Message Properties defined in the SMS configuration for that message define how it will be processed.

Page 92: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

14

Page 93: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

15

SMS: SendTo send an SMS, place an SMS Send operation in your Ladder application. Before you can send an SMS, you must initialize a COM port to use a GSM modem, create an SMS Configuration, and set conditions as explained in Using SMS Messaging.

Note ♦ Communications cannot flow through the port during initialization. To avoid conflicts in your program, use the Modem Initialization Status SBs.

♦ Before using a modem, prepare it as described in the help topic PLC-side Modems.

♦ If the SMS Configuration is busy, messages cannot be received. Avoid conflicts by using a negative contact, linked to the Configuration's Modem is Busy MB, as an activating condition for SMS: Send.

Note ♦ You can send only one SMS message at a time, but you may send it to multiple phone numbers.

♦ The Send Status MB turns on if there are more than one Send operations, and the PLC has not finished processing the first Send before the second Send is activated. In this case, Modem Busy MB of the SMS: Configuration bit will be ON, causing the Send Fail Bitmap to contain a value of -1.

Page 94: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

16

Compose Message

Opens a blank message field. Create a message by typing characters and attaching variables.

Select from Configuration

Opens the list of messages contained in the linked Configuration. To select a message to send, click it; the message will be highlighted.

Indirect Message

Enables a vector of register values to be sent as ASCII characters. Note ♦ Each register byte contains one character.

Note ♦ When you create messages in a Configuration, VisiLogic does not allow you to begin a message with a fixed text character that is not a numeral (0-9) or a number sign (#). These limitations do not apply to messages that you compose in an SMS Send FB, or to Indirect Messages. These may begin with variables or with any alphanumeric character.

♦ A message containing only English characters may contain up to 160 characters. A message containing non-English characters may contain up to 70

Page 95: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS: Send

17

characters.

♦ Phone Indexes is based on the Phone Book in the linked SMS configuration. Index numbers are 0 to 8, note that 0 is the index of the last number called.

♦ SB 184 SMS: Transmission Succeeded and 185 SMS: Transmission Failed are both reset when any message is sent to any phone number. After the message has been processed, the Relevant SB will turn ON.

♦ You can send messages in ASCII text format by turning ON SB 279: ASCII Text message format,

♦ If forced display messages are supported by the cell phone receiving the SMS, you can send a forced display message by turning ON SB 280: Force Message Display on Cell Phone.

Page 96: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 97: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS VariablesVariables can be included in Configuration or Send FB messages. A sinmessage can contain both fixed text and up to 10 variables. Note that SMS variables are not related to HMI variables.

Although the PLC can send Binary Text, Numeric, and List of Texts variables, it can only receive Numeric

Binary Variable

This type of variable displays different text in the SMS variable field according to the status of a bit operand. The value currently visible is the last value sent.

Numeric Variable

A Number Variable enables you to:

Show any numeric value within aControl the format in which that value is shown, including the placement of a decimal point and leading zeros.Use Linearization to show a converted value, such as an analog temperature converted to degrees Celsius.

ed in Configuration or Send FB messages. A sinth fixed text and up to 10 variables. Note that SMS

d to HMI variables.

end Binary Text, Numeric, and List of Texts variables, it ric variables.

plays different text in the SMS variable field according erand. The value currently visible is the last value sent.

bles you to:

value within a message. in which that value is shown, including the placement and leading zeros.o show a converted value, such as an analog rted to degrees Celsius.

19

es. A single SMS ote that SMS

exts variables, it

field according e last value sent.

the placement

nalog

Page 98: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

20

List of Texts: by Pointer

This type of variable contains numbered lines of text. You link the Variable to an operand. The value within that operand 'points' to the number of a line within the list. When the operand value is equal to a particular line number, the text of that line is shown in the Display.

Page 99: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

21

SMS: Check GSM Signal QualityThe signal quality may be checked at any point after SMS Configuration.

The signal quality value is placed in SI 185 GSM Signal Quality.

A value of -1(FFFF)signifies a modem error. This may be due to a weak signal; try repositioning the antenna. If this has no effect, check the modem.

Page 100: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53
Page 101: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

Sending SMS messages from a GSM cell phoneTo send SMS messages from your cell

Create and download a project to your PLC that includes an SMS Configuration, set Message Properties, and define conditions as described in the topic Using SMS Messaging.Write an SMS message in your cell phone.Send the message to the PLC's GSM modem

Note ♦ You can only send messages that are already part of an SMS Configuration in the PLC.

♦ If the Limit to Authorized Phone Numbers option is selected in the SMS configuration, the cell phone number must be in the list

Writing SMS messages in your cell phoneYou write an SMS message using your cell phone keypad. Make sure that:

The fixed text in your cell phone is identical to the message in the PLC's SMS Configuration in every detailare case-sensitive.

You bracket variable values with number signs (#) as shown below. These signs '#' do not count as spaces.The variable field in the SMS message is big enough to hold the value.

The figure below shows the same SMS medisplay, and as it appears in the PLC's SMS Configuration.

When you send this message from your cell phone, the value 110 will be written into the variable in the PLC.

Sending the message to the PLC1. Enter the number of t

GSM cell phone number, then send the message.Checking that the PLC has received the SMS message

You can check if the PLC received your message by using the Acknowledge feature:

ssages from a GSM cell phoneom your cell phone to your PLC, you must:

a project to your PLC that includes an SMS essage Properties, and define conditions as described in Messaging.ge in your cell phone.the PLC's GSM modem

d messages that are already part of an SMS he PLC.

thorized Phone Numbers option is selected in the SMS cell phone number must be in the list.

s in your cell phonee using your cell phone keypad. Make sure that:

r cell phone is identical to the message in the PLC's SMS ry detail: spaces, characters--and note

values with number signs (#) as shown below. These nt as spaces.the SMS message is big enough to hold the value.he same SMS message: as it appears on a cell phone in the PLC's SMS Configuration.

age from your cell phone, the value 110 will be written C.

o the PLCthe PLC's GSM modem exactly as you would enter any ber, then send the message.has received the SMS messagereceived your message by using the Acknowledge

23

honemust:

SMS s as described in

SMS

ted in the SMS

sure that:

in the PLC's SMS e that characters

n below. These

the value.n a cell phone

0 will be written

would enter any

knowledge

Page 102: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

SMS Messaging

1. Select 'Acknowledge' in shown below.

2. Use your cell phone to send the message "to the PLC.

3. The PLC receives this SMS message; AutoAcknowledge causes the PLC toimmediately return the message to your cell phone, together with the current variable value.

4. You can now view this SMS message on your cell phone display, together with changes in the variable value.

Note that although the PLC can send SMS messages thatand List variables, the PLC can only receive Numeric variables.

in Message Properties, the ACK box is checked as

to send the message "Holding Temperature:#110#"

s SMS message; AutoAcknowledge causes the PLC tossage to your cell phone, together with the current

s SMS message on your cell phone display, together with ue.

C can send SMS messages that include Numeric, Binary, C can only receive Numeric variables.

24

checked as

rature:#110#"

ses the PLC tothe current

play, together with

e Numeric, Binary,

Page 103: Table of Contentsmedia.klinkmann.ee/catalogue/content/data_en...Vision OPLCs and Modems vi Cable Pin-out ..... 53 Data Flow Direction ..... 53

IndexBBridge ......................................... 37 CCANbus ....................................... 37 COM port ..................................... 45 Communications ............. 9, 29, 41, 45

Initialize COM port ..................... 29 Modem ................. 9, 19, 29, 41, 55 Troubleshooting ......................... 41

Controller .................................... 37 Controller network ........................ 37 DDial ............................................ 31 Download via network ................... 37 EEdit programs-via network ............ 37 Errors ......................................... 41 GGSM ...................................... 19, 21

HHMI ............................................ 31 MModem .................... 9, 15, 19, 45, 55 Modem Error Messages ................. 41 NNetwork ...................................... 37 PPC .............................................. 37 Phone book .................................... 5 Phone numbers .............................. 5 Programming cable ....................... 37 RRemote Access ............................... 9 SSMS ........................ 1, 13, 15, 21, 23 TTroubleshooting ........... 41, 45, 55, 13 WWiring ......................................... 19

Samaratel. +7 846 273 95 [email protected]

Yekaterinburgtel. +7 343 287 19 [email protected]

St. Petersburgtel. +7 812 327 [email protected]

Moscowtel. +7 495 641 [email protected]

Helsinkitel. +358 9 540 [email protected]

Vilniustel. +370 5 215 [email protected]

Rigatel. +371 6738 [email protected]

Мinsktel. +375 17 200 [email protected]

Tallinntel. +372 668 [email protected]

Кievtel. +38 044 495 33 [email protected]