0% found this document useful (0 votes)
2 views

VisiLogic Software Manual-Getting Started

The VisiLogic Software Manual provides comprehensive guidance for configuring and using VisiLogic software with Unitronics Vision controllers. It covers topics such as hardware configuration, ladder and HMI display editors, variable management, and communication protocols. The manual also includes troubleshooting tips and examples to assist users in creating and managing control projects effectively.

Uploaded by

MishaPl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

VisiLogic Software Manual-Getting Started

The VisiLogic Software Manual provides comprehensive guidance for configuring and using VisiLogic software with Unitronics Vision controllers. It covers topics such as hardware configuration, ladder and HMI display editors, variable management, and communication protocols. The manual also includes troubleshooting tips and examples to assist users in creating and managing control projects effectively.

Uploaded by

MishaPl
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 220

Software Manual

Getting Started
with VisiLogic
V230-21-G23 Rev: 12/04
No part of this document may be used for any purpose other than
for the purposes specifically indicated herein nor may it be
reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying and/or
recording, for any purpose without written permission from
Unitronics.
The information appearing in this document is for general
purposes only. Unitronics makes no warranty of any kind with
regard to the information appearing in this document, including,
but not limited to, implied warranties of merchantability and/or
fitness for a particular use or purpose. Unitronics assumes no
responsibility for the results, direct and/or indirect, of any misuse
of the information appearing in this document nor for any use of
the Unitronics products referred to herein in any manner
deviating from the recommendations made in this document.
Unitronics assumes no responsibility for the use of any parts,
components, or other ancillary appliances including circuitry other
than as recommended hereunder or other than that embodied in
the Unitronics product.
Unitronics retains all rights to its proprietary assets including, but
not limited to its software products which are copyrighted and
shall remain the property of Unitronics. Copyright protection
claimed includes all Forms and matters of copyrightable materials
and information legally allowed including but not limited to
material generated from the software programs which are
displayed on the screen of the Unitronics products such as styles,
templates, icons, screen displays, looks, etc. Duplication and/or
any unauthorized use thereof are strictly prohibited without prior
written permission from Unitronics.
All brand or product names are used for identification purpose
only and may be trademarks or registered trademarks of their
respective holders.
Unitronics reserves the right to revise this publication from time to
time and to amend its contents and related hardware and
software at any time. Technical updates (if any) may be included
in subsequent editions (if any).
Table Of Contents
Welcome to VisiLogic................................................................................................................................................ 1
Getting Started............................................................................................................................................................ 3
Hardware Configuration ......................................................................................................................................... 3
Ladder Editor.......................................................................................................................................................... 3
HMI Display Editor................................................................................................................................................ 4
About the HMI Display and Keypad ...................................................................................................................... 5
'Touchscreen' controllers................................................................................................................................... 5
Quick Navigation ................................................................................................................................................... 6
Variables................................................................................................................................................................. 8
Variable Editor.................................................................................................................................................. 8
Downloading/Uploading a Project ......................................................................................................................... 9
On-Line Test Mode (Debug) ............................................................................................................................... 10
Watch Folders....................................................................................................................................................... 11
Information Mode................................................................................................................................................. 13
Using Information Mode................................................................................................................................. 14
COM Ports and Data Communications ................................................................................................................ 17
Com Ports ....................................................................................................................................................... 17
About Modems ..................................................................................................................................................... 18
Getting Started with Ladder ................................................................................................................................. 18
Ladder Net ...................................................................................................................................................... 18
Placing a Ladder Element in a Net.................................................................................................................. 19
Placing a Function in a Net ............................................................................................................................. 19
Connecting Ladder Elements and Functions................................................................................................... 20
Linking Operands to Elements........................................................................................................................ 21
Nets: Sizing and Resizing ............................................................................................................................... 21
Adding and Inserting Nets .............................................................................................................................. 22
Move, Copy, & Paste Nets.............................................................................................................................. 22
Move, Copy & Paste Elements ....................................................................................................................... 25
Move, Copy, & Paste between Projects .......................................................................................................... 26
Deleting Nets .................................................................................................................................................. 28
Comments Tool............................................................................................................................................... 30
Undo ............................................................................................................................................................... 32
Changing an Element's Operand ..................................................................................................................... 32
Power-up Values............................................................................................................................................. 33
Program Sequencing: Modules, Subroutines, Labels & Jumps ...................................................................... 33
Protecting Subroutines .................................................................................................................................... 37
Import/Export Subroutines.............................................................................................................................. 38
Ladder Logic................................................................................................................................................... 41
Toggling between PLC and HMI Editors ....................................................................................................... 41
Getting Started with Displays............................................................................................................................... 42
Text in HMI Displays ..................................................................................................................................... 42
Graphic Images in Displays ............................................................................................................................ 42
Copy & Paste Displays ................................................................................................................................... 42
Getting Started with Variables ............................................................................................................................. 44
Inserting a Variable into a Display ................................................................................................................. 45
Hardware Configuration........................................................................................................................................... 47
I/O Expansion Modules ........................................................................................................................................ 47

iii
Getting Started

Configuring a PT100 Input ............................................................................................................................. 47


Configuring I/O Expansion Modules .............................................................................................................. 48
High-Speed Counters: I/O Expansion Modules .............................................................................................. 48
Snap-in I/O Expansion Modules........................................................................................................................... 50
Configuring Snap-in I/O Modules .................................................................................................................. 50
High-Speed Counters: Snap-in I/O Modules .................................................................................................. 50
Configuring a High-Speed Counter ...................................................................................................................... 52
Configuring a High-speed Output (PWM) ........................................................................................................... 53
Configuring the HSO ...................................................................................................................................... 53
Configuring an Analog Input................................................................................................................................ 54
Analog Filters, PLC.............................................................................................................................................. 55
Configuring an Analog Output ............................................................................................................................. 57
Analog I/O Ranges ............................................................................................................................................... 57
Working with Analog I/O Values......................................................................................................................... 58
Configuring Digital Inputs ................................................................................................................................... 61
Configuring Digital Outputs................................................................................................................................. 61
Assign a Description to Multiple Operands.......................................................................................................... 62
Controller Settings.................................................................................................................................................... 63
Communication and OS-Controller Menu............................................................................................................ 63
Vision Communication PC Settings ..................................................................................................................... 63
Run, Reset, Initialize ............................................................................................................................................ 63
Get COM Parameters and PLC status .................................................................................................................. 64
Downloading an OS ............................................................................................................................................. 64
Check Network Status .......................................................................................................................................... 65
Communications....................................................................................................................................................... 67
COM Port: Init...................................................................................................................................................... 67
RS232 ................................................................................................................................................................... 67
RS485 Options ..................................................................................................................................................... 68
About RS485................................................................................................................................................... 68
Network Topology & Wiring.......................................................................................................................... 68
RS485, by controller type..................................................................................................................................... 69
Vision 230/260/280......................................................................................................................................... 69
Vision 120/ M91 ............................................................................................................................................. 71
M90................................................................................................................................................................. 73
Vision / M91 RS485 Port Specifications ........................................................................................................ 73
PLC-side Modems ................................................................................................................................................ 74
How to enable a Vision controller to communicate via landline, GSM, or CDMA modem........................... 74
How to enable a PLC to dial a remote modem (Ladder)................................................................................. 76
How to terminate the link--Hang-up ............................................................................................................... 77
Modem Tips.................................................................................................................................................... 78
PC-Side Modems.................................................................................................................................................. 78
How to Configure a PC-side Modem.............................................................................................................. 78
How to use the PC modem to access a PLC ................................................................................................... 79
Dial & Hang-up .................................................................................................................................................... 79
Downloading an OS via Modem .......................................................................................................................... 80
Modem Tips.................................................................................................................................................... 81
Using Ethernet ...................................................................................................................................................... 81
Default Socket Configuration ......................................................................................................................... 82

iv
Table Of Contents

General............................................................................................................................................................ 83
Examples......................................................................................................................................................... 83
PLC networks, PLC to PLC............................................................................................................................ 83
PC to PLC: Accessing PLC via SCADA ........................................................................................................ 88
PC-PLC Communications .................................................................................................................................... 90
Remote Access: Accessing a PLC via PC....................................................................................................... 90
Vision Communication PC Settings ............................................................................................................... 93
Ethernet ................................................................................................................................................................ 93
About Ethernet ................................................................................................................................................ 93
Using Ethernet .............................................................................................................................................. 101
TCP\IP: Card Init .......................................................................................................................................... 110
TCP\IP: Socket Init ....................................................................................................................................... 110
TCP\IP: TCP Connect \ TCP Close .............................................................................................................. 111
Ethernet TCP\IP: PC to Vision ..................................................................................................................... 112
Ethernet TCP\IP: SBs & SIs ......................................................................................................................... 116
Ethernet TCP\IP: PC to Vision ..................................................................................................................... 118
Networks ................................................................................................................................................................ 121
About Networks ................................................................................................................................................. 121
CANbus Networking Operands.......................................................................................................................... 122
Implementing inter-PLC data exchange........................................................................................................ 122
Assigning a Unit ID number............................................................................................................................... 126
Network Operands-Communicating Data Via CANbus..................................................................................... 128
Accessing a Networked PLC via PC .................................................................................................................. 129
Accessing a Networked Controller ............................................................................................................... 129
Accessing a Networked Controller via Modem ............................................................................................ 130
Modems: Setting Up ..................................................................................................................................... 131
Check Network Status ........................................................................................................................................ 133
CANbus Network Problems ............................................................................................................................... 133
Utilities ................................................................................................................................................................... 135
Live Update from the Web ................................................................................................................................. 135
Information Mode............................................................................................................................................... 135
Using Information Mode............................................................................................................................... 136
On-Line Test Mode (Debug) ............................................................................................................................. 139
Remote Access: Accessing a PLC via PC .......................................................................................................... 141
Accessing a Controller .................................................................................................................................. 141
Project (Vision) Downloader.............................................................................................................................. 144
Creating Download files ............................................................................................................................... 144
Checking the integrity of the Download file................................................................................................. 144
Quick Navigation ............................................................................................................................................... 145
Operand View..................................................................................................................................................... 147
Watch Folders..................................................................................................................................................... 147
Protecting Subroutines........................................................................................................................................ 149
Creating and Using a Password .................................................................................................................... 149
Deleting a Ladder Password ......................................................................................................................... 150
Memory Tab ....................................................................................................................................................... 150
Find (& Replace) ................................................................................................................................................ 151
Interrupt Routines............................................................................................................................................... 156
2.5 mS Interrupt Routine............................................................................................................................... 156

v
Getting Started

Interrupt HSC................................................................................................................................................ 157


Search: Symbolic Name ..................................................................................................................................... 158
Deleted Unreferenced Operands......................................................................................................................... 158
Print Project........................................................................................................................................................ 158
Project Properties ............................................................................................................................................... 159
Import/Export Subroutines ................................................................................................................................. 162
Verify Project ..................................................................................................................................................... 165
Compile .............................................................................................................................................................. 165
Log ..................................................................................................................................................................... 166
Show STL........................................................................................................................................................... 166
Power-up Modes: Trouble-shooting ................................................................................................................... 167
Memory Allocation ............................................................................................................................................ 168
Ladder Code Capacity................................................................................................................................... 168
Hotkeys: Quick Editing ...................................................................................................................................... 169
Data Tables............................................................................................................................................................. 171
About Data Tables.............................................................................................................................................. 171
Creating a Data Table ................................................................................................................................... 171
Data Table Options ....................................................................................................................................... 172
Column Parameters....................................................................................................................................... 173
Database-Read/Write.......................................................................................................................................... 174
Read Row...................................................................................................................................................... 175
Write Row..................................................................................................................................................... 176
Read Column ................................................................................................................................................ 176
Write Column ............................................................................................................................................... 176
Read/Write Direct ......................................................................................................................................... 177
Data Tables: Clear Table .................................................................................................................................... 179
Data Tables: Find Row, Find Row Extended ..................................................................................................... 179
Program Recipes................................................................................................................................................. 181
Data Tables: Synchronizing Data ....................................................................................................................... 181
Data Tables and Excel ........................................................................................................................................ 182
Troubleshooting...................................................................................................................................................... 185
Detecting Short-circuited End Devices .............................................................................................................. 185
On-Line Test Mode (Debug) ............................................................................................................................. 185
Power-up Modes: Trouble-shooting ................................................................................................................... 186
I/O Expansion Module Errors............................................................................................................................. 187
Compile .............................................................................................................................................................. 188
Why does the Controller display the 'Restart' message?..................................................................................... 188
HMI Element Resizing/Rotating Limitations ..................................................................................................... 188
Float Errors......................................................................................................................................................... 189
Changing Panel Types: Conflicts ....................................................................................................................... 189
Insufficient Flash Memory ................................................................................................................................. 190
Communications................................................................................................................................................. 190
CANbus Network Problems ......................................................................................................................... 190
Modem Troubleshooting............................................................................................................................... 191
COM Port/Modem Status, System Operands, & Error Messages................................................................. 196
Using Hyperterminal for COM Troubleshooting.......................................................................................... 199
Using Hyperterminal to check PC-PLC direct communications................................................................... 206
Index....................................................................................................................................................................... 211

vi
Welcome to VisiLogic
VisiLogic is the software tool you use to create control projects for Vision controllers. After you plan the control
task, use VisiLogic to write, debug, and download the PLC control and HMI applications into the controller.

The PLC application is your control, or automation application. You write the PLC application using the Ladder
Editor.

The HMI application configures the operating panel's function. You use the HMI Editor to create the Displays
that are shown on the controller's screen.

Displays tell your operators what to do. You can have your operators log in with a password, enter setpoints and
other data, and instruct the operator what to do in case of a system problem or alarm. A Display can contain both
text and images. Text and images can be both fixed and/or variable.

Variables are inserted into a Display to:

Show run-time values as integers


Represent run-time values with either text, images, or bar graphs
Show text messages that vary according to runtime conditions.
Enable an operator to enter data using the Vision's alphanumeric keypad.
Here are some of VisiLogic's major features.

Program Editors
You use 3 editors to create your application:

Ladder
HMI Display
Variable
Each editor is operated through a different window. You switch between the editors via the Toolbar buttons or
by clicking elements in the Project Tree.

Ladder Modules and Subroutines


VisiLogic is a modular program you build using Modules and Subroutines.

Hardware Configuration
VisiLogic offers easy Hardware Configuration. The foundation of a Vision control system is the controller. The
Snap-in I/O Module provides an on-board I/O configuration. You add I/Os by integrating I/O Expansion
Modules.

After you select the Snap-in or Expansion I/O modules connected to the controller, you can configure inputs:
analog, digital, and high-speed counter/shaft-encoder/frequency measurers and PT100; and outputs: analog,
digital, and PWM high-speed outputs.

Project Explorer
The Project Explorer tree allows you to navigate easily between program components.

Operand View and Watch Folders


VisiLogic allows you to view operands and their contents according to type and whether or not they are in use.
You can also group related operands according to functions in Watch Folders.

Help
Use the VisiLogic Help System to learn how to use the software and answer your questions. Browse sequences
present help topics in an order to aid you in learning. The browse sequence shown below is Configuring Hardware.

1
Getting Started

VisiLogic Examples

When you install VisiLogic, an Examples folder is


created on your hard disk, containing field-tested
VisiLogic (.vlp) sample applications. You can copy these
sample applications and adapt them for your own use--if,
for example, an application is written for the V120, you
can select the V230 via Hardware Configuration.

VisiLogic's Help Menu now includes a Help file


containing a list of applications as well as their location
path.

2
Getting Started
Hardware Configuration
Hardware Configuration opens automatically when you first create a new project. In order to open Hardware
Configuration in an existing project, either select Hardware Configuration from the View menu or click the
button on the toolbar.

Click on the appropriate icon to select the model Vision, the Snap-in I/O module, and any I/O Expansion
modules required by your application.

After you select the Snap-in or Expansion I/O modules connected to the controller, you can configure inputs:
analog, digital, and high-speed counter/shaft-encoder/frequency measurers and PT100; and outputs: analog,
digital, and PWM high-speed outputs.

Note • You must select the correct Vision model and Snap-in I/O modules before downloading your
project.

Ladder Editor
Use the Ladder Editor to create the Ladder diagram that comprises your control application. Ladder diagrams
are composed of contacts, coils, and function block elements arranged in nets.

In a Ladder diagram, the contacts represent input conditions. They lead power from the left Ladder rail to the
right rail. This is why the first element in a net must always touch the left rail. Coils represent output
instructions. In order for output coils to be activated, the logical state of the contacts must allow the power to
flow through the net to the coil. This is why the elements in a net must be connected. Each net must contain
only one rung.

Use the Ladder Editor to:

3
Getting Started

Place and connect Ladder Elements.


Apply Compare, Math, Logic, Clock, Store, and Vector functions.
Insert Function Blocks (FBs) into your program.
Build program Modules and Subroutines, and use internal Subroutine Jumps and Labels.
Place Comments on Ladder nets.
Ladder elements and functions may be dragged and dropped between nets. Hotkeys are also available for easy
programming.
To start the Ladder Editor
Click the Ladder button on the toolbar.

HMI Display Editor


Use the HMI Display Editor to create the Displays that are shown on the controller screen after the program is
downloaded. When you select HMI from the Project Explorer tree, a Display replica opens. The size of this
replica reflects the type of Vision controller you have selected in your project's Hardware Configuration.

Displays tell your operators what to do. You can have your operators log in with a password, enter setpoints and
other data, and instruct the operator what to do in case of a system problem or alarm. A Display can contain
both text and images. Text and images can be both fixed and/or variable.

Variables are inserted into a Display to:

4
Getting Started

Show run-time values as integers


Represent run-time values with either text, images, or bar graphs
Show text messages that vary according to runtime conditions.

About the HMI Display and Keypad


All Vision controllers offer an integrated HMI operating panel that includes an LCD screen and a keypad. The
screen size, type and keypad vary. Exact specifications regarding Vision operating panels are included in the
user's manuals.

'Touchscreen' controllers
There are 2 types of Vision touch-screen models:

Models which comprise only a virtual keypad (V290). In these models, the virtual keypad opens
whenever the user touches a keypad entry variable that is currently displayed on the screen.

5
Getting Started

Models which comprise both an HMI function keypad and a virtual keypad (V280). However, in
these models, the virtual keypad must be activated by turning SB 22 Enable Virtual Keypad ON.
This must be done at power-up, or before the Display containing the keypad variable is entered.
In addition, the Keypad entry variable must be assigned a Touch Property.

Quick Navigation
VisiLogic offers different tools for program navigation.

Program Tree

Note • Within the program tree, elements are presented alphabetically. This does not affect the order in
which the program runs.
• Ladder Modules and subroutines can be moved via drag-and-drop, as can HMI Modules and
Displays. Again, moving elements does not affect the order in which they run.
The Main Ladder Module, Main Subroutine, Start-up HMI Module and the Start-up HMI Display
cannot be moved via drag-and-drop or erased. For easy identification, they are always marked in
orange.

6
Getting Started

Accessing a Load Display Target

Accessing a Call Subroutine Target

Go To Label

Use labels as bookmarks to mark program sections, and then locate them using the Go To Label<Alt> +
<Right/Left arrow> and List of Labels <Ctrl> + <L> utility.

7
Getting Started

The Find utility also enables you to easily locate, directly open, and edit most program elements.

In addition, shortcut menus that are relevant can be opened.

Variables
Variables enable you to show run-time values, text, images, and bar graphs on the controller's screen in response
to run-time conditions. Bit, or binary text variables, for example, display text messages on the controller's LCD
screen according to the status of a bit operand.

A Display may contain up to 24 variables.

You can also use Keypad Entry Variables to enable an operator to enter a password, or data such as setpoints
from the controller's keyboard.

Variable Editor
When you insert a variable into a display, the Variable Editor opens, showing you the options that are relevant
for that type of Variable.

8
Getting Started

After you have inserted Variables into a display, they are shown with that display in the Project tree.

Downloading/Uploading a Project
The Download process transfers your project from the PC to the controller.

To download a project to a controller:

1. Connect the controller to the PC with the programming cable.

9
Getting Started

2. Click the Download icon on the Standard toolbar.


3. The downloading process begins.

To upload a project from a controller:

1. Connect the controller to the PC with the programming cable.


2. Select Upload icon from the Connection menu; the Vision Communication PC Settings window opens.
3. Select the connection type and click Exit; the uploading process begins.
Upload copies the complete project from the controller into the PC.

Via Project Properties, you can apply upload and download options:

Assign a project password. Password protection requires users to enter a password before
uploading a project to a PC.
Prevent project upload.

On-Line Test Mode (Debug)


To test a project, first connect the controller to your PC using the program download cable provided with the
software package, then download the project and click the On-Line Test button. The Online Test toolbar opens,
enabling you to:

Switch between Run and Stop modes.


Use Single Scan to run a single cycle of the ladder program for debugging purposes.
You can stop the scan cycle at any point by placing OnLine Test Points, located on the More
menu, in the Ladder.

When the scan reaches an OnLine test point that is active (receives RLO), Online Test freezes,
enabling you to check element status and values, including Timer values, at that point during
Ladder execution. Note that if more than one OnLine test point is activated, SB 35 turns ON.
Measure the time interval between 2 points in the Ladder application, by placing Start and End
Interval elements, located on the More menu, anywhere in the application. The time interval, in

10
Getting Started

micro-seconds, is stored in the DW linked to the End Interval element.

Open Remote Access to debug remote controllers via network or modem connections.

In Online Test mode, you can view the power flow, and view and force operand values and element status.

Note • The controller can send and receive SMS messages when the controller is in Test mode.

Watch Folders
Watch Folders enable you to:

11
Getting Started

Arrange related groups of operands in folders.


Name the folders.
View these operands in the tabbed Output Window at the bottom of the screen.
To view a Watch folder, click the Watches tab at the bottom of the screen, then select the desired folder. Edit the
folder by right-clicking a line, then selecting the appropriate function.

Adding Operands to a Watch Folder from a net

To add a single operand to a Watch folder, right-click it in the Ladder or in the Operand Output
Window.

12
Getting Started

To add all of the operands within a net to a Watch folder, right-click the right-hand rail of the
desired net.

Information Mode
Information Mode is a utility that is embedded in the operating system of the controller. Via Information Mode,
you can view data on the LCD screen, use the controller’s keyboard to directly edit data, and perform certain
actions such as resetting the controller. You can enter Information Mode at any time without regard to what is
currently displayed on the LCD screen.

Enter Information Mode by pressing the <i> key for a few seconds. The default password is 1111.

13
Getting Started

Viewing data does not affect the controller’s


program. Performing actions, such as initializing
the controller, can influence the program.

Note that when you use Information Mode, the


keyboard is dedicated to that purpose. The keys
return to normal application functions when you
exit Information Mode.

Using Information Mode


1. To enter Information mode, press the <i> key on the Vision’s keyboard.
2. Enter your password. The default password is 1111. This password remains in effect until you change it
via the Information Mode screen described in the table below.
3. The controller enters Information Mode, showing the first category, Data Types. Use the <Enter> key to
enter a category.
4. Press the <ESC> key to exit a category, and to exit Information mode.

The controller will block entry into


Information mode until the correct password
has been entered. This is why you must
record any password you set for your
controller.

The data in Information Mode is arranged in


Categories. Each Category contains several
Subjects. You navigate Information Mode by
using the keyboard buttons.

To exit Information mode, press the


<ESC>button on the Vision’s keyboard.
Each press returns one level up. Press the
number of times necessary to exit.

Note • When you reenter Information Mode, the controller will return to the last Category viewed.
• V290 only
Note that in order enter Information Mode, you touch the V290’s touchscreen in an area that is not
occupied by a Keypad Entry variable or other screen object that has been assigned a Touch
Property. Maintain contact for several seconds, until the controller enters Information Mode. The
V290 displays Information Mode options on the touchscreen exactly as other Vision controllers
display these options on their LCD screens.
To navigate through Information Mode, use touchscreen keys just as the keypad keys are used in
other Vision controllers.

14
Getting Started

The table below shows the categories of information that can be accessed in this mode.

Info System Operands


INFO mode, SB 36

# Description Turned ON Turned Off Comments

SB 36 INFO mode By OS, Remote Turns OFF when user Delay time to enter Info Mode is 4 seconds, may be
Access, or program exits Info Mode modified via SI 50

INFO Delay time, SI 50

# Description Value Comments

SI 50 INFO delay time Default by O/S (every Units: seconds.


power up) = 4 seconds Legal values: 0, 3 to 20.
If you force or store '0' into equal Zero – INFO is disabled.
For V290 – Touching the <i\> key on the touch screen
starts Info Mode – Touching a legal Ladder application
variable clears the INFO time.

Category Subject Possible Actions

Data Types Memory Bits • View bit status

System Bits • Change bit status (Set/Reset)

Memory Integers • View integer/long integer/double word value.

System Integers • Change values

Memory Longs
• Toggle Base: view the value in decimal or hexadecimal form.

System Longs

Memory Double Words

System Double Words

Inputs • View input status.·


• Force input status to 1 (FR1) or 0 (FR0). Forced values stay in
effect until Normal mode (NRM) is selected, or until the controller
is initialized or reset.
Note • Forced values do influence your program. This can be
useful in testing the effect of an input condition on an output status.

Outputs • View output status.·

15
Getting Started

• Force output status to 1 (FR1) or 0 (FR0). Note that forced output


values do not affect your program.
• Set/Reset output status.

Timers • Enter a Preset Timer value.


• View the current timer value and status by selecting the R.T. option.

System Model & O/S Ver • Check the controller’s model number and operating system version.
• Check whether the controller is in Run or Stop mode.

Working Mode • Check whether the controller is in Run or Stop mode.


• Reset the controller. This restarts your program; restoring power-up
values to all data types except for those protected by the battery
backup. The battery protects Real Time Clock (RTC), all operand,
and Data Table values.
• Initialize the controller. This restarts your program and initializes
all values, restoring 0 values to all data types.

Time & Date • View the Real Time Clock (RTC) settings. Note that the RTC
settings control all time-based functions.
• Change the RTC settings via the controller’s keyboard.

Unit ID The Unit ID number identifies a networked controller. You can:


• Change the ID number. The new ID number will remain in effect
until the controller is reset.
• Burn the ID number into the controller’s FLASH memory. This is a
permanent change.

Serial Port 1 • View and edit communication settings.


Serial Port 2 • Select to Change or Burn the new settings.

CANbus Baud Rate • Change the CANbus baud rate.

Function Block Reserved for future use

Password New Set a New Password

Hardware • Check if I/O Expansion Modules are installed. Note that I/O
Configuration Expansion Modules are represented by letters. Identical module
types are represented by identical letters as shown below.
• Shows if an I/O module is short-circuited.

16
Getting Started

COM Ports and Data Communications


Information regarding the communications features of specific Vision models is available from your local
Unitronics distributor, or [email protected].

Com Ports
Serial All Vision controllers comprise RS232 serial communication ports. RS232/RS485 adaptors are
available by separate order. Certain models, such as the Vision120, support both RS232 and
RS485. For details on communications hardware settings, refer to the User Guides and
documentation supplied with relevant models.

CANbus Separate CANbus ports are built into specific controller models.

Ethernet Ethernet ports are available by separate order.

Note • All ports can be used simultaneously. For example, a single controller may use one serial port to
send messages to a modem via RS232, another port to communicate with a frequency converter,
while the controller engages in communications via its CANbus port.

• Standard programming cables do not provide connection points for pins 1 and 6.

Initializing COM ports


Serial and CANbus communication ports must be initialized in your control program using the
COM Init FB, located on the FB's menu.
The Ethernet port must be initialized using the Ethernet Card Init FB, located under Ethernet on
the FB's menu.
Data Communications Options
Data Communications include all of the options shown below:

CANbus Networking
Modems, Landline, GSM, and CDMA
GPRS
Ethernet
Communication FBs
SMS messaging
GPRS
MODBUS (serial)
MODBUS IP (Ethernet)
Communications Protocol FB

17
Getting Started

PC-Vision communications
PC-Modem Configuration
Remote Access: Accessing a PLC via PC
Accessing a Networked PLC via PC

About Modems
Unitronics' controllers can be hooked up to PSTN (landline), GSM, or CDMA modems via the RS232 COM
port.

PC-side Modems
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. For example, you can

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.
PLC-side modems
Via modem, a Vision controller can 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 bar-code readers and frequency converters, via their
proprietary protocols.
SMS messages. The SMS FB enables text messages, including variable data, to be sent and
received via GSM and CDMA modems.
Modem services,
Located on the Connections menu, Modem Services enables you to use your PC to:

Prepare/initialize PC & PLC side modems.


Dial a PLC modem and receive calls from a PLC.
Send SMS messages to a PLC.

Getting Started with Ladder


Ladder Net
The Ladder diagram contains a left and right rail. Between these rails, the control application is arranged in nets.
A net contains a row of Ladder elements that drive a coil. Power flows through the ladder elements in a net
from left to right. Each net must contain only one rung.

This is why the first ladder element in the net must touch the left Ladder rail. All of the elements in a net must
be connected to allow power flow. You do not need to connect the last element on the right to the right side of
the ladder in each net.

If the elements in a net are not connected, the software will display an error message when you compile your
project.

18
Getting Started

Placing a Ladder Element in a Net

1. Select any type of Ladder element by:


Clicking its icon on the Ladder toolbar, -or-

Selecting it from the Ladder menu, -or-


Right-clicking on the Ladder to display the Ladder menu and then selecting the element.

2. Move the element to the desired net location, then click.

3. Link operands using the Select Operand and Address dialog box shown below.

Placing a Function in a Net

1. Select any type of Ladder function by:

19
Getting Started

Selecting it from the Ladder toolbar, -or-


Selecting it from the Ladder menu, -or-
Right-clicking on the Ladder to display the Ladder menu and then selecting the function.
2. Move the function to the desired net location, then click.

3. Link operands using the Select Operand and Address dialog box.

Connecting Ladder Elements and Functions


Use the Connect Elements tool to connect two or more elements or functions in a net. All net elements must be
connected in order to allow power to flow through the net. If they are not connected you will not be able to
compile your application.

20
Getting Started

Connecting Elements

Linking Operands to Elements


When you place a Ladder element or function on a net, the Select Operand and Address dialog box opens. All of
the operands and operand types that are displayed in the Select Operand and Address dialog box are applicable
to the element or function that you have selected. To edit an operand attached to an element, you can also
double-click on the yellow Description field of an element after it has been placed in the Ladder.

You can search for a particular operand by using the Search: Symbolic Name function at the bottom of the
dialog box.

Nets: Sizing and Resizing


To shrink a net to its minimum height, double-click the net's left-hand rail.

Nets can be also manually resized.

21
Getting Started

The Ladder menu contains two options that enable you to resize nets throughout a project.

Adding and Inserting Nets


To add a net to the bottom of your Ladder:

Select the Append Ladder icon from the Insert menu;a net is added to the bottom of the Ladder
application. .
To insert a Ladder net:

1. On the Ladder toolbar, click on the Insert Net icon ; your cursor changes into a cross-hairs.
2. Click on a net; the new net is inserted above the net you clicked on.

Move, Copy, & Paste Nets

1. Select the desired net(s).

22
Getting Started

2. Select the desired operation.

-or-
Select Cut or Copy from the Edit menu.

3. Place the elements in the net.

23
Getting Started

-or-
Select Paste from the Edit menu.

You can also cut, copy and paste nets between projects, subject to the information listed below:

Once you have cut or copied your selection from the source project, open a target project without
closing VisiLogic, either by using the New Project or Open project buttons or via these options
on the Project menu. If you close VisiLogic, the selection will be lost.

If the source project contains Call Subroutine or Load HMI operations, note that the referenced
elements will be marked as missing, even if the target project contains elements of the same
name. Note that you can reassign the references.

24
Getting Started

If the selection contains FBs, and no FBs of that type currently exist in the target project, the
pasted FBs will be the version currently in VisiLogic FB library--in other words, if the source
selection contains older FB versions, they are automatically updated during the Paste operation.
If the selection contains FBs, and FBs of that type currently exist in the target project in a
different version, Paste cannot be completed.
If your selection contains only Labels, without the attendant Jump to Label, they will be marked
as missing, even if the target project contains Jumps of the same name. Note that you can
reassign the references.

If the selection contains Labels or Jumps with the same name as those in the target project, these
will be automatically renamed by the program when they are pasted.

If you copy both Labels and Jump to Label, the Jumps will be marked as missing. Note that you
can reassign the references.

Move, Copy & Paste Elements


Ladder elements and functions may also be dragged and dropped between nets.

1. Select the desired element(s).


25
Getting Started

2. Select the desired function.

-or-
Select Cut or Copy from the Edit menu.

3. Place the elements in the net.

-or-
Select Paste from the Edit menu.

Note that when you paste elements into a net, the elements paste into the same relative location in the new net.
The elements 'remember' their original net location. Therefore, before you paste elements into a net that already
contains elements, move any elements that occupy the same position as the paste selection.

Move, Copy, & Paste between Projects


You can cut, copy and paste both HMI Displays and Ladder nets between projects, subject to the information
listed below.

Once you have cut or copied your selection from the source project, open a target project without closing
VisiLogic, either by using the New Project or Open project buttons or via these options on the Project menu. If
you close VisiLogic, the selection will be lost.

26
Getting Started

Ladder

If the source project contains Call Subroutine or Load HMI operations, note that the referenced
elements will be marked as missing, even if the target project contains elements of the same
name. Note that you can reassign the references.

If the selection contains FBs, and no FBs of that type currently exist in the target project, the
pasted FBs will be the version currently in VisiLogic FB library--in other words, if the source
selection contains older FB versions, they are automatically updated during the Paste operation.
If the selection contains FBs, and FBs of that type currently exist in the target project in a
different version, Paste cannot be completed.
If your selection contains only Jumps, without the attendant Labels, they will be marked as
missing, even if the target project contains Labels of the same name. Note that you can reassign
the references.

27
Getting Started

If the selection contains Jumps and Labels with the same name as those in the target project, the
Jump, Label and link between them will be automatically recreated by VisiLogic when they are
pasted.

In this way, VisiLogic maintains the integrity of the links between Jumps and their corresponding Labels.

Display elements

When you paste elements into a Display, the elements paste into the same relative area in the
new net. The elements 'remember' their original location. Therefore, before you paste elements
into a Display that already contains elements, move any elements that occupy the same position
as the Paste selection.
If you paste variables that are linked to named constant values, note that the constant's
description is lost during the paste operation.
Variables do not retain their descriptions; they are renamed as Variable 1, Variable 2, etc..

Deleting Nets
First, select the desired nets.

To select one net


Click on the left rail of a net to select it; the rail in that net turns grey.

To select more than one net:


1. Select the first net by clicking on the left net bar.

28
Getting Started

2. Hold the Shift button and click on the last net in the range that you want to copy.

29
Getting Started

To move the selected nets,

Press the Delete button on your computer keyboard; the net is deleted and all of the nets in your
project move up.

Comments Tool
Ladder Editor Comments enable you to place remarks program nets. Comments can be written directly into the
Comment pane, or written in Notepad and pasted.

Comments are not downloaded to the controller. To toggle Comments in and out of view, press <Alt> + <C>, or
select the option from the View menu.

Insert a comment:

1. Click on the Comment icon ; your cursor changes into a cross-hairs .


-or-
Select Insert Comment from either the Insert or Ladder menu.
-or-
Right-click on the Ladder, and then select Insert Comment.
2. Click on a net; a Comment field opens in the net you clicked.
3. Type text in the field.

30
Getting Started

Move, Copy, and Paste Comments:


1. Select the Comment.

2. Place the Comment in the net.

-or-
Select Paste from the Edit menu.

Delete a Comment
1. Select the Comment.

31
Getting Started

2. Select Delete.
-or-
Press the Delete button on your PC's keyboard.

Undo
VisiLogic supports up to 10 Undo/Redo actions.

The list of supported actions is shown below.

Ladder HMI Project


Delete ladder element Delete HMI Display Compile

Delete ladder net Delete HMI Elements Build All

Delete Comments Clear HMI Display

Cut Ladder Elements Cut HMI Element

Cut Ladder Net Paste HMI Elements

Paste Ladder Element

Paste Ladder Net

Clear Sub

Import Sub

Changing an Element's Operand


To edit an element's operand:

32
Getting Started

The element appears on the net with the new Operand, Address and symbol.

Power-up Values
Power-up values can be assigned to most operands. These values are written into the operands when the
controller is turned on.

Bit operands can be SET or RESET. Integers, Long Integers, and Double Words can be assigned values that are
written into the operand at power-up.

You can assign Power-up Values in the:

Select Operand and Address Dialog Box


Check the box next to the plug-shaped icon. This enables you to enter a value in the Power-up value
fill-in field.

Operand View Window


1. Select the Operand tab at the bottom of the screen.
2. Click on the Operand type to display the list of operands.
3. Enter Power-up values in the column headed by the Power-up icon.

Program Sequencing: Modules, Subroutines, Labels & Jumps


A module is a container of subroutines. Use modules and subroutines to divide your application into program
blocks. You can then run these program blocks conditionally, from any point in your control application.

33
Getting Started

Note • Within the program tree, elements are presented alphabetically. This does not affect the order in
which the program runs.
• Ladder Modules and subroutines can be moved via drag-and-drop, as can HMI Modules and
Displays. Again, moving elements does not affect the order in which they run.
The Main Ladder Module, Main Subroutine, Start-up HMI Module and the Start-up HMI Display
cannot be moved via drag-and-drop or erased. For easy identification, they are always marked in
orange.
To control the Ladder program flow sequence and avoid loops, use the Call Subroutine function to conditionally
call subroutines. Within a subroutine, you control the sequence by conditionally skipping over nets using Labels
and Jump to Label functions. This enables you to shorten the program scan time.

A new VisiLogic project contains the main module and subroutine for the program. Each new subroutine
contains a default number of nets and a Subroutine Return function.

Subroutines do not run if they are not called by Call Subroutine. If no Call Subroutine commands are included in
the first subroutine of the main module, the program runs until it reaches the Subroutine Return function, and
then jumps back to the beginning of the first subroutine.

Note • If a subroutine does not run, the coils in that subroutine will not be updated. For example,
Subroutine 4 contains . If MB0 is turned ON in Subroutine 1, but Subroutine 4 is not
called, O0 is not updated. The order in which I/Os are updated depend on the PLC program scan.
• Some FBs require Configuration, such as SMS. The FB Configuration should be placed in the first
subroutine of the main program module. If a Configuration is in a subroutine that is not called into
the program, linked FBs will not be processed even if the activating condition for that FB has been
turned ON.

Subroutines can be reused as many times as required. Subroutines can also be exported and imported between
projects.

PLC Program Scan


A scan is a complete execution of the controller's entire program. The scan cycle is performed continuously.

Note • Power-up tasks, relating to the status of SB2 Power-up bit, are performed when the controller is

34
Getting Started

turned on. These tasks are performed before the program scan.
• The scan time is stored in SI 0 Scan Time, Resolution: Units of 10 mSec.

35
Getting Started

Call Subroutine & Subroutine: Return

36
Getting Started

Within Subroutines: Labels & Jumps

Protecting Subroutines
You can create a Ladder Password, then apply it to protect multiple subroutines. When a subroutine is protected,
a user cannot export/import it. In addition, the user cannot open, copy, or print it without supplying the
password.

Creating and Using a Password


1. To create a password, select File>Set Ladder Password; then fill in the password field.

2. To apply the password to a subroutine, right-click the subroutine's name in the Project Navigation
window, then select Set as Protected; a small padlock icon is displayed nest to the subroutine's name.

37
Getting Started

You can also right-click a module's name and select Protect All Subroutines in Module.

Note • Protection is applied after VisiLogic (not just the project) is closed and reopened.
3. To remove protection from a subroutine, right-click the protected subroutine's name, then select Set AS
Unprotected; the padlock icon disappears.

You can remove protection from a module in the same way.

Note • The same password may be used for different projects.


Deleting a Ladder Password
1. To delete a Ladder password from a project, select File>Unset Ladder Password.
Import/Export Subroutines
You can export Subroutines and save them as .vlx files, then import them into other projects. You can
import/export single Subroutines, or all of the subroutines in a Module. Note that you cannot export Subroutines
from the Main Module.

Exporting a single Subroutine

1. Right-click the desired Subroutine and select Export Subroutine,


-or-
select Export Subroutine from the Project menu; the Select Subroutine box opens.
2. Select the desired subroutine, then save it to the desired folder.

38
Getting Started

Exporting all of the Subroutines in a Module

1. Right-click the desired module and select Export All Subroutines.

2. Save the .vlx file to the desired folder.


Note that when you import this .vlx file, all of the Subroutines it contains will be imported.
Import

1. Right-click a module name and select Import Subroutine,


-or-
Select Import Subroutine from the Project menu; the Open box appears.
2. Select the desired subroutine, then save it to the desired folder.

Import/Export is subject to the limitations below.

39
Getting Started

If the source project contains Call Subroutine or Load HMI operations, note that the referenced
elements will be marked as missing, even if the target project contains elements of the same
name. Note that you can reassign the references.

If the selection contains an FB operation related to an FB Configuration, and is imported into an


application containing an FB Configuration of the same name, the links will be retained.
If, for example, you export a subroutine containing an SMS Send FB linked to SMS
Configuration 'Denmark' and then import this subroutine into another application containing an
SMS Configuration 'Denmark', the SMS Send FB will automatically link to 'Denmark'.
If the selection contains FBs, and no FBs of that type currently exist in the target project, the
pasted FBs will be the version currently in VisiLogic FB library--in other words, if the source
selection contains older FB versions, they are automatically updated during the Paste operation.
If the selection contains FBs, and FBs of that type currently exist in the target project in a
different version, Paste cannot be completed.
If your selection contains only Jumps, without the attendant Labels, they will be marked as
missing, even if the target project contains Labels of the same name. Note that you can reassign
the references.

40
Getting Started

If the selection contains Jumps and Labels with the same name as those in the target project, the
Jump, Label and link between them will be automatically recreated by VisiLogic when they are
pasted.
In this way, VisiLogic maintains the integrity of the links between Jumps and their
corresponding Labels.

Note that the following symbols cannot be used in subroutine names:


/ \ | * : ! " < >.
When importing/exporting from older VisiLogic programs containing such symbols, they will be
automatically replaced by underscore characters.

Ladder Logic
You use Ladder Logic to write your project application. Ladder is based on Boolean principals and follows IEC
1131-3 conventions.

Ladder Diagrams are composed of different types of contact, coil and function block elements. These elements
are placed in nets.

In any Ladder Diagram, the contacts represent input conditions. They lead power from the left rail to the right
rail. Coils represent output instructions. In order for output coils to be activated, the logical state of the contacts
must allow the power to flow through the net to the coil.

Toggling between PLC and HMI Editors

41
Getting Started

Getting Started with Displays


Text in HMI Displays
Displays can contain both fixed and Variable text. Fixed (constant) text does not change according to run-time
conditions. Variable text can show run-time values, such as timer values, or display operating instructions
according to system status.

Graphic Images in Displays


Simple geometric shapes can be drawn on a Display.
Graphic images can be imported from the Image Library, or created with a program such as Microsoft Paint and
then imported.

Fixed graphic images


This type of image stays on the screen and does not change until a different Display is loaded by
the program.

Variable graphic images


Variable images change according to the value of a linked operand. Binary Image Variables are
linked to bit operand status (MB, SB, I, T, O). List Image Variables are linked to integers (MI,
SI, ML, SL)
You can draw graphic images directly on a Display, or import images.

Note • Although an imported image can be resized, resizing may result in some degree of distortion. To
avoid this, use images that are created to match the required size.
• The HMI display uses a grid which spaces the lines 8 pixels apart. To optimize Displays and shorten
the PLC cycle time, images and variables should be aligned to grid.

Copy & Paste Displays


You can copy and paste Display elements.

1. Copy the Display element(s) or select all of the elements in a Display.

42
Getting Started

2. Paste the elements into the Display.

-or-
Select Paste from the Edit menu.

Note • When you paste elements into a Display, the elements paste into the same relative
area in the new net. The elements 'remember' their original location. Therefore,
before you paste elements into a Display that already contains elements, move
any elements that occupy the same position as the paste selection.
If you paste variables that are linked to named constant values, note that the
constant's description is lost during the paste operation.
Variables do not retain their descriptions; they are renamed as Variable 1,
Variable 2, etc..
To copy elements between projects, copy your selection from the source project,
then open a target project without closing VisiLogic, either by using the New
Project or Open project buttons or via these options on the Project menu.
If you close VisiLogic, the selection will be lost.

43
Getting Started

Getting Started with Variables


Variables enable you to show run-time values, text, images, and bar graphs on the controller's screen in response
to run-time conditions. Bit, or binary text variables, for example, display text messages on the controller's LCD
screen according to the status of a bit operand.

A Display may contain up to 24 variables.

You can also use Keypad Entry Variables to enable an operator to enter a password, or data such as setpoints
from the controller's keyboard.

Variable Editor
When you insert a variable into a display, the Variable Editor opens, showing you the options that are relevant
for that type of Variable.

After you have inserted Variables into a display, they are shown with that display in the Project tree.

44
Getting Started

Inserting a Variable into a Display


To show variable data, you first create a field in the Display. The field is a container that holds the data.

45
Getting Started

A field that is not big enough to contain its data is red. To resize a field, click it and drag the edges.

46
Hardware Configuration
Hardware Configuration opens automatically when you first create a new project. In order to open Hardware
Configuration in an existing project, either select Hardware Configuration from the View menu or click the
button on the toolbar.

Click on the appropriate icon to select the model Vision, the Snap-in I/O module, and any I/O Expansion
modules required by your application.

After you select the Snap-in or Expansion I/O modules connected to the controller, you can configure inputs:
analog, digital, and high-speed counter/shaft-encoder/frequency measurers and PT100; and outputs: analog,
digital, and PWM high-speed outputs.

Note • You must select the correct Vision model and Snap-in I/O modules before downloading your
project.

I/O Expansion Modules


Configuring a PT100 Input

47
Getting Started

Configuring I/O Expansion Modules

Note • I/O Expansion Modules may require an adapter. Check with your distributor for additional details.

High-Speed Counters: I/O Expansion Modules


Certain digital inputs on certain I/O Expansion Modules are high-speed inputs that can be used as a 16-bit high-
speed counter of the following types:

48
Hardware Configuration

High-Speed Counter
High-Speed Counter with Reset
Frequency Measurer
Configuring a High-Speed Counter

The linked operand contains the counter value which is current at the last program scan. Use this operand in
your program like any other.

49
Getting Started

Snap-in I/O Expansion Modules


Configuring Snap-in I/O Modules

High-Speed Counters: Snap-in I/O Modules


Certain digital inputs on Snap-in I/O Modules are high-speed inputs that can be used as a 32-bit high-speed
counter of the following types:

50
Hardware Configuration

High-Speed Counter
High-Speed Counter with Reset
Frequency Measurer
Shaft Encoder
Configuring a High-Speed Counter

The linked operand contains the counter value which is current at the last program scan.

To measure frequency, click the second input field and select the sample rate.

51
Getting Started

High-Speed Counter: Reload


Reload enables you to immediately load 0 into a high-speed counter when the counter value reaches a target
value.

Configuring a High-Speed Counter


Certain digital inputs on both Snap-in I/O and I/O Expansion modules can be used as high-speed counters in the
following modes:

High-Speed counter
High-Speed counter with Reset
Shaft encoder
Frequency Measurer
Note • When you select High-Speed Counter with Reset, the controller uses an additional input for reset;
shaft encoders also require the use of two inputs.
High-speed counters are built into the hardware, you define them as part of the controller's hardware
configuration by first selecting the counter type and then linking it to an operand that contains the counter value.

Compare Functions and Counter Values

52
Hardware Configuration

The high-speed counter value is read once during every program scan. For this reason, do not use the Equal (=)
function together with high-speed counter values. If the counter does not reach the value required by the Equal
function during the actual program scan, the function cannot register that the value has been reached. Use
functions Greater Than Or Equal To (Y) and Lesser Than Or Equal To (Z).

Configuring a High-speed Output (PWM)


You can use certain outputs as High-speed Outputs (HSO) via PWM (Pulse Width Modulation). When you
select a High Speed Output in the Hardware, the Select Operand and Address dialog box appears three
successive times, allowing you to link operands for the following values:

Duty Cycle
The ratio of the "on" period of a cycle to the total cycle period. This value may be from 0-1000, and is
expressed as a percentage.
If, for example, the constant 750 is stored into the Duty Cycle operand, the duty cycle is equal to 75.0%
This means that the pulse will hold a positive state during 75.0% of the total cycle.
Frequency (F)
Note that F=1/T, where T is the duration time of a complete cycle. Frequency settings differ from npn to
pnp output type.
npn: You can use a value of 0, or a value from 8-50000Hz ( 50kHz).
pnp: You can use a value of 0, or a value from 8-1500HZ.
Other frequency values are not supported.

Run
Changes the operating mode of the output from normal output mode to HSO mode:
0 (SET)=Normal Mode, 1 (RESET): HSO Mode.
In the figure below, MI 22 Duty Cycle Value is equal to 250. This results in the duty cycle being 25% of the
total cycle time.

Note • If values out of range enter the Duty Cycle and Frequency operands, their values remain
unchanged—the operands retain the last legal values stored.
Configuring the HSO

53
Getting Started

Configuring an Analog Input


Before you can use an analog input in your program, you must link it to an operand. An analog input value can
be contained in an MI, ML, or DW.

54
Hardware Configuration

Analog Filters, PLC


Analog filter options, defined in Hardware Configuration, are available in Vision120, V200-18-E3B, and certain
I/O expansion models that offer analog inputs, such as the IO-ATC8. Note that 10-bit inputs do not offer filters.

Using a filter can help protect your system from fluctuating input readings. The filter processes values on a
FIFO (First In First Out) basis. The filtering process is run after each new analog reading. Values can be
processed further via the Filter FB.

The Filter field, shown below, is activated after you define the analog input.

55
Getting Started

Note • Details regarding an I/O's specific resolution, conversion methods, and rates are given in the
technical specifications supplied with Unitronics' controllers and I/O modules.
• When you configure an analog input for use with the PID function, ensure best results by using the
highest strength filter.

Filter Types

Low Calculates the average of the last two readings

Medium Takes the last 4 readings, eliminates the lowest and highest values, then calculates the average of the 2
remaining values.

High Takes the last 8 readings, eliminates the two lowest and the tow highest values, then calculates the average
of the 4 remaining values.

56
Hardware Configuration

Configuring an Analog Output

Analog I/O Ranges


Note that devices used in conjunction with the controller must be calibrated according to the available range.
Below, Range refers to the value contained by the register that is linked to the I/O in Hardware Configuration.

Model number Resolution Range

V200-18-E1 (Snap-in I/O module) 10 bit (0-10V, 0-20mA, 0-1023, 1024 units (except at 4-20mA)
V120-12-R1, V120-12-R2C 4-20mA) 204 to 1024, 820 units (at 4-20mA)
M90 controllers (analog input)
M91-19-R1, M91-19-R2, R2C

V120-12-UN2 14 bit (0-10V, 4-20mA) 0-16383, 16384 units (except at 4-20mA)


M90-19-UN2 3277-16383, 13107 units (at 4-20mA)
M91-19-TC2 Temperature ranges appear in the

57
Getting Started

following table

IO-AI4-AO2 Input 12 bit (0-10V, 0-20mA, 0-4095, 4096 units (except at4-20mA)
4-20mA) 819 to 4095, 3277 units (at 4-20mA)

Output 0-+4095(except at4-20mA)


12 bit +sign (±10V, 0-20mA, 819 to 4095, 3277 units (at 4-20mA)
4-20mA)

Model Type Input ranges Analog Value


number

V120-12-UN2 mV -5 to 56mV -500 to 5600


M90-19-UN2
M91-19-TC2 Thermocouple
type

B 200 to 1820°C (300 to 3276°F) 2000 to 18200 (3000 to 32760)

E -200 to 750°C (-328 to 1382°F) -2000 to 7500 (-3280 to 13820)

J -200 to 760°C (-328 to 1400°F) -2000 to 7600 (-3280 to 14000)

K -200 to 1250°C (-328 to 2282°F) -2000 to 12500 (-3280 to 22820)

N -200 to 1300°C (-328 to 2372°F) -2000 to 13000 (-3280 to 23720)

R -0 to 1768°C (-32 to 3214°F) -0 to 17680 (-32 to 32140)

S -0 to 1768°C (-32 to 3214°F) -0 to 17680 (-32 to 32140)

T -200 to 400°C (-328 to 752°F) -200 to 4000 (-3280 to 7520)

IO-PT4 -50° to 460°C -500° to 4600°C

Working with Analog I/O Values


Analog values can be converted to physical values, for example Engineering Units (EU) such as degrees Celsius,
by using the Linearization FB.

Note • Analog I/O values are contained in the register that you link to the I/O in Hardware Configuration.

Linearizing an Analog Input Value

58
Hardware Configuration

Linearizing an Analog Output Value

Working within the 4-20mA range

Available ranges, according to controller and I/O module, are shown in the topic Analog I/O ranges. Note that
devices used in conjunction with the controller must be calibrated accordingly. In the examples below, the
analog device is a pressure transducer; values are therefore translated to millibars.

59
Getting Started

10-bit Analog Input, V200-18-E1

12-bit Analog Input, IO-A14-AO2

12-bit Analog Output, IO-A14-AO2

14-bit Analog Input, V120-12-UN2

60
Hardware Configuration

Configuring Digital Inputs

Note • PNP/NPN must be set within the hardware, as explained in the technical specifications supplied
with the I/O module. The program settings do not influence the actual hardware input setting.

You can also assign a single description to a several lines.

Configuring Digital Outputs


Digital Outputs may be Relay or Transistor type.
Note • PNP/NPN must be set within the hardware, as explained in the technical specifications supplied
with the I/O module. The program settings do not influence the actual hardware input setting.

61
Getting Started

You can also assign a single description to a several lines.

Assign a Description to Multiple Operands


To assign a Description to multiple operands, select a range of operands by dragging your cursor across them,
then type a description and click OK.

You can also copy and paste text to and from other Windows applications.

62
Controller Settings
Communication and OS-Controller Menu
Via this menu, you can

Set PC communication parameters (non-modem) to enable PC-PLC communication.


Reset and initialize a PLC, enter Stop and Run modes, get RTC values as well as reset the RTC.
Get COM Parameters and PLC status.
Install an Operating System (O/S) in a PLC
Check Network Status

Vision Communication PC Settings


This defines the connection VisiLogic will use when downloading a program or carrying out other
communication tasks. To display the current communication settings, select Communication & OS from the
Connection menu.

Note that you can cause the Unit ID# to be permanently assigned to the project via Project Properties.

The default settings are shown below.

Select If your Vision contains an Ethernet port, you can select the Ethernet option.
Communication Serial is the default communication mode; note that if you select Ethernet and close the project, the
Type setting reverts to Serial.

PC COM Port, Retries and Time-Out are the communication settings between VisiLogic and the controller. Note
Parameters that if you are working with a network, the TimeOut should be greater than 1 second.

Communicate Use these options to communicate with networked controllers.


with OPLC Direct Connection: select this to communicate with any controller that is connected to your PC via the
download cable, including a network bridge.
Within Network:select this to communicate with a controller that is integrated into a network, then
select the controller's ID number
Note • ID numbers 1-63 are reserved for controllers linked via CANbus; ID numbers 64-127 are
reserved for controllers networked via RS485. Using this range of ID numbers prevents a polled
controller from attempting to act as a CANbus bridge, preventing it from attempting to locate the
requested controller.

Vision OPLC Click Get OPLC Information to display information about the controller you have selected in
Information Communicate with OPLC.

Run, Reset, Initialize


When you click one of the buttons shown in the figure below, your PC will access the controller selected in
Communicate with OPLC.

63
Getting Started

Set RTC These are the values of your PC's clock. Click Set RTC to import these values into the RTC of the
controller.

Get Vision RTC Click to view the current PLC settings


Current Values

Run Click to run the current program in the PLC.

Stop Click to stop the current PLC program.

Reset Click to reset the PLC, and reinstall any values preset in the program, such as Timers.

Reset & Initialize Click to reset, reinstall any preset values, and initialize all memory operands

Get COM Parameters and PLC status


Select Get to view communication parameters and PLC status in the controller you are currently communicating
with. This is the controller selected in Communicate with OPLC.

Downloading an OS
Selecting an OS version via the drop-down arrow and clicking Download installs a new Operating System (OS,
OS) into the controller.

Note that System Fonts are used to by the controller to show system messages that are not part of your program,
such as a message that the controller is in Stop Mode. These fonts are part of the OS, and do not need to be
downloaded separately.

The OS cannot be downloaded via a network connection. The controller's COM Port 1 must be directly
connected to the PC via the programming cable, and Direct Connection must be selected in Communicate with
OPLC. Only COM Port 1 can be used to download an OS.

When the controller is connected to the PC, clicking Check displays the currently installed OS.

To obtain the most recently released OS versions, run Live Update. Note that Live update does not install the
new operating system, which must be installed as described above.

64
Controller Settings

Known Issue, Vision 120


Known issue: A power failure during OS download causes V120 models, installed with bootstrap
(firmware)1.30 and lower, to enter bootstrap mode. The V120 will not be able to exit Bootstrap mode until it is
physically turned off, and then powered on.

Check Network Status


The network status is checked via the bridge. Access Check Network Status by opening the Connection menu,
selecting Communication & OS, then clicking the network tab.

65
Communications
COM Port: Init
COM Init is located on the Com menu. Use this function block:

To initialize serial communication port settings and enable the controller to communicate with
networked controllers, using protocols such as MODBUS; or to communicate with external
devices such as modems.
To initialize the CANbus port.
To synchronize port settings, enabling the controller to engage in inter-device communications
via protocols such as MODBUS.

Note • 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.
• All Vision controllers comprise RS232 serial ports, RS485 ports are not. To learn how to implement
RS485 with different Unitronics' controllers, refer to RS485 Options.
• Note that an Ethernet port is initialized via the Ethernet Card Init FB located on the FBs menu under
Ethernet.
• Where appropriate, use the system operands that are connected to the COM ports and that service
communications.

Specific uses of the COM Init FB are detailed in the topics listed below.

Modems
CANbus Networking
Examples

The applications below use the COM Init function. To locate application examples, select Examples from the
Help menu.

SMS messaging.vlp
GPRS.vlp
MODBUS Slave.vlp
MODBUS Master.vlp

RS232

67
Getting Started

All Vision controllers comprise RS232 serial communication ports. RS232/RS485 adaptors are available by
separate order. Certain models, such as the Vision120, support both RS232 and RS485. For details on
communications hardware settings, refer to the User Guides and documentation supplied with relevant models.

RS485 Options
The information in this topic is common to all Unitronics' controllers networked via RS485. Note that before
you carry out any tasks associated with wiring, you must read and fully understand the safety guidelines.

About RS485
RS485 is a balanced serial interface for the transmission of digital data, which enables you to create a multi-drop
network containing up to 32 devices, or nodes

RS485 gives you 2 main advantages over RS232: longer cable lengths and greater immunity to noise. In
comparison to RS232, RS485 uses lower voltage and differential signals. RS485 uses a differential voltage loop
interface (balanced differential signal); differential data transmission reduces the effects of ground shifts and
induced noise signals, even in an electrically noisy environment. The system is based on balanced circuits that
rely on twisted-pair wires (A & B). Thus, the data conversion of logical 0 and 1 is made by converting the
polarity of the two wires by reference to each other, instead of changing polarity of a single wire by reference to
the "SG" (Signal Ground).

The noise immunity results from the fact that, when electromagnetic noise is induced over the differential
signals, the same noise is induced on both signals. When the receiver subtracts the differential signals, the result
is noise compensation.

The same 2 wires are used for transmitting and receiving; therefore, within RS485 networks, only one device
can transmit while all of the other devices 'listen' (receive).

Unitronics' controllers offer different options for networking via RS485, according to the network series.

Network Topology & Wiring


The network topology is multi-drop bus. Every RS485 network includes 2 types of nodes; node refers to every
device that is physically connected to the network.

End Nodes: The devices attached at both physical ends of the network, containing a network
terminator.
In-line Node: All devices connected to the network that are not end nodes.
To enable a rapid rate of communication over relatively long distances, the wires function as transmission lines.
For this reason, the end nodes of the network must contain network terminators for the purpose of impedance
matching. The method for setting network terminators is described individually for each device.

RS485 Network Wiring


Use shielded twisted pair (STP) cables to network devices. Recommended cables types are:

Twinax cable, type H8106 • Control cable, type due 4001 (0.5mm2 , twisted pair)
Twinax cable, type H3094 • Control cable, type V45551-F21-B5 (1.5mm2 , twisted pair)
The combined total length of all network cables cannot exceed 1219 meters, as shown below.

68
Communications

RS485 wiring considerations


With the exception of the M90-19-R4, the RS485 signals are NOT isolated. If the controller is
used with a non-isolated external device, avoid potential voltage that exceeds ± 10V. To avoid
severely damaging the system, all non-isolated device ports should relate to the same 0Vsignal.
Minimize the stub (drop) length leading from each device to the bus. The stub should not exceed
5 centimeters. Ideally, the main cable must be run in and out of the networked device as shown
below. The connectors MJ10-22-CS66 (V120 and M91 series) and MJ10-22-CS65 (V2xxx
series), shown below, enable this to be easily accomplished.

Do not cross positive (A) and negative (B) signals. Positive terminals must be wired to positive,
and negative terminals to negative.
You must create network termination points by using the two end point devices integrated into
your network. The method of creating termination points varies according to the controller
series.

RS485, by controller type


RS485 is implemented differently in Unitronics' controllers, according to model type. These options are
summarized below.

Vision controllers are programmed using VisiLogic software. When Vision controllers are networked via
RS485, the COM ports must be initialized to the RS485 standard as explained in COM Port: Init.

In addition, you must assign a unique Unit ID number to each controller, as explained in the Help topic:
Assigning a Unit ID number. Note that there is a range of ID numbers reserved for RS485, numbers 64-127.

Vision 230/260/280
May be ordered with or without RS485 ports. A V2xx controller that is ordered containing an RS485 port has a
part number that ends in the number '1', for example: V2xx-1x-B21x1. If your V2xxx controller does not have
an RS485 port, you can order a port module, V200-19-R4, and install it.

Note that the ports are not isolated. The connector type is RJ-45. RS485 termination settings are determined via
jumper.

If your V2xxx controller does not have an RS485 port, you can order a port module, V200-19-R4, and install it.
Installation instructions are provided together with the module when it is ordered separately. The information
below applies whether or not the RS485 port was supplied with the V2xxx controller, or whether it is ordered
and installed separately.

69
Getting Started

Network Termination Settings

The jumper settings shown above determine whether the controller can function as an end device in a RS485
network. Note that the factory default setting is YES, whether or not the RS485 port was supplied already
installed in the controller. If the OPLC is not a network end device, set both jumpers to NO.

To open the controller in order to access the module and change the jumper settings, follow the relevant
instructions listed below.

1. Turn power off before opening the controller.


2. Open the OPLC by inserting a screwdriver into the
slots located on the sides of the controller as
shown, then carefully prying the cover off.
3. The RS485 port’s location is covered by plastic.
Remove the plastic covering by using a razor cutter
to cut through the tabs.

4. Locate the J3 connector.

5. Install the module by placing the J1 connector


(female) of the module onto the J3 connector
(male) in the controller.
6. Make sure that the connection is secure.
7. Close the controller by snapping the plastic cover
back in its place. If the module is correctly placed,
the cover will snap on easily.

70
Communications

Vision 120/ M91


Vision 120 series
Offers 2 serial communication ports. Each port can be adapted to either the RS232 or RS485 standard, via jumpers
located within the controller and VisiLogic software settings. Note that the ports are not isolated. The connector
type is RJ-11. RS485 termination settings are determined via jumper.

M91 series
An M91 that contains an RS485/RS232port has a part number that includes the number '4', for example: M91-
19-4UN2.

RS485 is via an RJ-11-type serial communication port. Each port can be adapted to either the RS232 or RS485
standard, via jumpers located within the controller. The M91 is programmed using U90 Ladder software.
The port mode is determined by SI 64, Set COM Port Mode, as described in the U90 Ladder help topic: COM
Port Mode: RS232/RS485 (M91 only).

Note that the port is not isolated. RS485 termination settings are determined via jumper.

Vision 120/ M91 RS232/RS485 COM ports


The information below applies to both Vision 120 and M91 series controllers. The controllers in these series
offer RJ-11-type serial communication ports. Each port can be adapted to either the RS232 or RS485 standard,
via jumpers located within the controller. In the case of the Vision 120, appropriate VisiLogic program settings
are also required.

RJ-11 type port

The pinout below is of the RJ-11 type port, when the port is used for RS485.

Note • When a port is set to RS485, both RS232 and RS485 can be
used simultaneously if flow control signals DTR and DSR
are not used.

The ports are not isolated. If the controller is used with a


Note non-isolated external device, avoid potential voltage that
exceeds ± 10V.
To avoid damaging the system, all non-isolated device ports
should relate to the same ground signal.

RS232/RS485 Jumper Settings


Use the jumper settings shown below to change the functionality of the controller's COM port.

71
Getting Started

To open the controller and access the jumpers, refer to the instructions below.

RS485 Network Termination Settings


The jumper settings shown below determine whether the controller can function as an end device in a RS485
network. Note that the factory default setting is ON. If the OPLC is not a network end device, set both jumpers
to OFF.

Opening the Controller


Before opening the controller, touch a grounded object
to discharge any electrostatic charge.
Note Avoid touching the PCB board directly by holding the
PCB board by its connectors.

1. Turn power off before opening the controller.


2. Locate the 4 slots on the sides of the controller.
3. Using the blade of a flat-bladed screwdriver, gently pry off
the back of the controller as shown.

4. Gently remove the top PCB board:


Use one hand to hold the top-
most PCB board by its top and
bottom connectors as shown.
With the other hand, grasp the
controller, while keeping hold of
the serial ports; this will keep
the bottom board from being
removed together with the top
board.
Steadily pull the top board off.

72
Communications

5. Locate the jumpers shown in Figure 9, then change the


jumper settings as required.

6. Gently replace the PCB board as shown.


Make certain that the pins fit correctly
into their matching receptacle.
Do not force the board into
place; doing so may damage the
controller.
7. Close the controller by snapping the
plastic cover back in its place. If the card
is placed correctly, the cover will snap on
easily.

M90
These controllers are programmed via U90 Ladder.

RS485 communications are enabled via an external RS232/RS485 converter, such as Unitronics' M90-19-R4,
which can be connected to the controller's RS232 port. No U90 Ladder software settings are required.

The M90-19-R4 RS485 port is isolated.

Note that since the M90-19-R4 is an external converter, it is also compatible with other devices, such as PCs.

Vision / M91 RS485 Port Specifications


The specifications below apply to RS485 ports for all Vision and M91 controllers.

Input Voltage -7 to +12V differential max.

Cable type Shielded twisted pair, in compliance with EIA RS485

Cable length 1200m maximum (4000 feet)

Galvanic Isolation No

Baud rate 110 - 57600 bps

Complete specification for the M90-19-R4, which converts serial data from the RS232 standard to either RS422
or RS485, is located on the Setup CD. It is also available from your local Unitronics distributor. This module is
recommended for use with M90 controllers and other devices.
73
Getting Started

User safety and equipment protection guidelines


This information is intended to aid trained and competent personnel in the installation of this equipment as
defined by the European directives for machinery, low voltage, and EMC. Only a technician or engineer trained
in the local and national electrical standards should perform tasks associated with the device’s electrical wiring.

Before using a Unitronics' product, it is the responsibility of the user to read and understand this document and
any accompanying documentation.

Symbols are used to highlight information relating to the user’s personal safety and equipment protection
throughout this document. When these symbols appear, the associated information must be read carefully and
understood fully.

Under no circumstances will Unitronics be liable or responsible for any consequential damage
that may arise as a result of installation or use of equipment, and is not responsible for problems
resulting from improper or irresponsible use of Unitronics devices.
All examples and diagrams shown are intended to aid understanding. They do not guarantee
operation.
Unitronics accepts no responsibility for actual use of a product based on these examples.
Only qualified service personnel should open a device or carry out repairs.
Please dispose of this product in accordance with local and national standards and regulations.
Failure to comply with appropriate safety guidelines can result in severe
personal injury or property damage. Always exercise proper caution when
working with electrical equipment.
Check the user program before running it.
Note Do not attempt to use a device with parameters exceeding permissible levels.
Install an external circuit breaker and take appropriate safety measures against
short-circuiting in external wiring.
To avoid damaging the system, do not connect or disconnect a device when
the power is on.
Do not touch live wires.
Double-check all the wiring before turning on the power supply.

PLC-side Modems
How to enable a Vision controller to communicate via landline, GSM, or CDMA modem.
1. Connect the modem to a PC, using the cable supplied by the modem manufacturer.
2. Prepare the PLC modem.

74
Communications

Open Connection>Modem Services, and select the modem type and COM port.
Click the Prepare PLC-side Modem button; that dialog box opens.
Click the Init Modem button; the modem is initialized for PLC use.

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

Note • 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.

75
Getting Started

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

4. 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 the COM Port initialization SBs 80-85.

5. Download the application to the PLC.


6. 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.
For more information regarding Ladder conditions and other details, refer to the topic Dial and Hang-up.

76
Communications

GSM/CDMA 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

Note • If calls are routed via a switchboard, note that the switchboard settings may interfere with
communications. Consult with your switchboard provider.

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

77
Getting Started

Modem Tips
To avoid compatibility problems, use modems produced by the same manufacturer and of the same model. This
is due to lack of standardization between modem manufacturers, which may result in communication conflicts.

PC-Side Modems
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. For example,
you can

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.
How to Configure a PC-side Modem
Select and enter the appropriate parameters in Connection>Modem Services

PC Modem Configuration Parameters


Initializing a PC Modem 1. Select a tab; the Modem Type selection box shows the options.
2. Select the PC modem type; the initialization strings change accordingly.
To edit strings, click in the field and enter text.
Selecting TAPI displays the settings of telephony devices that appear in
Windows>Control Panel>Phone and Modem Options.
3. Edit other options as required. If your GSM modem requires a PIN code, enter the
number.
4. When all parameters are set, initialize the PC modem by clicking Init Modem.
Note• Default strings and baud rate enable OS download via modem.

78
Communications

Phone Book • Click a line to enter a number and description.


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

Dial & Hang-Up • To dial, highlight the desired number and click Dial.
• To break the data link, click Hang-Up.

Send SMS This option is available if you have selected GSM or CDMA modem.
1. Select the destination number.
2. Enter the SMS text, then click Send SMS.
Note• 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 This is used to initialize a PLC-side modem. Full instructions are in the topic PLC-side
Modems.

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 Vision controller to communicate via landline, GSM, or CDMA modem's.
2. In Connection PC-Modem Configuration, dial the remote PLC's controller 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 • The PC to modem cable is not the same type of cable that connects the controller to the modem. The
PC to modem cable must provide connection points for all of the modem's pins.
• The initialization commands for PC modems, and those found in the COM Init FB used to initialize
the PLC's modem are different.
• If calls are routed via a switchboard, note that the switchboard settings may interfere with
communications. Consult with your switchboard provider
• If the modem initialization string parameter S7, TimeOut, is to short to permit the PLC's modem to
answer, an error will result.
For example, if this parameter is S7=30, the PC modem waits 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.
• PC/PLC modem communications: Both PC and PLC must use the same type of modem: landline or
GSM\CDMA. Internal PC modems must use the driver provided by the modem's manufacturer.

Dial & Hang-up


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

Dial
This enables you to use Ladder conditions to dial a modem.

Note • 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.

79
Getting Started

Hang-up
This 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.

Downloading an OS via Modem


By following the recommendations given below, you can successfully download an OS to a Vision controller
via modem. Download via modem is supported by OS V3.70, B50 and higher.

In order to download an OS via modem:

1. Prepare and connect the PLC-side modem as described in the topic PLC-side Modems, in the section
'How to enable a Vision controller to communicate via landline, GSM, or CDMA modems'.
These procedures initialize the modem with the parameters required to download an OS.
2. Connect the modem to COM port 1 on the PLC.
If power failures occur, or if the modem communication link is broken, the OS download stops. Controllers
V230, 260, and 280 can recover without any intervention; as can V120 controllers installed with bootstrap
Version 1.30 or higher.

However, a V120 controller installed with bootstrap versions lower than 1.30 may require physical power-up
(must be turned off, and then powered on.)

In all cases, it is recommended that someone be next to the PLC during the OS download in order to attend to
any potential problems.

The PC-side and PLC-side modems must use the initialization defaults: baud rates must be set to 9600; and
COM Init set to ATS0=1.

80
Communications

Once the PC-PLC modem connection has been established, proceed according to the instructions in
Downloading an OS.

Modem Tips
To avoid compatibility problems, use modems produced by the same manufacturer and of the same model. This
is due to lack of standardization between modem manufacturers, which may result in communication conflicts.

Using Ethernet
Unitronics currently supports both TCP and UDP protocols, as explained in the topic About Ethernet. This topic
also contains general information about Ethernet, IP addressing, sockets, and ports.

Ethernet uses star topology.

In order to use Ethernet, your controller must comprise an Ethernet port.

V2xx Vision OPLCs can be ordered with or without an Ethernet port. The Ethernet port enables you to
implement communications via TCP/IP, such as MODBUS over TCP. To check if your Vision controller was
supplied with an installed Ethernet port, first check the device’s model number. In addition, note that the
Ethernet port is an RJ-45-type port that is lined with metal.

Via Ethernet, you can use the MODBUS IP FB to:

Communicate data within a PLC network.


Use a PC to access a PLC via MODBUS over TCP.
Use MODBUS over TCP to enable non-Unitronics PLCs to access Unitronics PLCs, via
MODBUS.
You can also use Ethernet to enable a PC running VisiLogic, Remote Access, or other communication .dll to
access a networked PLC.

The default socket configuration enables you to implement these communication options as shown below:

81
Getting Started

Default Socket Configuration


Vision controllers currently offer 4 sockets. The default socket configuration includes:

Socket Protocol Port Function


Number
0 UDP 20,000 Enables data to be both transmitted and received within a PLC network, via
MODBUS.
Note• If you are using the default settings for Socket 0, note that data is sent via
Unicast to IP: 255.255.255.255. port: 20,000 plus the last byte of the IP address
originally assigned to the device.
This is why Port numbers 20,000-20,255 are reserved for Socket 0.

1 TCP 20,256 Enables PC to PLC communication via UnCmDrv1.dll, including VisiLogic,


Remote Access, and other Unitronics communication applications.

2 TCP 502 Set to 'listen' as slave (server), enables MODBUS applications such as OPC servers
and SCADA systems which use MODBUS TCP over IP.

3 TCP 20,257 Set to 'listen' as slave (server), enables non-Unitronics PLCs to access Unitronics
PLCs, via MODBUS.

Note• The default configuration means that, for most applications, you do not need to include a Socket
Init FB in the ladder application. However, if, for example, your application requires 4 sockets
for TCP, change the default configuration of Socket 0 from UDP to TCP via the Socket Init FBs.

• When using the default socket configuration, Socket 0 cannot be used to communicate data
between routers, and therefore cannot transfer data between Intranets as shown in the figure

82
Communications

below. This is because the default configuration for Socket 0 uses Unicast.

• Note that when TCP is used, the formal 'handshake' required by the protocol means that, during
each session occurring via a defined socket, other communications cannot flow through that
socket until the current session has been terminated.

Such is not the case with UDP. Since there is no formal handshake, communications can
continue to flow through a socket even when there are multiple requests.

General
When using Ethernet, use the MODBUS IP FBs. For detailed information regarding MODBUS IP commands,
refer to the MODBUS IP help topics.

Note • In order to implement Ethernet, a controller must be assigned an IP address. This is done via the
Ethernet Card Init FB, which must be included in the Ladder applications of both master and slave
controllers.
Class C-type addresses are recommended, as explained in the topic About Ethernet.
• When the Ethernet card finishes initialization, SB 142 rises. Use this as a condition before activating
any Ethernet element, such as Socket Connect.
• An activating condition must be placed before the Ethernet Card Init FB. This may be assigned as a
power-up task; however a one-shot transitional contact may also be used.
• Unitronics' proprietary COM Protocol FB, located on the FBs menu, which may ordinarily be used
to access external slave devices, is not currently compatible with Ethernet.
Examples
PLC networks, PLC to PLC
Any controller within the network can be both master and slave. In order to be read by the master, a slave's
application must contain the MODBUS IP Scan FB.

Using UDP to implement controller-to-controller communication


In order to communicate via Ethernet throughout your controller network, you must include an Ethernet Card
Init FB in the ladder application of each networked controller. Remember that, when using UDP, do not use the
Socket: Connect or Socket: Close elements; these are only required by TCP applications.

Master
The master PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card and configuring MODBUS

The MODBUS Configuration is linked to Socket 0, which is by default set to UDP.

83
Getting Started

Note • A PLC defined as a UDP master can communicate with a number of slave devices.
Step 2: Using MODBUS Commands

Note • Note that the operand addresses in slave PLCs are indirect addresses (pointers). In the figure
below,the Slave: Start of Vector parameter is 15. This means that the master will begin reading
from MI 15 in the slave PLC. Since the Read: Vector Length parameter is 3, the function takes the
values in MI 15, 16 and 17.
The Master: Start of Vector parameter is 17; therefore the values will be written into MI 17, 18, and
19 in the master device.

84
Communications

Slave
The slave PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card and configuring MODBUS

Step 2: Scan

To enable the master PLC to access the slave, include a MODBUS Scan FB in the slave's application.

Using TCP to implement controller-to-controller communication


Master
The master PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card, Socket, and Configuring MODBUS

In the figure below, the socket is configured to use TCP.

85
Getting Started

Step 2: Establishing the Ethernet Connection: Connect Socket

Note • It is recommended that there be a time elapse of a few seconds after the Ethernet Card Initialization
and before activating Socket Connect. A timer may be used for this purpose.

Step 3: Using MODBUS Commands

Note • Note that the operand addresses in slave PLCs are indirect addresses (pointers). In the figure below,
Below, the Slave: Start of Vector parameter is 15. This means that the master will begin reading
from MI 15 in the slave PLC. Since the Read: Vector Length parameter is 3, the function takes the
values in MI 15, 16 and 17.
The Master: Start of Vector parameter is 17; therefore the values will be written into MI 17, 18, and
19 in the master device.

86
Communications

Step 4: Terminating the Ethernet connection: Close Socket

When you terminate the connection, use the 'Function in Progress' MB to ensure that you do not
terminate the connection while data is being communicated.

Slave
The slave PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card, Socket, and Configuring MODBUS

In the figure below, the socket is configured to use TCP.

87
Getting Started

Step 2: Scan

To enable the master PLC to access the slave, include a MODBUS Scan FB in the slave's application.

PC to PLC: Accessing PLC via SCADA


To enable the SCADA application to access the PLC, the PLC is defined as a slave device. The slave PLC
Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card and configuring MODBUS

Port 502 is the well-known port for MODBUS applications.

88
Communications

Step 2: Scan

To enable the SCADA application to access the slave, include a MODBUS Scan FB in the slave's application.

Ethernet Operations

The Ethernet FBs are grouped under Ethernet on the FB's menu.

89
Getting Started

Ethernet: Card Init

Ethernet: Socket Init

Ethernet: TCP Connect \ TCP Close

PC-PLC Communications
Remote Access: Accessing a PLC via PC
You can use a PC to access a remote Vision and download, upload, and edit programs. You can access:

Stand-alone controllers that are directly connected to the PC via a cable.


Controllers within a network
Either stand-alone or networked controllers via GSM/CDMA or landline modem.

When you run On-line Test mode, you can use the Remote Access utility to display the remote controller on
your PC screen. During a Remote Access session, you can:

'Press' keypad keys and touch-screen objects (relevant models) by using your cursor, to click the
controller keypad touch-screen objects on-screen, or via your PC keyboard, by pressing numeric
keys and function 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 on your PC keyboard, or by clicking it on-
screen with your cursor.

When you are in Online mode, you can toggle Remote Access on and off via <Shift>+<F9>.

Accessing a Controller
Direct Connection: PC-Controller
Connect your PC to any controller using the programming cable supplied with the controller kit.

90
Communications

Accessing a Networked Controller


1. Connect your PC to any controller in the network using the programming cable supplied with the
controller kit.

Note • Different PCs can access a network at the same time, using different controller units as bridges.
However, 2 different PCs cannot simultaneously access the same controller unit.

2. Select a networked controller by opening Communication & OS from the Connection menu, and then
entering the Unit ID number.

91
Getting Started

Accessing a Controller via Modem

1. Prepare and connect your PLC-side modem as described in the topic PLC-side Modems, in the section
'How to enable a Vision controller to communicate via landline, GSM, or CDMA modem'.
2. Prepare the PC-side modem as described in the topic PC-Modem Configuration, in the section 'How to
Configure a PC-side Modem'.
3. In Connection PC-Modem Configuration, dial the remote PLC's controller to establish the data link, then
enter OnLine mode.

Note • The Zoom option on the Remote Access Options menu can be activated only if you select Hide
Keys. Zoom cannot be used with M90/91 or V280 controllers.
• Improving Remote Access run times:
To improve VisiLogic's Remote Access run times, select Create HMI Display
Cache from the Build menu.
To create a .ura file containing static displays, select Export Displays to Remote
Access, a stand-alone utility provided by Unitronics.

92
Communications

Vision Communication PC Settings


This defines the connection VisiLogic will use when downloading a program or carrying out other
communication tasks. To display the current communication settings, select Communication & OS from the
Connection menu.

Note that you can cause the Unit ID# to be permanently assigned to the project via Project Properties.

The default settings are shown below.

Select If your Vision contains an Ethernet port, you can select the Ethernet option.
Communication Serial is the default communication mode; note that if you select Ethernet and close the project, the
Type setting reverts to Serial.

PC COM Port, Retries and Time-Out are the communication settings between VisiLogic and the controller. Note
Parameters that if you are working with a network, the TimeOut should be greater than 1 second.

Communicate Use these options to communicate with networked controllers.


with OPLC Direct Connection: select this to communicate with any controller that is connected to your PC via the
download cable, including a network bridge.
Within Network:select this to communicate with a controller that is integrated into a network, then
select the controller's ID number
Note • ID numbers 1-63 are reserved for controllers linked via CANbus; ID numbers 64-127 are
reserved for controllers networked via RS485. Using this range of ID numbers prevents a polled
controller from attempting to act as a CANbus bridge, preventing it from attempting to locate the
requested controller.

Vision OPLC Click Get OPLC Information to display information about the controller you have selected in
Information Communicate with OPLC.

Ethernet
About Ethernet
General information regarding the parameters required to implement Ethernet is given below. A glossary of
Ethernet terms is included at the bottom of this topic. To learn how to specifically define parameters within the
VisiLogic Ethernet FBs, refer to Using Ethernet.

Unitronics' Ethernet uses star topology.


93
Getting Started

About Networks
Generally, controllers are part of a closed, internal control network. A closed network may be referred to as a
LAN (Local Area Network) or an Intranet. When Intranets are connected via gateway devices, they form a
WAN (Wide Area Network). The Internet, which is made up of connected Intranets or LANs, is a form of
WAN. Internet communications are via the TCP/IP protocol.

Large manufacturing companies, for example, may be made up of a number of factories, each of which contains
its own LAN, closed control network. Within the company, all of these LANs may be connected by gateway
devices, forming a proprietary WAN--a company Internet, which in turn may be connected to the Internet--the
World Wide Web.

Within closed controller networks, Ethernet is becoming a common protocol. Ethernet communications are also
via the TCP/IP protocol.

What is an IP address?
In order to enable a controller to communicate over Ethernet, you must assign it an IP address.

An IP address is a unique number which identifies a computer or controller on a TCP/IP network. These
networks use the IP address to route messages to their destination. An IP address is a 32-bit numeric address
which is divided into four numbers (octets). Each octet is separated by a period formatted as follows:
1.160.10.240. The decimal value in each octet can range from zero to 255, or 00000000 - 11111111 in binary
notation.

Note • The values '0' and '255' are restricted and should not normally be used.

Internally, within an Intranet, you can assign IP addresses at random as long as each one is unique within the
Intranet. The common IP may be: 192.•.192.xx, where the last octet is the identifies the device on the network.

Note • In the majority of cases, controllers are part of a closed control network (Intranet). The controllers' IP
addresses are unique only within the Intranet, and cannot be accessed via the Internet--unless an valid Internet IP
address is purchased from a ISP and assigned to the controller.

IP Addresses and Networks


In binary form, the IP address 68.212.226.204 is 10101000.11010100.11100010.11001100.

The 4 octets of the address are used to create classes of IP addresses. Networks are divided into 5 classes,
according to size, as explained below. The octets are split into two sections: Net and Host. The Net section is
represented by the first octet. It is used to identify the network that a device belongs to. The Host (sometimes
called Node) section identifies the actual device on the network. The Host section is always contains by the
final octets; how many octets is determined by the network class. There are five IP classes plus certain special
addresses.

Although decimals are generally used to represent IP addresses, it is the binary value which determines which
class of network the IP address belongs to. All nodes on a given network share the same network prefix but
must have a unique host number.

94
Communications

Default The IP address of 0.0.0.0 is used for the default network.


Network

Class A This class is for very large networks.


Network Binary address start with '0', meaning that the decimal value can be anywhere from 1 to 126.
The first octet bits identify the network as Class A ; Octets 2, 3, and 4 (the next 24 bits) indicate the host within
the network.
An example of a Class A IP address is 102.•.212.226, where "102" identifies the network and "•.212.226"
identifies the host on that network.
Note • The IP address 127.0.0.1 is used as the loopback address. This means that it is used by the host computer
to send a message back to itself. It is commonly used for troubleshooting and network testing.

Class B This class is used for medium-sized networks.


Network The first two octets identify the network as Class B; Octets 3 and 4 (the remaining 16 bits) indicate the host
within the network. Binary addresses start with '10', meaning that the decimal value can be anywhere from 128
to 191.
An example of a Class B IP address is •.212.226.204 where "•.212" identifies the network and "226.204"
identifies the host on that network.

Class C This class is used for small to medium-sized networks. This is the most common type of network.
Network The first three octets identify the network as Class C; Octet 4 (8 bits) indicate the host within the network.
Binary addresses start with '110', meaning that the decimal number can be anywhere from 192 to 223.
An example of a Class C IP address is 200.•.212.226 where "200.•.212" identifies the network and "226"
identifies the host on that network.

Class D This class is used for multicasting, where a node sends a packet addressed to a special group address.
Network Binary addresses start with '1110', therefore the decimal number can be anywhere from 224 to 239.

Class E This class is used for experimental purposes only.


Network Binary addresses start with '1111', therefore the decimal number can be anywhere from 240 to 255. Class E
networks are used for experimentation. They have never been documented or utilized in a standard way.

Broadcast Messages that are intended for all computers on a network are sent as broadcasts. These messages always use the
IP address 255.255.255.255.

Subnet
A subnet is a part of a network.

All of the devices within a subnet share a common address component. On TCP/IP networks, subnets are
defined as all devices whose IP addresses have the same prefix. Devices within a particular subnet might, for
example, have IP addresses that start with 100.100.100.

Subnetting enables the network administrator to further divide the host part of the address into two or more
subnets. In this case, a part of the host address is reserved to identify the particular subnet.

Subnet Mask
One of the crucial tasks for any router is knowing when a packet of information stays on its local network. For
this, it uses a 'subnet mask'.

95
Getting Started

A network mask indicates which portion of the address identifies the network and which portion of the address
identifies the node. Class A, B, and C networks have default masks, also known as natural masks, as shown
below.

Class A: 255.0.0.0 - binary - 11111111.00000000.00000000.00000000

Class B: 255.255.0.0 - binary - 11111111.11111111.00000000.00000000

Class C: 255.255.255.0 - binary - 11111111.11111111.11111111.00000000

Since class C networks are the most common type, the most commonly used subnet mask usually reads
"255.255.255.xx.". This tells the router that all messages with the sender and receiver having an address sharing
the first three groups of numbers are on the same network, and shouldn't be sent out to another network. For
example: The computer at address 192.•.192.254 sends a request to the computer at 192.•.192.252. The router,
which sees all the packets, matches the first three groups in the address of both sender and receiver (192.•.192.),
and keeps the packet on the local network.

Gateway
A gateway is special software, or a device running special software, that routes data between different networks.

In the case of control networks, the gateway is generally a PC. The gateway PC has its own IP address.

For example, a proxy server provides a gateway between a private network to the Internet. The proxy server is
configured to enable a workstation to communicate with remote services on the Internet. In this case, the
gateway acts as a barrier that allows a device to request information from the Internet and to receive
information, but does not allow access to the host network by unauthorized users.

Note • The IP address assigned to the gateway device is generally the last available address.

Socket
A software mechanism that connects an application to a network protocol. A program can, for example, send
and receive TCP/IP messages by opening a socket and reading and writing data to and from the socket. Note
that a socket is a software object, not a physical component.

96
Communications

Note that when TCP is used, the formal 'handshake' required by the protocol means that during each session
occurring via a defined socket, other communications cannot flow through any of the other sockets until the
current session has been terminated.

Such is not the case with UDP. Since there is no formal handshake, communications can continue to flow
through a socket even when there are multiple requests.

Protocols: UDP and TCP


UDP stands for User Datagram Protocol. It is a connectionless protocol that, like TCP, runs on top of IP
networks. Unlike TCP/IP, UDP/IP provides very few error recovery services, offering instead a direct way to
send and receive datagrams over an IP network. It's used primarily for broadcasting messages over a network.

Note • In Unitronics' implementation of Ethernet, UDP is a secure protocol. Here, UDP runs under MODBUS as
well as under Unitronics' proprietary protocols; these additional layers provide the level of data security required
by control applications.

TCP stands for Transmission Control Protocol. TCP is one of the main protocols in TCP/IP networks. Whereas
the IP protocol deals only with packets, TCP enables two hosts to establish a connection and exchange streams
of data. TCP guarantees delivery of data and also guarantees that packets will be delivered in the same order in
which they were sent.

UDP takes messages from application process, attaches source and destination port number fields for the
multiplexing/demultiplexing service, adds two other fields of minor importance, and passes the resulting
"segment" to the network layer. The network layer encapsulates the segment into an IP datagram and then makes
a best-effort attempt to deliver the segment to the receiving host. If the segment arrives at the receiving host,
UDP uses the port numbers and the IP source and destination addresses to deliver the data in the segment to the
correct application process. Note that with UDP there is no handshaking between sending and receiving
transport-layer entities before sending a segment. For this reason, UDP is said to be connectionless.

TCP uses a three-way handshake before it starts to transfer data. UDP just blasts away without any formal
preliminaries. Thus UDP does not introduce any delay to establish a connection. This is probably the principle
reason why DNS runs over UDP rather than TCP -- DNS would be much slower if it ran over TCP. HTTP uses
TCP rather than UDP, since reliability is critical for Web pages with text. But the TCP connection establishment
delay in HTTP is an important contributor to the "world wide wait".

TCP maintains connection state in the end systems. This connection state includes receive and send buffers,
congestion control parameters, and sequence and acknowledgment number parameters. UDP, on the other hand,
does not maintain connection state and does not track any of these parameters. For this reason, a server devoted
to a particular application can typically support many more active clients when the application runs over UDP
rather than TCP.

The TCP segment has 20 bytes of header overhead in every segment, whereas UDP only has 8 bytes of
overhead.

TCP has a congestion control mechanism that throttles the sender when one or more links between sender and
receiver becomes excessively congested. This throttling can have a severe impact on real-time applications,
which can tolerate some packet loss but require a minimum send rate. On the other hand, the speed at which
UDP sends data is only constrained by the rate at which the application generates data, the capabilities of the
source (CPU, clock rate, etc.) and the access bandwidth to the Internet. We should keep in mind, however, that
the receiving host does not necessarily receive all the data - when the network is congested, a significant
fraction of the UDP-transmitted data could be lost due to router buffer overflow. Thus, the receive rate is limited
by network congestion even if the sending rate is not constrained.

Local Port
In TCP/IP and UDP networks, a port is an endpoint to a logical connection and the way a client program
specifies a specific server program on a computer in a network.

The port numbers are divided into three ranges: the Well Known Ports, the Registered Ports, and the Dynamic
and/or Private Ports.

The Well Known Ports, sometimes called the contact port, are those from 0 through 1023. The
Well Known Ports numbers are assigned by the IANA and on most systems can only be used by

97
Getting Started

system (or root) processes or by programs executed by privileged users.


Note • Port 502 is reserved for SCADA.
The Registered Ports are those from 1024 through 4915. The Registered Ports are listed by the
IANA and on most systems can be used by ordinary user processes or programs executed by
ordinary users.
The Dynamic and/or Private Ports are those from 49152 through 65535
To the extent possible, these same port assignments are used with the UDP [RFC768].

Port Number Description


1 TCP Port Service Multiplexer (TCPMUX)
5 Remote Job Entry (RJE)
7 ECHO
18 Message Send Protocol (MSP)
20 FTP -- Data
21 FTP -- Control
22 SSH Remote Login Protocol
23 Telnet
25 Simple Mail Transfer Protocol (SMTP)
29 MSG ICP
37 Time
42 Host Name Server (Nameserv)
43 WhoIs
49 Login Host Protocol (Login)
53 Domain Name System (DNS)
69 Trivial File Transfer Protocol (TFTP)
70 Gopher Services
79 Finger
80 HTTP
103 X.400 Standard
108 SNA Gateway Access Server
109 POP2
110 POP3
115 Simple File Transfer Protocol (SFTP)
118 SQL Services
119 Newsgroup (NNTP)
137 NetBIOS Name Service
139 NetBIOS Datagram Service
143 Interim Mail Access Protocol (IMAP)
150 NetBIOS Session Service
156 SQL Server
161 SNMP
179 Border Gateway Protocol (BGP)
190 Gateway Access Control Protocol (GACP)
194 Internet Relay Chat (IRC)
197 Directory Location Service (DLS)
389 Lightweight Directory Access Protocol (LDAP)
396 Novell Netware over IP
443 HTTPS
444 Simple Network Paging Protocol (SNPP)
98
Communications

445 Microsoft-DS
458 Apple QuickTime
502 MODBUS
546 DHCP Client
547 DHCP Server
563 SNEWS
569 MSN
1080 Socks

Glossary
ARP

Address Resolution Protocol associates an IP address to a hardware address by requesting the sending machine
for additional information called a MAC address. This only applies to Ethernet based networks.

Client

The client is generally an application that runs on a personal computer or workstation and relies on a server to
perform some operations. For example, an e-mail client is an application that enables you to send and receive e-
mail.

Client/server architecture

In this type of network architecture, each computer or process on the network is either a client or a server.
Servers are powerful computers or processes dedicated to managing disk drives (file servers), printers (print
servers), or network traffic (network servers ). Clients are PCs or workstations on which users run applications.
Clients rely on servers for resources, such as files, devices, and even processing power.

Another type of network architecture is known as a peer-to-peer architecture because each node has equivalent
responsibilities. Both client/server and peer-to-peer architectures are widely used, and each has unique
advantages and disadvantages.

DHCP

Dynamic Host Configuration Protocol is a protocol for organizing and simplifying the administration of IP
addresses for local machines. In many cases (such as with WinRoute) A DHCP server is built into the gateway
for further simplification.

DNS

Domain Name System is a naming scheme for IP addressing. For example www.kerio.com is a domain name
and has an associated IP address. A DNS server matches domain names to an IP address. We use the domain
name system because it is easier to remember a domain name than a string of numbers.

Firewall

A filtering module located on a gateway machine that examines all incoming and outgoing traffic to determine if
it may be routed to its destination. WinRoute Lite is a simple Firewall based on Network Address Translation.

Gateway

The point of entrance from one network to another. A gateway is responsible for the proper distribution of data
coming in and going out of a local area network. WinRoute must be installed on the gateway machine, also
referred to as the host computer or network router.

ICMP

Internet Control Message Protocol uses datagrams to report errors in transmission between the host and
gateway.

IP address

99
Getting Started

An IP address is the unique 32-bit number, which identifies a computer in a network. In order to communicate
across wide area networks, each computer must have a unique IP address. Local area networks cannot directly
communicate across wide area networks because they are defined by a private class of IP's.

Local Area Network

A Local Area Network (LAN) is a group of interconnected computers with the ability to share resources without
having to access a wide area network.

MAC Address

A Media Access Control (MAC) address is a hard-coded interface identification used by layer 2 devices (switch
or bridge) for proper forwarding of frames between computers on a network.

NAT

Network Address Translation is an Internet standard that enables a local-area network (LAN) to use one set of IP
addresses for internal traffic and a second set of addresses for external traffic. A NAT box located where the
LAN meets the Internet makes all necessary IP address translations.

NAT serves three main purposes:

Provides a type of firewall by hiding internal IP addresses


Enables a company to use more internal IP addresses. Since they're used internally only, there's
no possibility of conflict with IP addresses used by other companies and organizations.
Allows a company to combine multiple ISDN connections into a single Internet connection.
Network interface

A network interface may be an Ethernet card, modem, ISDN card, etc. The computer sends and receives packets
by means of the network interface.

Network Mask

A Network mask is used to group IP addresses together. Routers use a subnet mask to define the group (or IP
subnet) to which an IP address belongs so that it can identify the correct interface from which it should forward
an IP packet.

Packet

When data is transmitted over the network it is broken up into smaller pieces called packets and individually
routed to their destination. This way if one packet is not properly received, the receiving party can request
resubmission of the single packet, as opposed to the entire piece of data. Each packet contains headers, which
are responsible for the successful transmission of the packet, and a data part, which contains a portion of the
original data being transmitted over the network. The term packet is used when referring to layer 3 devices (i.e. a
router). A frame is the term used when referring to layer two devices (i.e. a switch).

Peer-to-peer architecture

A type of network in which each workstation has equivalent capabilities and responsibilities. This differs from
client/server architectures, in which some computers are dedicated to serving the others. Peer-to-peer networks
are generally simpler, but they usually do not offer the same performance under heavy loads.

Port

A port, in terms of TCP/IP, is a 16-bit number (the allowed range being 1 through 65535) used by the protocols
of the transport layer - the TCP and UDP protocols. Ports are used to address applications. In other words, when
a packet is received by the computer, the operating system uses port information to determine which application
will receive the data within the packet.

Port Mapping

Port mapping is an advanced feature of WinRoute that allows servers to be hosted securely behind NAT. When
a packet is received by the WinRoute host it can be forwarded (by translating the destination information in the
packet header) to another computer in the local network.

100
Communications

Protocol

Defines rules for the transmission of data.

RAS

Remote Access Service refers to the ability to dial into another computer or network remotely. In the context of
WinRoute, RAS simply refers to a dial-up connection.

TCP/IP

TCP/IP is a suite of networking protocols used for communication across networks. It is the standard form of
communication over the Internet. The two most significantly used Internet Protocols are TCP and UDP.
Transmission Control Protocol (TCP) is a connection oriented protocol intended to provide reliability and to
ensure that all data is transferred successfully from one computer to another. User Datagram Protocol (UDP) is a
connectionless protocol that does not require any confirmation from the receiving party. UDP is more
commonly used for multimedia and streaming applications.

Using Ethernet
Unitronics currently supports both TCP and UDP protocols, as explained in the topic About Ethernet. This topic
also contains general information about Ethernet, IP addressing, sockets, and ports.

Ethernet uses star topology.

In order to use Ethernet, your controller must comprise an Ethernet port.

V2xx Vision OPLCs can be ordered with or without an Ethernet port. The Ethernet port enables you to
implement communications via TCP/IP, such as MODBUS over TCP. To check if your Vision controller was
supplied with an installed Ethernet port, first check the device’s model number. In addition, note that the
Ethernet port is an RJ-45-type port that is lined with metal.

Via Ethernet, you can use the MODBUS IP FB to:

Communicate data within a PLC network.


Use a PC to access a PLC via MODBUS over TCP.
Use MODBUS over TCP to enable non-Unitronics PLCs to access Unitronics PLCs, via
MODBUS.
You can also use Ethernet to enable a PC running VisiLogic, Remote Access, or other communication .dll to
access a networked PLC.

101
Getting Started

The default socket configuration enables you to implement these communication options as shown below:

Default Socket Configuration


Vision controllers currently offer 4 sockets. The default socket configuration includes:

Socket Protocol Port Function


Number
0 UDP 20,000 Enables data to be both transmitted and received within a PLC network, via
MODBUS.
Note• If you are using the default settings for Socket 0, note that data is sent via
Unicast to IP: 255.255.255.255. port: 20,000 plus the last byte of the IP address
originally assigned to the device.
This is why Port numbers 20,000-20,255 are reserved for Socket 0.

1 TCP 20,256 Enables PC to PLC communication via UnCmDrv1.dll, including VisiLogic,


Remote Access, and other Unitronics communication applications.

2 TCP 502 Set to 'listen' as slave (server), enables MODBUS applications such as OPC servers
and SCADA systems which use MODBUS TCP over IP.

3 TCP 20,257 Set to 'listen' as slave (server), enables non-Unitronics PLCs to access Unitronics
PLCs, via MODBUS.

Note • The default configuration means that, for most applications, you do not need to include a Socket Init
FB in the ladder application. However, if, for example, your application requires 4 sockets for TCP,
change the default configuration of Socket 0 from UDP to TCP via the Socket Init FBs.

102
Communications

• When using the default socket configuration, Socket 0 cannot be used to communicate data between
routers, and therefore cannot transfer data between Intranets as shown in the figure below. This is
because the default configuration for Socket 0 uses Unicast.

• Note that when TCP is used, the formal 'handshake' required by the protocol means that, during each session
occurring via a defined socket, other communications cannot flow through that socket until the current session
has been terminated.
Such is not the case with UDP. Since there is no formal handshake, communications can continue to flow through
a socket even when there are multiple requests.

General
When using Ethernet, use the MODBUS IP FBs. For detailed information regarding MODBUS IP commands,
refer to the MODBUS IP help topics.

Note • In order to implement Ethernet, a controller must be assigned an IP address. This is done via the
Ethernet Card Init FB, which must be included in the Ladder applications of both master and slave
controllers.
Class C-type addresses are recommended, as explained in the topic About Ethernet.
• When the Ethernet card finishes initialization, SB 142 rises. Use this as a condition before activating
any Ethernet element, such as Socket Connect.
• An activating condition must be placed before the Ethernet Card Init FB. This may be assigned as a
power-up task; however a one-shot transitional contact may also be used.
• Unitronics' proprietary COM Protocol FB, located on the FBs menu, which may ordinarily be used
to access external slave devices, is not currently compatible with Ethernet.
Examples
PLC networks, PLC to PLC
Any controller within the network can be both master and slave. In order to be read by the master, a slave's
application must contain the MODBUS IP Scan FB.
Using UDP to implement controller-to-controller communication
In order to communicate via Ethernet throughout your controller network, you must include an Ethernet Card
Init FB in the ladder application of each networked controller. Remember that, when using UDP, do not use the
Socket: Connect or Socket: Close elements; these are only required by TCP applications.

Master
The master PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card and configuring MODBUS

The MODBUS Configuration is linked to Socket 0, which is by default set to UDP.

103
Getting Started

Note • A PLC defined as a UDP master can communicate with a number of slave devices.
Step 2: Using MODBUS Commands

Note • Note that the operand addresses in slave PLCs are indirect addresses (pointers). In the figure
below,the Slave: Start of Vector parameter is 15. This means that the master will begin reading
from MI 15 in the slave PLC. Since the Read: Vector Length parameter is 3, the function takes the
values in MI 15, 16 and 17.
The Master: Start of Vector parameter is 17; therefore the values will be written into MI 17, 18, and
19 in the master device.

104
Communications

Slave
The slave PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card and configuring MODBUS

Step 2: Scan

To enable the master PLC to access the slave, include a MODBUS Scan FB in the slave's application.

Using TCP to implement controller-to-controller communication


Master
The master PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card, Socket, and Configuring MODBUS

In the figure below, the socket is configured to use TCP.

105
Getting Started

Step 2: Establishing the Ethernet Connection: Connect Socket

Note • It is recommended that there be a time elapse of a few seconds after the Ethernet Card Initialization
and before activating Socket Connect. A timer may be used for this purpose.

Step 3: Using MODBUS Commands

Note • Note that the operand addresses in slave PLCs are indirect addresses (pointers). In the figure below,
Below, the Slave: Start of Vector parameter is 15. This means that the master will begin reading
from MI 15 in the slave PLC. Since the Read: Vector Length parameter is 3, the function takes the
values in MI 15, 16 and 17.
The Master: Start of Vector parameter is 17; therefore the values will be written into MI 17, 18, and
19 in the master device.

106
Communications

Step 4: Terminating the Ethernet connection: Close Socket

When you terminate the connection, use the 'Function in Progress' MB to ensure that you do not
terminate the connection while data is being communicated.

Slave
The slave PLC Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card, Socket, and Configuring MODBUS

In the figure below, the socket is configured to use TCP.

107
Getting Started

Step 2: Scan

To enable the master PLC to access the slave, include a MODBUS Scan FB in the slave's application.

PC to PLC: Accessing PLC via SCADA


To enable the SCADA application to access the PLC, the PLC is defined as a slave device. The slave PLC
Ladder application must include the elements shown below.

Step 1: Initializing the Ethernet card and configuring MODBUS

Port 502 is the well-known port for MODBUS applications.

108
Communications

Step 2: Scan

To enable the SCADA application to access the slave, include a MODBUS Scan FB in the slave's application.

Ethernet Operations

The Ethernet FBs are grouped under Ethernet on the FB's menu.

109
Getting Started

Ethernet: Card Init

Ethernet: Socket Init

Ethernet: TCP Connect \ TCP Close

TCP\IP: Card Init


This function is located on the Com>TCP/IP menu.

If you assign an IP address indirectly, via an MI vector, note that 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.

Note • In order to implement Ethernet, a controller must be assigned an IP address. This is done via the
TCP\IP Init FB, which must be included in the Ladder applications of both master and slave
controllers. Information on IP addressing is given in the topic About Ethernet
• When the Ethernet card finishes initialization, SB 142 rises. Use this as a condition before activating
any Ethernet element, such as Socket: Connect.
• An activating condition must be placed before the Ethernet Card Init FB. This may be assigned as a
power-up task; however a one-shot transitional contact may also be used.
• If you have linked the IP address to a vector of MIs, and this condition is not activated, the IP
address will not be assigned to the controller. Make sure, for example, that if you have used a
power-up condition, that the controller does go through power-up.

TCP\IP: Socket Init


This function is located on the Com>TCP/IP menu.

Vision controllers currently offer 4 sockets.

The default configuration means that, for most applications, you do not need to include a Socket Init FB in the
ladder application. However, if, for example, your application requires 4 sockets for TCP, change the default
configuration of Socket 0 from UDP to TCP via the Socket Init FBs.

110
Communications

The default socket configuration includes:

Socket Protocol Port Function


Number
0 UDP 20,000 Enables data to be both transmitted and received within a PLC network, via
MODBUS.
Note • If you are using the default settings for Socket 0, note that data is sent via
Unicast to IP: 255.255.255.255. port: 20,000 plus the last byte of the IP address
originally assigned to the device.
This is why Port numbers 20,000-20,255 are reserved for Socket 0.

1 TCP 20,256 Enables PC to PLC communication via UnCmDrv1.dll, including VisiLogic,


Remote Access, and other Unitronics communication applications.

2 TCP 502 Set to 'listen' as slave (server), enables MODBUS applications such as OPC servers
and SCADA systems which use MODBUS TCP over IP.

3 TCP 20,257 Set to 'listen' as slave (server), enables non-Unitronics PLCs to access Unitronics
PLCs, via MODBUS.

Note • When TCP is used, the formal 'handshake' required by the protocol means that during each session
occurring via a defined socket, other communications cannot flow through any of the other sockets
until the current session has been terminated.
Such is not the case with UDP. Since there is no formal handshake, communications can continue to
flow through a socket even when there are multiple requests.

TCP\IP: TCP Connect \ TCP Close


TCP applications require you to use a TCP: Connect FB to establish the Ethernet connection after the Ethernet
card is initialized and before activating any of the MODBUS IP commands.

To terminate the session, use the TCP: Close FB. Both elements are located on the Com>TCP/IP menu.

111
Getting Started

Ethernet TCP\IP: PC to Vision


In order to use a PC to access a Vision controller via Ethernet:

1. The Vision PLC must contain an Ethernet port.


2. Both the PC and PLC must be connected to an Ethernet network, and be assigned valid IP addresses; the
PLC must be assigned a unique name via the Set PLC Name.
3. The PLC must be defined in either TCP\IP's Ethernet Project Settings or in TCP\IP Favorites .
4. In VisiLogic's Vision Communication - PC Settings:
- Ethernet must be selected
- the target PLC must be selected from either Favorites or TCP\IP Project Settings.
These conditions enable VisiLogic to access a PLC via Ethernet in order to download programs and carry out
other tasks.

Vision Ethernet Port


V2xx Vision OPLCs can be ordered with or without an Ethernet port. The Ethernet port enables you to
implement communications via TCP/IP, such as MODBUS over TCP. To check if your Vision controller was
supplied with an installed Ethernet port, first check the device’s model number. In addition, note that the
Ethernet port is an RJ-45-type port that is lined with metal.

TCP/IP Project Settings


TCP/IP Project Settings enable VisiLogic to access a Vision PLC via an Ethernet connection. Each PLC
included in the project will be accessed according via the protocol and port number assigned to it.

TCP/IP Project Settings contain IP addresses and settings that are specific to a particular VisiLogic project.
However, you can add any of the IP addresses it contains to the Favorites file, which is a common, global file
that can be accessed from any VisiLogic project.

1. Select TCP/IP Settings from the Project menu.

112
Communications

2. Open the IP Address Selector in order to enter the IP of the PLC s in the project.

3. Enter an IP address either by:


- Typing it,
- Importing any IP addresses you may have defined in your project within TCP/IP Init FBs
- Importing the IP of a PLC currently linked to your PC via a valid communication connection.

113
Getting Started

Note • If you import a Vision's IP, its protocol type (UDP or TCP) and port number are also imported.
If you have typed the IP address, you must also type the port number.

4. Before exiting TCP/IP Project Settings, you must set the PLC name. This is a unique name that is
assigned to the controller via the Set PLC Name FB.

Note • You can add any PLC defined in TCP/IP Project Settings to the Ethernet Favorites file.

114
Communications

TCP/IP Favorites
Favorites is a common, global file that can be accessed from any VisiLogic project, as well as by other programs
such as Remote Access.

Favorites is a file that is created by VisiLogic after you have added a PLC to the favorites list. It is a global file
stored in the Program\Common files\Unitronics folder as Eth_Favorites.evb.

Ethernet Favorites is located on the Connection menu.

Once Favorites have been created, you can access them in order to:

Import the definitions into TCP/IP Project Settings.


Select a PLC listed in Favorites to enable VisiLogic to access a PLC via Vision Communication
- PC Settings.

Vision Communication - PC Settings--Selecting the target PLC


Once the conditions above have been met, VisiLogic can access a selected PLC via Ethernet.

1. Select Communication and OS from the Connection menu.

115
Getting Started

2. Under Connection Type, select Ethernet, and then select the target PLC from either Project Settings or
Favorites.

VisiLogic is now ready to communicate via Ethernet.

Ethernet TCP\IP: SBs & SIs


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

SB 141 Ethernet: Card Ethernet card is No Ethernet card is When the Ethernet: Card
Exists found installed Initialization FB runs,
the PLC checks whether
an Ethernet card is
installed.

SB 142 Ethernet: Card Ethernet card Ethernet card


Initialized initialization initialization fails
succeeds

SB 143 Ethernet: Socket 0 Socket 0 initialization Socket 0


Initialized succeeds initialization fails

SB 144 Ethernet: Socket 1 Socket 1 initialization Socket 1


Initialized succeeds initialization fails

SB 145 Ethernet: Socket 2 Socket 2 initialization Socket 2


Initialized succeeds initialization fails

SB 146 Ethernet: Socket 3 Socket 3 initialization Socket 3


Initialized succeeds initialization fails

SB 147 Ethernet: Socket 0 Connection Socket 0 is free


Connected established via
Socket 0

SB 148 Ethernet: Socket 1 Connection Socket 1 is free


Connected established via
Socket 1

SB 149 Ethernet: Socket 2 Connection Socket 2 is free


Connected established via
Socket 2

SB 150 Ethernet Status: Connection Socket 3 is free


Socket 3 established via
Connected Socket 3

116
Communications

SB 151 Ethernet Link: A link exists No link exists


Communication
established

SB 152 Ethernet Link: When a 10baseT link When a 10baseT


10baseT is detected, during link is not detected,
data transmit/ during data
receive. transmit/ receive.

SB 153 Ethernet Link: When a 100baseT When a 100baseT


100baseT link is detected, link is not detected,
during data transmit/ during data
receive. transmit/ receive.

SB 154 Ethernet: data More than one device One or no devices


collision is transmitting data are transmitting
over the Ethernet data over the
network Ethernet network

SB 155 Ethernet: Socket 0 Data is being Data is not being


Send in Progress transmitted via transmitted via
Socket 0 Socket 0

SB 156 Ethernet: Socket 1 Data is being Data is not being


Send in Progress transmitted via transmitted via
Socket 1 Socket 1

SB 157 Ethernet: Socket 2 Data is being Data is not being


Send in Progress transmitted via transmitted via
Socket 2 Socket 2

SB 158 Ethernet: Socket 3 Data is being Data is not being


Send in Progress transmitted via transmitted via
Socket 3 Socket 3

Parameter Description Value Comments

SI 141 Ethernet Socket 0: Protocol Type • 0=PC application (Read-only)


(default) Sockets are set to Protocol Type 0 by
• 1=MODBUS default. Activating MODBUS
SI 142 Ethernet Socket 1: Protocol Type
Configuration changes the Protocol
Type to 1.
SI 143 Ethernet Socket 2: Protocol Type

SI 144 Ethernet Socket 3: Protocol Type

Parameter Function
SI value Message

0 Initialized to UDP, status: Closed

S1 145 Socket 0: Status

117
Getting Started

SI 146 Socket 1: Status


2 Initialized to TCP, status: Listen

14 Initialized to UDP, status: Ready

SI 147 Socket 2: Status


15 Initialized to UDP, status: Engaged in
Transmit/Receive

SI 148 Socket 3: Status

Parameter Description Value Comments

SDW 14 Socket 0: Number of sent transmissions Updated after each data


transmission via Socket 0

SDW 15 Socket 1: Number of sent transmissions Updated after each data


transmission via Socket 1

SDW 16 Socket 2: Number of sent transmissions Updated after each data


transmission via Socket 2

SDW 17 Socket 3: Number of sent transmissions Updated after each data


transmission via Socket 3

SDW 18 Socket 0: Number of received transmissions Updated after each data packet
received via Socket 0

SDW 19 Socket 1: Number of received transmissions Updated after each data packet
received via Socket 1

SDW 20 Socket 2: Number of received transmissions Updated after each data packet
received via Socket 2

SDW 21 Socket 3: Number of received transmissions Updated after each data packet
received via Socket 3

Ethernet TCP\IP: PC to Vision


In order to use a PC to access a Vision controller via Ethernet:

1. The Vision PLC must contain an Ethernet port.


2. Both the PC and PLC must be connected to an Ethernet network, and be assigned valid IP addresses; the
PLC must be assigned a unique name via the Set PLC Name.
3. The PLC must be defined in either TCP\IP's Ethernet Project Settings or in TCP\IP Favorites .
4. In VisiLogic's Vision Communication - PC Settings:
- Ethernet must be selected
- the target PLC must be selected from either Favorites or TCP\IP Project Settings.
These conditions enable VisiLogic to access a PLC via Ethernet in order to download programs and carry out
other tasks.

118
Communications

Vision Ethernet Port


V2xx Vision OPLCs can be ordered with or without an Ethernet port. The Ethernet port enables you to
implement communications via TCP/IP, such as MODBUS over TCP. To check if your Vision controller was
supplied with an installed Ethernet port, first check the device’s model number. In addition, note that the
Ethernet port is an RJ-45-type port that is lined with metal.

TCP/IP Project Settings


TCP/IP Project Settings enable VisiLogic to access a Vision PLC via an Ethernet connection. Each PLC
included in the project will be accessed according via the protocol and port number assigned to it.

TCP/IP Project Settings contain IP addresses and settings that are specific to a particular VisiLogic project.
However, you can add any of the IP addresses it contains to the Favorites file, which is a common, global file
that can be accessed from any VisiLogic project.

1. Select TCP/IP Settings from the Project menu.

2. Open the IP Address Selector in order to enter the IP of the PLC s in the project.

3. Enter an IP address either by:


- Typing it,
- Importing any IP addresses you may have defined in your project within TCP/IP Init FBs
- Importing the IP of a PLC currently linked to your PC via a valid communication connection.

Note • If you import a Vision's IP, its protocol type (UDP or TCP) and port number are also imported.
If you have typed the IP address, you must also type the port number.

4. Before exiting TCP/IP Project Settings, you must set the PLC name. This is a unique name that is
assigned to the controller via the Set PLC Name FB.

Note • You can add any PLC defined in TCP/IP Project Settings to the Ethernet Favorites file.

TCP/IP Favorites
Favorites is a common, global file that can be accessed from any VisiLogic project, as well as by other programs
such as Remote Access.

Favorites is a file that is created by VisiLogic after you have added a PLC to the favorites list. It is a global file
stored in the Program\Common files\Unitronics folder as Eth_Favorites.evb.

Ethernet Favorites is located on the Connection menu.

119
Getting Started

Once Favorites have been created, you can access them in order to:

Import the definitions into TCP/IP Project Settings.


Select a PLC listed in Favorites to enable VisiLogic to access a PLC via Vision Communication
- PC Settings.

Vision Communication - PC Settings--Selecting the target PLC


Once the conditions above have been met, VisiLogic can access a selected PLC via Ethernet.

1. Select Communication and OS from the Connection menu.


2. Under Connection Type, select Ethernet, and then select the target PLC from either Project Settings or
Favorites.

VisiLogic is now ready to communicate via Ethernet.

120
Networks
About Networks
Vision controllers offer different networking options:

CANbus

You can create a decentralized control network of up to 63 controllers using CANbus. This is sometimes called
a multi-master network. In such a network, CANbus enables inter-PLC data exchange. Technical specifications
and wiring diagrams are given in the User Guide. Vision controllers also support data exchange via the
MODBUS protocol

.
You can network M90 Micro-OPLCs and Vision OPLC controllers.

Via RS232 and RS485, you can implement communication protocols such as MODBUS.

RS485

RS485 is a balanced serial interface for the transmission of digital data, which enables you to create a multi-drop
network containing up to 32 devices, or nodes.

Network Access via Serial COM Ports

You can access a networked controller unit via its RS232/RS485 port using a PC, whether directly connected or
via modem link. Using any networked controller as a bridge, you can view, read, and write data into any unit, as
well as upload and download programs.

121
Getting Started

This feature can also allow you to view your network via a SCADA program.

CANbus Networking Operands


CANbus enables inter-PLC data exchange. Via the CANbus port, you can:

Network up to 64 controllers, where each unit can read information from up to 8 other
controllers in the network.
Connect one PC to 63 controllers.
Each networked PLC broadcasts specific data to the network, stamped with the controller's unique ID number.
This data is contained in the following system operands:16 System Bits (SB 200 to SB 215( 16 Inputs (I 0 to I
15), and 2 System Integers (SI 200 and SI 201).

When the data in these operands is constant (unchanging), it is broadcast every 400mS. When the data is
dynamic (changing) it is broadcast at a rate not exceeding 20mS. Even when the data changes are rapid, data is
not broadcast at a rate exceeding 20mS; this avoids network overload.

Implementing inter-PLC data exchange


Assigning each networked controller a unique Unit ID number

CANbus ID numbers range from 1 to 63. The ID number is contained in SI 8. You can assign an ID number by:

122
Networks

Entering a value into SI 8 via Information Mode.


Storing a value into SI 8 as shown below, either by storing a constant number or by linking a
register value.

Linking a register value allows you to enable an end-user to enter an Unit ID number via the HMI panel. You
can create a Display for this purpose as shown below.

Note • The default ID # is 1.

Initializing the CANbus port

The CANbus ports of all controllers in the network must be initialized. This is done via a COM Port Init FB as
shown below.

123
Getting Started

Note • The baud rates of all controllers in the network must be set to the same rate. Baud rate is limited by
cable length, as described in the CANbus Specifications section below.
• The COM Init FB used to initialize the CANbus port should be included in the Main Routine of the
Ladder application.

Reading Data from a Networked Controller via Network Operands

When a controller is integrated into a CANbus network, the values in these operands are continually broadcast to
the network: SB 200 to SB 215, I 0 to I 15, SI 200 and SI 201.

In order to enable a networked controller to read the values from another networked controller, place the desired
function in the net. In the Select Operand Address box, click on the Network tab, then select the ID of the target
controller and the desired operand.

124
Networks

SB 237: Enable/Disable Broadcast

By default, SB 237 is set to ON, enabling the controller to broadcast data. When this SB is OFF, the data is not
broadcast. This can be used prevent network overload.
CANbus Specifications

Power Requirements: 24VDC (±4%), 40mA max. per unit

Galvanic Isolation between CANbus and controller: Yes

Baud rate Max. Network Cable Length:


1 Mbit/s 25 m

500 Kbit/s 100 m

250 Kbit/s 250 m

125 Kbit/s 500 m

100 Kbit/s 500 m

50 Kbit/s 1000 m

20 Kbit/s 1000 m

Note • Cable lengths over 500 meters require an additional power supply.

Wiring Considerations
Use twisted-pair cable. DeviceNet® thick shielded twisted pair cable is recommended.

Network terminators: These are supplied with the controller. Place terminators at each end of the CANbus network. Resistance
must be set to 1%, 121d, 1/4W.

Connect the ground signal to the earth at only one point, near the power supply.

The network power supply need not be at the end of the network.

125
Getting Started

Maximum number of controllers in a network: 63.

Wiring Diagram

Note • Unitronics’ CANbus control network is run by a separate isolated power supply that is not part of
the network power supply.

Assigning a Unit ID number


When you create an controller network, you must assign a Unit ID number to each controller. A Unit ID number
is unique. The same ID number must not be assigned to more than one device within a network.

You use this number for two purposes:

To enable controllers to exchange data.


To access a networked controller via your PC.
The ID number is contained in SI 8. You can assign an ID number by:

126
Networks

Entering a value into SI 8 via Information Mode.


Storing a value into SI 8 as shown below, either by storing a constant number or by linking a
register value.

Linking a register value allows you to enable an end-user to enter an Unit ID number via the HMI panel. You
can create a Display for this purpose as shown below.

127
Getting Started

Note • The default ID # is 1.

• ID numbers 1-63 are


reserved for
controllers linked via
CANbus; ID numbers
64-127 are reserved
for controllers
networked via RS485.

Using this range of ID


numbers prevents a
polled controller from
attempting to act as a
CANbus bridge,
preventing it from
attempting to locate
the requested
controller.

Network Operands-Communicating Data Via CANbus


When a controller is integrated into a CANbus network, the data contained in certain system operands is
continuously broadcast to the network, together with the controller's unique ID number. The data is contained in
16 System Bits (SB 200 to SB 215( 16 Inputs (I 0 to I 15), and 2 System Integers (SI 200 and SI 201).

In order to enable a networked controller to read the values from another networked controller, place the desired
function in the net. In the Select Operand Address box, click on the Network tab, then select the ID of the target
controller and the desired operand.

128
Networks

Accessing a Networked PLC via PC


Use a PC to access controllers within a network either via a direct connection, GSM or landline modem.

Accessing a Networked Controller


1. Connect your PC to any controller in the network using the programming cable supplied with the
controller kit.

129
Getting Started

Note • Different PCs can access a network at the same time, using different controller units as bridges.
However, 2 different PCs cannot simultaneously access the same controller unit.
2. Select a networked controller by opening Communication & OS from the Connection menu, and then
entering the Unit ID number.

Accessing a Networked Controller via Modem

Note • The PC-modem cable is not the same type of cable used to connect between the controller and the

130
Networks

modem. Ensure that the cable used to connect the PC to the modem provides connection points for
all of the modem's pins.
• 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.
• If calls are routed via a switchboard, note that the switchboard settings may interfere with
communications. Consult with your switchboard provider.
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.
PC Modem Configuration

Open PC Modem Configuration from the Options menu.

131
Getting Started

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.

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.

Online Test Mode & Remote Access


You 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 Test button on the toolbar, then click the Remote Access button.

The controller model that is shown on the display is the one selected in Hardware Configuration.

132
Networks

During a Remote Access session, you can:

Use your cursor to operate the controller keypad and activate touch-screen objects (relevant
models).
Use your PC keyboard to operate the controller keypad (numeric keys, function 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.

Check Network Status


The network status is checked via the bridge. Access Check Network Status by opening the Connection menu,
selecting Communication & OS, then clicking the network tab.

CANbus Network Problems


SB 236 indicates that there is an error in the CANbus network.

SI 236 CANbus Network: Failed Unit ID. Note that the first 3 bits turn ON only when the controller is unable to
broadcast via the CANbus port. The value of SI 236 indicates the following messages:

Value Message May result from:

0 No Acknowledgement CANbus power failure, crossed wires, incorrectly set termination


points.

1 CANbus OFF

2 CANbus Warning error Poor transmission quality due to faulty wiring, or if the cable length
exceeds recommendations.

4 One or more networked units cannot be read.


If this bit is ON, check SI 238, SI 240-243.

SI 237 CANbus Network Communication Error Code is a bitmap that indicates the LAST unit that cannot be
read. Note that each controller can receive messages from up to 8 others. Example: Assume that there are 6

133
Getting Started

controllers in the network (3,6,8,13,17,34). Controller 3 is waiting for data from controllers 8 and 13 and 17. If
the controller does not receive data from controller 13 (assume a 1 second timeout) then SI 237 will contain a
value of 13. Bit 4 in SI 236 will also turn ON. Once controller 3 has received the data, Bit 4 turns OFF.

SIs 240, 241, 242, and 243 serve as a bitmap indicating which unit is in error. If, for example, the network
includes unit ID numbers 8, 9 and 13, and PLC #9 cannot be accessed, then the ninth bit in SI 240 will turn ON.
When the error is fixed, the bit falls to OFF.

CANbus troubleshooting

Problem Possible cause Recommended Action

Failed Baud rate settings All controllers in the network must be set to the same CANbus baud rate.
communication Baud rate may be set:
• By initializing a port via the COM Init FB.
• Temporarily via Info mode;however, note that the baud rate will
be reset at the next power-up

Termination resistors Termination resistor settings are provided in the chapter Communications
in the controller's user guide.

CANbus power supply Check that the CANbus power supply is properly connected, and that the
voltage is in the permissible range as described in the chapter
Communications in the controller's user guide.

Incorrect ID number You may not have assigned the correct unit ID number in your operand
addresses (between 1-63). Check the OPLC settings tab Communicate with
OPLC.

PC cannot Incorrect setting When you communicate with the controller unit that you are using as a
communicate with bridge to the network, either enter the ID# of the bridge or select Direct
bridge Connection in the OPLC settings tab Communicate with OPLC.

PC cannot Communication Make sure the current RS232 parameters in your project are the same as
communicate with settings the parameters that are actually in the bridge. Check these topics:Check
network Network Status,Vision Communication PC Settings

Incorrect baud rate The bridge's RS232 port's baud rate cannot be set below 9600.

134
Utilities
Live Update from the Web
Live Update is available from the Help menu. To start Update, select a subject and follow the on-screen
instructions.

Note • To enable Live Update, you may need to change the settings in Project Properties, which is
located on the Project menu.
Via the Project Properties Download tab, you can select to run Live Update via a proxy server, or
via your Internet Explorer settings.

• After downloading FBs, you must close and then restart VisiLogic. The new FBs will appear on
the FBs menu. Check the topic FB Library for more information.

• After downloading a new Operating System to your PC, you must install it in the controller.
Connect the controller to your PC, then open Communication and OS from the Connection menu.
The new Operating system will appear in the Install Operating System tab. Select Download to
begin the installation process.

Information Mode
Information Mode is a utility that is embedded in the operating system of the controller. Via Information Mode,
you can view data on the LCD screen, use the controller’s keyboard to directly edit data, and perform certain
actions such as resetting the controller. You can enter Information Mode at any time without regard to what is
currently displayed on the LCD screen.

Enter Information Mode by pressing the <i> key for a few seconds. The default password is 1111.

135
Getting Started

Viewing data does not affect the controller’s


program. Performing actions, such as initializing
the controller, can influence the program.

Note that when you use Information Mode, the


keyboard is dedicated to that purpose. The keys
return to normal application functions when you
exit Information Mode.

Using Information Mode


1. To enter Information mode, press the <i> key on the Vision’s keyboard.
2. Enter your password. The default password is 1111. This password remains in effect until you change it
via the Information Mode screen described in the table below.
3. The controller enters Information Mode, showing the first category, Data Types. Use the <Enter> key to
enter a category.
4. Press the <ESC> key to exit a category, and to exit Information mode.

The controller will block entry into


Information mode until the correct password
has been entered. This is why you must
record any password you set for your
controller.

The data in Information Mode is arranged in


Categories. Each Category contains several
Subjects. You navigate Information Mode by
using the keyboard buttons.

To exit Information mode, press the


<ESC>button on the Vision’s keyboard.
Each press returns one level up. Press the
number of times necessary to exit.

Note • When you reenter Information Mode, the controller will return to the last Category viewed.
• V290 only
Note that in order enter Information Mode, you touch the V290’s touchscreen in an area that is not
occupied by a Keypad Entry variable or other screen object that has been assigned a Touch
Property. Maintain contact for several seconds, until the controller enters Information Mode. The
V290 displays Information Mode options on the touchscreen exactly as other Vision controllers
display these options on their LCD screens.
To navigate through Information Mode, use touchscreen keys just as the keypad keys are used in
other Vision controllers.

136
Utilities

The table below shows the categories of information that can be accessed in this mode.

Info System Operands


INFO mode, SB 36

# Description Turned ON Turned Off Comments

SB 36 INFO mode By OS, Remote Turns OFF when user Delay time to enter Info Mode is 4 seconds, may be
Access, or program exits Info Mode modified via SI 50

INFO Delay time, SI 50

# Description Value Comments

SI 50 INFO delay time Default by O/S (every Units: seconds.


power up) = 4 seconds Legal values: 0, 3 to 20.
If you force or store '0' into equal Zero – INFO is disabled.
For V290 – Touching the <i\> key on the touch screen
starts Info Mode – Touching a legal Ladder application
variable clears the INFO time.

Category Subject Possible Actions

Data Types Memory Bits • View bit status

System Bits • Change bit status (Set/Reset)

Memory Integers • View integer/long integer/double word value.

System Integers • Change values

Memory Longs
• Toggle Base: view the value in decimal or hexadecimal form.

System Longs

Memory Double Words

System Double Words

Inputs • View input status.·


• Force input status to 1 (FR1) or 0 (FR0). Forced values stay in
effect until Normal mode (NRM) is selected, or until the controller
is initialized or reset.
Note • Forced values do influence your program. This can be
useful in testing the effect of an input condition on an output status.

Outputs • View output status.·

137
Getting Started

• Force output status to 1 (FR1) or 0 (FR0). Note that forced output


values do not affect your program.
• Set/Reset output status.

Timers • Enter a Preset Timer value.


• View the current timer value and status by selecting the R.T. option.

System Model & O/S Ver • Check the controller’s model number and operating system version.
• Check whether the controller is in Run or Stop mode.

Working Mode • Check whether the controller is in Run or Stop mode.


• Reset the controller. This restarts your program; restoring power-up
values to all data types except for those protected by the battery
backup. The battery protects Real Time Clock (RTC), all operand,
and Data Table values.
• Initialize the controller. This restarts your program and initializes
all values, restoring 0 values to all data types.

Time & Date • View the Real Time Clock (RTC) settings. Note that the RTC
settings control all time-based functions.
• Change the RTC settings via the controller’s keyboard.

Unit ID The Unit ID number identifies a networked controller. You can:


• Change the ID number. The new ID number will remain in effect
until the controller is reset.
• Burn the ID number into the controller’s FLASH memory. This is a
permanent change.

Serial Port 1 • View and edit communication settings.


Serial Port 2 • Select to Change or Burn the new settings.

CANbus Baud Rate • Change the CANbus baud rate.

Function Block Reserved for future use

Password New Set a New Password

Hardware • Check if I/O Expansion Modules are installed. Note that I/O
Configuration Expansion Modules are represented by letters. Identical module
types are represented by identical letters as shown below.
• Shows if an I/O module is short-circuited.

138
Utilities

On-Line Test Mode (Debug)


To test a project, first connect the controller to your PC using the program download cable provided with the
software package, then download the project and click the On-Line Test button. The Online Test toolbar opens,
enabling you to:

Switch between Run and Stop modes.


Use Single Scan to run a single cycle of the ladder program for debugging purposes.
You can stop the scan cycle at any point by placing OnLine Test Points, located on the More
menu, in the Ladder.

When the scan reaches an OnLine test point that is active (receives RLO), Online Test freezes,
enabling you to check element status and values, including Timer values, at that point during
Ladder execution. Note that if more than one OnLine test point is activated, SB 35 turns ON.
Measure the time interval between 2 points in the Ladder application, by placing Start and End
Interval elements, located on the More menu, anywhere in the application. The time interval, in

139
Getting Started

micro-seconds, is stored in the DW linked to the End Interval element.

Open Remote Access to debug remote controllers via network or modem connections.

In Online Test mode, you can view the power flow, and view and force operand values and element status.

Note • The controller can send and receive SMS messages when the controller is in Test mode.

140
Utilities

Remote Access: Accessing a PLC via PC


You can use a PC to access a remote Vision and download, upload, and edit programs. You can access:

Stand-alone controllers that are directly connected to the PC via a cable.


Controllers within a network
Either stand-alone or networked controllers via GSM/CDMA or landline modem.

When you run On-line Test mode, you can use the Remote Access utility to display the remote controller on
your PC screen. During a Remote Access session, you can:

'Press' keypad keys and touch-screen objects (relevant models) by using your cursor, to click the
controller keypad touch-screen objects on-screen, or via your PC keyboard, by pressing numeric
keys and function 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 on your PC keyboard, or by clicking it on-
screen with your cursor.

When you are in Online mode, you can toggle Remote Access on and off via <Shift>+<F9>.

Accessing a Controller
Direct Connection: PC-Controller
Connect your PC to any controller using the programming cable supplied with the controller kit.

141
Getting Started

Accessing a Networked Controller


1. Connect your PC to any controller in the network using the programming cable supplied with the
controller kit.

Note • Different PCs can access a network at the same time, using different controller units as bridges.
However, 2 different PCs cannot simultaneously access the same controller unit.

2. Select a networked controller by opening Communication & OS from the Connection menu, and then
entering the Unit ID number.

142
Utilities

Accessing a Controller via Modem

1. Prepare and connect your PLC-side modem as described in the topic PLC-side Modems, in the section
'How to enable a Vision controller to communicate via landline, GSM, or CDMA modem'.
2. Prepare the PC-side modem as described in the topic PC-Modem Configuration, in the section 'How to
Configure a PC-side Modem'.
3. In Connection PC-Modem Configuration, dial the remote PLC's controller to establish the data link, then
enter OnLine mode.

Note • The Zoom option on the Remote Access Options menu can be activated only if you select Hide
Keys. Zoom cannot be used with M90/91 or V280 controllers.
• Improving Remote Access run times:
To improve VisiLogic's Remote Access run times, select Create HMI Display
Cache from the Build menu.
To create a .ura file containing static displays, select Export Displays to Remote
Access, a stand-alone utility provided by Unitronics.

143
Getting Started

Project (Vision) Downloader


The Project Downloader utility is included in Unitronics Remote Access software, which is installed with
VisiLogic. The Project Downloader makes it possible to install .dvi files in local or remote controllers without
using VisiLogic.

.dvi files are complete applications in a compressed format. You create them when you download programs to a
controller.

Creating Download files


Note • Both the controller used to make the download file (source), and the controller that is installed with
the .dvi file (target) should be installed with the same OS Version.
• To avoid errors in the .dvi file, the Download process must run smoothly, without being aborted or
affected by PC faults.

1. Click Download,then select Create Download file.

2. A dialog box opens, enabling you to select a Save location. Select a location, then click OK, a .dvi file is
created.
Checking the integrity of the Download file
Although you do not need to have Remote Access installed on your PC in order to create .d90 files, you need to
install it in order to check .dvi files.

1. After you have created the .dvi file, save the project from which it was downloaded.
2. Open a new, empty project and download it to the controller.
3. Start Remote Access and select the appropriate Vision model.

144
Utilities

4. Click on the Project Downloader which is located on the Remote Access Tools menu.
5. Navigate to the .dvi file and download it into the controller.
6. Reopen the original Ladder project used to create the .dvi file.
7. Select Verify from the Controller menu; the Verify process will compare the project in your PC with the
.dvi application installed in the controller.
8. If the Verify process is successful, the .dvi file is valid.
For more information regarding the Project Downloader, check the Remote Access Help.

Quick Navigation
VisiLogic offers different tools for program navigation.

Program Tree

Note • Within the program tree, elements are presented alphabetically. This does not affect the order in
which the program runs.
• Ladder Modules and subroutines can be moved via drag-and-drop, as can HMI Modules and
Displays. Again, moving elements does not affect the order in which they run.

145
Getting Started

The Main Ladder Module, Main Subroutine, Start-up HMI Module and the Start-up HMI Display
cannot be moved via drag-and-drop or erased. For easy identification, they are always marked in
orange.

Accessing a Load Display Target

Accessing a Call Subroutine Target

Go To Label

Use labels as bookmarks to mark program sections, and then locate them using the Go To Label<Alt> +
<Right/Left arrow> and List of Labels <Ctrl> + <L> utility.

146
Utilities

The Find utility also enables you to easily locate, directly open, and edit most program elements.

In addition, shortcut menus that are relevant can be opened.

Operand View
Use the Operands tab in the Output Window to see if operands and I/Os are used in a program, assign power-up
and preset values, view current values when you run Test mode, change formats, assign descriptions (symbols),
and view and edit Watch Folders.

Watch Folders
Watch Folders enable you to:

Arrange related groups of operands in folders.


Name the folders.
View these operands in the tabbed Output Window at the bottom of the screen.
To view a Watch folder, click the Watches tab at the bottom of the screen, then select the desired folder. Edit the
folder by right-clicking a line, then selecting the appropriate function.

147
Getting Started

Adding Operands to a Watch Folder from a net

To add a single operand to a Watch folder, right-click it in the Ladder or in the Operand Output
Window.

148
Utilities

To add all of the operands within a net to a Watch folder, right-click the right-hand rail of the
desired net.

Protecting Subroutines
You can create a Ladder Password, then apply it to protect multiple subroutines. When a subroutine is protected,
a user cannot export/import it. In addition, the user cannot open, copy, or print it without supplying the
password.

Creating and Using a Password


1. To create a password, select File>Set Ladder Password; then fill in the password field.

2. To apply the password to a subroutine, right-click the subroutine's name in the Project Navigation
window, then select Set as Protected; a small padlock icon is displayed nest to the subroutine's name.

149
Getting Started

You can also right-click a module's name and select Protect All Subroutines in Module.

Note • Protection is applied after VisiLogic (not just the project) is closed and reopened.

3. To remove protection from a subroutine, right-click the protected subroutine's name, then select Set AS
Unprotected; the padlock icon disappears.

You can remove protection from a module in the same way.

Note • The same password may be used for different projects.


Deleting a Ladder Password
1. To delete a Ladder password from a project, select File>Unset Ladder Password.

Memory Tab
Memory enables you to view a vector according to the length you set and in the format you desire. When ASCII
is the selected format, you can click a line and force a string to the vector.

150
Utilities

Find (& Replace)


Highlight an operand or Ladder Element and press <Ctrl> + <F>; the results will be displayed in the Output
window at the bottom of the screen. Highlighting a function and pressing <Ctrl> + <F> will open a dialog box,
enabling you to select the desired operand.

In addition, right-clicking most program elements will display the Find button.

In addition, VisiLogic offers the following Find functions:

Find
Use Find to locate operands, labels, subroutines and Displays.

You can also right-click an element or subroutine to display the Find icon on the right-click menu.

Note • Labels: Clicking on a found 'Label' will list the Jump to Label linked to that label in the Output
Window.
Find Element
The Find Element utility enables you quickly locate any element that is used in a project.

1. Select Find Element from the Edit menu; the utility opens.
2. Click the desired element type in the left pane, then select the element from the right and click
OK.

151
Getting Started

Find & Replace Operand


The Find & Replace Operand utility enables you quickly replace any operand or vector of operands that
is used in a project.

1. Select Replace Operand from the Edit menu; the Replace utility opens.
2. The Select Operand box opens; select the Source and Target operands.
3. To restrict the Replace operation to a specific subroutine, click the Subroutine field to open the
selection box, then click the desired subroutine.
4. To replace a vector, enter its length..
5. To copy the operand descriptions, power-up values, and formats, select Copy Properties; select
Clear Source to remove these from the source operands.
6. Click OK; the operands are replaced.

Find FB
Find FB enables you to locate the FBs in your project.

152
Utilities

Find Font
This enables you to find fonts used in HMI Displays.

153
Getting Started

Finding a Load Display Target

154
Utilities

Finding a Call Subroutine Target

Go To Label
To find Labels, use Go To Label<Alt> + <Right/Left arrow> and List of Labels <Ctrl> + <L> utility.

Find Constant Value


To find Constant values, either:

Click on the Constant, then press <Ctrl> + <F>; the results appear in the Output window.

155
Getting Started

Start Find, select the Constant tab and enter the value, then press OK ; the results appear in the
Output window.

Interrupt Routines
Interrupt routines cause:

A program to stop immediately, whenever the interrupt is activated, even if the program is in the
middle of scanning a net in another subroutine.
A jump to the Interrupt subroutine. An Interrupt subroutine must have the exact name shown in
the examples below.
When the interrupt routine is finished, the program returns to where it was interrupted, and
continues from that point until the next Interrupt arrives.
Interrupt routines are generally used with Immediate elements, for example to turn an output ON in case of an
alarm or emergency. To call an interrupt routine:

1. Include an Interrupt
subroutine of the correct
name in your program; the
subroutine is executed
automatically when the
condition for calling it is
filled.

Note • If the name of the subroutine is incorrect, the subroutine will not function as an Interrupt routine.
• Interrupt features are not supported by the V120-12 series.
Sample applications showing how to use Interrupt routines in conjunction with Immediate elements may be
located in :::\ProgramFiles\Unitronics\VisiLogic\Examples.

2.5 mS Interrupt Routine


This function is timed-based. The interrupt function is called by naming a subroutine _Interrupt 2.5 mS.

156
Utilities

Including a _Interrupt 2.5 mS subroutine in the Ladder application causes:

The program scan to pause every 2.509 mSec.


A jump to the subroutine named _Interrupt 2.5 mS. Note that the interrupt routine should be as
short as possible, and must not exceed approximately 0.5 mSec.
When the interrupt routine is finished, the program returns to where it was interrupted, and continues from that
point until the next Interrupt arrives.

Note • The Subroutine _Interrupt 2.5 mS will run for the first time after the first Ladder scan is run.
Interrupt HSC
This function is called according to the current value of a high-speed counter. The program stops immediately
and executes the subroutine when the Counter Value reaches the Counter Target Value.

The interrupt function is included in the program by naming a subroutine _Interrupt x,x where the first x is the
high-speed counter, and the second x is the reload. These subroutines must be named in accordance with your
Hardware Configuration as:

_Interrupt HSC 0,1


_Interrupt HSC 2,3
_Interrupt HSC 4,5
When the interrupt routine is finished, the program returns to where it was interrupted, and continues from that
point until the next Interrupt arrives.

157
Getting Started

Search: Symbolic Name


Use Search: Symbolic Name to find operands by description. Within the Select Operand box, this is activated
via <Ctrl> + <L> .

Deleted Unreferenced Operands


To help manage your project, you can delete unreferenced operands.

Print Project
Print Project is located on the Project menu.

Via the Print dialog box, you can print various aspects of your project. Print Preview is also offered.

158
Utilities

Project Properties
Located on the Project menu, Project Properties enables you to :

Apply a password to your project.


Select download options.
Determine Live Update settings.
Set net height throughout a project.

1. Select Properties from the Project menu.


2. Click on the tabs to view and edit the various properties.

159
Getting Started

General

Download

Parameters Function

Disable Project If you select this, no user will be able to upload the project from the PLC.
upload

Rebuild, then Select this if the project was originally created in another VisiLogic version.
Download

Warn about Vision If the Vision120 selected in Hardware Configuration is different from the one to which you are
120 Snap-in downloading, by default VisiLogic issues a warning. Select this option to disable such warnings.
conflicts

Compiled Ladder By default, the amount of memory allocated for the Ladder application in the PLC is 64k. If the

160
Utilities

Allocation application requires, you can select this option and enter a different amount.

Back up and Restore This enables you to backup a project together with all of the current values in Data Tables and all
PLC RAM Data memory operand values.
If this option is selected:
• At project upload, the PC will upload all of the current values in Data Tables and all
operands--except for system operands. To back up system operand values, store them to
memory operands.
• At project download, the PC will download the complete project, including all of the current
values in Data Tables and all memory operands.
Note that this option is not part of the project. Once selected, such files will be created for all of the
projects downloaded from the PC--until it is deselected.

Save Unit ID in When you select the Save Unit ID option, the ID number of the controller selected in
Project Connection>Communication & OS>Vision-PC Communication Settings is saved together with the
project.
You will not be able to download the project to another controller until the number is changed.

Display OnLine Keeps the Test Tool bar from being displayed during Test
Tools

Mode.

Check Digital Select this to check the digital signature of the project in a PLC every time PC-PLC connection is
Signature established.

Ladder

Color
You can assign any color to show power flow during Test mode.

161
Getting Started

Import/Export Subroutines
You can export Subroutines and save them as .vlx files, then import them into other projects. You can
import/export single Subroutines, or all of the subroutines in a Module. Note that you cannot export Subroutines
from the Main Module.

Exporting a single Subroutine

1. Right-click the desired Subroutine and select Export Subroutine,


-or-
select Export Subroutine from the Project menu; the Select Subroutine box opens.
2. Select the desired subroutine, then save it to the desired folder.

Exporting all of the Subroutines in a Module

1. Right-click the desired module and select Export All Subroutines.

162
Utilities

2. Save the .vlx file to the desired folder.


Note that when you import this .vlx file, all of the Subroutines it contains will be imported.
Import

1. Right-click a module name and select Import Subroutine,


-or-
Select Import Subroutine from the Project menu; the Open box appears.
2. Select the desired subroutine, then save it to the desired folder.

Import/Export is subject to the limitations below.

163
Getting Started

If the source project contains Call Subroutine or Load HMI operations, note that the referenced
elements will be marked as missing, even if the target project contains elements of the same
name. Note that you can reassign the references.

If the selection contains an FB operation related to an FB Configuration, and is imported into an


application containing an FB Configuration of the same name, the links will be retained.
If, for example, you export a subroutine containing an SMS Send FB linked to SMS
Configuration 'Denmark' and then import this subroutine into another application containing an
SMS Configuration 'Denmark', the SMS Send FB will automatically link to 'Denmark'.
If the selection contains FBs, and no FBs of that type currently exist in the target project, the
pasted FBs will be the version currently in VisiLogic FB library--in other words, if the source
selection contains older FB versions, they are automatically updated during the Paste operation.
If the selection contains FBs, and FBs of that type currently exist in the target project in a
different version, Paste cannot be completed.
If your selection contains only Jumps, without the attendant Labels, they will be marked as
missing, even if the target project contains Labels of the same name. Note that you can reassign
the references.

164
Utilities

If the selection contains Jumps and Labels with the same name as those in the target project, the
Jump, Label and link between them will be automatically recreated by VisiLogic when they are
pasted.
In this way, VisiLogic maintains the integrity of the links between Jumps and their
corresponding Labels.

Note that the following symbols cannot be used in subroutine names:


/ \ | * : ! " < >.
When importing/exporting from older VisiLogic programs containing such symbols, they will be
automatically replaced by underscore characters.

Verify Project
The Verify utility shows the differences between the project open in your PC and the program currently installed
in the controller.

To use Verify:

1. Connect your PC it to the controller using a program download cable


2. Select Verify from the Connection menu.

Verify marks different sections with an , as shown below.

Compile

165
Getting Started

When you compile your program, you can see any errors in the Output Window.

Clicking the Compile tab displays the last compiled results.

Log
To view a log of events, click the Log tab at the bottom of the Output Window.

Show STL
You can view STL code for a particular Subroutine, whether off-line or in Online Test mode.

To view STL online test values after downloading a project to a controller, open STL View, then press F9 to
enter online test mode.

166
Utilities

Power-up Modes: Trouble-shooting


You can force the controller to boot up into Bootstrap or Stop mode by turning on the power supply while
pressing specific keypad keys.

Mode Features Possible Actions V120 V230/260 V280

Bootstrap • The controller's LCD is Via Vision Communication PC <I> + <I> + <I> +
on. Settings, you can: <ESC> <Right <Right
Arrow> Arrow>
• PC-PLC communications • Check which OS is
are enabled, but PC must currently installed in the
be connected to COM 1. controller.
• Download a new OS.

Stop As in Bootstrap, but Info mode As above, but all Info mode <I> <I> <I>
(O/S) can be entered. actions are supported.
Exit Stop Mode by entering
Information Mode, and then
selecting System>Working
Mode> Reset.

Bootstrap, Contrast range is 0-100, this <I> + <I> +


default option automatically sets <ESC> <Right
LCD Contrast to 50. + Arrow> +
contrast <+/-> <+/->

Stop (O/S, Contrast range is 0-100, this <I> + <I> +


default option sets Contrast to 50. <+/-> <+/->
LCD
contrast

167
Getting Started

Memory Allocation
You can check the flash memory requirements of a project via Projected Memory Allocation, which is located
on the Build menu.

You can also view the current allocated flash memory of a controller via PLC Flash Memory Allocation, which
is located on the Connection menu.

Note • Each topic may not exceed 64K.

Ladder Code Capacity


The table below shows how much memory is allocated for the Ladder code; note that an additional sector
comprising double that amount is allocated for compiled Ladder code.

Controller Model Ladder Code Compiled Ladder Code Total

V230, V260, V280 64K 128K 320K

V120 32K 64K 192K

During download, Ladder code is compiled into machine code. The compiled code may exceed the memory that
is allocated for compiled Ladder code. If the allocated memory is exceeded, the message below will appear at
download.

Note • If the second download attempt is not successful, the message will be displayed again. If this
occurs, contact technical support.

168
Utilities

Hotkeys: Quick Editing


VisiLogic offers keyboard shortcuts for a number of tasks, including Ladder editing. You can also assign certain
tasks to keys F3 and F4 via Program Properties.

Note • Selected Ladder elements can be moved within a net via the keyboard arrows.

Task Hotkeys

Ladder Insert Direct (N.O.) Contact <F5>


Pressing the
appropriate key Insert Indirect N.C.) Contact <F6>
attaches the element to
the cursor; click to drop
it into the net. Insert Positive Transition Contact <F7>
Once a Ladder element
is placed in the net, the
user can typed the Insert Negative Transition Contact <F8>
operand name and
number, for example
SB41, and then press Insert Direct Coil <Shift> + <F5>
Enter.
Note• Selecting an Insert Indirect Coil <Shift> + <F6>
element and pressing
<Fn> attaches the new
element to the one Insert Set Coil <Shift> + <F7>
selected.
Insert Reset Coil <Shift> + <F8>

Within Operand Get Next Address <Ctrl> + <N>


Address Box
Symbolic Search <Ctrl> + <L>

Toggle to Hex (when entering Constant value) <Ctrl> + <H>

Go to Label Next Label <Alt> + <Right Arrow>


This enables to you
skip from label to label.
Note that labels can be
used both as
bookmarks as well as
to cause program
jumps.

Previous Label <Alt> + <Left Arrow>

Open Label Navigation <Alt> + <L>

Help Open Help <F1>

169
Getting Started

Project New Project <Ctrl> + <N>

Open Project <Ctrl> + <O>

Print Project <Ctrl> + <P>

Exit Project <Alt> + <Q>

Edit Select All <Ctrl> + <A>

Find <Ctrl> + <F>

View Toggles Show/Hide Project Explorer <Ctrl> + <R>

Show/Hide Ladder <Ctrl> + <Alt> + <L>

Show/Hide HMI Display Editor <Ctrl> + <Alt> + <H>

Show/Hide Output Window <Ctrl> + <W>

Show/Hide Comments <Alt> + <C>

Connection Online Test <F9>

Download <Ctrl> + <D>

Upload <Ctrl> + <U>

Verify <Ctrl> + <Y>

Remote Access (During Online Test) <Shift> + <F9>

HMI Show Grid <Ctrl> + <G>

Zoom <Ctrl> + <I>

170
Data Tables
About Data Tables
You can store data into the Data Table memory section of your controller, then access the data in accordance
with program requirements. Vision controllers can contain up to 120K of Data Tables (RAM); Data Tables (that
are marked Part of Project) can take up to 250K (Flash).

You create tables in VisiLogic, define their structure, then download them to the controller. Data within the
tables can be copied and pasted to and from third-party tools such as Excel.

Note • Data Tables are based on bytes, not on registers.

Data tables consist of columns and rows.

Creating a Data Table


1. Open the Data Tables editor by clicking the PLC Data Tables on the toolbar, or by selecting it from
the Data Tables menu.

2. Create a table by clicking the Add Table icon, then name the table and define the number of columns and
rows.

171
Getting Started

Note • The grid that appears represents only the table's column and row structure. Each column in the table
can contain up to 100 elements, such as MIs.

3. Define a table's columns by selecting the column, then clicking the Edit button , or by right-clicking
and selecting Edit from the Column menu.

Data Table Options

Menu Name Option

File Import/Export
Data Tables can be exported from an application as .upd files, then imported into any VisiLogic program.
When you import the file, you can select to:
• Add individual tables to the structure. If tables of the same name already exist, the tables are
automatically renamed.
• Delete existing tables and import the new structure.
Memory Requirements
Displays pie charts that show the amount of memory that will be required by the data tables when the
project is downloaded.

Connection All of the Connection commands require that the PLC be connected to the PC.
Read Structure from PLC
Imports the structure of the data tables within the PLC into the project.
Verify: Tables Structure
Compares the table structure in the project to the structure of tables within the PLC.
The commands below also require that the table structure in the PLC be identical with the table structure
in the current project.
Read Range
Reads the values of the selected cells from within the PLC data table into the project.
Write Range
Writes the values of the selected cells from the project data table into the PLC.
Verify Cell Value: by Range

172
Data Tables

Compares the values of the cells in the project to the values within the PLC.

Table Table options have short-cut buttons on the left side of the Tables pane. Right-clicking the pane also
opens the Table menu.
Add Table
Adds a new data table.
Edit Table
Enables you to change the name of the data table and the number of rows and columns.
Delete Table
Deletes the entire table, both values and structure.
Duplicate Table
Creates a new table, including both the values and the structure of the table being duplicated.
Select All
Selects the entire table.

Row Edit Number of Rows


Enables you to change the name of the data table and the number of rows and columns.
Insert Row
Enables you to insert a row at any point in the table.
Delete Row
Enables you to delete a row from any point in the table.
Note • Inserting or deleting a row changes the index number of all successive rows; impacting your data
operations.

Column Set Cell Value


Enables you to enter values for a cell or range of cells within a column.
Insert Column
Inserts a column.
Edit Column
Enables you to name the column, set a data type for the entire column, define the number of elements held
by each cell in the column and make other selections based on the data type that has been assigned to the
column.
Delete Column
Deletes a column.

Column Parameters
The column structure options change according to the data type selected.

173
Getting Started

Parameter Function

Description Assign a unique name.

Type A column is assigned to the data type selected.


Data types may be directly assigned, or linked via address.

Part of Project, Protects the marked data from being modified by unauthorized third-party tools.
Read-only Recommended column order

Min/Max Enables you to set limits for the value of an element in the column.

Format View Choose between decimal and hexadecimal.

Number of A column can contain a maximum of 100 elements.


elements

Database-Read/Write
Read/Write functions enable you to copy a row of values from and to Data Tables. They are located on the Data
Tables menu.

174
Data Tables

Notes • Reading/Writing data from linked operands of different data types is not supported.

• If the source operands are single registers, and the destination registers are double registers, the 2 LSBs
of the double registers will contain the value. For example, the values in 10 MIs will occupy the 2 lower
bytes of 20 MLs.
If the source registers are double registers and the destination operands are single registers, the values
will be truncated. The 2 MSBs will be discarded, and the 2 LSBs saved.
• The maximum number of operands of any type for a Read/Write operation is 128.

Read Row
A row in a Data Table is the source for the Read function. Values are read from the Data Table into the operands
that are linked to it in the Read function.

175
Getting Started

Write Row
Operands within the PLC memory are the source for the Read function. Values are read from the PLC into the
Data Table cells that are linked to it in the Write function.

Read Column
A column in a Data Table is the source for the Read function. Values are read from the Data Table into the
operands that are linked to it in the Read function.

Write Column
PLC operands are the source for the Write function. Values are read into the Data Table cells that are linked to it
in the Write function.

176
Data Tables

Read/Write Direct
These operations access the values in the database without reference to table structure

Database: Read Direct


The Read Direct operation copies data from the data tables into a vector of registers within the controller.

1. Select Direct: Read from the Data Tables menu.


2. Place the function in the desired net.
3. Link the desired Operands and Addresses.
Operands A & B determine the data's destination --to where the data from the data table will be
copied.
Operand A: sets the register type for the target vector and the start register.
Operand B: determines the offset, in registers, from the start register.

Operands C, D, & E determine the data's source --from where in the data table the data will be
copied.
Operand C: contains the start byte of the source vector within the data table.
Operand D: determines the offset, in bytes, from the start register.
Operand E: determines the length of the source vector.

Note that the length is relative to the type of register linked to Operand A. For example, if
Operand A is linked to an MI and Operand E contains 5, 10 bytes of data will be copied from the
data table into 5 MIs, 2 bytes into each MI.
If Operand A is linked to a double register; ML or DW; and Operand E contains 2, 8 bytes of
data will be copied into 2 double register.
Read Example

Below, database bytes 28, 29, 30, 31, 32, and 33 are read and written into MIs 15, 16, and 17.

177
Getting Started

Database: Write Direct


The Write operation copies data a vector of registers into the database.

1. Select Data Block Read from the Data Tables menu.


2. Place the function in the desired net.
3. Link the desired Operands and Addresses.
Operands A & B determine the data's source --from which registers the data will be copied.
Operand A: sets the register type for the target vector and the start register.
Operand B: determines the offset, in registers, from the start register.

Operands C, D, & E determine the data's destination--to where in the database the data will be
written.
Operand C: contains the start byte of the source vector within the database.
Operand D: determines the offset, in bytes, from the start register.
Operand E: determines the length of the source vector.

Note that the length is relative to the type of register linked to Operand A. For example, if
Operand A is linked to an MI and Operand E contains 5, the data from 5 registers will be copied
into 10 database bytes, 2 bytes per MI.
If Operand A is linked to a double register; ML or DW; and Operand E contains 2, the data from
2 double registers will be copied into 8 database bytes, 4 bytes per ML or DW.
Write Example

Below, MIs 26, 27, 28, 29 are written into database bytes 28 through 33; each register is copied into 2 bytes
within the database.

178
Data Tables

Data Tables: Clear Table


This function is located in the Data Tables menu.

Clear Table enables you to use a Ladder condition to delete values in a particular table.

Data Tables: Find Row, Find Row Extended


Find Row and Find Row Extended are located on the Data Tables menu. These functions search through a data
table, comparing the input value with the values in the data table.

Find Row:
If a matching value is found, the number of the row is stored in the output value.

Find Row Extended:


This function enables you to search for more than one value. The number of the row containing
all of the values is stored in the output value.

179
Getting Started

Parameter Name Purpose

Table Click on the drop-down arrow to select a table from the project, then click the desired column.
The number of bytes in the column of the linked data table define the length of the input vector.

Limit Rows Check this option to limit the number of rows the function will search.

Start Address The length of the input vector is determined by the number of bytes in the selected data table column.
If, for example, the column contains 6 bytes, the vector will be 3 MIs long.
Note that a string must end with a null (0) character.

Found Row If a matching value is found, the number of the row is stored in the output value.

180
Data Tables

Program Recipes
A recipe is a collection of ingredients or values that are used to prepare a batch of product or to perform a
specific task.

Data Tables can be used to contain parameters for pre-programmed recipes.

For example, assume that a laundry machine performs different tasks such as 'Fill', 'Wash' and 'Rinse'. A Data
Table is created that contains 1 row for each task. Each row contains cells; each cell holds a specific parameter
required for the task assigned to that row. The parameter values are transferred into the cells via a Write to Data
Tables function. Within the Write function, the operands containing the parameter values are linked directly to
the appropriate cells.

Data Tables: Synchronizing Data


When you download Data Tables to a controller, VisiLogic checks to see if the controller already contains Data
Tables. If the structure of the tables is not identical, VisiLogic opens the Synchronize Data Tables box.

To synchronize data values, VisiLogic uploads the data from the PLC Data Tables into Data Tables within the
PC, and then downloads the tables and data values when download is completed. This enables you to preserve
values within the controller's Data Tables, even if the data type in that column has been changed. For example, if
a Data Table column in the PLC that contains an integer is transferred to a long integer, the two bytes of the
integer value will be placed in the 2 least significant bytes of the long integer.

Synchronize VisiLogic automatically uploads all of the data values in the PLC Data Tables into the PC tables. Data is matched up
all columns according to column name. When download is completed, the new Data Table is installed in the PLC with all of its
data values intact.

Synchronize Selecting this option opens up a window that enables you to manually link the PC Data Table columns with those in
selected your PC. The data values within the columns are then transferred to the new defined location.
columns

181
Getting Started

Do not Downloads the Data Tables as structured in your project, regardless of any PLC data.
synchronize

Data Tables and Excel


Data can be imported to and exported from Excel.

Export: When you click the Export to Excel icon, VisiLogic opens a Save As dialog box, enabling you to create
an Excel file to save your data. The data is copied as shown below.

182
Data Tables

Import: When you click the Import from Excel icon, VisiLogic opens an Open dialog box, enabling you to select
an Excel source file. The data is copied as shown below.

Copy & paste data

To copy/paste data to and from Data Tables and Excel.

1. Select data. You can select individual cells, rows, columns, or contiguous groups of cells.
2. Copy the values to the Clipboard either by pressing <Ctrl>+ <C> or by clicking the Copy button.
3. Click the cursor in the Paste location, then paste the either press <Ctrl> + <V> or click the Paste button.
Note • The selection is pasted towards the right and down. When you paste from Excel to Data Tables, the
Data Table must have enough rows and columns to contain the Paste selection.

183
Troubleshooting
Detecting Short-circuited End Devices
The controller can detect short circuits in end devices (loads) that are connected to transistor outputs located on
snap-in or expansion I/O modules. Short circuits can also be detected in end-devices connected to analog
outputs.

If a short circuit is detected on either an expansion or snap-in I/O module, SB 5 turns ON.

If the short circuit is located on an:

I/O expansion module, the location is indicated in SDW 5.


Snap-in I/O module, the LSB in SDW 6 turns ON.
SDW 5 provides a bitmap. Each I/O expansion module included in your controller's hardware configuration is
assigned a number, 0-7, according to its place in that configuration. In the bitmap, bits 0-7 correspond to these
place numbers.

V120 only

Bit 8 within SDW 5 is reserved for the controller. A value of '1' indicates that the short-circuit has been detected
in an on-board V120 output.

In the bitmap below, short circuits have been detected in devices that are connected to expansion modules 1 and
3, and to the V120 itself.

SDW 5
(Please note that although an SDW is 32 bits long, only 16 bits are shown below.)

On-Line Test Mode (Debug)


To test a project, first connect the controller to your PC using the program download cable provided with the
software package, then download the project and click the On-Line Test button. The Online Test toolbar opens,
enabling you to:

Switch between Run and Stop modes.


Use Single Scan to run a single cycle of the ladder program for debugging purposes.
You can stop the scan cycle at any point by placing OnLine Test Points, located on the More
menu, in the Ladder.

When the scan reaches an OnLine test point that is active (receives RLO), Online Test freezes,
enabling you to check element status and values, including Timer values, at that point during
Ladder execution. Note that if more than one OnLine test point is activated, SB 35 turns ON.
Measure the time interval between 2 points in the Ladder application, by placing Start and End
Interval elements, located on the More menu, anywhere in the application. The time interval, in

185
Getting Started

micro-seconds, is stored in the DW linked to the End Interval element.

Open Remote Access to debug remote controllers via network or modem connections.

In Online Test mode, you can view the power flow, and view and force operand values and element status.

Note • The controller can send and receive SMS messages when the controller is in Test mode.

Power-up Modes: Trouble-shooting


You can force the controller to boot up into Bootstrap or Stop mode by turning on the power supply while
pressing specific keypad keys.

186
Troubleshooting

Mode Features Possible Actions V120 V230/260 V280

Bootstrap • The controller's LCD is Via Vision Communication PC <I> + <I> + <I> +
on. Settings, you can: <ESC> <Right <Right
Arrow> Arrow>
• PC-PLC communications • Check which OS is
are enabled, but PC must currently installed in the
be connected to COM 1. controller.
• Download a new OS.

Stop As in Bootstrap, but Info mode As above, but all Info mode <I> <I> <I>
(O/S) can be entered. actions are supported.
Exit Stop Mode by entering
Information Mode, and then
selecting System>Working
Mode> Reset.

Bootstrap, Contrast range is 0-100, this <I> + <I> +


default option automatically sets <ESC> <Right
LCD Contrast to 50. + Arrow> +
contrast <+/-> <+/->

Stop (O/S, Contrast range is 0-100, this <I> + <I> +


default option sets Contrast to 50. <+/-> <+/->
LCD
contrast

I/O Expansion Module Errors


An interruption in communication between an I/O expansion module and controller can cause the controller to
enter Stop Mode, and an ‘Expansion Error’ message to be displayed on the controller’s LCD.

This error results when:

1. The module was connected at power-up.


2. The communication between module and controller was interrupted for more than 200 milliseconds.
Interruptions may occur if the connecting cables are disconnected, or may result from signal interference
(noise).
Note • When a controller enters stop mode, the program stops running and all outputs within the system are
initialized. This includes on-board outputs, outputs located on Snap-in I/O modules, and outputs
located I/O expansion modules.

What to do

Check that the cables are connected and in proper order.


Remedy signal interference. Such an error may also result from a hardware malfunction.
If the RUN LED on the expansion module blinks, check the documentation supplied with the
expansion module to see if a hardware error is indicated.
To exit Stop Mode, reset the controller either by turning it off and on, or by entering Information
Mode, and then selecting System>Working Mode> Reset.

187
Getting Started

Compile
When you compile your program, you can see any errors in the Output Window.

Clicking the Compile tab displays the last compiled results.

Why does the Controller display the 'Restart' message?


The most common reason for this event is a peak in electromagnetic (EMF) 'noise'. This may result from
contactors, power relays, solenoid valves, etc. switching on and off, as well as from power transformers and
motor speed drivers. Recommendations:

Use different power supplies - highly recommended - one for the controller (CPU and inputs),
and a different one for other electromagnetic devices;
Use suppressors - reverse connected diodes for DC loads and RC filters for AC loads;
Where possible, place the signal cables, including the 24V power supply, far away from power
lines, especially from cables, coming in and out of motor drivers;
If needed, use shielded cables for signals, including for 24 VDC and for power cables between
the motor driver and the motor itself.
Taking these precautions should help prevent ' Controller Restart'. If the problem persists, contact
support@unitronics or your local Unitronics representative.

HMI Element Resizing/Rotating Limitations


Elements 'grow' down, and to the right. If resizing/rotating will cause Variable elements to collide, or any
element to extend beyond the boundaries of the Display, the element cannot be returned to its original size, or
resized to a larger size.

Note • 'Original size' is the actual size of the element as it appears in the element's ToolTip.
• Fit to Original Size does not affect geometric shapes that are drawn on the Display.
• 'Original size' cannot be used to resize Variable elements if the elements have different original
sizes.

188
Troubleshooting

Note • Although an imported image can be resized, resizing may result in some degree of distortion. To
avoid this, use images that are created to match the required size.
• Resizing text elements changes the size of the text field, but does not affect font size.
• Shapes that are imported are resized in proportion to their original size.

Float Errors
When an Float function error occurs, SB 10 Float Error turns on. This SB is reset by the user.

The error code is stored in SI 500 General Error. The codes are shown below.

Value Message Result

3 Integer Overflow 7FFF or 8000 (integer result)FFFF or 0000(unsigned integer result)

4 Floating Overflow +INF or -INF (float result)

5 Floating Underflow 0.0 (float result)

7 Divide by Zero +INF or -INF or NaN (float result)

9 Undefined Float NAN (float result)

10 Conversion Error 0 (integer result)

11 Floating point Stack Floating point stack underflow


Overflow

12 Floating point Stack Floating point stack overflow


Underflow

INF Infinite which is the largest absolute floating point number.

NAN Not a Number, special notation for undefined floating point number.

Changing Panel Types: Conflicts


If a project contains Displays, selecting a different panel type in your project's Hardware Configuration may
cause you to lose some of your Display elements and their properties.

189
Getting Started

If you select a smaller panel, some of the elements in your Displays may be too large. In this case, any variable,
graphic, or text elements that extend beyond the edge of the screen will be deleted from your project, and may
not be retrieved.

In addition, note that all calendar variables will be deleted.

Also, note that if you change from a touch panel to a non-touch panel, any 'touch' properties linked to on-screen
objects will be deleted.

Insufficient Flash Memory


This error message is displayed when the PLC does not have sufficient memory to handle the current project. To
see the memory requirements of the project, click the Events tab in the Output Window at the bottom of the
screen.

Communications
CANbus Network Problems
SB 236 indicates that there is an error in the CANbus network.

SI 236 CANbus Network: Failed Unit ID. Note that the first 3 bits turn ON only when the controller is unable to
broadcast via the CANbus port. The value of SI 236 indicates the following messages:

Value Message May result from:

0 No Acknowledgement CANbus power failure, crossed wires, incorrectly set termination


points.

1 CANbus OFF

2 CANbus Warning error Poor transmission quality due to faulty wiring, or if the cable length
exceeds recommendations.

4 One or more networked units cannot be read.


If this bit is ON, check SI 238, SI 240-243.

SI 237 CANbus Network Communication Error Code is a bitmap that indicates the LAST unit that cannot be
read. Note that each controller can receive messages from up to 8 others. Example: Assume that there are 6
controllers in the network (3,6,8,13,17,34). Controller 3 is waiting for data from controllers 8 and 13 and 17. If
the controller does not receive data from controller 13 (assume a 1 second timeout) then SI 237 will contain a
value of 13. Bit 4 in SI 236 will also turn ON. Once controller 3 has received the data, Bit 4 turns OFF.

SIs 240, 241, 242, and 243 serve as a bitmap indicating which unit is in error. If, for example, the network
includes unit ID numbers 8, 9 and 13, and PLC #9 cannot be accessed, then the ninth bit in SI 240 will turn ON.
When the error is fixed, the bit falls to OFF.

190
Troubleshooting

CANbus troubleshooting

Problem Possible cause Recommended Action

Failed Baud rate settings All controllers in the network must be set to the same CANbus baud rate.
communication Baud rate may be set:
• By initializing a port via the COM Init FB.
• Temporarily via Info mode;however, note that the baud rate will
be reset at the next power-up

Termination resistors Termination resistor settings are provided in the chapter Communications
in the controller's user guide.

CANbus power supply Check that the CANbus power supply is properly connected, and that the
voltage is in the permissible range as described in the chapter
Communications in the controller's user guide.

Incorrect ID number You may not have assigned the correct unit ID number in your operand
addresses (between 1-63). Check the OPLC settings tab Communicate with
OPLC.

PC cannot Incorrect setting When you communicate with the controller unit that you are using as a
communicate with bridge to the network, either enter the ID# of the bridge or select Direct
bridge Connection in the OPLC settings tab Communicate with OPLC.

PC cannot Communication Make sure the current RS232 parameters in your project are the same as
communicate with settings the parameters that are actually in the bridge. Check these topics:Check
network Network Status,Vision Communication PC Settings

Incorrect baud rate The bridge's RS232 port's baud rate cannot be set below 9600.

Modem Troubleshooting
General Information

Note • The PC to modem cable is not the same type of cable that connects the controller to the modem. The
PC to modem cable must provide connection points for all of the modem's pins.
• The initialization commands for PC modems, and those found in the COM Init FB used to initialize
the PLC's modem are different.
• If calls are routed via a switchboard, note that the switchboard settings may interfere with
communications. Consult with your switchboard provider
• If the modem initialization string parameter S7, TimeOut, is to short to permit the PLC's modem to
answer, an error will result.
For example, if this parameter is S7=30, the PC modem waits 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.
• PC/PLC modem communications: Both PC and PLC must use the same type of modem: landline or
GSM\CDMA. Internal PC modems must use the driver provided by the modem's manufacturer.
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.

191
Getting Started

+++ 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 The PC was unable to access the PC port.
modem does not exist 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.
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

192
Troubleshooting

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, Check that the line is free.


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

Handshake between modems Modem adapter Check the PLC-to-modem connection and pin-out, particularly that
complete ('CONNECT'), cable the DSR is connected to the RTS on the modem side.
PLC does not reply

Problem SI Value (80, 82, Possible Cause & Recommended Action


84)

Modem fails to initialize (SB 3 • PLC-to-modem cable:


81, 83, 85 ON)
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.

193
Getting Started

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 Input for DTE devices (Receive), output for DCE devices. This is the data channel from the DCE
Receive Data device to the DTE device.

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

GND Signal return for all signal lines.


Signal Ground

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

CTS Terminal is ready --not related to data transfer.


Clear To Send

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

DSR Detects if the RS232 is actually connected.


Data Set Ready

DCD Turns ON when the modems connect.


Data Carrier Detect

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.

194
Troubleshooting

Problem Possible Cause & Recommended Action

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

PLC modem does not respond GSM modems generally recognize whether the incoming call is voice or data. If the modem
to cell phone call 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.

Modem Troubleshooting Table

Problem Possible cause Recommended Action

PLC stays connected A modem which is reset, or to Modem Connection and COM Port Transmit/Receive SBs can
when modem which the power supply is be used in conjunction with a timer to check if the line is
connection fails interrupted, may lose the inactive; the timer state is used to trigger Hang-up as shown
connection and may not send a below.
'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.)

VisiLogic is not able Once the modem is connected to Either:


to communicate with the PLC, and the modem is Reset the PLC, which will reset the Modem Initialized SB,
the PLC: initialized, the Modem Initialized -or-
PLC has initialized a SB turns ON. Via Vision Communication PC Settings, set VisiLogic's baud
modem. The modem As long as this SB is ON, the rate to match the baud rate to which the COM port was
is disconnected, and COM port stays initialized to the initialized to communication with the modem.
a PC is plugged into baud rate required in order to
the COM port. 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.

195
Getting Started

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


You 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


SB 80 SB 81
Port 1

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

SB 83 COM Port/Modem Initialization Failed: COM


Modem Initialization attempt failed, Modem is
Port 2 0 1
not initialized

SB 84 Modem Initialized: COM Port 3


Modem Initialization attempt succeeded,
1 0
Modem is initialized.

SB 85 COM Port/Modem Initialization Failed: COM


1 1 Not possible
Port 3

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


SB 80 SB 81
Port 1

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

SB 83 COM Port/Modem Initialization Failed: COM


Modem Initialization attempt failed, Modem is
Port 2 0 1
not initialized

SB 84 Modem Initialized: COM Port 3


Modem Initialization attempt succeeded,
1 0
Modem is initialized.

SB 85 COM Port/Modem Initialization Failed: COM


1 1 Not possible
Port 3

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:

196
Troubleshooting

SB 86 Modem Connection Status: COM Port 1 PLC receives 'Connect' • Hang-up OS, at Power-
string from modem up
• PLC receives string 'No
SB 87 Modem Connection Status: COM Port 2 Carrier'
• PLC receives break signal
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

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


SI 81 Error Code: COM 1

197
Getting Started

SI 82 Modem Status: COM


2 0 No error 0 Modem Idle

1 TimeOut exceeded: no reply 1 Initialization in Progress


SI 83 Error Code: COM 2

2 Reply Error 2 Initialization OK

SI 84 Modem Status: COM


3 Wrong PIN number 3 Initialization Failed
3

SI 85 Error Code: COM 3 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

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.

198
Troubleshooting

Using Hyperterminal for COM Troubleshooting


You 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 Input for DTE devices (Receive), output for DCE devices. This is the data channel from the DCE
Receive Data device to the DTE device.

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

GND Signal return for all signal lines.


Signal Ground

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

CTS Terminal is ready --not related to data transfer.


Clear To Send

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

DSR Detects if the RS232 is actually connected.


Data Set Ready

DCD Turns ON when the modems connect.


Data Carrier Detect

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

199
Getting Started

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.

200
Troubleshooting

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.

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.

201
Getting Started

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

Initializing the modem to SMS mode via Hyperterminal


Once the modem is successfully initialized, you can use Hyperterminal to initialize the modem to SMS mode.

Command Description Notes


at+cpin=? Is a pin number required?

at+pin=”xxxx” Is the pin number set in the application?


xxxx

at+creg? Has the SIM card been registered with Should return one of two answers:

202
Troubleshooting

the local cellular provider? • +CREG: 0,1


The SIM is registered with its local provider.
• +CREG: 0,5
The SIM is in roaming mode.

at+cmgf=1 Go to text mode

Note • Commands including question marks are run for verification twice. If the command is not verified
during the second attempt, the attempts stop.
• 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 message


It 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
If the message is successfully sent, the controller will receive a message of
confirmation,+CMGS:xx. When this message is received by the controller, SB 184 turns ON.
The confirmation message is acknowledged by OK.
If :
the message of confirmation is not received within 15 seconds, or
the '>' is not received within 3 seconds, SB 185 turns ON.
When the controller receives an SMS text message:

It receives the command: +CMTI: “SM” ,xx. Xx is a number in the controller's memory, 1 to 20.
When the message is received, the controller asks the modem for the text via the command
AT+CMGR=xx
The modem replies with +CMGR, including the phone number, status, text, and concluding with
OK.
Note • When a COM port has been successfully initialized, the relevant bit turns ON: SB 80 , 82, 83 or 84.

203
Getting Started

If initialization fails, SB 81, 83, 85, or 87 will turn ON.

'The Sniffer'--Viewing communication strings


The instructions below show you how to construct a communications 'Sniffer'. This device 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 ‘COM’ is connected to the


device. PLC.

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.
Two 1N4148 or 1N914 diodes.

1. Open the adapter


carefully via the 4 snaps
in its sides.

204
Troubleshooting

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.

205
Getting Started

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.

Using Hyperterminal to check PC-PLC direct communications


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

206
Troubleshooting

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.

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.

207
Getting Started

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

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

208
Troubleshooting

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 M90-R1 OS V3.00 (00) Checksum Not visible


number

209
Index

2 Communications.................................................... 81
2.5.........................................................................158 Communications.................................................... 95
A Communications.................................................. 112
Add Communications.................................................. 112
Add net ...............................................................23 Communications.................................................. 113
Addressing Operands .............................................22 Communications.................................................. 114
Analog I/Os Communications.................................................. 120
Analog Input.................................................56, 60 Communications.................................................. 123
Analog Output ..............................................59, 60 Communications.................................................. 135
Configuring I/O Expansion Modules ....50, 57, 60, Communications.................................................. 168
187
Communications.................................................. 192
Configuring Snap-in I/O Modules ..52, 57, 60, 187
Communications.................................................. 193
Hardware Configuration .................................3, 60
Communications.................................................. 198
PT100 Input........................................................49
Compile ..................................................21, 167, 190
Analog I/Os ..............................................................3
Connect.................................................................. 21
Analog I/Os ............................................................57
Connecting Ladder Elements................................. 21
Analog I/Os ............................................................59
Controller................................4, 34, 65, 95, 128, 131
Analog I/Os ............................................................60
Controller network................123, 128, 131, 135, 192
B
Copy & Paste ..............................................23, 26, 43
Baud
Counter .......................................................50, 52, 54
CANbus ............................................123, 135, 192
Counter Values ...................................................... 54
COM port ...........................................................69
Counter w/reset.......................................3, 50, 52, 54
Download ...........................................................66
Cut & Paste.................................................23, 26, 43
Get COM parameters..........................................66
D
Baud .......................................................................65
Data Tables...................................173, 181, 183, 184
Baud .......................................................................95
Data, entry via keypad ............................................. 9
boot...............................................................169, 188
Database, read/write .............................173, 176, 183
Bootstrap ......................................................169, 188
Debug .....................................................11, 141, 187
Bridge ...................................................................131
Delete..................................................................... 29
C
Descriptions ........................................................... 64
CANbus..........................................69, 123, 135, 192
Digital I/Os .................................................. 3, 50, 52
Change Element's Operand.....................................33
Digital Outputs .....................................50, 52, 55, 63
color blind ............................................................161
Direct Connection............................................ 65, 95
COM port .................................................69, 70, 193
Display text messages.............................................. 9
Comment ........................................................31, 171
Displaying Values.................................................... 9
Communications
Displays ................................................4, 5, 9, 43, 46
Initialize COM port ......................................69, 81
Download via network......................................... 131
Log ...................................................................168
Downloading
Modem .......................19, 65, 69, 76, 81, 198, 201
OS ................................................................ 66, 82
Network ........................83, 95, 103, 112, 113, 123
Project................................................................ 10
Troubleshooting..........................70, 135, 192, 198
Downloading ......................................................... 10
Communications.....................................................18
Downloading ......................................................... 66
Communications.....................................................19
Downloading ....................................................... 183
Communications.....................................................65
Duty Cycle............................................................. 55
Communications.....................................................65
DW ........................................................................ 56
Communications.....................................................66
E
Communications.....................................................69
Edit ........................................................................ 33
Communications.....................................................70
211
Getting Started

Edit programs-via network ...................................131 I/Os ........................................................................ 52


editing, keyboard ..................................................171 I/Os ........................................................................ 52
Element.......................................................20, 22, 33 I/Os ...................................................................... 149
Element's Operand..................................................33 ID in network....................................................... 128
Enter data via keypad IEC 1131-3 ............................................................ 42
password...............................................................9 Image ............................................................. 4, 9, 43
Enter data via keypad ...............................................9 Immediate ...................................................... 34, 158
Errors............................................................189, 198 Import/Export ................................................ 39, 164
Ethernet ............ 83, 95, 103, 112, 113, 114, 118, 120 Information Mode...................................14, 137, 189
Excel.....................................................................184 Input................................................................. 50, 52
F Insert ................................................................ 23, 46
Favorites .......................................................114, 120 Insert comments..................................................... 31
Filter .......................................................................57 Insert net ................................................................ 23
Find ......................................................................153 Interrupt ......................................................... 34, 158
Find & Replace Interrupt HSC ...................................................... 158
Constant............................................................153 IP Addresses ................................................ 114, 120
Element.............................................................153 K
FB .....................................................................153 keyboard .............................................................. 171
Font...................................................................153 Keypad..................................................................... 5
Label.................................................................153 Keypad Entry....................................................... 5, 9
Load Display ....................................................153 L
Operand ............................................................153 Labels .................................................................. 171
Subroutine ........................................................153 Ladder......3, 6, 11, 19, 20, 31, 34, 38, 141, 147, 151,
Find & Replace.....................................................153 187
Fixed text................................................................43 Ladder Diagram..................................................... 42
Flash .....................................................................173 Ladder element ...................................................... 22
Float functions......................................................191 Ladder Logic ......................................................... 42
Flow........................................................................34 Ladder Modules..................................................... 34
Folders............................................................12, 149 Ladder Net ............................................................. 19
Frequency Measurer ...........................................3, 55 Ladder rail ............................................................. 19
Function................................................3, 20, 22, 191 Lexical Search ....................................................... 22
G Link ....................................................................... 22
Graphics .................................................................43 Log....................................................................... 168
Graphs ......................................................................9 Loops ..................................................................... 34
GSM .......................................................................76 M
H Memory ....................................................... 170, 173
Hardware Configuration 3, 49, 50, 52, 54, 55, 56, 59, MI 22 Duty Cycle Value ....................................... 55
60, 63, 191 MI-Memory Integers ............................................. 56
High Speed Input..........................................3, 50, 52 ML-Memory Long Integers................................... 56
High Speed Output (HSO)..................................3, 55 Modem..................................19, 76, 80, 82, 193, 201
High-Speed Counter .......................3, 50, 52, 54, 158 Modem Error Messages....................................... 198
HMI ..........................................................4, 5, 43, 46 Modules ............................................................. 3, 34
I Move
I/Os selected nets....................................................... 29
I/O Expansion Modules ........3, 49, 50, 54, 59, 189 Move...................................................................... 29
I/O Snap-in Modules ..........................................52 Move Elements ...................................................... 26
I/Os ...........................................................................3 Multi-master ........................................................ 123
I/Os .........................................................................50 N
I/Os .........................................................................50 Navigation ....................................................... 6, 147
212
Index

Nets .................. 3, 12, 19, 20, 21, 22, 23, 31, 42, 149 R
Network..... 65, 67, 95, 112, 113, 123, 128, 131, 135, Rails............................................................. 3, 19, 42
192 RAM .................................................................... 173
Network M90 Micro-OPLCs................................123 Range enter ............................................................ 55
Networked controller Recipes ........................................................ 181, 183
ID......................................................................128 Relay...................................................................... 63
Networked controller............................................123 Reload.................................................................... 52
Networked controller............................................128 Remote Access ...................................................... 19
New net ..................................................................23 Remote PLC Programming............................ 92, 143
NI..........................................................................130 Rename
Notepad ..................................................................31 Watch Folder ............................................. 12, 149
npn................................................................3, 50, 52 Reset .............................................................. 65, 189
NSB-Network System Bit ....................................130 Resizing ................................................................. 22
NSI-Network System Integer ...............................130 RS232 Parameters.............................69, 70, 135, 192
O RS232 port..................................................... 70, 123
Online point............................................11, 141, 187 RS485 .................................................................... 70
Operand .......... 12, 22, 33, 34, 56, 130, 149, 153, 160 Run ........................................................................ 65
Operand Description.......................................64, 160 Rung .................................................................. 3, 19
Operating System ...................................................66 S
OS...........................................................66, 169, 188 Scan ..................................................11, 34, 141, 187
Outputs .....................................................50, 63, 187 Search .................................................................. 153
P security .......................................................... 38, 151
Password...................................14, 38, 137, 151, 161 Select ..................................................................... 22
Paste .................................................................23, 26 Shaft Encoder .............................................. 3, 52, 54
PC.....................................................65, 95, 123, 131 Shortcut keys ....................................................... 171
PC COM Parameters ........................65, 95, 114, 120 Single scan..............................................11, 141, 187
Pictures ...................................................................43 Sizing..................................................................... 22
Placing function blocks ..........................................20 Snap-in I/O Module ..................................... 3, 52, 54
PLC ........................................................................65 Socket .................................................................. 113
PLC status ..............................................................66 Stop Mode ........................................................... 189
pnp................................................................3, 50, 52 Subroutines .............................3, 34, 38, 39, 151, 164
PNP/NPN ...............................................................63 Symbols ......................................................... 64, 130
Port .......................................................18, 65, 69, 95 System Operands ................................................. 118
Power T
flow.....................................................................21 TCP/IP ..................................112, 113, 114, 118, 120
Power......................................................................19 Test mode .......................................11, 141, 149, 187
Power......................................................................21 Text........................................................................ 43
Power....................................................................169 Timers.................................................................... 43
Power....................................................................188 Total cycle period .................................................. 55
Power-up modes ...........................................169, 188 Transistor............................................................... 63
Power-up Values ....................................................34 Troubleshooting.....11, 118, 141, 169, 187, 188, 189,
Program Flow .........................................................34 191, 192, 193, 198, 201
Program Sequence ..................................................34 U
Programming cable.........................................10, 131 Undo ...................................................................... 33
Project................... 6, 10, 11, 114, 120, 141, 147, 187 Unit ID................................................................. 128
PT100 .....................................................................49 Upload ................................................................. 183
PT4 .........................................................................49 utility ................................................................... 158
Pulse .................................................................50, 55 V
PWM-Pulse Width Modulation ....................3, 52, 55 Values .................................................................. 184
213
Getting Started

Variable text ...........................................................43 W


Variables...................................................4, 9, 43, 46 Watch Folder ................................................. 12, 149
View Window.................................12, 149, 152, 168 Welcome.................................................................. 1
Vision OPLC Information 3, 65, 66, 67, 95, 128, 135 Wiring.................................................................... 76

214

You might also like