Vuniq User's Manual
Vuniq User's Manual
1
Revisions
1 2005-06-01 First draft.
2
Contents
Introduction 6
Organization of this Manual 6
Getting Help 7
Upgrading from Previous Versions of Vuniq 7
Getting Started 8
The Vuniq Disk on Key 8
Installing Vuniq 8
Starting Vuniq 9
The Tray Icon 9
The Project Window 10
Working with Projects 10
The Project Development Process 11
Working with Groups 11
The Vuniq User Interface 12
The Software License 12
Screens 14
Viewing Screens 14
Inspecting Values 15
Screen Design 30
Designing Screens 30
The Screen Design Environment 30
Drawing Screen Elements 31
Editing Screen Elements 33
Using the Symbol Library 37
Working with Layers 38
Changing Appearance 38
3
Editing Properties 41
Screen Properties 42
Element Properties 43
Creating and Editing Links 46
Screen Designer Preferences 52
Alarms 54
How Alarms Work 54
Creating an Alarm System 54
Watching Current Alarms 55
The Alarm Log 57
Defining Alarms 57
Using SMS Messaging 59
Tips & Tricks 60
Reports 61
How Reports Work 61
Defining Report Tables 62
Replaying Reports in Screens 64
Tips & Tricks 65
Recipes 66
How Recipes Work 66
Defining Recipes 67
Using the Recipe Loader 68
Displaying and Editing Recipe Values in Screens 68
Customizing Projects 77
Security 77
Security Settings 77
Project Settings 78
4
Project Maintenance 79
System Events 80
User Actions 80
5
Introduction
6
Getting Help
In case you wish to get more information about Vuniq you can contact us:
NC Engineering Ltd. Hashaked pinat Hadafna st. Rishpon, 46915 Israel
Phone: +972-9-9564329
Fax: +972-9-9564328
E-mail: [email protected]
Website: http://www.vuniq.co.il
Or contact your local integrator.
Vuniq version 5 has been rewritten from scratch and represents a departure from previous
versions. This means that Vuniq applications developed in 4.x or prior versions will not work in
version 5. It is therefore necessary to recreate screens and definitions.
Note: Vuniq 5 is supported on Windows 2000 / 2003/ XP only.
7
Getting Started
To use the Vuniq disk on key, connect it to your computer's USB port and double-click the
computer icon on your desktop. The window will display a list of all volumes on your computer.
Double-click the volume named 'Vuniq' in order to open it. In the Vuniq window, double-click
Start Vuniq.
Installing Vuniq
8
The Vuniq installation window.
After following all instructions, Vuniq will have been installed on your computer and ready to use.
If you do not interfere in the installation process, the software is installed in a folder named
“vuniq50” on your hard disk.
Vuniq has the following minimum system requirements:
Windows 2000/Windows XP/Windows 2003.
1 GHz CPU.
256 MB RAM.
20 MB available hard disk space.
1024 x 768 screen resolution.
Starting Vuniq
To start Vuniq double-click the Vuniq icon on the desktop or select Vuniq from the Start menu.
Vuniq will load the sample project, and then will display its icon in the system tray.
The tray icon is displayed in the system tray (at the right edge of the Windows task bar) while
Vuniq is running, and lets you go on with your work without having to keep all Vuniq windows
open. The tray icon can also be used to access the different parts of your project without having to
open the project window.
9
The tray icon’s pop up menu
When right-clicked, the tray icon displays a pop up menu containing the following commands:
Show Vuniq – show the project window. You can also show the project window by double-
clicking the tray icon.
Main Screen – show the main screen.
Alarm Summary – show the alarm summary window.
Data Monitor – show the data monitor.
Log In – log the current user in with a password.
Log Out – log the current user out.
Save Layout – save the current window layout. You can either save the current layout as the
default layout or for a specific group. This command is useful when you don’t want the
project window to appear in the layout.
Vuniq User's Manual – show this manual.
About Vuniq – show the About Vuniq box.
Quit – quit Vuniq.
The project window displays a list of project items according to item type. The project window lets
you further more arrange all items such as screens, tables or charts into groups for easy access. You
can also search for items using the built in search box.
The project window provides access to all project elements and design tools
A Vuniq project represents a collection of settings, tables and screens that are used to control a
process or a group of processes. A project consists of numerous files and should reside in its own
folder. Projects can be placed on the local hard disk, on a shared network volume, or on a portable
volume, such as Vuniq To Go.
10
Vuniq can open only one project at a time, but makes it very easy to switch between projects.
Projects can be opened by selecting Project > Open Project... in the project window. In
addition, the most recently opened projects are listed in the Project menu for easy access.
The current project can also be archived into a single file. This can be useful when you want to
share a project, or make a backup copy of a project. To archive a project, select Project > Create
Archive. To restore a project from a project archive, select Project > Restore from Archive.
Project archiving is discussed in detail in the chapter “Customizing Projects” on page 77.
Vuniq contains a sample project which can be useful as a starting point for creating your own
project (you can make a copy the project folder and change its name), but you can also start by
creating a new project from scratch. In Vuniq you don't have to follow any rules when creating
your project, and you can always go back and change settings and parameters at any point in your
project's progress.
To create a new project, select Project > New Project. Supply the project name and the location
where the project will be stored, and you're ready to continue with any of the following:
Setup up communication ports and other project settings.
Design screens.
Define alarms.
Define reports.
Define trends and charts.
Define recipes.
Create groups and layouts.
Setup security options.
Once your project is ready for use by plant operators, you can prevent access to development tools
by hiding settings tables and putting Vuniq in operator mode. For more information refer to in the
chapter “Customizing Projects” on page 77.
Groups are an easy way to organize items in your project into logical groups. Since items can
belong to multiple groups simultaneously, groups don't need to be exclusive, that is an item can
belong to multiple groups at the same time.
To create a group, click the plus sign at the bottom of the project window and enter a name for the
group. To add items to a group, simply drag and drop them to the group. To remove items from a
group, select the group, select the items and press Delete.
11
Groups help you organize your project elements into well-defined categories
Each group can be associated with a global window layout, which can be saved and restored for
easily opening frequently used screens, tables, charts or utility windows.
The Vuniq environment contains numerous kinds of windows, such as the project window, table
windows, screen windows or settings windows. In order to facilitate working with Vuniq, the
windows are divided into two groups: modeless windows and modal windows. Modeless windows
are windows which do not demand the user’s immediate attention, and have a darker background.
The project window is a modeless window, as is also the screen designer and table windows. Modal
windows demand the user’s immediate attention and must be dismissed before performing other
work in Vuniq. These windows are displayed with a lighter background. Modal windows include
the project settings window, the recipe loader, alert windows and other prompt windows.
The Vuniq software license is distributed as part of the Disk on Key (DOK) distribution, letting the
user run Vuniq on any computer. Each license purchased provides full functionality without any
limitations, including all design and configuration tools. You can also use Vuniq without a license
for up to 30 days.
Note: The license is valid only when the disk-on-key is plugged into the computer.
To view your license information, select Help > License in the project window.
12
The license window displays information about your license.
Site Licenses
Vuniq can also be used with site licenses. Site licenses allow you to use a single license which
allows you to setup one computer as a license server, and have other computers connect to it to
acquire a license. To connect to a license server, open the license window, click the Use License
Server button and enter the server's IP address. Please contact us to find out more about licensing
options.
13
Screens
Screens are the primary elements of an HMI system. They present the operator real time
information in graphical form and allow him to change and control field values. This can be done
by either entering numerical values using the keyboard or by direct manipulation using the mouse,
clicking and dragging graphical elements. Vuniq offers a powerful screen engine capable of
presenting rich, high-quality graphics to the operator with features such as anti-aliasing, gradients,
true scaling, animation, multiple layers and accurate typography. These features are
complemented by a rich drawing environment which includes an extensible symbol library, visual
styles, positional guides. The same window can be used for both designing a screen and viewing it
in operator mode, switching between the two modes with the click of a button.
Graphical elements can be connected to real-time values by means of links. Links can be
programmed in a variety of ways to control every aspect of the display, including changing colors,
visibility, position, size, angle etc. Links can be used to define actions related to mouse operations
or keystrokes, such as changing a value, opening windows, performing a script etc.
A project may contain any number of screens which can be shown on request. A specific screen can
also be designated as the main screen, which is opened up when the project is loaded, for example.
In addition, screens can be designated as toolbars attached to the edges of the screen window.
Screens can also be displayed in floating panels, for example to open control panels for specific
machines or other equipment.
The selected valve (in green) is right-clicked to display its floating panel.
Viewing Screens
To display the main screen, double-click the Screens group in the project window. You can also
select View > Main Screen in the project window, or Main Screen from the tray icon menu.
At the top a toolbar is displayed. This toolbar is actually a regular screen, which is displayed at the
top edge of the window. Toolbars can be attached to any edge of the window at design time. The
bottom bar contains a zoom panel on the left, allowing the operator to zoom in and out on the
displayed picture.
14
Positioning the mouse over graphical elements will change the mouse cursor according to the
operations which can be performed on the element:
- A hand cursor indicates that clicking the element will perform an action, such as
writing a value, switching a screen, or opening a floating window. In addition, when the
cursor is placed over an element which can be manipulated, a blue frame will be displayed
around the element. The operator can then click the element to perform actions as defined in
the screen. When dragging elements, for example in order to change set points, a small label
will be displayed along side the cursor showing the selected value.
Inspecting Values
You can always inspect and change real-time values by right-clicking while holding down the Ctrl
key on any dynamic element. The value inspector will pop up next to the selected element and
display all values used by the element.
The value inspector presents a list of all values pertaining to a specific shape
On the left, the addresses are displayed. If any aliases match the relevant addresses, they are
displayed along with their descriptions. On the right, the current values are displayed. For digital
(boolean) values two buttons are displayed to change the value (green for switching on, red for
switching off.) Double-clicking the current value will toggle it. For analog (numerical or string)
values, clicking the current value will display a text box for editing the value. Hitting the Enter key
will write the edited value.
15
Real-Time Data Access
At the core of Vuniq is a sophisticated real-time data acquisition engine , which manages access to
real-time data residing in PLC’s and other field units. The data acquisition engine automatically
optimizes data access in order to achieve the fastest performance possible. This engine uses
communication drivers, small pieces of software that allow it to access specific types of equipment,
such as different kinds of PLC’s.
Computers running Vuniq may be connected using Ethernet and TCP/IP communication in peer-
to-peer fashion, so that each computer may access PLC’s connected to any other computer. Data
may also be automatically transferred between different PLC’s or computers.
Vuniq provides access in real-time to diagnostic tools, including monitoring, generation of alarms
upon communication errors, and redundancy features for network operation. It is also possible to
define aliases and use them throughout the application instead of physical addresses.
Note: In Vuniq, addresses do not need to be specified or configured in advance. The
communication engine operates dynamically on the currently requested items of data.
The data acquisition engine handles the task of fetching real-time data from and issuing
commands to PLC's and other remote equipment. It ensures optimal performance under
constantly changing demands and conditions, and provides comprehensive statistics for
monitoring communication.
Ports
In Vuniq each communication channel is called a port and is completely independent of all other
communication channels. All ports perform communication simultaneously - a port does not need
to wait for other ports to finish a communication task before handling its own communication
tasks.
16
Stations
For some types of PLC's, a single communication channel may be used to connect to more than one
PLC. For example, an RS-422/485 line may be used to connect to multiple PLC's, and a TCP/IP
driver can always connect to multiple PLC's connected to the same Ethernet line. Each PLC is
referred to as a station.
For regular serial port drivers, where multiple stations are concerned, communication is handled
one station at a time. Some drivers, like TCP/IP drivers for example, perform communication to all
stations at once, thus highly increasing the performance and the scalability of the application. This
type of driver is called a "parallel driver".
Each station has its own communication status and each station may be disabled manually or
automatically after repeated communication errors.
Items
An item is a single variable with a specific PLC address, which is updated by continuously polling
the PLC. Each item holds a current value and a current state. For each item, the polling frequency
may be defined.
Communication Drivers
Each port is assigned a communication driver to work with. A driver is a separate piece of software
which handles communication with a specific type of equipment. For example, a driver exists to
handle communication with Modicon PLC's, or any other equipment which supports the ModBus
RTU protocol.
The driver is responsible for defining the address formats, and formatting communication
messages sent to the PLC. Some drivers ordain the use of a serial port. Others use TCP/IP for
communication, and others still use a third-party software to communicate to special-purpose
equipment.
Communication Tasks
A communication task is a group of items defined for reading values from the PLC. Though a task
has no operational function, it is used for managing large amounts of items. In Vuniq, an screen
will have its own task, the trend logger will have its own task, each report will have its own task,
etc.
Data Polling
Each port holds a current list of the items it has to update. When the port is idle, it search this list
for the first item which is due to be updated. This is done by going through the list and looking for
the first item whose polling frequency is smaller than the time elapsed since it was last updated.
Then the port builds a block, a set of variables whose addresses can fit together in a single read
request. The size of this block depends on the actual amount of items in need of immediate
updating, and is limited by the maximum amount allowed by the driver. Another factor in the
creation of blocks is fragmentation. If a single block consists of addresses which are not
consecutive, it might be better, performance wise, to separate that block into two blocks. The
fragmentation value is tunable.
After construction of the communication block, the request is formatted by the driver and sent to
the PLC. When a reply has been received, it is parsed by the driver, and the values are updated in
the items.
Write Operations
In Vuniq, reading real-time data is the rule and writing is the exception. This means that write
operations (sending commands) receive a higher priority than read operations (data polling).
Whenever a port is idle, and has a write operation pending, it performs the write operation before
any read operation. For more information on configuring the behavior of write operations, see the
section “Advanced Port Settings” on page 24.
17
Item References
Address References
Vuniq defines a standard format for referencing variables:
<port>;<station>;<item>
For example, for ModBus addressing 1;1;40001 refers to item 40001 in station 1, port 1.
The item name depends on the kind of communication driver defined for the port. For example, an
Allen-Bradley port will have item names such as N7:15 etc., and a Siemens S7 port will have item
names such as DB10.DBW0 etc.
Vuniq offers a wide range of communication drivers for different kinds of equipment. Depending
on the driver you select, the port may use a physical serial port of the computer, or other driver-
specific means of communication (such as TCP/IP or special I/O cards). Vuniq supports all the
major PLC brands. For more information on drivers refer to appendix A – communication drivers.
Note: Vuniq gives you a visual feedback if you have specified an invalid address reference, in the
form of red background.
Bit References
In some cases, a specific bit inside a word may be addressed individually. The format for bit
references is <port>;<station>;<item name>-<bit number>, where <bit number> is a number
between 1 (LSB) and 16 (MSB). For example, 2;1;V31-5 refers to bit 5 of item V31 in station 1,
port 2.
18
The Internal Data Table
The Data Table is used for internal variables and data transfer. It contains four types of variables:
flags (digital), integers (analog), real numbers (floating point) and strings. The size of the Data
Table may be configured. The Data Table is assigned the port number 99.
The names of the addresses are:
Flags: F<word>.<bit>, e.g. F1.1, or flag words: F<word>, e.g. F1
Integers: N<index>, e.g. N3
Floating point numbers: R<index>, e.g. R32
Strings: S<index>, e.g. S5
Data Table values may be saved periodically or manually and may also be manually restored.
Performance Variables
Apart from the real-time data which can be accessed with Vuniq, Vuniq also provides variables to
control the software itself and automate it. The variables are available on port 100 (the station
number doesn't matter). For example, to access the LastAlarm variable, specify 100;1;LastAlarm.
The currently available variables are:
Communication:
19
Port.StEn - This variable enables or disables a specific station on a specific port. The format
is Port<port>.StEn[<station>]. For example, to reference port 2, station 14, use the
following address: 100;1;Port2.StEn[14]. To enable a station, set the variable value to 1. To
disable a station, set the variable value to 0.
Port.StCommError - This variable reflects the current communication state on a specific
station. The format is Port<port>.StCommErr[<station>]. For example, to reference port
1, station 5, use the following address: 100;1;Port1.StCommErr[5]. When the station is in
communication error, the variable will hold the value of 1. Otherwise the variable will hold
the value of 0.
Alarms:
LastAlarm – this variable holds information about the most recent active alarm. Its value is
in the format: <date/time> - <alarm name> - <alarm description>. When no alarm is
active, the value is empty.
LastAlarm.Name – the name of the last alarm.
LastAlarm.Start – the date and time the last alarm started.
LastAlarm.Description – the last alarm description.
LastAlarm.Group – the last alarm’s group name.
LastAlarm.Group.Description – the last alarm’s group description.
LastAlarm.Group.Color – the last alarm’s group color.
AlarmCount – the number of currently active alarms. If no alarms are active, the value is 0.
For more information on alarms, see the chapter “Alarms” on page 54.
Aliases
Aliases are names that act as substitutes for item addresses. They can be used globally in Vuniq
wherever an item address is required. Aliases let you specify easy to read addresses, and are also
useful when the PLC logic is not yet determined. For example, instead of using the address
1;3;V1237, you can specify the alias 'Pump1_Pressure', which references this address. Anytime
this alias is specified, Vuniq will convert it to the address specified. Aliases are also offered
wherever an address is requested, such as in link definition, trend definition for easy picking.
Editing Aliases
To edit the aliases table, select Settings > Aliases in the project window.
20
To find out more about working with tables, see the chapter “Working with Tables” on page 69.
Once the aliases table is closed, the aliases are recompiled and can be used.
Expressions
In addition to offering access to any valid PLC address, Vuniq also lets you evaluate complex
logical, mathematical or string expressions. These expressions can be used anywhere an address is
required, such as in screens, trends, alarms, reports or recipes.
Note: currently aliases cannot represent expressions. However, expressions can include aliases. To
prevent a variable reference from being confused with a constant, you can enclose the alias or
address in square brackets, for example [Pump1_Pressure].
Mathematical Expressions
Vuniq accepts the normal operators, such as addition, subtraction, multiplication, etc. You can also
parentheses to form complex expressions, such as ([1;1;R4]+[1;1;R5])/[1;1;R7]. You can also
use aliases or constants in expressions, for example Pump1_Pressure/1.4.
Boolean Expressions
You can evaluate boolean expressions, such as Pump1_Pressure>3.54. Vuniq recognizes the
comparison operators >, <, >=, <= and =. Like mathematical expressions, boolean expressions can
be nested, for example (Pump1_Pressure>3.54) and Pump1_Working.
String Expressions
String expressions are used relatively infrequently in SCADA applications, but can be useful when
displaying messages. Vuniq lets you easily concatenate strings, for example
"Last Message:"+Last_Message.
While port configuration is usually a simple affair in Vuniq, you can also customize the port
behavior and fine-tune performance settings. Port configuration can be changed on the fly, without
needing to restart Vuniq, and changes you make are reflected instantly.
Port Configuration
To configure ports, select Settings > Data Sources in the project window. The data sources
window contains a list of currently available ports on the left, and a tabbed detail pane on the right.
21
Serial port configuration
To add a port, click the Add Port button at the bottom of the window and enter a port number.
Since ports are identified by their number, the port number must be unique. The settings pane will
appear on the right. Here you can configure all port settings. Usually, the advanced settings are
best left alone, and all you need to set is the port type and other basic information such as driver
and serial settings.
To delete a port, right click it and select Delete from the context menu. To disable
communications on a port, uncheck the Active check box. When a port is disabled, addresses are
still valid, but no read or write operations are performed.
Ports are categorized by types: local, remote, OPC and simulated port. Following is a discussion of
the different types and how to configure them.
22
OPC Port Configuration
You can connect to an OPC server by selecting OPC port from the Type combo box and entering the
server name, or selecting it from the drop down list. Addressing is performed in the normal
manner, that is <port>;<station>;<address>, but the <station> part has no actual meaning. For
example, 1;1;Data.V1 refers to item Data.V1 in the OPC server. The item format is dependent on
the OPC server, and will change according to the OPC server and its configuration.
23
Yield - this settings controls the progress of read operations in cases where many write
requests are pending. It defines the minimum ratio between read and write operations.
Maximum Fragmentation - this number represents the maximum gaps in read blocks. The
smaller the value, more blocks will be needed to read all requested items. The bigger the
value, less blocks will be needed, but efficiency will decrease.
Preferred scan rate – this is the number of times the port is scanned per second. Usually it is
best not to change this value, but in cases where the computer’s performance is suffering, you
may try to reduce this value. Reducing this value could, however, affect the communication
speed.
Maximum Task Rate - This value defines the maximum number of read/write operations per
second. If the value is 0, operations are performed as fast as possible. Limiting the task rate
may be useful in cases where timeouts are experienced due to the inability of field equipment
to cope with the task rate.
Automatically Disable Problematic Stations - In cases where multidrop lines are used, a
single malfunctioning station can cause increased update rates due to timeouts. If the
automatic disable box is checked, Vuniq will stop polling problematic stations after the
specified number of repeated failures for the specified number of minutes.
Port Monitoring
The current state pane provides detailed statistics about the port. To display the current state click
the Current State tab.
Some ports even offer information for each station. The statistics include the following items:
Port state – the current state of the port – active, inactive (disabled), or idle.
Driver state – OK / error loading the communication driver. In most cases an error would
occur only if the driver relies on third party software to operate, such as the RSLinx driver, or
the Siemens S7 driver.
Serial port – The state of the serial port used by the driver. If the serial port is invalid or is
already taken by another program, this item will indicate failure.
Comm. State – the current communication state – OK or error. An error will be indicated
only in the case of 3 consecutive failures to get a proper response from the equipment.
Items – the total number of items being polled on this port.
Update rate – the time it takes to do a full update of all polled items.
Blocks – the number of blocks needed to do a full update of all polled items.
Read rate – the number of blocks read per second.
Write rate – the number of write operations per second.
Throughput – the number of items read or written per second.
Response time – the time it takes to get a response for read or write operations.
Total writes – the number of write operations performed.
Total blocks – the number of read operations performed.
24
Scan rate – the scan cycles the port receives per second.
Networking
Vuniq allows you to build a distributed control system, where every computer running Vuniq can
access data from any PLC regardless of which computer it is connected to. For example, you can
have a computer in the office access real-time data and show the same screen as the computer on
the production floor. The computer on the production floor would be connected directly to the
PLC, but the computer in the office would only be connected to the other computer through
Ethernet.
The server acts as a proxy, letting a client access a PLC connected to the server.
Each Vuniq computer can be both a server and client. The configuration of the system requires no
special hardware or software and the same application files may be used on a client computer
without any change to the application itself, only to the port configuration.
25
Each Vuniq computer can act as both client and server, letting other computers access locally connected
PLC’s, and accessing PLC’s connected to other computers.
The data transfer over the network occurs only when the values of requested variables have
changed. This results in high efficiency and minimal update times, even with applications
involving thousands of variables and dozens of computers.
Server redundancy - if one server fails, the client automatically switches to the other.
Vuniq also lets you design the system for server redundancy as a measure of safety. A client can
switch automatically between two servers connected to the same PLC, so that if one server fails,
you can still access the PLC by using the other servers.
Note: Using a client/server communication topology might be beneficial even in cases where all
computers have access to all PLC’s (for example, where the PLC are connected using Ethernet.) In
cases where you have many computers accessing many PLC’s, you can significantly improve
communication throughput by concentrating all communication on one or two servers, and
configuring all other computers as clients.
Server Configuration
To configure a computer running Vuniq as server, make sure the computer is connected to the
network and is reachable from the client computers. This may be verified by running the ping
utility or from the client by configuring the remote port with the servers' IP address and clicking
the Ping button.
Note: Each computer running Vuniq can act as a server. No configuration is necessary in Vuniq in
order to use it as a server.
26
Client Configuration
On each client computer, a remote port should be configured having the same driver type as the
server port, and referencing the port number in the server. It is recommended to give the local port
the same number as on the remote computer, so aliases and address references defined on the
server computer can be used without any changes.
Data Transfer
Vuniq gives you the option of automatically and continuously transferring blocks of data between
different PLC’s, a feature which can be very useful when integrating large systems. Data may be
transferred between different PLC’s, between a PLC and the Data Table, or even between different
computers.
It is also possible to configure a task which keeps two different sources of data synchronized by
using the Write back feature. This feature works so that any data written to the target is also
written to the source. That way, changes are being reflected in both directions.
Note: To achieve optimal performance, the target is not written to constantly, but only when the
source value changes.
To open the data transfer table, select Settings > Data Transfer in the project window.
27
The table contains the following fields:
Source - the source address.
Target - the destination address.
Action address - an address of a boolean variable controlling the data transfer. If an address
is specified, the transfer will occur only when the variable is on.
Block Size - the amount of variables.
Interval - the sampling interval in seconds.
Write Back - whether changes to the target area should be written back to the source area.
Note: Aliases or expressions can not be used in the data transfer table.
For more information about working with tables, refer to the chapter “Working with Tables” on
page 69.
The data monitor lets you quickly lookup and change real-time values without needing to create
screens. To open the data monitor, select View > Data Monitor in the project window.
28
In most cases, read rates of more than 100 blocks per second are not possible. In fact, usually a
rate of 50 blocks per second is more realistic even under optimal conditions, and since a single
block usually can hold about 50 items, we can expect a throughput of no more than 50×50=2500
items per second from a single PLC.
Since screens need to be as responsive as possible, Vuniq polls items referenced in screens
constantly, or as fast as possible. This is also true for alarms. Data logging, however, uses a
different approach to acquiring values, where items are polled only when they are needed. In
trends, for example, items are polled according to their sampling frequency, and in reports only
when a new report record is logged. Therefore it is advisable to keep the sampling rate as low as
possible, that is to define as big as possible a sampling interval. This is also beneficial for keeping
the logging tables as small as possible to increase performance.
29
Screen Design
The screen designer included in Vuniq simplifies design by providing a rich set of drawing and
manipulation tools, as well as an extensible symbol library. Changes to object appearance and
placement can be applied easily using floating panels. You can switch between design mode and
operator mode with a single key-stroke.
Designing Screens
To open the screen designer, select View > Screen Designer in the project window. You can
optionally right-click a screen and select Edit from the context menu.
The designer window contains the usual main menu, a toolbar for accessing common commands,
and a status bar containing the zoom panel. In addition the designer window, several panels are
used to create and manipulate screen elements:
The designer panels, from left to right: Tools, Appearance, Properties, Layers and History
30
These panels are:
The Tools panel – used to select the drawing tool. Also contains tools to select elements,
change contours of shapes, navigate the canvas and zoom in/out.
The Appearance panel – used to change the appearance of screen elements, select visual
styles and change element alignment.
The Properties panel – used to edit object properties and links.
The Layers panel – used to control, add and delete layers in the screen.
The History panel – used to review the changes made to the drawing and optionally undo or
redo them.
Each of the panels can be displayed while editing in the designer window, floating on top, and can
be hidden and recalled on demand. You can show or hide each panel by selecting the appropriate
command from the View menu.
The screen designer includes a comprehensive set of drawing tools that are available both from the
Tools menu and from the Tools floating panel. Drawing elements involves selecting a tool and
clicking or click-dragging on the drawing canvas.
Drawing Lines
To draw a line select the line tool and click drag from the start point to the end point. The Shift key
can be used to draw 90˚ and 45˚ lines.
31
Drawing Arcs and Pies
To draw 180˚/90˚ arcs and pies, select the arc tool and click-drag from the start point to the end
point. Normally, 180˚ arcs are drawn clockwise. When the Shift key is held, a 90˚ arc is drawn
counter-clockwise. To create a pie (closed arc), hold down the Ctrl key. To prevent an arc from
closing, uncheck the Closed check box in the Appearance section of the Appearance panel. For
more information on the object inspector see the section “Changing Appearance” on page 38.
Drawing an arc
Drawing Polygons
To draw a polygon, select the polygon tool and click drag the first line of the polygon. To add more
lines click successively. To finish the polygon, press Escape, right-click the canvas, or click the start
point. To prevent a polygon from closing, i.e. create a polyline, uncheck the Closed check box in the
Appearance section of the Appearance panel. For more information on the object inspector see the
section “Changing Appearance” on page 38.
Drawing Text
To add text select the text tool and click the canvas. A text frame appears with a cursor, where you
can enter text. Multiple lines of text can be entered in a single text frame by using the Enter key.
The text frame can be moved and resized while editing the text by dragging its edges.
A text element can include multiple lines of text, and you can also drag the frame while editing.
Note: The text frame does not adjust itself automatically to the text. To adjust the frame to the
text, you must select the text element and select Format > Auto-Adjust Text Frames.
Adding Images
To add an image, select the image tool and click the canvas. A file selection dialog box will appear,
where you should choose the appropriate image. The supported image types are .bmp, .jpeg and
.gif.
Note: images are not saved as part of the screen. Only a reference is saved. Therefore the images
should exist apart from the screen, and remain in the same location.
32
Adding Charts
To add a chart, select the chart tool and click-drag from the top-left corner to the bottom-right
corner. The selection of chart can be performed later in the properties panel, as discussed in the
section Editing Properties below.
After elements have been added to the screen, they can be further edited by direct manipulation,
arranged in groups, or aligned with each other. Elements can also be duplicated, copied and
pasted.
Selecting Elements
To select an element, click its outline. If the Enable Area Selection options is checked (in the
designer preferences), you can also select an object by clicking inside it. To add another element to
the selection, click the element while holding down Shift. To select an object underneath the
current selection, click again in the same position. You can also select multiple elements in one fell
swoop by click-dragging a selection rectangle around them. If the elements are located on top of
another, bigger element, you can hold down Ctrl while click-dragging to prevent the bigger element
from being selected.
You can also use the Edit > Select menu to perform selection: select all elements, cancel the
selection or invert the selection.
33
Add to Symbol Library – add the selected element to the symbol library.
Duplicate – open the duplicate dialog box.
Cut – copy the current selection to the clipboard and remove from the canvas.
Copy – copy the current selection to the clipboard.
Paste – paste selected symbols from the clipboard to the canvas.
Delete – delete the current selection.
Copy Appearance – copy the current selection’s appearance to the clipboard. You can later
paste the appearance settings onto other elements.
Copy Properties – copy the current selection’s properties to the clipboard. You can later paste
the property values onto other elements.
Copy Links – copy the current selection’s links to the clipboard. You can later paste the links
onto other elements.
Align – align multiple elements.
Size – resize multiple elements.
Flip Horizontally – flip selection horizontally.
Flip Vertically – flip selection vertically.
Reset Anchor – reset anchor for all elements in selection.
Reset Angle – set angle for all elements in selection as 0 (12 o’clock).
Manipulating Elements
Once elements are selected you can move them by click-dragging the selection. You can also click-
drag any of the square handles displayed on the selection rectangle corners and edges. When
dragging the corners, you can preserve the x/y ratio by holding down Ctrl.
To rotate the selection, place the cursor outside the selection frame until the cursor turns into the
rotation cursor and click-drag to rotate the selection around the center of the selection frame.
When a single element is selected, you can rotate it around its associated rotation anchor, and also
move the anchor by holding down Ctrl. While the Ctrl key is held, a circle with a cross is displayed
at the location of the anchor, letting you drag it to move the anchor, or click-drag around it to
rotate the element. You can restore the anchor to the center of the element’s surrounding rectangle
by selecting Format > Reset Anchor.
Hold down Ctrl to rotate a shape around its anchor. You can also drag the anchor to change its position.
34
Arranging Elements
Screen elements can be positioned on top of each other, and can be moved to the foreground or
sent to the background. To move the selection to the front, select Format > Bring to Front. To
move the selection to the back, select Format > Send to Back.
Aligning Elements
To align elements, select Format > Align menu, and then select one of the options from the sub
menu. You can also align elements to the grid by selecting Align to Grid.
When several elements are selected you can also equalize their dimensions by using options from
the Format > Size menu.
Note: As stated before, you can align objects to the grid while dragging by selecting View > Snap
to Grid. You can also toggle the snap to grid feature by holding down Alt while dragging.
Duplicating Elements
To duplicate the selected element, select Edit > Duplicate.
35
To paste the contents of the clipboard into the drawing canvas, select Edit > Paste. A wireframe
representation of the clipboard will be displayed at the position of the cursor. Move the cursor to
place the wireframe at the required position, and click the canvas.
36
Using the Symbol Library
The symbol library comes with an exhaustive collection of useful symbols, some of them including
pre-defined links. To browse the symbol library, open the symbol library panel.
The symbol library panel can be used for browsing and pasting symbols.
The symbol library panel contains a list of categories on the left, a grid of symbols filtered by
category on the right, and a search field and a slider on the top. The search field is used for quickly
searching for symbols. Once you enter a search term, only items whose names contain the search
term are displayed. You can use the slider next to the search field to change the magnification level.
To add a symbol to the drawing canvas, simply drag the desired symbol onto the drawing canvas.
To add a symbol to the screen, simply drag it from the symbol library panel to the canvas.
37
Working with Layers
Layers let you separate various overlapping parts of your screen for easy editing, and for later
manipulation, also in runtime. You can hide and show different layers in design time or at runtime,
manually or automatically, i.e. by using links. An example of using layers would be a layer for the
background, a layer for dynamic elements and a layer for labels. Layers are edited using the layers
panel.
Use the layer drop-down box in the toolbar to select the active layer.
Changing Appearance
The Appearance panel is used to alter the appearance of the current selection or of newly-drawn
items.
38
Brush – used for changing fill appearance.
Text – used for changing text appearance.
Appearance – used for changing placement.
Modify – used for aligning elements.
When no selection is made, the Appearance panel controls the appearance of elements added to
the canvas using the drawing tools.
39
Changing Brush Settings
The brush settings control the appearance of shape fills.
Changing Placement
The placement section lets you specify the selection's position, size and rotation in accurate values:
Layer - to which layer the element belongs.
Left,Top - the position of the element's top-left corner.
Width, Height - the element's dimensions.
Angle - the element's rotation.
Closed Shape - this box controls whether shapes appear closed or open.
40
Editing Properties
Each element in a screen is described with various parameters which control different aspects of
the element's behavior and appearance. These parameters can be edited individually or all together
using the properties panel.
Editing Properties
To edit an element's properties, click on the value. The controls displayed to edit a value differ
according to the kind of property. For boolean values, such as the Visible property, a combo box is
displayed, along a check box, letting you toggle the value. For text or number values, such as Name,
or Width, an editing box is presented. For other values, a combo box containing a number of
options is displayed. Changes you make are applied once you click outside the property cell, or
press Enter. To cancel a change of value, press Escape.
41
Searching for Values
The search box lets you quickly find items containing a specific value, and also to replace values.
The search is performed while you type the search term, and any items containing the search term
are displayed in the element list. Editing these elements' properties is done as before.
Right-clicking the magnifying glass displays a context menu for controlling the search:
Addresses - look for the search term only in address specifications.
Names - look for the search term only in element names.
Properties - look for the search term only in other element properties.
Everything - look for the search term everywhere.
Once search results are displayed, you can replace occurrences of the search term by clicking the
Replace button and entering a replacement term.
Screen Properties
General Properties
Address references are propagated from the screen to all the elements contained in it, from groups
to their sub-elements, and are also propagated to screens called at runtime. This means that any
references defined for the screen are can also be used by any element in the screen, and the same
for sub-elements of a group. For more information see the section “Creating and Editing Links” on
page 46.
AddressRefs – address references for use in links.
Title – the title of the screen.
Appearance Properties
Appearance properties control the appearance of the screen.
BackColor – the screen’s background color.
FillWindow – whether to fill the window with the shape selected as VisibleArea. This causes
the shape to resize whenever the window is resized.
GridColor – the screen’s grid color.
GuideColor – the screen’s guide color.
VisibleArea – the name of the element used to mark the area of the screen to show. This
property can be useful when displaying a floating panel, or when you want the window
containing the screen to show a specific part of the screen.
Layer Properties
Layer properties appear only for the screen, and control the usage of layers.
ActiveLayer – the active layer used for editing.
<layer>-Visible – whether a specific layer is visible. Such a property will be displayed for each
layer defined for the screen.
<layer>-Selectable – whether a specific layer is selectable. Only selectable layers can be
manipulated in both design and operator mode. Such a property will be displayed for each
layer defined for the screen.
42
Navigation Properties
Navigation properties control which screens will be displayed when the user presses
ScreenDown – the name of the screen to switch to when the user presses Down.
ScreenEscape – the name of the screen to switch to when the user presses Escape.
ScreenLeft - the name of the screen to switch to when the user presses Left.
ScreenNext - the name of the screen to switch to when the user presses PgDn.
ScreenPrev - the name of the screen to switch to when the user presses PgUp.
ScreenRight - the name of the screen to switch to when the user presses Right.
ScreenUp - the name of the screen to switch to when the user presses Up.
Element Properties
General Properties
Address references are propagated from the screen to all the elements contained in it, from groups
to their sub-elements, and are also propagated to screens called at runtime. This means that any
references defined for the screen are can also be used by any element in the screen, and the same
for sub-elements of a group. For more information see the section “Creating and Editing Links” on
page 46.
AddressRefs – address references for use in links.
Name – the name of the selected element.
Appearance Properties
Appearance properties control the appearance of elements and of the screen.
Angle – the rotation angle of the selected element, measured clockwise from 12 o’clock and
expressed in degrees.
Closed – whether the shape is closed.
Composite – whether a group should be drawn as a composite of all its sub-elements. When
set to True, the group will be rendered as a single shape comprised of all its sub-elements.
Height – the height of the selected element.
Layer – the layer to which the selected element belongs.
Left – the position of the left edge of the element.
Top – the position of the top edge of the element.
Visible – whether the element is visible.
VisibleObject – the name of the sub-element to display for the group. When this property is
set to the name of an existing sub-elements, only that sub-element is displayed, instead of the
whole group.
Width – the width of the element.
Anchor Properties
Anchor properties determine how an element will behave when the screen’s FillWindow property
is set to True. When this is the case, you can use the Anchor… properties to change the position
and size of individual elements according to changes made to the window size.
AnchorBottom – whether to maintain the distance from the element’s bottom edge to the
window’s bottom edge.
43
AnchorLeft – whether to maintain the distance from the element’s left edge to the window’s
left edge.
AnchorRight – whether to maintain the distance from the element’s right edge to the
window’s right edge.
AnchorTop – whether to maintain the distance from the element’s top edge to the window’s
top edge.
Animation Properties
Animation properties control whether an element will be animated (showing movement). The
Cycle Group kind of animation is valid only for groups.
AnimateCycle – the amount of time in seconds for performing a complete animation cycle. In
the case of rotation, this is the amount of time in which to complete a full 360˚ rotation.
AnimateKind – one of the following: None – no animation, Rotate – rotate the element
around its anchor, Cycle Group – cycle through all sub-elements in the group, displaying one
at a time.
Pen Properties
Pen properties control the appearance of lines and shape edges.
PenAlign – the pen alignment: Center – draw the centered line in its intended position
(default), Inset – draw the line inside the shape. This property might be useful when using
thick pens.
PenAlpha – the opacity of the pen, from 0 (completely transparent) to 255 (completely
opaque).
PenColor – the color of the pen.
PenEndCap – the line’s end cap.
PenLineJoin – the way line segments are joined. This is useful when using thick pens.
PenStartCap – the line’s start cap.
PenStyle – the pen style. To make a pen invisible, set the value to Clear.
PenWidth – the width of the pen. A value of 0 (zero) indicates that the pen will always be one
pixel thick, regardless of zooming.
Fill Properties
Fill properties control the appearance of a shape’s fill.
FillAlpha – the opacity of the fill.
FillColor – the fill color.
FillGradColor – the second color used for gradients.
FillGradFocus – the gradient focus, from 0 to 1.
FillGradStyle – the gradient style.
FillStyle – the fill style.
44
Image Properties
Image properties control the appearance of images and images in buttons.
ImageFilename – the absolute or relative path to the image file. Images are not stored in
Vuniq stored, but rather only referenced.
LockAspectRatio – whether to prevent the user from changing the ratio between the image’s
width and height. Setting this property to false allows you to stretch the image to any
dimensions.
TransparentImage – whether to display the image as transparent, using the bottom-left pixel
as the transparency color.
Text Properties
Text properties control the appearance of text and button captions.
Align – the text alignment: Left, Center or Right.
BorderWidth – the text box border width. When this property is set to a value greater than 0,
the box around the text grows, and is displayed as a rectangle with round corners.
FontSize – the font size.
RightToLeft – whether the text flows from right to left. This settings is useful for displaying
text in languages such as Hebrew or Arabic.
Text – the text to display.
TextAlpha – the text transparency, from 0 (completely transparent) to 255 (completely
opaque).
TextColor – the text color.
TextStyle – the text style.
Typeface – the font name.
Button Properties
Button properties control the appearance of buttons.
BevelSize – the button’s bevel size.
BorderColor – the button’s border color.
Down – whether the button is displayed as pressed.
DownColor – the button’s pressed state color.
Placement – the placement of the image (if set) in the button.
UpColor – the button’s normal state color.
Chart Properties
Chart properties control the appearance of charts.
ChartName – the name of the chart as defined in charts. For more information, see the
chapter “Trends and Charts” on page 72.
LabelSize – a factor for the label size. A value of 1 will give the default size.
ShowGrid – whether to show a grid.
ShowLegend – whether to show a legend.
45
Creating and Editing Links
Like properties, links are also edited using the properties panel, and like properties, can be edited
individually or all together. Links are also searchable, and appear in search results. Screen links
are designed to be completely customizable, and are based on the principle of tying real-time
values to specific properties in various fashions.
Creating a Link
To create a link, select an element, open the properties panel, and click the Create Link (plus sign)
button. The link editing pane will appear instead of the properties table. The link will also be
displayed as a sub-item under the element in the element list. Since each link can have a name, you
can enter a name for the link which will appear in the element list. You can also enter a hint for the
item, a text which will be displayed in operator mode when the mouse hovers over the element.
Deleting a Link
To delete a link, right-click it in the element list and select Delete Links. To delete all of an
element's links, right-click the element and select Delete Links.
46
Deleting a link.
To delete all the links associated with an element, right-click the element in the element list and
select Delete Links.
Reflection Links
Reflection links have several different types:
Value - ties a continuous real-time value to a single property.
Matrix - a table describing multiple states of one or more real-time variables and the
corresponding changes in one or more properties.
Move - a change in position according to a continuous real-time value.
Textfile Index - uses a real-time value as an index to a text file table of property values.
Value Reflection
47
Matrix Reflection
A matrix is a table which defines correlation between real-time values and property values. You can
define as many columns and rows as you wish, containing either real-time values or property
values.
The matrix.
To add or remove columns and rows, right-click the matrix header and select the appropriate
action from the context menu. When adding property columns, you should also select which
property the column controls.
To add or delete columns and rows, right-click the matrix and select a command from the context menu.
The context menu contains the following commands:
Source – turn the selected column into a source column, that is a real-time value column.
Property – turn the selected column into a property column.
Insert Source – insert a source column.
Insert Property – insert a property column.
Add Row – add a row.
Delete Column – delete the currently selected column.
Clear Matrix – clear the matrix of all values.
When editing property values, changes are made in the same fashion as when editing actual
element properties.
In situations involving more than one real-time values, you may want to specify a row where only
one expression has a specific value. In those cases, you can leave the value in other columns as
empty.
48
Leave a source value empty in order to ignore it.
In the example above, the valve will be color red whenever there is valve fault, regardless of
whether the valve is open or closed.
Move Reflection
Move links are controlled by a single address, and let you define minimum and maximum values
and placements. To define placement, move the element to the appropriate position and double-
click the appropriate placement label in the link definition.
Move reflection.
49
Red
Yellow
Green
This format uses the Start parameter to define the index corresponding to the first line, and each
line afterwards is considered as contiguous.
Indexes and Values:
[Values]
3=Red
8=Yellow
6=Green
Action Links
Action links, like reflection links, have different kinds:
Write value - perform a value change to a real-time variable.
Move, Rotate – tracks the mouse cursor in order to change a real-time variable.
Open screen - open a screen in the current window or in a new window.
Script - run a script containing multiple commands.
Actions are further controlled by specifying the following parameters:
Trigger - the trigger for the action: left or right mouse button click.
User Level - the minimal user level needed to perform the action: basic, operator, supervisor,
engineer or programmer.
Confirm - whether to confirm the action before performing it. You can specify a text message
to display for confirmation.
Record operation - whether to record the operation in the user operations log.
50
Move Action
Move actions are controlled by the following parameters:
Target - the target address for the written value. To use the same address as in the reflection,
check the box underneath.
Type – the type of move operation: Shape – move a shape across the string in conjunction
with a move reflection. Bar up, left, right, down – use these to move a line inside the rectangle
occupied by the element. This can be useful for displaying and controlling bar graphs.
Update While Dragging – check this box to continuously write the value to the target while
dragging. When this box is not checked, the target is written to only when the user releases
the mouse button.
Rotate Action
Rotate actions are controlled by the following parameters:
Target - the target address for the written value. To use the same address as in the reflection,
check the box underneath.
Update While Dragging – check this box to continuously write the value to the target while
dragging. When this box is not checked, the target is written to only when the user releases
the mouse button.
Note: rotate actions can be used only in conjunction with a value reflection controlling the Angle
property.
51
Script Action
Scripts can contain multiple commands, and are executed in order, one line at a time. The scripts
commands are:
Write constant value: write target=<address> value=<value>, for example write
target=1;1;40001 value=1.
Toggle bit: toggle target=<address>, for example toggle target=99;1;F1.1.
Show alarm summary: show alarmSummary.
Show alarm log: show alarmLog.
Show chart: show chart=<chart>, for example show chart=pump1, or show
chart=”pump1”.
Show table: show table=<table name>, for example show table=reports.report1.
Show monitor: show monitor.
Show login box: show login.
Open screen: open name=<filename> [x=<x> y=<y> w=<w> h=<h>] [newViewer]
[subWindow] [modal] [area=<area name>] [title=<title>] [resize=<resizable>]
[sysMenu=true|false] [statusBar=true|false] [noTitle=true|false]
[autoPos=left|right|above|below] [<element>.<prop>=<value>]
[<ref>=<address>].
Close the current window: close.
Set element property: setprop <element>.<property>[=<value>] | [toggle].
(to access screen properties use #.<property>).
Screen designer preferences let you fine-tune the designer environment. To open the designer
preferences select Edit > Editor Preferences.
Editor preferences.
The display settings control the display of graphics. Unchecking any of the three boxes is not
recommended and will seriously degrade the visual quality of screens. You should make changes
only when faster display is needed.
The selection settings control how selection is made:
52
Allow area selection - check this box to be able to select a shape by clicking inside it.
Select unfilled shapes - check this box to be able to select inside unfilled shapes.
Contain selection rectangle - check this box to select only elements that are fully contained in
the selection rectangle.
You can also specify the size of handles and the selection boundary, in pixel units.
The grid settings control the size of the grid and the grid snapping:
Show grid - check this box to show the grid.
Snap to grid - check this box to enable coordinate snapping.
Grid size - the grid size.
Snap size - the snap size.
The undo limit specifies the maximum number of edit operations stored in the edit history.
53
Alarms
Alarms are events that can be set to be triggered upon a certain condition which requires the
attention of the operator. Alarms are organized by groups, and alarm conditions are constantly
evaluated against static or dynamic set-points. Alarm groups can be assigned colors to provide
further visual cues on the nature of alarms. Each alarm point can be individually configured to
perform different actions, such as popping-up the alarm summary window, toggling a flag in the
PLC, playing an audio file, or sending out an SMS message.
When a new alarm occurs, the current alarms window pops up. If the alarm window is in the way,
the pop up feature can be disabled by a single click. You can sort the list of current alarms by start
time, alarm name, alarm group, status, or description. In addition, you can use the relax feature to
get rid of alarms which are of no interest at the moment. Clicking the Refresh button will restore
all active alarms to the list. Acknowledging alarms can be done for all active alarms or for
individual alarms.
Alarms can also be logged to the alarm log, a database table automatically maintained by Vuniq.
The alarm log maintains information such as alarm start and end times, the process value,
acknowledge time and the duration of the alarm in seconds. The alarm log table uses alarm colors
for displays and lets you export the data to .csv files, filter the data by date or quickly search for a
specific alarm or value.
Each alarm is described using a condition. The alarm condition is composed of two expressions
which are compared. If the result of the comparison is true, then the alarm is active. Otherwise, it
is inactive. The alarm condition is evaluated continuously by Vuniq, monitoring for any changes.
Once the alarm becomes active, Vuniq performs all actions defined for the alarm, such as popping
up the alarm summary window, toggling a flag in the PLC, playing a sound file or sending out an
SMS messages. When an alarm changes back to inactive, Vuniq again performs all applicable
actions for the alarm.
In addition to displaying alarms in the alarm summary window and in the alarm log, you can also
show the most recent alarm information in screens by using alarm automation, as discussed below.
54
Further defining alarms: A name is given to each alarm condition, and other options may be
set, such as whether to log the alarm, whether it demands acknowledgment, whether to print
an alarm record, etc.
Note: group definition is optional. Alarms can also be defined without using groups.
The alarm summary window provides a summary of all currently active alarms. A current alarm is
an alarm which condition evaluates to true. Alarms which must be acknowledged will be displayed
as current even after their condition no longer evaluates to true, if they are not acknowledged. To
open the alarm summary window, select View > Alarm Summary in the project window, or
select Alarm Summary from the tray icon menu. The alarm summary window will also pop up
when a new alarm occurs.
55
Right-clicking an alarm presents a context menu.
Alarms can also be relaxed, that is remove them from the alarm summary window. To relax all
alarms, click the Relax button. To relax specific alarms, select one or more alarms, right-click the
selection and select Relax from the context menu. To display all relaxed alarms, click the Refresh
button.
You can also perform the following operations:
Print - print the currently displayed alarms.
Alarm log - show the alarm log table.
Open the screen associated with the alarm by double-clicking the alarm.
To prevent the alarm summary window from popping-up whenever an alarm occurs, click the
Popup button. The slider to the right of the Popup button controls the text size of the latest alarm
bar.
Alarm Comments
Alarm comments can be used to display additional alarm information, or for documenting
operator actions for the alarm. Alarm comments can be viewed and edited by right-clicking the
alarm and selecting Comments from the context menu.
56
The Alarm Log
The alarm log stores historical alarms, that is alarms that have ended. Like other logging tables,
the alarm log is automatically archived, and can be displayed, sorted, filtered and searched. To
open the alarm log, double-click the alarm log item in the Tables group, or click the Alarm log
button in the alarm summary window.
Defining Alarms
Alarm Groups
To define alarm groups, select Settings > Alarm Groups in the project window.
57
The alarm groups table.
The alarm groups table contains the following fields:
Group – the group name.
Description – the group description.
Color – the color associated with the group. To change the color, double-click the color value.
Alarm Conditions
To define alarm conditions, select Settings > Alarm Conditions in the project window.
58
Sound – whether a sound file should be played.
Sound File – the name and location of the sound file to be played.
Call – whether an SMS message should be sent when the alarm starts or stops.
Call Name – the SMS recipient’s name.
Comments File – an optional text file associated with the alarm which can be displayed for
the operator, containing comments about the alarm and how to handle it.
Alarms can be configured to send out SMS messages to cellular phones, keeping operators and
supervisors informed about important alarms even when not in front of the PC.
In order to deliver alarm messages to cellular phones, Vuniq uses a utility included in the
installation. In order to use SMS messaging, you need to:
Prepare an available serial port on the computer.
Connect a cellular modem, either a Siemens M20 or TC35, to the serial port.
Setup the SMS dialer in Vuniq.
Define SMS recipients in the SMS Recipients table.
59
The SMS Recipients table.
The table defines recipients and their phone numbers. If you need to send SMS messages to more
than one phone number, you can define multiple records with the same recipient name but with
different phone numbers.
60
Reports
In addition to real-time access to variables which Vuniq offers, it also includes a comprehensive
suite of tools for storing and viewing historical values in database tables.
Reports are database tables that contain historical process data that were collected over a period of
time. Each report defined in the system is associated with scheduling settings which determine in
what conditions a record is added to the report table. Each row in a report table contains a time
stamp and a list of values corresponding to different variables, arranged in columns. Tables can be
sorted, filtered and searched, and the customizable data archiver automatically moves old records
to separate archives, thus preventing the hard disk from becoming fragmented or full.
61
Defining Report Tables
To define reports, open the Reports window by selecting Settings > Reports in the project
window.
62
A report table with data.
Tables are discussed in detail in the chapter “Working with Tables” on page 69.
63
Replaying Reports in Screens
In addition to displaying report data in tables, you can also display it in screens. Using the replay
feature, you can view real-time data and historical data using the same user interface, and include
on-screen controls for browsing report records, or switching between real-time and historical data.
64
Tips & Tricks
65
Recipes
A recipe is a container for value-sets associated with specific run-time variables. Each such value-
set can be downloaded to its associated variables in a single action, letting the operator initiate a
specific mode of operation. In a process that produces different kinds of products, a recipe can be
used to quickly switch between product types. Different value-sets for the same process are stored
in a recipe table, where each value-set occupies a single row and is identified by a unique key.
Vuniq includes tools to define recipes, manually enter values and upload complete value-sets from
the PLC into the recipe table. Recipe downloading and uploading can be automated by specifying
flag events. You can also visualize and control recipes in screens, in a similar fashion to report
replay, discussed in the previous chapter.
Each column in a recipe table is associated with a run-time variable. Each row contains a value-set
which is identified by a key. Before downloading a recipe value-set, the user must select the value
set by specifying a key. Vuniq uses this key to find the value-set in the recipe table. It then writes
the value in each column to the appropriate variable. When performing an upload operation, run-
time values are read instead of written, and then stored in the appropriate row in the recipe table.
When Vuniq downloads recipe values, it also requests the recipe values from the PLC after having
written them, in order to verify that the recipe has been downloaded successfully.
Note: After downloading or uploading a recipe automatically (after a flag has been raised), Vuniq
will automatically reset the flag. This should be taken into account when configuring recipe
automation.
66
Defining Recipes
To define recipes, open the Recipes window by selecting Settings > Recipes in the project
window.
67
Using the Recipe Loader
The recipe loader window can be used to manually download, upload and edit recipe value-sets. To
open the recipe loader select View > Recipe Loader in the project window.
As in reports, recipe values can also be displayed in screens. For information about displaying
recipes in screens refer to the section Replaying Reports in Screens in the previous chapter.
Recipes are displayed in the same fashion, except that the control panel for recipes is a bit
different:
68
Working with Tables
Tables in Vuniq are used for both definitions and historical data. Vuniq offers a complete set of
tools for viewing and editing tables with ease.
Opening Tables
All tables are listed in the project window separated into categories. While the table group displays
all tables, it also contains sub-groups for each type of table: definitions, history, reports, recipes
and trends. Vuniq includes tables of two kinds:
Definition tables – tables such as alarm conditions, aliases etc.
History and value tables – tables used to log historical values or recipe values.
To open a table, select the group and double-click the appropriate table item.
A table window.
The table columns can be resized by dragging the column separators. You can also adjust the
columns sizes by right-clicking the column header and selecting Adjust Column or Adjust All
Columns from the context menu.
To automatically adjust column widths, right-click a column and select the appropriate option from the
context menu.
Operations on Tables
The table window contains a number of buttons for performing global operations on the entire
table:
Refresh – refresh the displayed records. This is useful when working with a log table.
Clear – delete all records in the table.
69
Export – export all displayed records to a .csv (comma separated values) file. A comma-
separated values file can be opened using Excel and other applications.
Import – import records from a .csv file.
Sorting Records
To sort the table by a specific column, click its header. The column header will be displayed with a
blue background and a triangle signifying the sort order. To invert the sort order (descending
instead of ascending), click the column header again.
Filtering by Time
Tables containing historical records can be filtered by time. The combo box at the bottom-left of
the table window displays the current time filter, one of the following options: all records, today,
last hour, last 24 hours, yesterday, last week, last month, last year. The next combo lets you choose
between the current records and archive records.
Editing Records
Tables containing definitions and recipes let you also edit, add and delete records.
To add a record, click the plus button. To delete records, select the records and click the minus
button.
To change a value, click the cell and enter the new value.
To import and export data, use the Import and Export buttons, respectively.
70
Finding Records
To find specific records, you can use the search box. Enter a search term in the search box, and
only records containing the search term will be displayed. By default, Vuniq search all fields for the
term, but you can search a specific field by right-clicking the magnifying glass and selecting a field
name from the context menu. To replace all occurrences of the search term, click the Replace
button and enter the replacement term.
To limit the search to a specific column, right-click the magnifying glass and select a column from the menu.
To display records from the archive instead from the current record-set, click the Current drop-
down box and select Archive
71
Trends and Charts
Trends monitor a single real-time value and sample it regularly into a table. Each row in a trend
table contains a time stamp and the value sampled at that moment in time. Trends can also be
visualized as charts, where values for up to 8 trends are plotted against time.
Charts are used to visualize trends in a graphic form. Up to 8 trends can be plotted at once against
time. Other elements such as a grid, scales and a legend can be added to the chart. Charts can be
viewed in a special-purpose window or integrated into screens. Charts can display as little as a
single minute of values or as much as a year of values, letting you zoom-in and out, move backward
and forward in time, and can scroll automatically to continuously display real-time values.
For each trend variable a separate table is generated, containing one column for the date and time,
and one column for the sampled value. Trend values are sampled according to the frequency
defined for the trend.
72
Once the table is closed, changes to trend variables are applied. You can quickly create a chart by
selecting up to 8 rows and clicking the Chart button. Creating and updating trend tables is handled
automatically by Vuniq. You can open a trend table by double-clicking the appropriate item in the
Trends group in the project window.
Defining Charts
73
Displaying Charts
All charts are listed in the project window under the Charts group. To open a chart, select the
Charts group and double-click the appropriate chart item.
A chart window.
The chart displays graph box, a time scale and a legend.
The toolbar at the top of the window contains the following controls:
Chart selector – use the drop-down box to select and view another chart.
Options button – when clicked, this button displays a menu with viewing options.
Print button – use this button to make a printout of the chart.
Time slider – use this slider to move forward and backward in time.
Zoom controls – click the plus and minus buttons to zoom in and out, or click the time label
to select a different time scale.
Line width slider – use this slider to change the line width.
The options button, when clicked, expands to present a pop up menu with the following items:
Jump – jump to a different date and time.
Show Grid – show or hide the grid.
Show Legend – show or hide the legend.
Moving in Time
To move in time, drag inside the graph box to the left and to the right, or use the time slider. The
chart lets you scroll between the earliest recorded points and up to the current time. Zooming in
and out can be performed by Shift-dragging inside the graph box, or by using the zoom controls.
If current values are displayed, the graph box will automatically scroll in order to show current
values.
Note: Charts can automatically display archive values as well as the current values.
74
The Legend
The legend displays a summary of the data displayed. It includes the chart title and a list of all
displayed trends, together with their descriptions and units. When the current time is displayed,
the current values are displayed as well. To measure values at specific points in time, Shift-click
and drag inside the graph box.
To measure values at a specific point in time, shift-click and drag. The legend displays the values at the
specified point in time.
To change the width of the legend, you can drag the separator between the graph box and the
legend.
To embed a chart in a screen, select the chart tool (Tools > Chart) and draw the chart in the same
manner as drawing a rectangle. Once the chart is placed on the screen, you can set the following
chart-specific properties:
ChartName
LabelSize
ShowGrid
ShowLegend
75
Time scroll box
Zooming controls
Grid check box
Legend check box
Print button
Advanced options - the disclosure triangle, when clicked, expands the control panel to display
a check box for each pen, used to show or hide it.
76
Customizing Projects
Security
The security model employed by Vuniq is designed for simplicity and expandability. The security
model defines three concepts:
Security Levels – One of five levels used to describe the security level of a user, or of an
action: Basic, Operator, Supervisor, Engineer or Programmer. Each security level implies also
access to all security levels beneath it. For example, access to the Supervisor level also implies
access to the Operator and Basic levels.
Permissions – Permission describe the security level needed to perform actions of a specific
kind, such as writing values to the PLC, or editing tables.
Users – Descriptors for individual users, each user with his own security level.
Actions which are associated with a permission are performed only when the current user’s
security level is high enough. For example, editing screens is possible only when the current
security level is equal to or higher than the security level assigned to the Design permission.
The current security level can be changed by logging in (with a user name and password) or out.
Otherwise the security level matches the default user level, which can be changed in the security
settings dialog box.
Security Settings
To change security settings, select Settings > Security in the the project window.
77
Login on startup – present the login box when the project is started.
Login whenever needed – present the login box whenever the permission level required is
higher than the default.
Default user level – the default user level.
Automatically log out – automatically log out after a certain period of inactivity.
The Users table displays the defined users and their levels. To add a user click the Add User and
enter the user name. To delete a user, select the user row and press Delete. To change a user’s
password, select the user and click the Password button. To change a user’s level click the
appropriate cell and select a level from the combo box.
The Permissions table displays the defined permissions and their levels. To change the level for a
permission, click the appropriate cell and select a level from the combo box.
Project Settings
To change project settings, select Settings > Project Settings in the project window.
General Settings
The General sections contains the following settings:
Project name
Designer Mode
Shut Down after…
Show system groups
On startup restore layout
Tables Settings
The tables section is used to specify the location of logging tables. Logging tables can be stored:
In the project folder – this is the default and recommended option. Logging tables are stored
in a sub-folder named ‘logs’ inside the project folder: <project folder>\logs.
Local machine – logging tables are stored locally for the machine, regardless of where the
project folder resides. This can be useful when the project sits on a server, or is stored on a
Vuniq To Go flash disk. The logging tables are stored under c:\Documents and
Settings\All Users\Application Data\Vuniq\<project name>\logs.
Other – lets you specify a custom location for the logging tables.
78
Screen Settings
The Screen contains the following settings:
Main screen
Left toolbar
Top toolbar
Right toolbar
Bottom toolbar
Prevent close window in operator mode
Project Maintenance
79
Using Project Packages
Vuniq lets you package your projects for easy portability. A project package is a single file, which
contains all files contained in the project folder. You can also specify whether to include logging
tables in the package. When creating packages, Vuniq also compresses the project data, in order to
minimize file size. Once you have a project package created, you can use this file to move your
project easily to other computers where Vuniq is installed. To create a project package, select
Project > Create Package in the project window, and select the desired file name and location.
System Events
The system events table displays information about global events. Problems accessing devices,
network servers etc. will be displayed in this table, along with information on Vuniq startup and
the Vuniq license.
User Actions
80
Operator – the name of the logged-in operator.
Old Value – the target's old value.
New Value – the target's new value.
81
Appendix A – Driver Guide
Setup
The RSLinx software must be installed and configured correctly.
Valid Addresses
N<file>:<word> Registers in integer (16-bit) format.
N<file>:1..N<file>.1024
F<file>:<word> Registers in floating point (32-bit) format.
F<file>:1..F<file>.1024
B3:<word>/<bit> Bits - <bit> number is specified in octal representation.
B3:0/0..B3:511/17
I:<word>/<bit> Inputs - <bit> number is specified in octal representation.
I:0/0..I:511/17
O:<word>/<bit> Outputs - <bit> number is specified in octal representation.
O:0/0..O:511/17
Remarks
In the vuapp.ini file, you must enter the following to configure addresses:
[RSLinx Driver]
Fileref<ref number>=<file number>
where <ref number> is an arbitrary number, and <file number> is the file number to access in
the PLC memory.
For example,
Fileref1=7
Fileref2=30
Will give access to N7 and N30.
82
GE 90-30 Serial Driver
Setup
Serial port setup.
Valid Addresses
R1..R8192 Registers in integer (16-bit) format
D1..D8192 Registers in long integer (32-bit) format
M1..M4096 Marker coils
Q1..Q4096 Discrete outputs
I1..I4096 Discrete inputs
G1..G4096 Global coils
Setup
Under the port heading in vuapp.ini ([Port 1] for port number 1, etc.), enter the following
entries:
tcp_default_port=18245
tcp_station1_ip=<IP address>
tcp_station1_ip=<IP address>
...
Usually the port number should stay 18245. Enter the IP addresses of all the PLC's you wish to
access.
Valid Addresses
R1..R8192 Registers in integer (16-bit) format
D1..D8192 Registers in long integer (32-bit) format
M1..M4096 Marker coils
Q1..Q4096 Discrete outputs
I1..I4096 Discrete inputs
G1..G4096 Global coils
83
Izumi Network Serial Driver
Setup
Serial port setup.
Valid Addresses
TP1..TP79 Timer preset values
TC1..TC79 Timer current values
CP1..CP79 Counter preset values
CC1..CC79 Counter current values
R1..R899 Registers
R1501..R1800
Remarks
This driver should be used for multiple PLC's on the same drop line.
Setup
Serial port setup.
Valid Addresses
TP1..TP79 Timer preset values
TC1..TC79 Timer current values
CP1..CP79 Counter preset values
CC1..CC79 Counter current values
R1..R899 Registers
R1501..R1800
Remarks
This driver should be used to connect to a single PLC
Setup
Serial port setup.
Valid Addresses
D1..D4096 Data registers
C1..C4096 Counter registers
T1..T4096 Timer registers
R1..R16384 Relays
84
Koyo 405 Serial Driver
Setup
Serial port setup.
Valid Addresses
V1..V8191 Registers in BCD format (16-bit)
L1..L8191 Registers in long integer format (32-bit)
N1..N8191 Registers in decimal format (16-bit)
R1..R8191 Registers in floating point format (32-bit)
X0..X4095 Discrete inputs
Y0..Y4095 Discrete outputs
C0..C4095 Discrete coils
Remarks
This driver uses the TI protocol, which is compatible also with TI405 series PLC's.
Setup
The Koyo HEI library must be installed.
Valid Addresses
V1..V8191 Registers in BCD format (16-bit)
L1..L8191 Registers in long integer format (32-bit)
N1..N8191 Registers in decimal format (16-bit)
R1..R8191 Registers in floating point format (32-bit)
X0..X4095 Discrete inputs
Y0..Y4095 Discrete outputs
C0..C4095 Discrete coils
Setup
Serial port setup.
85
Valid Addresses
V1..V8191 Registers in BCD format (16-bit)
L1..L8191 Registers in long integer format (32-bit)
N1..N8191 Registers in decimal format (16-bit)
R1..R8191 Registers in floating point format (32-bit)
X0..X4095 Discrete inputs
Y0..Y4095 Discrete outputs
C0..C4095 Discrete coils
Remarks
This driver uses the Koyo K-Sequence protocol.
Setup
Serial port setup (usually 9600, odd parity, 8 data bits, 1 stop bit)
Valid Addresses
1..9999 Discrete flags
10000..19999 Discrete inputs
30000..39999 Analog inputs
40000..49999 Registers
F40000..F49999 Registers in floating-point format
N40000..N49999 Registers in long format
Setup
In the vuapp.ini file, add the following:
[Modicon TCP/IP]
default_port=502
station1_ip=<ip address>
station2_ip=<ip address>
...
The default port number should not normally be changed. For each station enter its IP address.
Valid Addresses
1..9999 Discrete flags
10000..19999 Discrete inputs
30000..39999 Analog inputs
40000..49999 Registers
F40000..F49999 Registers in floating-point format
N40000..N49999 Registers in long format
86
Omron Serial Driver
Setup
Serial port setup.
Valid Addresses
M1..M4096 Registers in BCD format
P1..P4096 Timer/counter preset values
N1..N4096 Registers in decimal format
I<word>.<bit> I/O relays
I0.0..I511.15
L<word>.<bit> Link relays
L0.0..L511.15
H<word>.<bit> Holding relays
H0.0..H511.15
T<word>.<bit> Timer relays
T0.0..T511.15
Setup
Setup the port as a remote port. This driver is used to access the Data Table of a Vuniq server. Set
the Vuniq port to 99.
Valid Addresses
N1..N16384 Integers
R1..R16384 Floating-point numbers
S1..S16384 Strings
F<word>.<bit> Flags
F1.1..F2048.16
F1..F2048 Flag words
Setup
Serial port setup.
87
Valid Addresses
V1..V41 Fields 1 to 41. For example: V1=Voltage L1, V4=Current L1, etc. (see
Satec manual.)
F1 Reset KWH+, KWH- and KVarH
F2 Reset power and current maximum demand
F3 Same as F1 but for network of instruments
F4 Same as F2 but for network of instruments
Setup
Serial port setup.
Valid Addresses
DW<block>.<index> Data block word where <block> is the block number (1..128) and
<index> is the word index (0..255)
I<byte>.<bit> Discrete input where <byte> is the byte index (0..511) and <bit> is
the bit number (0..7)
Q<byte>.<bit> Discrete output where <byte> is the byte index (0..511) and <bit> is
the bit number (0..7)
F<byte>.<bit> Discrete flag where <byte> is the byte index (0..511) and <bit> is the
bit number (0..7)
Siemens S7 Driver
Setup
The Siemens SIMATIC NET software must be installed and configured. To configure
communication:
Valid Addresses
Before using the driver, and because of the complexity of the S7 memory structure, the required
addresses have to be configured in the vuapp.ini file:
[S7 Driver]
ref<reference number>=<DB number>,<data type>,<length>
where <reference number> is an arbitrary number identifying the line; <DB number> is the data
block number; <data type> is one of the following: DBX for bits, DBB for bytes, DBW for words,
DBI for integers (16-bit), DBD for long integers (32-bit), DBR for floating-point (32-bit); <length>
is the length of the data block in bytes.
For example, specifying ref1=DB10,DBI,32 would allow addressing DB10.DBI0 through
DB10.DBI31.
To configure access to inputs and outputs, use the following format:
ref<reference number>=<data type>,<length>
where <reference number> is an arbitrary number identifying the line; <data type> is one of the
following: I for input bits, IB for input bytes, Q for output bits, QB for output bytes; <length> is
the length of the block in bytes.
88
The driver already presumes access to M memory, using M, MB, MW, and MD data types.
The addressing format:
DB<block>.DBX<byte>. Data block data in bit format, where <byte> is the byte index
<bit> and <bit> is the bit number (0..7).
DB<block>.DBB<byte> Data block data in byte format, where <byte> is the byte index.
DB<block>.DBW<byte> Data block data in word format, where <byte> is the byte index.
DB<block>.DBI<byte> Data block data in integer (16-bit) format, where <byte> is the
byte index.
DB<block>.DBD<byte> Data block data in long integer (32-bit) format, where <byte> is
the byte index.
DB<block>.DBR<byte> Data block data in floating-point (32-bit) format, where <byte>
is the byte index.
M<byte>.<bit> M memory in bit format, where <byte> is the byte index and
<bit> is the bit number (0..7).
MB<byte> M memory in byte format, where <byte> is the byte index.
MW<byte> M memory in word (16-bit) format, where <byte> is the byte
index.
MD<byte> M memory in double word (32-bit) format, where <byte> is the
byte index.
I<byte>.<bit> Inputs in bit format, where <byte> is the byte index and <bit> is
the bit number (0..7).
IB<byte> Inputs in byte format, where <byte> is the byte index.
Q<byte>.<bit> Outputs in bit format, where <byte> is the byte index and <bit>
is the bit number (0..7).
QB<byte> Outputs in byte format, where <byte> is the byte index.
Setup
Use this driver for a remote port on a computer that doesn't have SIMATIC NET installed. You can
then use this driver to connect to a Vuniq server using the regular S7 driver.
Valid Addresses
This driver uses the same addressing conventions as the regular Siemens S7 driver.
Setup
Serial port setup.
Valid Addresses
V1..V4096 Registers
D1..D4096 Registers
X1..X4096 Discrete inputs
89
Y1..Y4096 Discrete outputs
C1..C4096 Relays
Setup
Serial port setup.
Valid Addresses
V1..V8192 Registers in word (16-bit) format
N1..N8192 Registers in integer (16-bit) format
R1..R8192 Registers in floating-point (32-bit) format
X1..X4096 Discrete inputs
Y1..Y4096 Discrete outputs
C1..C8192 Relays
Setup
Under the port heading ([Port 1] for port number 1, etc.), enter the following entries:
tcp_default_port=1505
tcp_station1_ip=<IP address>
tcp_station1_ip=<IP address>
...
Usually the port number should stay 1505. Enter the IP addresses of all the PLC's you wish to
access.
The TCP/IP Adapter in the PLC rack should also be configured to communicate. For more
information consult the adapter manual.
Valid Addresses
V1..V8192 Registers in word (16-bit) format
N1..N8192 Registers in integer (16-bit) format
R1..R8192 Registers in floating-point (32-bit) format
X1..X4096 Discrete inputs
Y1..Y4096 Discrete outputs
C1..C8192 Relays
Setup
Serial port setup.
90
Valid Addresses
V1..V8192 Registers in word (16-bit) format
N1..N8192 Registers in integer (16-bit) format
R1..R8192 Registers in floating-point (32-bit) format
X1..X4096 Discrete inputs
Y1..Y4096 Discrete outputs
C1..C8192 Relays
Remarks
Use this driver for TI545 and newer models. This driver is almost twice as fast as the TI 500 driver.
Setup
Serial port setup.
Valid Addresses
MW1..MW8191 Memory words (16-bit signed)
ML0..MW8192 Memory long words (32-bit signed)
E<byte>.<bit> Discrete Inputs
E0.0 .. E511.7
A<byte>.<bit> Discrete output
A0.0 .. A511.7
M0..M4095 Memory bits
Setup
Serial port setup.
Valid Addresses
MI1..MI8191 Memory integers (16-bit signed)
ML0..ML8191 Memory long integers (32-bit signed)
MDW0..MDW4095 Memory long words (32-bit unsigned)
SI0..SI4095 System integers (16-bit signed)
SL0..SL4095 System long integers (32-bit signed)
SDW0..SDW4095 System long words (32-bit unsigned)
I0..I4095 Discrete inputs
O0..O4095 Discrete outputs
MB0..MB4095 Memory bits
SB0..SB4095 System bits
T0..T4095 Timer coils
91
C0..C4095 Counter coils
92
Appendix B – Operators and Functions
Operators and functions provide a way to evaluate complex expressions. Vuniq supports nested
expressions using parentheses and correct order of evaluation in arithmetic and boolean
expressions. You can use expressions to scale values, evaluate complex conditions and manipulate
strings, as well as perform a wide range of mathematical operations on real-time data.
The syntax for functions is simple: <function name>(<value list>), where the value list is
made of one or more values separated by commas. For example, add(1;1;40001,5) takes the
value of 1;1;40001, adds 5 to it and returns the result. Values in functions can be address
references, aliases, constants and even other expressions.
Operators are likewise simple: <value 1><operator><value 2>. For example 1;1;40001+5
performs the same thing as the example above. Again, you can use address references, aliases,
constants or other expressions as values.
Operators
Operators are special functions which operate on two values. The syntax for operators is different
from functions in that operators are placed between the two values, and not in front of them.
Operators are divided into two kinds: comparison operator and manipulation operators. Each
operator also has a regular function name.
= compEqual Returns true if the two values are equal, or false otherwise.
<> compDiff Returns true if the two values are different, or false otherwise.
> compGreater Returns true if the left value is greater than the right, or false
otherwise.
< compLess Returns true if the left value is less than the right, or false
otherwise.
>= compGreaterEqual Returns true if the left value is greater than or equal to the
right, or false otherwise.
<= compLessEqual Returns true if the left value is less than or equal to the right, or
false otherwise.
- sub Subtracts the right value from the left and returns the result.
/ div Divides the left value by the right and returns the result.
93
Operator Function Description
% mod Divides the left value by the right and returns the remainder.
^ bit Returns the value of the bit referenced by the right value in the
left value. For example, 1;1;40001^5 returns the value of the
fifth bit in 1;1;40001.
! not Returns the logical inverse of the right value. For example,
!99;1;F1.1 returns the inverse of the flag state of 99;1;F1.1.
Mathematical Functions
Function Description
94
String Functions
Function Description
compareStr(<string1>, Compares the two strings with case sensitivity. If the first
<string2>) string is greater than the second, returns 1. If it is less than
the second, returns -1. Otherwise, returns 0 to indicate the
strings are the same.
compareText(<string1>, Compares the two strings without case sensitivity. If the first
<string2>) string is greater than the second, returns 1. If it is less than
the second, returns -1. Otherwise, returns 0 to indicate the
strings are the same.
format(<format>, <value Formats one or more values using the format specified in
list>) <format>. For more information on format specifiers see
below.
Format Specifiers
Format specifiers are used to format values into specific representations. They are used either in
the format parameter of reflection links, or in the format function. Format specifiers have the
following form: %<width>.<precision><type>, where <width> and <precision> are optional,
and <type> is one of the following:
d – decimal integer value. If <precision> is specified, it indicates that the resulting string
must contain at least the specified number of digits; if the value has less digits, the resulting
string is left-padded with zeros.
u - unsigned decimal. Similar to d but no sign is output.
e - Scientific. The value is converted to a string of the form "-d.ddd...E+ddd". The resulting
string starts with a minus sign if the number is negative. One digit always precedes the
decimal point. The total number of digits in the resulting string (including the one before the
decimal point) is given by the <precision> specifier in the format string—a default precision
of 15 is assumed if no <precision> specifier is present. The "E" exponent character in the
resulting string is always followed by a plus or minus sign and at least three digits.
95
f - fixed. The value is converted to a string of the form "-ddd.ddd...". The resulting string
starts with a minus sign if the number is negative. The number of digits after the decimal
point is given by the <precision> specifier in the format string—a default of 2 decimal digits
is assumed if no precision specifier is present.
g - general. The value is converted to the shortest possible decimal string using fixed or
scientific format. The number of significant digits in the resulting string is given by the
<precision> specifier in the format string— a default precision of 15 is assumed if no
precision specifier is present. Trailing zeros are removed from the resulting string, and a
decimal point appears only if necessary. The resulting string uses fixed point format if the
number of digits to the left of the decimal point in the value is less than or equal to the
specified <precision>, and if the value is greater than or equal to 0.00001. Otherwise the
resulting string uses scientific format.
n - number. The value is converted to a string of the form "-d,ddd,ddd.ddd...". The "n" format
corresponds to the "f" format, except that the resulting string contains thousand separators.
s - string. The string or character is inserted in place of the format specifier. The
<precision> specifier, if present in the format string, specifies the maximum length of the
resulting string. If the argument is a string that is longer than this maximum, the string is
truncated.
x - Hexadecimal. The value is converted to a string of hexadecimal digits. If the format string
contains a <precision> specifier, it indicates that the resulting string must contain at least
the specified number of digits; if the value has fewer digits, the resulting string is left-padded
with zeros.
A <width> specifier sets the minimum field width for a conversion. If the resulting string is shorter
than the minimum field width, it is padded with blanks to increase the field width. The default is to
right-justify the result by adding blanks in front of the value, but if the format specifier contains a
left-justification indicator (a "-" character preceding the width specifier), the result is left-justified
by adding blanks after the value.
96