You are on page 1of 345

Infilink-HMI Software for Windows

Users Guide

Kessler-Ellis Products
Phone 800-631-2165 or 732-935-1320 extension 332
Website www.kep.com
Licensing website http://infilock.kep.com
Email plc@kep.com

2004 KEP
99755REV22SEP04
All Rights Reserved

Infilink License and Warranty


The software accompanying this license agreement (the Software) is the property of KEP, Inc. and is protected by
copyright law. Your rights and obligations in its use are described as follows:
1. You may use and display the Software on a single computer.
2. You may make one copy of the Software for archival purposes.
3. You may copy the Software onto your hard disk and hold the original for archival purposes.
4. You may not make copies of materials that accompany the software, including instruction manuals,
promotion materials, and labels.
5. You may not modify or attempt to reverse engineer the software, or make any attempt to change or
even examine the source code of the software.
6. The Software can be unlocked on only a single computer at one time.
7. You may not give or distribute copies of the Software or written materials associated with the Software
to others.
8. You may not sub-license, sell, or lease the Software to any person or business.

Return Policy
The original licensee of the Software can return it within thirty (30) days of purchase. Please call us for a Return
Goods Authorization Number.
Warranty
KEP does not guarantee that the Software will satisfy your application needs, nor that the Software will be error
free. Though the software is tested thoroughly there may be minor defects that may have been missed. As in all
software, not every useable application can be performed due to the complexity of the software itself.
Disclaimer of Damages
Even if the Software does not satisfy the customers needs, or is viewed as failing to perform, in no event will KEP
be liable to you for any direct or indirect damages, including lost profits or lost data. KEPs liability shall never
exceed the purchase price for the Software.
Trademarks

Microsoft and Microsoft Excel are registered trademarks, Windows is a trademark of Microsoft Corporation.
Users Guide
Revision 4.04
(c) 2004 Kessler-Ellis Products, Inc
10 Industrial Way East
Eatontown, NJ 07724
1-800-631-2165 (Voice)
(732) 935-9344 (FAX)
http://www.kep.com
plc@kep.com
Copyright 2004, KEP, Inc., All rights reserved.

Table of Contents
INFILINK-HMI SOFTWARE FOR W INDOWS ................................................................................................... I
Kessler-Ellis Products..............................................................................................................................i
2004 KEP.............................................................................................................................................i
TABLE OF CONTENTS .................................................................................................................................... I
INTRODUCTION .......................................................................................................................................... 1
W ELCOME .................................................................................................................................................. 1
SYSTEM REQUIREMENTS ............................................................................................................................. 1
SETTING UP ................................................................................................................................................ 2
DIRECTORIES INSTALLED BY THE SETUP PROGRAM ...................................................................................... 2
ICONS INSTALLED BY THE SETUP PROGRAM ................................................................................................. 3
SETTING UP A SERVER ................................................................................................................................ 3
INSTALLING DAO......................................................................................................................................... 4
REGISTERING YOUR SOFTWARE .................................................................................................................. 5
MOVING A LICENSE ..................................................................................................................................... 6
UPGRADING A LICENSE ................................................................................................................................ 7
INFILINK 4.06.01 NEW FEATURES ............................................................................................................ 9
New Features Table of Contents........................................................................................................... 9
UPGRADE COST ........................................................................................................................................ 10
EDIT USERS IN RUN MODE ........................................................................................................................ 11
IMPORTING W INDOWS FROM ANOTHER PROJECT ....................................................................................... 11
RETENTIVE TAGS ...................................................................................................................................... 12
ACTIVE UNACKNOWLEDGED ALARMS FLASHING.......................................................................................... 12
TELEPHONY SCRIPTING COMMANDS........................................................................................................... 13
TEXTTOSPEECH: SPEAKOUT SCRIPTING COMMAND .................................................................................. 15
TREND PRINTING ....................................................................................................................................... 16
ANIMATED GIF OBJECT ............................................................................................................................. 17
MAKING BITMAP OBJECTS FULLY / PARTIALLY TRANSPARENT ....................................................................... 18
W INDOW PRINTING ................................................................................................................................... 19
GRADIENT FILLS AND TRANSPARENCY ....................................................................................................... 20
SENDKEYS SCRIPTING COMMAND .............................................................................................................. 22
LANGUAGE SWITCHING .............................................................................................................................. 25
BACKGROUND IMAGE TO HMI WINDOW ....................................................................................................... 27
SYSTEM TAGS: _FORMATTEDDATE, _FORMATTEDTIME .............................................................................. 28
SCRIPT COMMANDS: _THISW IN.<TREND OBJECT NAME>.PENTAG .............................................................. 28
SCRIPT COMMANDS: LOG2, LOG10 ............................................................................................................ 28
SCRIPT COMMAND: DATATOFILE ............................................................................................................... 29
TREND VIEW INCREASED: .......................................................................................................................... 29
DDE SHARE NAME CHANGE ...................................................................................................................... 29
ROUND SCRIPTING COMMAND ................................................................................................................... 29
ONSCREEN FRENCH KEYBOARD ................................................................................................................ 30
BUG FIXES ................................................................................................................................................ 30
INFILINK OVERVIEW ................................................................................................................................ 31
DESIGN MODE........................................................................................................................................... 31
SHORT CUT MENUS................................................................................................................................... 32
THE INFILINK DOCKABLE TOOLBARS ........................................................................................................... 34
Window Tools.......................................................................................................................................... 34

DESIGN MODE KEYBOARD MAPPING .......................................................................................................... 36


Function Keys...................................................................................................................................... 36
Alphanumeric Keys.............................................................................................................................. 36
Numeric Keypad .................................................................................................................................. 36
Arrow Keys .......................................................................................................................................... 36
Other Keys........................................................................................................................................... 36
DESIGN MODE MOUSE FUNCTIONS ............................................................................................................ 36
Buttons ................................................................................................................................................ 36
Copyright 2004 KEP, Inc.

Introduction i

Combinations....................................................................................................................................... 37
RUN MODE ............................................................................................................................................... 37
LESSON 1: LEARNING TO USE INFILINK .............................................................................................. 38
OVERVIEW ................................................................................................................................................ 38
LESSON OBJECTIVES................................................................................................................................. 39
CREATING A PROJECT ............................................................................................................................... 40
THE IMPORTANCE OF OBJECT PROPERTIES ................................................................................................ 43
About Object Properties ...................................................................................................................... 43
The Object Name ................................................................................................................................ 43
A CHANCE TO PRACTICE ........................................................................................................................... 44
Draw and Place a Rounded Rectangle. .............................................................................................. 44
Draw and Place a Text Object............................................................................................................. 46
Draw and Place a Triangle .................................................................................................................. 49
Grouping the Objects........................................................................................................................... 51
SAVE THE PROJECT AND EXIT .................................................................................................................... 54
TAG GROUPS AND TAGS ........................................................................................................................ 56
OVERVIEW ................................................................................................................................................ 56
ABOUT TAG GROUPS................................................................................................................................. 56
ADDING/EDITING TAG GROUPS .................................................................................................................. 57
Creating Tag Groups ........................................................................................................................... 57
Creating a Memory Tag Group............................................................................................................ 58
Creating a DDE Tag Group ................................................................................................................. 58
Creating an OPC Tag Group ............................................................................................................... 61
Creating a Virtual Tag Group............................................................................................................... 62
ABOUT TAGS............................................................................................................................................. 63
Predefined System Tags ..................................................................................................................... 63
ADDING/EDITING USER DEFINED TAGS....................................................................................................... 65
Tag Edit Tools ..................................................................................................................................... 65
Creating a Memory Tag....................................................................................................................... 65
Creating a DDE Tag ............................................................................................................................ 67
Creating an OPC Tag .......................................................................................................................... 68
Creating a Virtual Tag.......................................................................................................................... 69
Tag Edit Advanced Tab ....................................................................................................................... 70
Deadband........................................................................................................................................ 70
Value clamps / Scaling .................................................................................................................... 70

Tag Edit Scripts Tab ............................................................................................................................ 71


Scripts Tab ...................................................................................................................................... 71

Tag Edit Discrete, Level and Deviation Alarm Tabs ............................................................................ 71


Alarm Tabs ...................................................................................................................................... 71

EXPORTING THE TAG DATABASE ................................................................................................................ 71


Tag Database Field Definitions ........................................................................................................... 72
IMPORTING THE TAG DATABASE ................................................................................................................. 75
ANIMATIONS: YOUR PROCESS IN ACTION .......................................................................................... 77
OVERVIEW ................................................................................................................................................ 77
ABOUT ANIMATIONS .................................................................................................................................. 77
ANIMATING AN OBJECT .............................................................................................................................. 78
Making an Object Blink ........................................................................................................................ 78
Showing and Hiding Objects ............................................................................................................... 79
Moving Objects Left and Right (Horizontally) or Up and Down (Vertically) ......................................... 80
Stretching Objects Left and Right (Horizontally) or Up and Down (Vertically)..................................... 81
Rotating a Line..................................................................................................................................... 82
Enter Data Into a Tag .......................................................................................................................... 84
Using Sliders to Input Data.................................................................................................................. 85
Changing the Color of an Object ......................................................................................................... 86
Showing the Value of a Tag................................................................................................................. 88
Executing a Script With a Button Click ................................................................................................ 89
LIBRARIES: THE QUICK PATH TO GREAT LOOKING APPS ............................................................... 91
Copyright 2004 KEP, Inc.

Introduction ii

OVERVIEW ................................................................................................................................................ 91
LIBRARY MANAGER TOOLS ......................................................................................................................... 91
Create a New Library........................................................................................................................... 92
Create a New Object Group ................................................................................................................ 92
Open a library ...................................................................................................................................... 92
Save a library....................................................................................................................................... 93
The Library Manager Treebar.............................................................................................................. 93
SAVING OBJECTS TO A LIBRARY ................................................................................................................. 94
Placing an Object or Group from a Library .......................................................................................... 94
Reassigning Tags................................................................................................................................ 95
SCRIPTS: THE FINAL WORD IN FLEXIBILITY ....................................................................................... 97
OVERVIEW ................................................................................................................................................ 97
INTRODUCTION .......................................................................................................................................... 98
PROJECT SCRIPT ...................................................................................................................................... 99
W INDOW SCRIPTS ................................................................................................................................... 100
TAKE ACTION SCRIPTS ............................................................................................................................ 102
TAG DATA CHANGE SCRIPTS ................................................................................................................... 103
ALARM SCRIPTS ...................................................................................................................................... 104
SCRIPT REFERENCE ................................................................................................................................ 106
General.............................................................................................................................................. 106
Comments ......................................................................................................................................... 106
Logical Constants .............................................................................................................................. 106
Conditional Operators........................................................................................................................ 107
Logical Operators .............................................................................................................................. 107
Assignment Operator......................................................................................................................... 108
Virtual Tag assignment ......................................................................................................................... 108

Arithmetic Operators.......................................................................................................................... 109


Flow Control ...................................................................................................................................... 110
Math Functions .................................................................................................................................. 111
String Functions................................................................................................................................. 112
File Functions .................................................................................................................................... 113
Sound Functions................................................................................................................................ 118
Window Functions ............................................................................................................................. 118
System Functions .............................................................................................................................. 119
Miscellaneous Functions ................................................................................................................... 120
Color Constants................................................................................................................................. 121
Object Properties............................................................................................................................... 122
General Object Properties............................................................................................................................. 122
Arc, Pie and Chord Properties ...................................................................................................................... 123
Rounded Rectangle Properties ..................................................................................................................... 123
Alarm Viewer Properties................................................................................................................................ 123
Alarm History Viewer Properties ................................................................................................................... 124
Trend Properties ........................................................................................................................................... 124

LESSON 2: USING INFILINK TO MIMIC A PROCESS........................................................................... 127


OVERVIEW .............................................................................................................................................. 127
LESSON OBJECTIVES............................................................................................................................... 128
CREATING A PROJECT ............................................................................................................................. 129
COPYING LIBRARY OBJECTS .................................................................................................................... 130
Place a Pump from the Library .......................................................................................................... 130
EDIT/ARRANGE THE OBJECTS IN THE W INDOW ......................................................................................... 134
Rotate, Enlarge, and Place the Tank................................................................................................. 134
Copy, Size, and Place a Section of Horizontal Pipe .......................................................................... 135
Resize and Place the Pump .............................................................................................................. 136
Place and Resize the Horizontal Pipe ............................................................................................... 137
Copy, Place and Size a Section of Vertical Pipe ............................................................................... 138
Place and Resize the Control Valve .................................................................................................. 139
Place and Resize the Vertical Pipe.................................................................................................... 140
Add a Fill Meter to the Tank............................................................................................................... 141
DEFINE A TAG TO ASSIGN TO THE FILL LEVEL ANIMATION.......................................................................... 144
ANIMATE THE OBJECT T1_LEVEL ............................................................................................................. 145
Copyright 2004 KEP, Inc.

Introduction iii

CREATE A SCRIPT TO SIMULATE AN INCREASING FILL LEVEL ..................................................................... 147


SAVE THE PROJECT................................................................................................................................. 149
RUN THE PROJECT .................................................................................................................................. 149
EXIT RUN MODE ...................................................................................................................................... 149
LESSON 3: CONTROLLING A PROCESS ............................................................................................. 151
OVERVIEW .............................................................................................................................................. 151
LESSON 3 OBJECTIVES............................................................................................................................ 152
CONTINUING FROM LESSON 2 .................................................................................................................. 152
Opening Lesson 2 ............................................................................................................................. 152
ADDING SOME NEW TAGS ....................................................................................................................... 153
Adding Tags ...................................................................................................................................... 153
ADD AND ANIMATE THE NEW OBJECTS ..................................................................................................... 156
Add a Button to Turn the Pump On and Off ...................................................................................... 156
Add a Text Object to Enter and Display the Pump Fill Rate.............................................................. 161
Build a Slider to Control the Tank Drain Rate.................................................................................... 163
Duplicate the Slider Text Object and Modify It to Display the Tank Level ......................................... 166
Duplicate the Pump Control Button and Modify to use as a Valve Control ....................................... 167
Modify the Existing Project Script ...................................................................................................... 168
SAVE AND RUN THE PROJECT .................................................................................................................. 170
LOGGING: DATA AND ALARMS ........................................................................................................... 173
OVERVIEW .............................................................................................................................................. 173
THE ALARM LOGGER ............................................................................................................................... 174
Basic Settings .................................................................................................................................... 175
Log File Timings ................................................................................................................................ 175
Preferences ....................................................................................................................................... 176
DEFINING ALARMS ................................................................................................................................... 177
ALARM VIEWER PROPERTIES ................................................................................................................... 180
ALARM HISTORY VIEWER PROPERTIES..................................................................................................... 183
SETUP ALARM PRINTER ........................................................................................................................... 185
Send Output To ................................................................................................................................. 185
Sample Format .................................................................................................................................. 185
THE DATA LOGGER ................................................................................................................................. 186
Basic Settings .................................................................................................................................... 187
Log File Timings ................................................................................................................................ 187
Preferences ....................................................................................................................................... 188
LESSON 4: ALARMS AND ALARM LOGGING...................................................................................... 189
OVERVIEW .............................................................................................................................................. 189
LESSON OBJECTIVES............................................................................................................................... 190
CREATING A NEW PROJECT ..................................................................................................................... 191
DRAWING THE ALARM VIEWER ................................................................................................................. 191
CREATING ALARM VIEWER CONTROL BUTTONS ........................................................................................ 192
DRAWING THE ALARM HISTORY VIEWER................................................................................................... 193
CREATING ALARM HISTORY VIEWER CONTROL BUTTONS .......................................................................... 194
ENABLING THE ALARM LOGGER................................................................................................................ 195
DEFINING TAGS WITH ALARMS ................................................................................................................. 196
CREATING ANIMATIONS TO GENERATE ALARMS ........................................................................................ 200
DISPLAYING THE ACTIVE ALARM COUNT ................................................................................................... 201
SAVE AND RUN THE PROJECT .................................................................................................................. 202
EXIT RUN MODE ...................................................................................................................................... 204
LESSON 5: REAL-TIME AND HISTORICAL TRENDS........................................................................... 205
OVERVIEW .............................................................................................................................................. 205
LESSON OBJECTIVES............................................................................................................................... 206
CREATING A NEW PROJECT ..................................................................................................................... 207
DEFINING TAGS ....................................................................................................................................... 207
DRAWING THE TREND AND EDITING TREND PROPERTIES .......................................................................... 208
CREATING TREND CONTROL BUTTONS ..................................................................................................... 210
CREATE AND ANIMATE A HISTORICAL CURSOR ......................................................................................... 211
Copyright 2004 KEP, Inc.

Introduction iv

ANIMATING TREND CONTROL BUTTONS .................................................................................................... 213


Create an On button down Script for the Mode Button...................................................................... 213
Create an On button down Script for the YRangeInc Button............................................................. 214
Create an On button down Script for the YRangeDec Button ........................................................... 214
Create an On button down Script for the Smooth Button .................................................................. 214
Create an On button down Script for the Discrete Button ................................................................. 215
Create an On button down Script for the Scatter Button ................................................................... 215
Create an On button down Script for the SkipInc Button................................................................... 215
Create an On button down Script for the SkipDec Button ................................................................. 215
CREATE A CURRENT VALUE DISPLAY ....................................................................................................... 216
W RITING A PROJECT SCRIPT ................................................................................................................... 217
SAVE AND RUN THE PROJECT .................................................................................................................. 218
EXIT RUN MODE ...................................................................................................................................... 220
ACTIVEX CONTROLS ............................................................................................................................. 221
OVERVIEW .............................................................................................................................................. 221
INSERTING ACTIVEX CONTROLS INTO A PROJECT ..................................................................................... 222
SCHEDULER............................................................................................................................................ 223
OVERVIEW .............................................................................................................................................. 223
INTRODUCTION ........................................................................................................................................ 224
Using the Calendar Tool........................................................................................................................ 224

HOLIDAYS ............................................................................................................................................... 225


ACTION GROUPS ..................................................................................................................................... 226
Creating an Action Group...................................................................................................................... 226

EVENTS .................................................................................................................................................. 230


Creating a Single Event......................................................................................................................... 230
Creating a Double Event ....................................................................................................................... 231
Creating a Weekly Schedule................................................................................................................. 232

PREFERENCES ........................................................................................................................................ 234


USING OPC AND DDE ............................................................................................................................ 235
OVERVIEW .............................................................................................................................................. 235
ABOUT OPC (OLE FOR PROCESS CONTROL) AND DDE (DYNAMIC DATA EXCHANGE)............................... 235
OPC Link Specifications .................................................................................................................... 235
DDE Link Specifications .................................................................................................................... 235
INFILINK AS A DDE CLIENT ...................................................................................................................... 237
Supported DDE Formats ................................................................................................................... 237
Using Infilink as a Local Client.......................................................................................................... 237
Using Infilink as a Remote Client....................................................................................................... 237
INFILINK AS A DDE SERVER ..................................................................................................................... 238
A Note About Discrete Tags .............................................................................................................. 238
Using Infilink as a Local Server ......................................................................................................... 238
MS EXCEL AS A DDE SERVER................................................................................................................. 239
Tag Group setup................................................................................................................................ 239
Tag Addresses .................................................................................................................................. 239
SECURITY................................................................................................................................................ 240
OVERVIEW .............................................................................................................................................. 240
DESIGN MODE SECURITY......................................................................................................................... 240
RUN MODE SECURITY ............................................................................................................................. 242
Logging in to a Project....................................................................................................................... 242
Logging Out as a User....................................................................................................................... 242
Adding/Editing a User List ................................................................................................................. 243
User List Tools................................................................................................................................... 244
Creating a New User ..................................................................................................................... 244

IVIEWER UTILITY .................................................................................................................................... 245


OVERVIEW .............................................................................................................................................. 245
CONNECTING TO A REMOTE PC................................................................................................................ 246
Getting Started .................................................................................................................................. 246
Copyright 2004 KEP, Inc.

Introduction v

Connecting ........................................................................................................................................ 246


Disconnect......................................................................................................................................... 246
iViewer Setup..................................................................................................................................... 248
iViewer Setup Dialog ......................................................................................................................... 248
Adding/Editing a Server ..................................................................................................................... 249
Screen Shots ..................................................................................................................................... 249
iViewer Tag Display ........................................................................................................................... 250
Modifying the Tag list display............................................................................................................. 251
iViewer Status Bar ............................................................................................................................. 251
AUTOMATICALLY RUNNING A PROJECT............................................................................................ 252
OVERVIEW .............................................................................................................................................. 252
W INDOWS 95/98..................................................................................................................................... 253
Making Infilink Auto Start in Win 95/98 .............................................................................................. 253
Making KEPServerEX Auto Start in Win 95/98 ................................................................................. 255
W INDOWS NT ......................................................................................................................................... 257
Making Infilink Auto Start in Win NT .................................................................................................. 257
Making KEPServer Auto Start in Win NT .......................................................................................... 259
APPENDIX A: LIBRARY OBJECTS............................................................................................................ 1
LIBRARY FILE: 2D_ISA_1 ............................................................................................................................ 1
LIBRARY FILE: 2D_ISA_2 ............................................................................................................................ 2
LIBRARY FILE: 2D_ISA_3 ............................................................................................................................ 3
LIBRARY FILE: 3D_ISA_1 ............................................................................................................................ 4
LIBRARY FILE: 3D_ISA_2 ............................................................................................................................ 5
LIBRARY FILE: 3D_ISA_3 ............................................................................................................................ 6
LIBRARY FILE: AIRCOND1 .......................................................................................................................... 7
LIBRARY FILE: AIRCOND2 .......................................................................................................................... 8
LIBRARY FILE: AIRCOND3 .......................................................................................................................... 9
LIBRARY FILE: ALARMHST ....................................................................................................................... 10
LIBRARY FILE: ARROWS .......................................................................................................................... 11
LIBRARY FILE: BITMAPS1......................................................................................................................... 12
LIBRARY FILE: BITMAPS2......................................................................................................................... 13
LIBRARY FILE: BITMAPS3......................................................................................................................... 14
LIBRARY FILE: BUTTONS1 ....................................................................................................................... 15
LIBRARY FILE: BUTTONS2 ....................................................................................................................... 16
LIBRARY FILE: BUTTONS3 ....................................................................................................................... 17
LIBRARY FILE: BUTTONS4 ....................................................................................................................... 18
LIBRARY FILE: BUTTONS5 ....................................................................................................................... 19
LIBRARY FILE: BUTTONS6 ....................................................................................................................... 20
LIBRARY FILE: COMPUTER ...................................................................................................................... 21
LIBRARY FILE: CONTROLR ...................................................................................................................... 22
LIBRARY FILE: DATADISP......................................................................................................................... 23
LIBRARY FILE: DIALS1 .............................................................................................................................. 24
LIBRARY FILE: DIALS2 .............................................................................................................................. 25
LIBRARY FILE: DUCTS .............................................................................................................................. 26
LIBRARY FILE: ELECTRC1........................................................................................................................ 27
LIBRARY FILE: ELECTRC2........................................................................................................................ 28
LIBRARY FILE: FACILITY........................................................................................................................... 29
LIBRARY FILE: FLEXTUBE ........................................................................................................................ 30
LIBRARY FILE: FLOWMTRS ...................................................................................................................... 31
LIBRARY FILE: GENERMFG...................................................................................................................... 32
LIBRARY FILE: HEATING1......................................................................................................................... 33
LIBRARY FILE: HEATING2......................................................................................................................... 34
LIBRARY FILE: INDICATR.......................................................................................................................... 35
LIBRARY FILE: INTLSYMS......................................................................................................................... 36
LIBRARY FILE: MAPSFLAG ....................................................................................................................... 37
LIBRARY FILE: MATHANDL ....................................................................................................................... 38
LIBRARY FILE: METERS1.......................................................................................................................... 39
LIBRARY FILE: METERS2.......................................................................................................................... 40
LIBRARY FILE: METERS3.......................................................................................................................... 41
LIBRARY FILE: METERS4.......................................................................................................................... 42
LIBRARY FILE: MISCSYM1 ........................................................................................................................ 43
LIBRARY FILE: MISCSYM2 ........................................................................................................................ 44
LIBRARY FILE: MISCSYM3 ........................................................................................................................ 45
LIBRARY FILE: MISCSYM4 ........................................................................................................................ 46
Copyright 2004 KEP, Inc.

Introduction vi

LIBRARY FILE: MIXERS............................................................................................................................. 47


LIBRARY FILE: MOTORS ........................................................................................................................... 48
LIBRARY FILE: NATURE............................................................................................................................ 49
LIBRARY FILE: OP_INTFC......................................................................................................................... 50
LIBRARY FILE: PIPES1 .............................................................................................................................. 51
LIBRARY FILE: PIPES2 .............................................................................................................................. 52
LIBRARY FILE: PIPES3 .............................................................................................................................. 53
LIBRARY FILE: POWER............................................................................................................................. 54
LIBRARY FILE: PROCESS ......................................................................................................................... 55
LIBRARY FILE: PUMPS.............................................................................................................................. 56
LIBRARY FILE: SAFETY............................................................................................................................. 57
LIBRARY FILE: SENSORS ......................................................................................................................... 58
LIBRARY FILE: SHAPES1 .......................................................................................................................... 59
LIBRARY FILE: SHAPES2 .......................................................................................................................... 60
LIBRARY FILE: SLIDERS1 ......................................................................................................................... 61
LIBRARY FILE: SLIDERS2 ......................................................................................................................... 62
LIBRARY FILE: SLIDERS3 ......................................................................................................................... 63
LIBRARY FILE: SLIDERS4 ......................................................................................................................... 64
LIBRARY FILE: SYSCMDS ......................................................................................................................... 65
LIBRARY FILE: TANKCUTS ....................................................................................................................... 66
LIBRARY FILE: TANKS1............................................................................................................................. 67
LIBRARY FILE: TANKS2............................................................................................................................. 68
LIBRARY FILE: TIMEDATE......................................................................................................................... 69
LIBRARY FILE: TRENDHST ....................................................................................................................... 70
LIBRARY FILE: VALVES............................................................................................................................. 71
LIBRARY FILE: VEHICLES......................................................................................................................... 72

TECHNICAL SUPPORT ............................................................................................................................ 1


Kessler-Ellis Products............................................................................................................................ 1

Copyright 2004 KEP, Inc.

Introduction vii

Introduction

Welcome
Welcome to Infilink HMI, an easy-to-use tool for any size HMI application. Infilink
HMI provides you with the tools to design and implement a custom interface for
any process. Infilink offers interface solutions for PLCs, transmitters, sensors,
remote I/O, and other process devices.
Infilink HMI runs on Windows 98, NT 4.0, 2000, and XP.
This chapter shows you how to set up Infilink HMI on your computer and
introduces the documentation set.

System Requirements
To run Infilink HMI, you must have certain hardware and software installed on your
computer. The minimum system requirements include the following:
An IBM PC or compatible with a 233MHz Pentium microprocessor.
32MB of RAM.
30MB of free hard disk space.
At least one free serial port with a 16550 UART if you will be communicating
with serial devices.
VGA card and color monitor capable of at least 800x600-pixel resolution using
16 colors.
The recommended system configuration is the following:
An IBM PC or compatible with a 233 MHz Intel Pentium microprocessor.
128MB of RAM
100MB of free hard disk space
Accelerator enabled PCI Super VGA card and color monitor capable of at least
1024 x 768 pixel resolution using 256 colors.
Microsoft Windows XP.

Copyright 2004 KEP, Inc.

Introduction 1

Setting Up
If you have a previous version of Infilink installed on the target computer you should
perform a backup of all project files created using that version in the event that you
decide to return to that version in the future.
The program SETUP.EXE on disk #1 (or CD) performs the installation, installing the
Infilink HMI executable files, license file, help file, and other components. If you are
a Windows NT user you will need to ask your system administrator to perform the
Setup.
1. Place the CD into the drive and the setup program should autorun. If not, then
browse the CD and run it by double-clicking it.
2. Choose the components you wish to install.
3. Click the Browse button to choose a destination directory.
4. Choose a Program Folder/Program Group for the icons that invoke the
executable files and help.
5. Verify your choices. If you want to make a change click on the < Back button.
6. At this point, the file copy process begins. You will be prompted for disks as
needed.
7. Upon completion of the file copy process, you will be given the opportunity to
view the README.TXT file. This file contains release information specific to this
version of Infilink HMI. You can find this file in the Infilink program directory if
you want to read it later.

Directories Installed by the Setup Program


You specify the target directory for installation during the setup process. By default,
this directory is called INFILINK. The Setup program creates additional directories
for the components that have been installed.

Copyright 2004 KEP, Inc.

\LESSONS contains one subdirectory for each lesson supplied with the
software. The lessons are covered later in this manual.

\LIBRARY contains object library files for use with the Design Mode program.

\IVIEWER contains the iViewer Internet utility

\PROJECTS contains the INFILINKDEMO project designed to illustrate Infilink


HMIs functionality.

\UTILITIES contains utilites such as the data conversion utility, printscreen, and
others.

Introduction 2

Icons Installed by the Setup Program


Infilink Design Mode
Design tool for creating and editing an Infilink project.

Infilink Run Mode


Runs a compiled Infilink project.
iViewer Internet Utility
Applet that allows the user to view Infilink data over the Internet

Help Folder
On-line information accessible from Design Mode by pressing the F1 key.

Event Log Viewer


The event log viewer captures and displays status output generated by run mode
components.
Readme
README.TXT includes the following major topics:
1) System Requirements
2) New features for V4.0
3) INFILINK Demo Description

Setting up a Server
Servers are used to get DDE data from applications or externally linked devices
through drivers. Infilink uses a Server to get data from external applications via OPC
or DDE.
If you will be using a third party Server with Infilink, you can install it now or wait until
you have developed your application and are ready to run it on the PC.
KEPwares OPC Server, KEPServerEX, comes with Infilink. You will be able to
unlock one driver for use with Infilink.

Copyright 2004 KEP, Inc.

Introduction 3

Installing DAO
If you will be logging data in MDB format your PC will need DAO support. If you have
Microsoft Access installed on your PC there is no need to install DAO support.
If you do not have Microsoft Access installed on your PC you will need to install the
files needed to support Data Access Objects (DAO). You can select to install DAO
support during Infilink installation by selecting the Full Installation option or selecting
the Custom Installation option and then selecting it as one of the components from
the install list. There are 2 files included in the \DAO folder of the Infilink CD.
1. Run the Mdac_typ.exe utility to install support for OBDC and DAO on your PC.
2. Additionally, run Dcom98.exe if your PC is running Windows95 or 98.
You can also download the latest versions of these files from the Universal Data
Access Web site at www.microsoft.com/data/. Select the proper download
versions for your operating system.

Copyright 2004 KEP, Inc.

Introduction 4

Registering Your Software


Unlike other HMI products on the market, Infilink does not require a hardware lock.
Furthermore, the design portion of the package can be run anywhere, anytime, with
an unlimited tag count, for as long as you want, However, the run time portion of the
package must be registered.
While a project is in the Run Mode use the Help menu, Purchase a license... menu
to see this dialog...

Send an E-Mail that includes the KEP Sales Order number and a request to unlock
the software to unlock@kep.com. Instructions will be included in the reply to
receive a Internet Unlock Password. Use it to access the Serial number and unlock
codes over the internet at www.kep.coms unlock page. A serial number unlocks the
Run Mode for 10 days. Once a Serial number is obtained the Help|Unlock menu
item is enabled.
Note: You have up to 10 days from the time you entered the serial number in which
to unlock the software. If the software is not unlocked within that time, it will cease
to operate
Use your Internet Unlock Password to access the unlock webpage again and enter
the Computer ID. A Password that unlocks Infilink will be generated.
Note: The software unlock password is dependent on the number of user tags. 128,
256, 512, 1024 and Unlimited tag unlock passwords are available.
Enter the password in the Password field and click OK.

Once a PC is unlocked no further codes are needed for unlimited and continuous
operation time. The password you receive is only valid for a single PC. If you want to
move the software to another PC you will have to obtain another password for that
PC.
Copyright 2004 KEP, Inc.

Introduction 5

Moving a License
Accept a License.../Move a License...
This menu item is used to move the license from on PC to another. Once the Move
a License procedure is finished, the PC where the license originated will be locked in
Demo Mode and the PC that received the license will be unlocked for unlimited time
use. A blank floppy diskette is needed for this process. Infilink must also be installed
on the PC that will accept the license (target computer).

@ Use a formatted floppy disk. The disk must not have any files on it when starting
step 1.
1. Insert blank floppy disk into target computer. Initiate license activation from
target computer by clicking on Help|Accept a License, select a floppy drive, click
Step 1, this prepares the floppy disk. Remove the floppy disk.

@ Do NOT turn off the target computer or exit Infilink


2. Insert the floppy disk from Step 1 into the licensed computer. Continue by
selecting Help|Move a License menu and selecting the floppy drive. Click Step 2,
this causes the Infilink to exit Run Mode. Remove the floppy disk.
3. Insert the floppy disk into the target computer. Click Step 3, this takes the license
from the floppy disk and puts it into the target computer.
Notes:
DO NOT EXIT TARGET PCs INFILINK OR LICENSE MENU AFTER THIS
PROCESS IS STARTED, OR THE LICENSE WILL BE LOST.
Set the User Access Level required to perform license transfers by going to
Project|Properties, Users tab and making the appropriate entries. If you want to
move the software to another PC, you can use the transfer a license procedure. This
procedure will erase the license from the source PC and install it on the target PC.

Copyright 2004 KEP, Inc.

Introduction 6

Upgrading a License
The Upgrade License feature is provided for users that wish to upgrade a License to
a higher tag count or add Internet access with the iViewer utility.
Send your request via e-mail with the Serial Number and Computer ID to
unlock@kep.com. A new Serial Number and Password that will unlock the Run
Mode for the higher tag count will be e-mailed back to you. Alternately, you can Fax
the information to KEP. Enter the serial number and password in the appropriate
fields and click OK.

@ Use the Copy numbers to clipboard button then paste it into your e-mail request
to insure accurate data.

Copyright 2004 KEP, Inc.

Introduction 7

Infilink 4.06.01 New Features

This document is to provide a description of features new to version 4.06.01; these are all the
features added since version 4.02.02.
Document updated 16-September-2004

New Features Table of Contents


Upgrade Cost
Edit Users in Run Mode
Importing Windows from Another Project
Retentive Tags
Active Unacknowledged Alarms Flashing
Telephony Scripting Commands
TextToSpeech: SpeakOut Scripting Command
Trend Printing
Animated GIF Object
Making bitmap objects fully / partially transparent
Window Printing
Gradient Fills and Transparency
SendKeys Scripting Command
Language Switching
Background image to HMI window
System tags: _FormattedDate, _FormattedTime
Script commands: _ThisWin.<Trend object name>.PenTag
Script commands: Log2, Log10
Script Command: DataToFile
Trend View Increased:
DDE Share Name Change
Round Scripting Command
OnScreen French Keyboard
Bug Fixes

Copyright 2004 KEP, Inc.

10
11
11
12
12
13
15
16
17
18
19
20
22
25
27
28
28
28
29
29
29
29
30
30

Infilink 4.06.01 New Features 9

Upgrade Cost
KEP is not increasing prices for these new features, and it is a free upgrade from Infilink
version 4.00.20 and later to version 4.06.01.
Some of the new features require KEPRUN-0000 (unlimited tag version). Current users, and
new purchasers, of KEPRUN-0000 have these features at no additional cost.
Text-To-Speech
Telephony
Iviewer (5 license)
If you have one of the lower tag versions now, and want to upgrade, the upgrade price is
reasonable. Basically, it is the price difference plus $50. Contact KEP, your manufacturers
representative, or your distributor for details.
The other new features are available in all tag counts of Infilink.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 10

Edit Users in Run Mode


In the "user properties" dialog a check box was added, "Allow runmode editing of user table".
Editing of user table in runmode can be done in two ways:
1. Menu item "Users - Edit users".
2. Script command _Syscmd.EditUsers.
Menu item "Users - Edit users" will be enabled only when there is a logged in user has the
permission to edit user table at runmode.
User table edited at runtime is saved as file ProjectUsers.dat in the project directory. This file
is encrypted.
Runmode uses the table from ProjectUsers.dat and overrides the DesignMode table.
Runmode on exit creates the file ProjectUsers.dat. Runmode edited user table can be
imported into design mode by importing the file ProjectUsers.dat by clicking the button
Import run mode user table on User list tab of Project properties.
ProjectUsers.dat file is project specific. The file generated for one project will not be
accessible to another project. This is done to prevent somebody from copying the file,
creating another project and then getting user names and passwords.
In some cases it is possible that the Infilink design mode work is done in some office and run
mode runs at different location. User table edited in runmode can be Imported by copying
the file ProjectUsers.dat to computer running design mode. The file should be copied in the
project directory. The file can be imported by clicking button Import run mode user table on
User list tab of Project properties. As ProjectUsers.dat is tied to a specific project,
importing it can be done only for that project.

Importing Windows from Another Project


Using design mode menu item Window Import it is now possible to import HMI window
made in another project. All the contents of source window (shapes along with their
animations, trend / alarm objects, Window background picture if defined, animated GIF files if
present, window scripts) are imported. Any tag names present in the imported window if not
found in the project tag table will generate errors while compiling project.
Import window functionality is upward compatible for different Infilink versions.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 11

Retentive Tags
While defining memory tags, check the check box Retentive to make it retentive.
Value of that memory tag at project close will be stored and will be assigned to that memory
tag on next execution of the project, overriding its initial value setting.
Values of retentive tags are stored in file ProjectRetentiveTags.dat in project directory. This
file is encrypted and is tied to a particular project.
While getting the tag values from the file ProjectRetentiveTags.dat Infilink uses Group
name, Tag name and its data type to identify a particular tag.
Changing the data type of Tag1 (from Word to Long for example) causes the retentive value to
be lost.
Error messages are posted to Eventlogger in the following cases:
Retentive tags are defined in a project but ProjectRetentiveTags.dat is not found.
ProjectRetentiveTags.dat is copied into project directory from different project.
ProjectRetentiveTags.dat is corrupt.
Runmode is unable to save file ProjectRetentiveTags.dat on project exit.

Active Unacknowledged Alarms Flashing


There is now a setting in the Alarm Viewer properties. Active Unacknowledged Alarms can be
made to flash between two different colors, and the colors are selectable.
This provides more prominent notification of alarms.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 12

Telephony Scripting Commands


Script command

Description

Ph_MakeCall
Ph_DropCall
Ph_EnableIncoming
Ph_DisableIncoming
Ph_TTSString
Ph_TTSFile

Make outgoing call.


Drop current call
Enable incoming calls
Disable incoming calls
Say a string over phone using text to speech
Say contents of file over phone using text to
speech
Play a wave file over phone
Stop playing of wave file or text to speech
Enable sensing of digits pressed over remote
phone
Disable sensing of digits pressed over remote
phone

Ph_PlayWaveFile
Ph_StopVoiceOut
Ph_EnableDTMF
Ph_DisableDTMF

Syntax of all of above script commands is like: Ph_MakeCall(G1);


Each command expects a string expression / string constant in the parenthesis. This string is
used to identify the memory tag group which is to be associated with that command.
Using a tag group name as a parameter to a command allows the user to work with multiple
phone lines.
Tags used with above telephony commands.

Tag name

Data
type

Usage

LineName
PhoneNumber
CallStatus
CallStatusString
IncomingRings

string
string
long
string
long

VoiceOut

string

VoiceOutStatus

long

Specifying line / phone device name


Specifying phone number to call
Call status code
Call status string
Number rings after which incoming call should
be answered
String to use for Ph_TTSString / Ph_TTSFile or
file name to use for Ph_PlayWaveFile
Code which gives the status of text to speech
output or playing of wave file
Last digit received from remote touch tone
phone
Error code indicating last error.
String informing about ErrorCode
Caller ID received for incoming call
Generic timers, automatically incremented by
Infilink at every second. Setting 1 to these tags
stops incrementing operation.

LastDTMFReceived long
ErrorCode
ErrorString
CallerID
Timer1, Timer2,
Timer3
Copyright 2004 KEP, Inc.

long
string
string
long

Infilink 4.06.01 New Features 13

IncomingEnabled
Call status codes.
Code
1
2
4
8
16
32
64
128
256
512
1024
2048
4096
8192
16384
32768

Discret
e

Whether incoming calls are enabled or not.

Description
Call state Idle
Call state Offering (Incoming call)
Call state Accepted (Incoming call)
Call state Dialtone
Call state Dialing
Call state Ringback
Call state Busy
Call state Special Info
Call state Connected
Call state Proceeding
Call state On Hold
Call state Conferenced
Call state On Hold Pending Conference
Call state On Hold Pending Transfer
Call state Disconnected
Call state Unknown

Voice out status codes.


-1
Voice status undefined
100
Wave file playing in progress
101
Wave file playing completed.
102
Text to speech in progress
103
Text to speech completed
Defaults : For each telephone device Infilink assumes the following defaults: Incoming calls
disabled, DTMF input enabled.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 14

TextToSpeech: SpeakOut Scripting Command


SpeakOut (TextToSpeech, Repetition);
TextToSpeech: This is a string enclosed in quotation marks, or a string tag.
Repetition: This is the number of times that TextToSpeech is repeated. This is a number, or
a numeric tag.
Example:
SpeakOut (MemGrp\SayIt,1);
This takes the text in the tag SayIt, and sends it one time out the PCs speakers.

Script command syntax:


SpeakOut (string expression, nRepeatCount);
SpeakOut (string tag, nRepeatCount);
SpeakOut (string literal, nRepeatCount);
The string is spoken using the installed TTS engine. TTS engine is configured through control
panel for settings like speed, voice type etc.
NRepeatCount has a valid range between 1 and 10 (inclusive). Attempt to program number
outside this range results in clamping it to valid range.
Attempt to issue more SpeakOut commands before finishing the previous one results in
queuing of the SpeakOut commands.
StopSpeaking;
Stop speaking / TTS. This command terminates any speaking going on and also empties all
the queue if built.
SpeakOut and StopSpeaking commands operate independent of telephony commands. It is
possible to have two different text to speech sessions, both over telephone line and over
computer speakers.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 15

Trend Printing
Brief notes about trend printing.
Trend printing is done by using script command "_ThisWin.Trend.TrendPrint".
Default printer is used for printing.
This command prints real time and historical trends, whatever is seen on the screen as
a "Trend Object" is printed on the printer.
Any drawing objects appearing above or below the trend objects are not included in
print.
Works for both "Portrait" and "Landscape" modes.
For historical trends, the inactive period black rectangles shown on the screen are
printed with black cross-hatched brush. This improves appearance and reduces ink or
toner usage.
While printing the trend object, proper scaling is automatically done to fit the trend on
the paper in both "Portrait" and "Landscape" modes.
A printer typically offers more resolution (total # of horizontal and vertical dots) than a
PC screen. It is likely that more detailed plot is obtained on the printed trend than is
seen on the screen. Infilink plots the trend utilizing the higher resolution available on
the printer. In the unlikely event that the printer resolution is less than the height and
width of the trend, Infilink will not print the trend and it will post an error message in the
event logger stating this.
Using print spooling (instead of choosing "Print directly to printer") is best; otherwise
Infilink program execution will slow while printing.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 16

Animated GIF Object

Select Animated GIF drawing tool, or select menu item Draw-Animated GIF.
Draw a rectangle on the window.
Animated GIF properties dialog appears.
Select the Animated GIF file for this object.
Check the check box Animate in design mode if you want to see the animation in design
mode. Run mode will always animate the object, design mode gives you the choice.
Click OK, you should see the animated picture.
This object can be resized, moved, duplicated (etc.) just like other Infilink objects.
If the object is being animated and if a zoom level other than 100 % is chosen, animation
stops. Coming back to 100 % zoom should restore animation if it was on.

If the selected file does not contain valid Animated GIF (or mis-typing of file name) then you
should see following bitmap indicating the failure to load the file.

Following animations are allowed for this object.


1. Show / Hide
2. Take Action
3. Enter Data
Animated GIF objects when being animated is always displayed on top of all other objects
(irrespective of their Z level).

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 17

Making bitmap objects fully / partially transparent

Create the bitmap object as usual.


Go to Bitmap properties dialog, Bitmap mask tab.
Select the bitmap file to be used as mask. This file has to be of type bmp (bitmap), it can
not be in other image formats like JPEG, TIFF etc. (As opposed to basic bitmap object
which allows most of the image formats to be used)
Clicking OK shows the bitmap with transparent portions as defined in Mask bitmap.
Mask bitmap is automatically stretched / shrunk in memory to the size of base bitmap
before applying the mask.
For all the White pixels (RGB values 255, 255, 255) found in mask bitmap, corresponding
pixels in base bitmap are made transparent.

Used Animated GIF and Mask bitmap files are copied into project sub-directories
AnimatedGIFs and BitmapMasks.
Ragged Tank Cut-Out has been a typical request which could not be done until this feature
was added to Infilink:

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 18

Window Printing
In design mode user can print the HMI window by using menu item Window Print or by
right clicking on empty portion of HMI window and selecting Print.
The window is printed to the default printer.
User is able to print three lines of footer information. Infilink before printing presents default
print lines and allows the user to edit them.
In run mode user prints the HMI window by using script command
Print Window <Window Name>
The <Window Name> must be a string literal. Only the visible window is printed to the default
printer.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 19

Gradient Fills and Transparency


This applies to following shapes:
Polygon, Rectangle, Rounded Rectangle, Ellipse, Pie, Chord, Button, Live and History Alarm
Viewers, Trend.
Gradient filling of these objects is done by selecting the Shape Properties dialog and choosing
the Interior tab. Previous method of filling objects is retained as Normal fills. New Gradient
fills style is introduced. Checking this radio control results in gradient fill. Colors / gradient
pattern / transparency / gamma correction is configured by clicking Configure Gradient fills
button.
Focus X and Focus Y edit boxes accept numbers between 0 99, both inclusive. These
numbers specify percentage of center color portion in X and Y directions.
Using Gamma Correction option has also some specific effect on gradient.
Alpha level (transparency) of 0 255 (both inclusive) can be assigned to each color. 255
being least transparent, 0 means most transparent.
All the objects except Trends show proper transparency. Trends ignore alpha values.
Line styles like dashed, dash dot for objects filled with Normal fills and having line thickness
greater than single pixel were resulting in a solid line. This is unchanged. But now with fill
style Gradient fills selected, proper line style is available for all line thickness values.
Blink and Color fill animations do not work if object is Gradient filled.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 20

Here is an example of a bitmap with a rectangle on top of it. The rectangle has gradient fills
and alpha (transparency) properties:

This is the setup:

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 21

SendKeys Scripting Command


SendKeys(strWinCaption, strKeyStrokes, nFlags);
Send keystrokes to other top level windows.
Parameter
strWinCaption

Data Format
Tag with datatype string,
String expression,
String Literal

strKeyStrokes

Tag with datatype string,


String expression,
String literal
Tag with datatype other
than string or discrete.
Relational expression
resulting in number,
Number literal.

nFlags

Meaning
SendKeys command sends the
key strokes to the window(s)
having this caption on the same
computer as Infilink
String holding characters /
keystrokes to be sent to target
window(s).
Indicates how strWinCaption
should be used to find target
window.

Examples:
SendKeys (Notepad, helloworld<enter>, 0);
SendKeys (strTag1, strTag2, longTag3);
SendKeys (strTag1 + strTag2, strTag3 + strTag4, lTag5 lTag6);

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 22

Which keystrokes can be sent:


Generally all characters found on US English keyboard are sent as keystrokes to target
window. To send the keystrokes like: Enter use syntax <enter>. Following table lists the
keystrokes which can be sent in this way.
Keystroke
Required string to be
entered, non case
sensitive
Numpad 0
<Numpad0>
Numpad 1
<Numpad1>
Numpad 2
<Numpad2>
..
..
Numpad 9
<Numpad9>
Shift press
<Shift_Down>
Shift release
<Shift_Up>
Control press
<Ctrl_Down>
Control release
<Ctrl_Up>
Alt press
<Alt_Down>
Alt release
<Alt_Up>
Back space
<Back>
Tab
<Tab>
Escape
<Escape>
Home
<Home>
End
<End>
Left Arrow
<Left>
Right Arrow
<Right>
Up Arrow
<Up>
Down Arrow
<Down>
Enter
<Enter>
Insert
<Insert>
Delete
<Delete>
F1
<F1>
F2
<F2>
.
F24
<F24>
Examples:
1. String John <home>F <home>Kennedy results in the following string when sent to
Notepad application, Kennedy F John
2. String ABC <left><left> DEFGHI results in the following string when sent to Notepad
application, A DEFGHI BC

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 23

Explanation of nFlags:
Two attributes of window caption matching can be controlled:
1 Attempt matching given caption string exactly or non exactly with the target window
caption.
2 Attempt matching given caption string to target window caption with case sensitivity of not.
Value of nFlag
Attempt Exact
Case sensitive
match
matching
0
No
No
1
Yes
No
2
No
Yes
3
Yes
Yes
4 or any other value No
No
Keystrokes are sent to all the top level windows with matching caption. It is possible to send
the keystrokes to single or multiple windows simultaneously.
Examples of nFlags usage.
Sending keystrokes to notepad window with caption Untitled Notepad
Value of strCaption
Value of nFlags
Will keystrokes be sent
to notepad ?
notepad
0
Yes
Notepad
2
No
untitled notepad
1
Yes
Untitled Notepad
1
Yes
ntitled Notepad
1
No
Untitled Notepad
3
Yes
ntitled Notepad
3
No

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 24

Language Switching
General Concept:
Assume that the user is looking for creating runtime displays in "English" and "Spanish". (more than
two languages are supported).
Infilink design mode allows the user to create a string table. It is basically a table with "n" rows and
two columns since we are assuming two languages in this example. Row1 contains two strings, 1.
"High Temp in English", 2. "High Temp in Spanish". Similarly other rows contains two strings
each with same meaning.
Currently "Text object" contains a string. With this feature, user is able to assign a row number from
string table to the text object. Script command "SelectLanguage (<Language Name>)" is available to
the user.
Let us assume that user creates 10 text objects on a HMI window. At start of run mode these 10 text
objects displays text from string table column 1. User executes script command "SelectLanguage
(Spanish)" on a button press. After executing this script command Infilink replaces text of all 10 text
objects by picking up strings from the Spanish column.
The display which was in English is now in Spanish.
Following Infilink objects will assume similar behaviour as of "Text object" because of language
switching feature.
1. Button (text displayed on button), 2. Alarm comments. 3. HMI Window caption..
Design mode offers a string table editor. User is able to set required number of columns (Languages)
and go on adding / editing rows.
Details:
User can create user interfaces (HMI windows) in such a way that in run mode the user
interface is shown in any one of the configured languages.
User creates a string table in design mode using menu item Tools String table, a dialog
box similar to following will appear.
Multilanguage strings can be import/exported to/from a CSV file. This allows most of the
editing to be done within a spreadsheet.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 25

User can create many strings in multiple languages. Each string has a string identifier (String
ID). Duplicate String IDs are trapped by Infilink.
Text object, button object, Window Caption and Alarm comment can be assigned a string ID
instead of a string. While assigning string ID, character # should be put as initial character
before actual string ID.
To assign a string ID of IDS_GREETING to a text object, #IDS_GREETING should be entered
as text.
Infilink upon seeing first character as # will treat that string as string ID. At run time string
associated with that string ID for currently selected language are assigned to the text object.
The script command SelectLanguage <Language Name> should be used to select current
language. <Language Name> is expected to be a string expression. Passing an empty string
to SelectLanguage command causes Default Language to be selected.
The other languages are selected by passing the actual language name, which is the same as
the column heading for that language. The string IDs and language names are not casesensitive.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 26

Background image to HMI window


An image in standard image format (BMP, JPEG, GIF, PNG) can be assigned as a
background to HMI window.
While setting window properties in following dialog box, background image is selected.

The image can be used in semi transparent form by assigning Image alpha value less than
255. For semi transparent images the background color of the window is seen through the
image. Assigning value of 255 to Image alpha value will make the image completely opaque
and at that setting background color will not be seen.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 27

System tags: _FormattedDate, _FormattedTime


These string tags will contain formatted System Date and System Time. The format is set
in the windows control panel. These tags are typically used with show value animation for text
object, to show nicely formatted time and date.

Script commands: _ThisWin.<Trend object name>.PenTag


_ThisWin.<Trend object name>.PenTag = <string expression> is used to assign a tag to a
trend pen. <String expression> is used to get the tag name to be used with pen.
The pen with index set by _ThisWin.Trend.CurrentPen is affected by this command.
Example:
_ThisWin.Trend.CurrentPen = 3 ;
_ThisWin.Trend.PenTag = LiquidTemp ;
PenTag command does nothing in the following cases.
1. CurrentPen index is greater than the number of pens used for the trend.
2. Attempt to assign a tag name which is already used for any pen for that trend.
3. Invalid or non existing tag name.
4. Tag name expressed without group name and tag name not unique across tag groups.
Event logger will show error messages to inform about these error conditions.
Assigning a tag to real time trend will cause that pen to start plotting from beginning. Data
logging is enabled for the tag if required when executing PenTag command.
History data for any tag which was not being logged before executing PenTag command will
not be available for the time before executing PenTag command. Hence that data can not be
seen in history plot. However data for time after logging enabled is available and is seen on
history plot.
Assignment of a tag name to a trend pen is retained only while the parent window is open.

Script commands: Log2, Log10


Log2(<Numerical expression>) will cause log to the base of 2 to be calculated.
Log10(<Numerical expression>) will cause log to the base of 10 to be calculated.
Result 0 is assumed for input numbers of 0 and less than 0.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 28

Script Command: DataToFile


_ThisWin.<Trend object name>.DataFileName
_ThisWin.<Trend object name>.DataToFile
User can save the data plotted on History or Real time trend by using script command
_ThisWin.<Trend object name>.DataToFile.
Data for time period trend start to trend end (time corresponding to trend left edge to right
edge) for all the trend pen tags is stored onto disk file.
The file name set by _ThisWin.<Trend object name>.DataFileName is used to store the data.
If the file name is not set (i.e. DataFileName property of trend is an empty string) before
executing DataToFile command then Infilink will generate a file name using system time and
store the file in Project directory\DataLog.
Example:
_ThisWin.Trend.DataFileName = c:\InfilinkTrendData\May13.dat ;
_ThisWin.Trend.DataToFile ;
The name set by DataFileName command is retained while the window is open. The same
file name is used in subsequent executions of the DataToFile command. User is expected to
change the file name before executing DataToFile command if overwriting of previous file is
not expected.

Trend View Increased:


Now max time span 1440 hrs, Max pens 12.

DDE Share Name Change


Infilink while acting as NetDDE server was registering INFILINK HMI as DDE share name, it
is now registering INFILINK as DDE share name.

Round Scripting Command


Tag1 = Round (Expression resulting in number);
Tag1 = Round (Tag1);
Tag1 = Round (Number literal);
Tag5 = Round (5.45) + Round (Tag1);

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 29

OnScreen French Keyboard


Onscreen French keyboard added. English or French keyboard can be invoked for data entry
animation. Setting is made through project properties dialog in design mode.

Bug Fixes
Flat lines were being displayed on trends if System Time changed; this is now fixed.
If HMI windows were created with width and height equal to screen resolution then scrolling to
rightmost and bottommost portions of those windows was not possible; fixed.
Infilink is now able to respond to iViewer information requests from computers running
WindowsXP.

Copyright 2004 KEP, Inc.

Infilink 4.06.01 New Features 30

Infilink Overview

Design Mode
Infilink Design Mode is used to create a project that will execute in Infilink Run
Mode. A project is a collection of objects that graphically depicts a process or
operation. A valid project contains at least one window to display the output for
the project. Output is generated by drawing one or more objects in the window
and then assigning animations to those objects. Animations are driven by data
that is stored in internal memory locations called tags.
In addition to object animations, Infilink provides a scripting language to
manipulate project components and tag data. Scripts may be assigned at the
project level, window level and object level. A script may also be assigned to
execute when the value of a tag changes or reaches an Alarm condition.
Tags can reference data from external devices such as PLCs, user defined
memory variables, or other Windows applications through DDE. Tags are
assigned to external devices using a node identifier or alias for each device. This
alias identifies the device driver and protocol used to communicate with the device
and its network ID.
The steps involved in creating a Infilink project are as follows:
1. Identify the hardware that will be accessed and draw up a map to identify
each device. This step will help you determine which DDE or OPC server
application you need to provide device data. It will also simplify the
process of identifying these devices to Infilink.
2. Launch Infilink Design Mode and click cancel on the Open Project dialog
that automatically pops up. Use the New... item on the File menu to
create an empty Infilink project. A default window will be displayed before
moving on.
3. Open the Window Properties dialog box to choose the options that you
wish to apply to the window at run time.
4. Use the Tag Groups item on the Project menu to setup OPC and DDE tag
groups referring to the device map created in step 1. (If you don't have
the appropriate device driver yet you may skip this step for now and
assign the tags you will define in the next step to a memory group.)
5. Use the Tag Groups item on the Project menu to assign tags to the
groups entered in step 4. This step maps device locations that will be
monitored with assigned tags in Infilink that will be referred to when
defining scripts and animations.
Copyright 2004 KEP, Inc.

Infilink Overview 31

6. Use the drawing tools to create objects on the project window.


7. Use the Animations... item on the Edit menu to assign animations to the
created objects.
8. Use the Scheduler Utility to program timing for events to occur on a real
time basis.
9. Save the project.

Short Cut Menus


When using the Design Mode application to create a project you will find that
Infilink makes it easy to select the most common commands that may be applied
to an object or window. When you select an object or window with the right mouse
button, you will be presented with a small pop-up menu called a Short Cut Menu.
The menu's content changes based on the object or area clicked. Here are some
of the functions that are available from the Short Cut menus:
Short Cuts on Objects

For objects, short cut menu functions provide quick access to common activities
such as Cut, Copy, Duplicate, and Delete. The short cut menus also provide the
easiest means of accessing an object's properties and animations. Depending on
the object selected additional functions such as Reshape, Font, and Reassign
tags may be available.

Copyright 2004 KEP, Inc.

Infilink Overview 32

Short Cuts on Windows

The short cut menu functions for a window allow you to quickly turn the Grid
feature on and off. You can also quickly Save the selected window or Close it
altogether. The Last Drawing Tool selection allows you to easily draw multiple
objects of the same type without having to reselect the drawing tool from the
toolbox.
Short Cuts on Tag Groups and Tags

All of the tag management tools are included in the shortcut menus. The only way
access Tag Import and Export commands is through the short cut menu.

Copyright 2004 KEP, Inc.

Infilink Overview 33

The Infilink Dockable Toolbars


The Infilink Toolbars provide convenient access to the most commonly used
design tools. Each of the buttons on the Toolbars has a pop-up identifier called a
tool tip to tell you what function it performs. Pausing the mouse cursor over a
Toolbar button causes the tool tip to appear. The Toolbars can be dragged to any
screen location or docked along the edge of the design mode window.

Project Tools

Window Tools

- Save project

- New

- Duplicate

- Open project

- Open

- Properties

- Run Project

- Close

- Color

- Tag Groups

- Save

- Grid On/Off

- Project Properties

- Delete

- Library Manager
- Event Viewer

Drawing Tools

- Select objects

- Draw chord

- Draw line

- Draw text

- Draw polyline

- Draw button

- Draw polygon

- Import bitmap

- Draw rectangle

- Import metafile

- Draw rounded rectangle

- Draw alarm viewer

- Draw ellipse/circle

- Draw alarm history viewer

- Draw arc

- Draw trend view

- Draw pie

Line Tools

Copyright 2004 KEP, Inc.

Fill Tools

Infilink Overview 34

- Line Color

- Solid

- Fill Color

- Select single line

- Dash

- Unfilled

- Select double line

- Dot

- Select triple line

- Dash dot

- Select thick line

- Dash dot dot

- Solid Fill

- Horizontal Hatch
- Vertical Hatch
- Cross Hatch
- Downward Diagonal Hatch

- None

- Upward Diagonal Hatch


- Diagonal Cross Hatch
Text Tools

Layout Tools

- Bold text

- Move Forward one level

- Italic text

- Move Back one level

- Underline text

- Rotate Clockwise
- Select font

- Rotate Counter Clockwise

- Increment font size

- Flip Horizontal

- Decrement font size

- Flip Vertical

- Text Color

Editing Tools

Alignment Tools

- Undo

- Make Group

- Align Left

- Align Right

- Cut

- Break Group

- Align Top

- Align Bottom

- Copy

- Remove from Group

- Center Vertical

- Paste

- Shape Properties

- Center Horizontal

- Duplicate

- Reassign Tag

- Space Equally Horizontal

- Delete

- Reshape

- Space Equally Vertical

*To create a group, use the selector tool,


the objects you wish to group.

Copyright 2004 KEP, Inc.

, to lasso

- Make same Width


- Make same Height

Infilink Overview 35

Design Mode Keyboard Mapping


Function Keys
F4 Displays the Properties dialog box for the selected object.
F5 Displays the Animations dialog box for the selected object.
F6 Displays the Tag Database dialog box.
F7 Saves the current project.
F8 Closes the current project.
F9 Runs the current project.
Alphanumeric Keys
CTL-X
Cuts the selected object to the clipboard.
CTL-V
Pastes an object from the clipboard into the active window.
CTL-C
Copies the selected object to the clipboard.
CTL-D
Duplicates the selected object.
CTL-Z
Undoes the most recent edit. Up to 32 operations can be undone.
Numeric Keypad
+
Brings the selected object forward in the z-order.
Sends the selected object backward in the z-order.
Arrow Keys
Left
Moves the selected object to the left by one grid line (or one pixel if the
grid is not enabled).
Right
Moves the selected object to the right by one grid line (or one pixel if
the grid is not enabled).
Up
Moves the selected object up by one grid line (or one pixel if the grid is
not enabled).
Down Moves the selected object down by one grid line (or one pixel if the
grid is not enabled).
Other Keys
Tab

Moves the selection to the next object on the window as determined


by the z-order.
Shift-Tab Moves the selection to the previous object on the window as
determined by the z-order.
Esc
Ends reshape mode or interactive animation definition.
Del
Deletes the selected object.

Design Mode Mouse Functions


Buttons
Left Click
Right Click
Double Click

Copyright 2004 KEP, Inc.

Object/window selection.
Context sensitive short cut menu.
Ends reshape mode or interactive animation definition.

Infilink Overview 36

Combinations
Shift-Drag
Defines a square boundary rectangle when drawing an object.
Defines a diagonal line when drawing a line.
Ctrl-Drag

Defines a vertical or horizontal line when drawing a line.

Ctrl-Click

Adds/Deletes a node when reshaping a polyline or polygon.

Ctrl-Shift-Double Click Opens grouped objects for editing without breaking


apart the group.

Run Mode
The Run Mode application executes an Infilink project created in Design Mode.
Run mode consists of six basic components: run time animator, database server,
data logger, alarm logger, OPC/DDE server and event logger.
Run Time Animator
This is the main window that you see when you start Run Mode. The run time
animator handles any operator interaction with a running Infilink project.
Database Server
This is the data management component of Infilink Run Mode. You may see it
referred to as the "Data Manager". It handles the exchange of data between the
run time animator and the device drivers. It is also responsible for managing active
OPC and DDE links, updating the scheduler, animator and data logger when a
piece of data changes, and notifying the animator of alarm conditions.
Data Logger
The data logger processes data changes and records information about the change
to a log file.
Alarm Logger
The alarm logger processes alarm notifications from the database server and
records the alarms to a log file.
OPC/DDE Server
A server provides the interface between Infilink and a specific piece of hardware.
Each server knows only how to communicate with a specific device or set of
devices. You will need to choose the appropriate server for your application and
install this component separately.
If Infilink does not provide a native driver for the device that you will be using, you
can use any third party OPC or Advanced DDE server in place of the device driver.
KEPware's OPC Server application, KEPServerEX, has been provided for you on
the Infilink CD. Please refer to the documentation provided with KEPServerEX to
determine if an appropriate device driver is available for your application.
Event Log Viewer
The event log viewer captures and displays status output generated by the other
run mode components. Each status message is time stamped and displayed in the
Event Logger window. The contents of this window may then be printed or saved to
a text file for later review.

Copyright 2004 KEP, Inc.

Infilink Overview 37

Lesson 1: Learning to Use Infilink

Overview
If you need help, the
completed lessons may
be found in the Infilink
\lessons directory.
These lessons are
provided to give you a
reference of what a
project should look like
when completed.

Copyright 2004 KEP, Inc.

Thank you for making Infilink your choice in HMI Software. Infilink has been
designed to allow you, the user, to get maximum performance with a minimal
amount of effort.
This lesson and the lessons that follow are designed to guide you through the
process of creating an Infilink project. The lessons will get more complex as they
progress. Some lessons, like this one, are designed to teach you about the parts
of Infilink. At any time you may jump forward to another lesson or skip lessons
entirely.

Lesson 1: Learning to Use Infilink 38

Lesson Objectives
This lesson is designed to give you a basic understanding of how to navigate
within Infilink. When completed you should be able to:
Create a new project.
Add/Draw objects in a project window using the Toolbars or Main
Menu.
Edit objects using the Main Menu, Short Cut Menus, or Toolbars.
Save a Project
If you feel that you know how to navigate in Infilink, please feel free to go to
Lesson 2.
This is what your project
will look like at the end of
the lesson.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 39

Creating a Project
1. Open the Infilink Design Mode application.
2. Click Cancel in the Open Project dialog box
Show at startup, when
this box is checked the
Open Project window will
automatically come up
when Infilink Design is
started.

3. Click the File menu and select New ...

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 40

4. The New Project dialog box will open. Type a name in the Create Directory
field as a project name, we suggest using Lesson1. Click Create to accept
the settings and create the project.

5. When the system asks you to verify the name and path of your project, click
Yes if it is correct. If not, click No and repeat 3.

6. The design Mode will start with a default window created. Open the Window
Properties dialog box by clicking on Properties in the Window menu. Leave
Win001 for a window Name and type Drawing and Editing for a Title.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 41

Win001 is the
system generated
object Name for
the first window in
a project. You can
change this name
at any time.
Generally we will
give a name to a
window that
indicates its use
i.e." Main" or
"Pump_room1".
The Title text will
appear in the title
bar of the project
window.
Show when project
starts in run mode,
when checked,
makes the window
open whenever
the project is
opened in run
mode.

7. Click on Show when project starts in run mode, then click OK to create the window.

8. A grid is available to assist in the layout and alignment of objects in the


window. If it is not activated, click on the Layout menu and select Enable grid or
click the
button on the Window Toolbar. When objects are drawn or
resized, they will snap to the points on the grid.
9. To make document images clearer we have chosen the color of our window to
be white. If you wish to change your window color, click the
button on the
Window Toolbar and select the desired color from the displayed palette.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 42

The Importance of Object Properties


About Object Properties
Unnamed objects will be
referred to as "unnamed"
on the status bar, and in
compile error messages.

Every object has properties that can be modified both at design and run time. The
differences in dialog boxes for each object are too numerous to explain in one
lesson. You can investigate these differences on your own when you have
learned how to create each of the objects and modify their properties.
Properties common to every object are name, size and position. Generally you will
use the mouse to change an objects size or position. You must however use an
objects property dialog to change its name.

The Object Name


An Infilink project will not
run if it contains errors.

When creating objects it is very important that you consider giving a unique name
to any object that will be animated. You might have ten to twenty objects grouped
together to simulate a panel and have one object that is animated. Naming that
object will allow you to immediately know when you have selected that object by
seeing its name appear in the status bar.
To reference the properties of an object at run time using a script, you must be
able to specify that object by name.
When you save a project if there are errors in scripts or animations, messages will
appear in the event logger. These messages will indicate objects by name and
indicate what kind of error has occurred.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 43

A Chance to Practice
You will now take the opportunity to add some objects to our project and learn how
to manipulate them. Feel free to deviate from the lesson, its goal is to help you
feel comfortable using Infilink
If you make a mistake
when drawing an object,
you can choose Undo
from the Edit menu or
select the object and
press the DEL key to
remove it.

Draw and Place a Rounded Rectangle.


First, you will place a Rounded Rectangle in the upper left corner of our project
window.
1. Click the

button on the Toolbar.

2. Place the pencil cursor in the upper left corner of the project window.
3. Holding the left mouse button down, drag the cursor down and to the right
creating a box. Release the mouse button when done.

4. While the object is still selected press the right mouse button and click
Properties... from the popup.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 44

5. Type Round_rect in the Name field of the Properties dialog box.


Notice the name of the
object changed from
Unnamed to
Round_rect on the
status bar.

6. The Geometry tab allows you to change the shape of the corners. Changing
both numbers to 0 will make the rounded rectangle a perfect square.
Changing those numbers to 100 will make it a perfect circle. As you will see,
these attributes can also be changed visually by invoking a special mode
called Reshape.

7. Click OK to exit the dialog.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 45

8. While the object is still selected, press the right mouse button and click
Reshape from the short cut menu.
9. Move the cursor over the reshape dot until it becomes a hand.
10. Holding down the left mouse button, move the dot around and see how its
different locations effect the corners of the rectangle.

11. When you are through, drag the reshape dot to the center of the bottom line
and release the left mouse button as shown below

Draw and Place a Text Object


You are now going to draw a text object in the approximate center of the project
window.
1. Click the

button on the Edit Toolbar.

2. Place the pencil cursor below the rectangle in the center of the project
window.
3. Holding the left mouse button down, drag the cursor down and to the right
creating a box. Release the mouse button when done.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 46

4. While the object is still selected press the right mouse button and select the
Properties... item from the short cut menu.

5. Select the Text tab and type the following text in the Text field: Text can be
useful.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 47

6. Click on the General Tab and type My_text in the Name field.
Notice the name of the
object changed from
none to My_texton
the status bar.

7. Click OK to accept the changes and exit the dialog.


8. If the text is too close to the rectangle or is not close enough to the center,
place the cursor over the text until it becomes a hand.
9. Holding the left mouse button down, drag the text object so that it is centered
in the project window.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 48

Draw and Place a Triangle


You are now going to draw a polygon in the shape of a triangle in the lower right
corner of the project window.
1. Click the

button on the Toolbar.

2. Place the pencil cursor below the text object in the lower right portion of the
project window.
3. Click the left mouse button to set the first corner of your triangle. Drag the
cursor to the next point and release. Move the cursor to the last position and
double click to finish creating the triangle.

4. While the object is still selected, use the short cut menu as you did above to
display the properties dialog or press F4 to do the same thing.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 49

5. Assign the name Triangle to the object and click OK.

See the help file for


information on how to
reshape a polygon.

6. Change the fill color of the triangle to bright green by clicking the
and the

Copyright 2004 KEP, Inc.

, solid fill

, fill color tools on the Fill Toolbar.

Lesson 1: Learning to Use Infilink 50

Grouping the Objects


You are now going to group all three objects and manipulate them together.
1.

Click the

2.

Click somewhere on a blank area of the window to deselect any selected


objects.

3.

Position the cursor above and to the left of the Rounded rectangle.

4.

Holding the left mouse button down, drag the cursor down and to the right
creating a bounding box or lasso large enough to enclose all of the objects
in the project window and release the mouse button.

5.

Click the
button on the Toolbar to align all of the grouped objects to
their horizontal centers.

button in the Edit Toolbar to set the Selection Tool.

Notice how the objects


aligned to the right.
Alignment always keys
off of the object with the
black handles.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 51

6. Click the
button on the Toolbar to space all of the grouped objects equally
from the top of the group to the bottom.

7. Click on the

Group tool in the Edit Toolbar to group the objects.

8. Use one of the methods described earlier in the lesson to display the
properties of the group and name it grpLesson1.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 52

9. Drag the left side of the group to the left to resize the group and the objects
contained within it.

10. Double Click while holding the Shift and Ctrl keys down on one of the grouped
objects. This selects the group and allows you to edit individual objects in the
group.

Note: Variable size is automatically assigned to text objects in a group when the
group is resized by dragging a handle.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 53

11. Click on the


button in the Alignment Toolbar to align all of the grouped
objects to their Horizontal center points.

12. Click the


button to undo the last changes until your window returns to the
image below.

Save the Project and Exit


1. Select the Save item from the Project menu
2. Select the Exit item from the Project menu to exit the program.

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 54

Copyright 2004 KEP, Inc.

Lesson 1: Learning to Use Infilink 55

Tag Groups and Tags


Overview
This section describes the Tag Database Editor. You will use this editor to define
groups that represent PLC devices and tags that represent locations on these
devices.

About Tag Groups


A Tag Group is used by Infilink to identify a source of data. A Tag Group can refer
to a piece of physical hardware, an OPC or DDE link or internal memory locations
within Infilink. What follows is a description of each of the possible Tag Group
types.
System
These are internal memory locations maintained by Infilink that contain system
information. Such as the current date and time, the name of the current user, etc.
Tags cannot be defined for this Tag Group and are read only.
Memory
User defined memory locations within the context of the running project. A tag
that is used to hold the intermediate results of a calculation would be assigned to
this node.
DDE (User Defined)
A type of PLC hardware device, program or DDE server application that will
provide data to Infilink. For DDE servers, the Server Name will identify a server
application and topic a node in that server.
OPC (User Defined)
An OPC server application that will provide data to Infilink. For OPC servers, the
Prog ID will identify an OPC application.
Virtual
A Virtual Tag serves as a pointer to another tag's information. These tags can then
be dynamically reassigned to another tag's values during Run mode with a script.
Virtual tags can hold data of any type.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 56

Adding/Editing Tag Groups


The Tag Editor is called up by selecting Tag Groups from the Project menu or
by pressing F6.

Creating Tag Groups


The Tag Groups dialog box is used to add user defined Tag Groups to a project.
Click on Tag Groups in the Infilink Project menu or press F6.

Clicking on Tag Group icon allows you to add a new Tag Group of that type,
double clicking on a defined and highlighted tag group allows you to edit the
groups properties.
Edit Tag Group Properties Tool
Use this tool to bring up the properties window of a Tag Group.
Delete Tag Group Tool
Use this tool to delete a Tag Group. A Tag Group can only be deleted if it is empty.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 57

Creating a Memory Tag Group


1. Click on the

tool.

2. Name: Enter a name that will identify this Tag Group. The name you enter
here will appear in scripts that use Tags from this group.

3. Click OK to add the group.

Creating a DDE Tag Group


1. Click on the

tool.

2. Name: Enter a name that will identify this Tag Group as a link to a DDE
server. The name you enter here will appear in scripts that use Tags from this
group.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 58

See Using DDE


Although KEPware's OPC
server is referred to as
KEPServerEX, its application
name is still KEPDDE.

3. Server name: Enter the name of the program or DDE server application that
this Tag Group will use to get to a DDE information source.
4. For a DDE Tag Group, you would enter the name of the server application that
will be providing data to your project. If you will be using KEPware's OPC
server, you would enter KEPDDE if the server and Infilink will reside on the
same PC. Otherwise, you would enter a string of the form \\<computer
name>\ndde$ to specify a NETDDE connection to KEPServerEX on the PC
identified by <computer name>.
5. Server topic: Enter the name of the server device or program handle that is a
DDE information source.
6. If the Tag Group you are defining uses an Infilink device driver then this field
identifies the device on the device network. You must enter a number here
even if only one device will be used.
7. For a DDE Tag Group you would enter the name of the server topic that the
Tag Group will represent. Note: If you will be using KEPware's OPC server
then the topic would be "_ddedata" or an Alias name created in the server.
When specifying a topic for a remote server you will need to append a $ to
identify the topic as a registered NETDDE share.
8. Data format: You may specify the format of a DDE connection for a given
node by assigning a format to that node. Available formats are Advanced and
CF_TEXT. If you know that a specific server supports both Advanced and
CF_TEXT connections (such as KEPServerEX), you can force Infilink to only
connect using the format that you choose by assigning the desired connection
type. When the format is set to Advanced, Infilink will alternately try Advanced
followed by CF_TEXT when attempting to connect with a server.
Advanced Tab

9. Initially disabled at run mode start: Allows you to manually start looking for
DDE information when you need it. In some cases, the DDE information is not
available until the Server Application is started (sometimes this is after Infilink
is already running).

Copyright 2004 KEP, Inc.

Tag Groups and Tags 59

10. Wait: Puts a delay in before attempting to reconnect to a broken DDE link.
This gives the Server a chance to reestablish a link with its Topic.
11. CF_TEXT DDE
These settings apply only when CF_TEXT is the data format.
Enable Block data start requests
On startup, DDE tag information must be sent to the server so that the
server knows what information to give Infilink. When checked, DDE tag
information is sent in a high efficiency fashion to the server. Otherwise,
each DDE tag's information is sent normally. Check this box to
accommodate servers without high efficiency request capabilities.
Initialization delay in milliseconds (0-2000)
This value causes a communication delay to the DDE server shortly after
Infilink starts. This allows servers with a long response after startup to
respond properly to Infilink initialization commands. This delay occurs only
once when Infilink is started.
Data start request delay in milliseconds (0-1000)
Use this value to put an additional delay after DDE communications are
initialized. Once this delay is over requests for DDE data begin. This
allows servers with a long response after initialization to respond properly
to Infilink data requests. This delay occurs only once when Infilink is
started.
Notes:
1. The above two delays can add up to 3 seconds to the startup time of
an Infilink project. Making the delay times shorter reduces this additional
delay. The delay can be fine-tuned by a trial and error process. The
delay is dependent on the server you are using.
2. KEPServerEX will accept high efficiency data requests and requires
no delays on startup.
12. Click OK to add the group.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 60

Creating an OPC Tag Group


1. Click on the

tool.

2. Name: Enter a name that will identify this Tag Group as a link to an OPC
server. The name you enter here will appear in scripts that use Tags from this
group.
3. Description: Enter a brief description. This will help you to identify the purpose
of the tags in this group later on.
4. Prog ID: Enter the name of the OPC server or source. Use the
tool to
browse for OPC applications that are running at design time. If you will be
using KEPware's OPC server, you would enter KEPware.KEPServerEX.V4 if
the server and Infilink will reside on the same PC. Otherwise, you enter a
remote machine name to specify a remote connection to
KEPware.KEPServerEX.V4.
5. Remote machine: Enter a remote machine name <computer name> to
specify a remote connection to the server, named in the Prog ID field.
6. Update Rate: The update rate specifies how often the Tag Group should
request data from the Server.
7. Click OK to add the group.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 61

Creating a Virtual Tag Group


1. Click on the

tool.

2. Name: Enter a name that will identify this as a Virtual Tag Group. The name
you enter here will appear in scripts that use Tags from this group.
3. Description: Enter a brief but meaningful description. This will help you to
identify the purpose of the tags in this group later.
4. Click OK to add the group.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 62

About Tags
A tag is a named object that is used to reference a piece of data. The Tag Group
to which the tag is assigned determines the source of the data.
The Tag Groups dialog box is used to define new tags and edit the properties of
existing tags. You can access this dialog box by pressing F6 or selecting the Tag
Groups item from the Project menu while in Design Mode. Any changes that
you make to the tags are not saved until you save your project.

Predefined System Tags


There are sixteen predefined, read-only memory tags called System tags that
Infilink Run Mode automatically assigns and updates. You cannot delete these
tags or change their properties. System tags are not included in the tag count of
your application.
_AccessLevel Short

Identifies the access level of the current user (0-255).


_ActiveAlarmCnt Long
Identifies the number of currently active alarms in the running project.
_AlarmLogStatus Short
Identifies the state of the Alarm Logger where: 0 = Off, 1 = On and -1 = Disabled.
_DataLogStatus Short
Identifies the state of the Data Logger where: 0 = Off, 1 = On and -1 = Disabled.
_Date Short
Identifies the day of the month.
_Day Short
Identifies the day of the week where: 0 = Sunday, 1 = Monday,..., 6 = Saturday.

See File Functions in


Scripting.

_FileOpStatus Short
Holds the result of the most recent file operation. Result codes are defined as
follows:
0
-1
-2
-3
-4
-5
-6
-7
-8
-9

Function success
File not found
Maximum open file count of 8 has been exceeded
Unable to create the target file
An error occurred during a file read operation
An error occurred during a file write operation
A memory allocation failure occurred during a read operation
The maximum CSV field length of 256 characters has been exceeded.
A specified read offset was past the end of the file.
An invalid length parameter was specified.

_Hour Short
Identifies the current hour in 24 hour format where 0 = 12:00 am, 13 = 1:00 pm,
etc.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 63

See System Functions in


Scripting

_MenusVisible Discrete
Identifies the visible state of the main program menus at run time where 0 = Off, 1
= On.
_Minute Short
Identifies the current minute from 0 to 59.
_Month Short
Identifies the current month from 1 to 12.
_Msecond Short
Identifies the current millisecond from 0 to 999.
_ProjectPath String
Identifies the current project path formatted with a trailing backslash character (\)
as in C:\Infilink\Projects\test\
_Second Short
Identifies the current second from 0 to 59.
_User String
Identifies currently logged in user. If no user is logged in, this tag will assume the
value NOUSER
_Year Short
Identifies the current year in 4 digit format.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 64

Adding/Editing User Defined Tags


Tag Edit Tools
Create new Tag Tool
Use this tool to create a new Tag in the active group. Right clicking in the Tag
window will bring up a shortcut menu to do the same thing.
Edit Tag Properties Tool
Use this tool to bring up the Tag Properties window.
Delete Tag Tool
Use this tool to delete a Tag. Make sure the tag is not used in any animation or
errors will occur when trying to save the project.

Creating a Memory Tag


Click on a Memory Tag Group in the Tag Group list. Then click on the
above the Tag list or right click in the tag list box and select New Tag

Tag names are not case


sensitive and as such
"Tag1" is the same as
"tag1". You should try to
use as descriptive and
unique a name as
possible for each tag that
you define. Doing so will
avoid confusion. The tag
name can be up to 32
characters in length and
must start with a letter.

Copyright 2004 KEP, Inc.

tool

Tag Name Field

Displays the name of the currently selected tag. When defining a new tag you will
enter the name for that tag in this field.
Description
Enter a brief but meaningful description. This will help you to identify the purpose
of the tag later.
Initial value (Memory Tags only)

Enter the value that you would like this tag to assume when the project is first
started.

Tag Groups and Tags 65

Data Type applies to all


Tag group types except
Virtual.

Data Type

Use this list to select a data type for the value that will be assigned to the tag.
Discrete: Boolean value, False = 0, True = 1

Char: An 8 bit signed value with a range from -128 to 127 that represents one
character.
Byte: An 8 bit value with a range from 0 to 255.
Short: A 16 bit signed value with range -32768 to 32767
Word: A 16 bit unsigned value with range 0 to 65535
Long: A 32 bit signed value with range -2,147,483,648 to 2,147,483,647

DWord: A 32 bit unsigned value with range 0 to 4,294,967,295


Real: Single precision (4 byte) floating point value with range -3.37 E38 to +3.37

E38
Double: Double precision (8 byte) floating point value with range 1.7976931 E308
to +1.7976931 E308
String: A character array of varying length from 1 to 256 bytes

Security
Security is used to restrict the user from changing a tag's value. A tag's value may
be changed by a variety of ways. Conditional access can also be implemented by
using Access Levels.
Internal Access
Select Read Only to prevent the value of this tag from being altered. If a tag
value is to be modified under project control from either a script or enter data
animation then it must be given Read/Write privileges.
DDE client access

Select No Access to prevent OPC/DDE client applications from viewing the


value of this tag.
Select Read Only to allow OPC/DDE client applications to read it's value but
prevent the value from being altered.
Select Read/Write to allow any OPC/DDE client application to modify the
value of the tag.
Internet client access

Select No Access to prevent Internet client applications from viewing the


value of this tag.
Select Read Only to allow Internet client applications to read it's value but
prevent the value from being altered.
Select Read/Write to allow any Internet client application to modify the value
of the tag.
See Lesson 5 for more
information on logging
data.

Log on data change


Use the Log on data change check box to have value changes for this tag
recorded in a log file.
Click OK to add the group.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 66

Creating a DDE Tag


Click on a DDE Tag Group in the Tag Group list. Then click on the
tool above
the Tag list. Alternatively, right click in the tag list area and select New Tag... from
the shortcut window.

The Data type should


match the value you are
retrieving.

Most Settings are the same as a Memory tag. Additional settings are listed below.

Server item
The address* of the information in the device or tag name in the server. For a
controller this might be a register number (ie. R0012) or in a spreadsheet program a
cell location (c3).
*Address
The address of a Server item is a string of 1 to 30 characters that specifies an item
name supported by the topic identified in the DDE Tag group properties.
Note: If you will be using KEPServerEX without an Alias as the topic, you must
specify the Channel and Device as well as the address for the item name.
<Channel Name>.<Device Name>.<Address>
You can specify an optional scan rate and/or data type for the item using the
format:
<item name>@<scan rate>
Where:
<item name> is the path to the device address or just an address if an alias is
used.
<scan rate> is the scan rate of the address in milliseconds. Infilink will request the
information from the DDE server at this interval. The scan rate specifies how
often the device driver should request this piece of data from the device.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 67

Creating an OPC Tag


Click on an OPC Tag Group in the Tag Group list. Then click on the
tool
above the Tag list. Or right click in the tag list area and select New Tag... from the
shortcut window.

The Data type should match


the value you are retrieving.

Most Settings are the same as a DDE tag. Additional setting listed below.

Server item
The address* of the information in the device or tag name in the server.

Design Tip
When more than one
address in the server is
selected, Infilink will
make tags for all of the
selected addresses. This
powerful feature eases
the task of creating tags
separately in Infilink after
they have already been
created in the server.

*Address
The address of a Server item is a string of 1 to 32 characters that specifies an item
name supported by the Prog ID identified in the OPC Tag group properties. If
you will be using KEPServerEX, specify the item using the format:
<channel name>.<device name>.<item name>
Where:
<channel name> is the name of the Channel in the OPC server
<device name> is the name of the device in the OPC server
<item name> is the device address in the controller or a tag name that was
created in the OPC server
Use the
tool to browse for OPC Server items. This will generate the address
for you automatically and put it in the Server item text box.
Note: Once a tag name is entered, the browse button will prompt you if
you want to change the tag name. Select NO to continue with the
browsing.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 68

Access path (optional)


If the Server accesses two tags or addresses with the same name, a specific path is
necessary to determine which value will be returned to Infilink. If you will be
using KEPServerEX, specify the item using the format:
<channel name>.<device name>
Where:
<channel name> is the name of the Channel in the OPC server
<device name> is the name of the device in the OPC server
Engineering Type
The Tag will hold the value as scaled by the OPC server.
Raw Type
The Tag will hold the devices un-scaled value from the OPC server.

Creating a Virtual Tag


Click on an OPC Tag Group in the Tag Group list. Then click on the
tool
above the Tag list. Or right click in the tag list area and select New Tag... from the
shortcut window.

Only a Name is needed.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 69

Tag Edit Advanced Tab

Deadband
Select the Enable check box to set the minimum raw value change the tag can
undergo before Infilink will see the value as changed.
Example: If a deadband of 10 is entered, the tags raw value must change by 10
units from that last recorded value before a new value for the tag will be
recognized and logged.
If the initial value of the
tag is set to a lesser
value than the Minimum
clamp, an error message
will be reported to the
Event Logger.

Value clamps / Scaling


Clamping
Select the Minimum check box to set the minimum raw value the tag can accept. If
the value goes below this value the minimum value is returned.
Select the Maximum check box to set the maximum raw value the tag can accept.
If the value goes above this value, the maximum value is returned.
For example, if the clamp values are set to 10 minimum and 40 maximum Infilink
will never allow the tag to assume a value less than 10 or greater than 40.
Scaling
DDE and OPC tags can be scaled. Scaling is a simple linear interpolation between
the raw values and the engineering values entered. Engineering Minimum and
Maximum are the scaled value range that Infilink will use for scripts and
animations. Raw Minimum and Maximum are the data range received from the
server. When Infilink writes data back to the server the scaling is backed out or
reversed so that the server gets relevant data.
For example: The value of a word from the server is a 10-bit A/D converter value
with the range of 0 to 1024. You would like to see it displayed as values ranging
from 4 to 20. Set the Raw minimum as 0 and the maximum as 1024. Set the
Engineering minimum as 4 and the maximum as 20. (Shown above).

Copyright 2004 KEP, Inc.

Tag Groups and Tags 70

Tag Edit Scripts Tab


Scripts Tab
Displays a Script Editor dialog box to view or edit the data change script for the
selected tag.

Tag Edit Discrete, Level and Deviation Alarm Tabs


See Lesson 4 for more
information on alarms
and alarm logging.

Alarm Tabs
Displays the alarm definitions. If you have added a tag that has an assigned data
type other than string, you may use these tabs to assign alarms to it.

Exporting the Tag Database


Right click in the Tag Groups list. You can use the Export Tags to CSV File item
on the Tag Group shortcut menu to generate a .CSV (comma separated variable)
text file containing the selected groups tag data for the current project. The file is
composed of a Field Identification Record that identifies the order and content of
the fields (columns) in each record (row) and the tag information that corresponds
to those fields.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 71

Special Note: This is the


best way to create a
CSV file. Let Infilink
create a template using
the Export Tag Database
function. Then add to
the template and read it
back with the Import Tag
Database function..

Quick Tip
If you intend to use the CSV function to create your tag database in another product such
as Microsoft Excel, create a couple of tags using Infilink's normal group and tag editors.
Once you have a small tag database established, use the export tag database function to
generate a template CSV file. You can then import this file into Excel and add to it as
needed.

Tag Database Field Definitions


Tag Name
The name of the tag.
Description
The user supplied description of this tag.
Eng. Data Type
The data type to use from within Infilink. Discrete, Short, Word, Long, etc.
Raw Data Type (OPC tags only)
The data type to expect from the server. Discrete, Byte, Char, Short, Word, Long,
DWord, Real, Double, String.
Server Item (OPC and DDE tags only)
The device location/DDE item the tag references.
Access Path (OPC tags only)
The path to the device location of the OPC item the tag references.
Initial value (Memory tags only)
Initial value assigned if a memory tag.
Local Access
R/W if the tag may be written to, RO otherwise.
Client Access
None if the tag cannot be accessed from DDE client application, RO if read only
access is provided, R/W if full read/write access is provided.
Internet Access
"None" if the tag cannot be accessed from Infilink Viewer application, RO if read
only access is provided, R/W if full read/write access is provided.
Log On Change
Y if the data for the tag is to be logged, N if not.
Deadband
The deadband value for the tag if defined.
Min. Value Clamp
The minimum engineering value if clamping or scaling is enabled.
Max. Value Clamp
The maximum engineering value if clamping or scaling is enabled.
Min. Value Clamp_Raw
The minimum raw input value if scaling is enabled.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 72

Max. Value Clamp_Raw


The maximum raw input value if scaling is enabled.
Deadband
The deadband value for the tag if defined.
Discrete Alarm Trigger
If a discrete alarm is defined, the state that triggers that alarm. 0 = False, 1 = True.
Discrete Alarm Comment
If a discrete alarm is defined, the text that is assigned to that alarm. 0 to 64
characters.
Discrete Alarm Severity
If a discrete alarm is defined, the severity that is assigned to that alarm. 0 to 16.
Discrete Alarm Access Level
If a discrete alarm is defined, the Access level that is assigned to that alarm. 0 to
255.
Discrete Alarm Action
If a discrete alarm is defined, the actions that are assigned to the alarm. L = Log,
P = Print, D = Display "E" = E Mail.
Deviation Alarm Target
If a deviation alarm is defined, the target value that is assigned to that alarm.
Deviation Alarm Min. %%
The minor deviation percentage if a deviation alarm is defined.
Deviation Alarm Min. Comment
If a deviation alarm is defined, the text that is assigned to that alarm.
Deviation Alarm Max. %%
The major deviation percentage if a deviation alarm is defined.
Deviation Alarm Max. Comment
If a deviation alarm is defined, the text that is assigned to that alarm.
Deviation Alarm Severity
If a deviation alarm is defined, the severity that is assigned to that alarm. 0 to 16.
Deviation Alarm Access Level
If a deviation alarm is defined, the Access level that is assigned to that alarm. 0 to
255.
Deviation Alarm Action
If a deviation alarm is defined, the actions that are assigned to the alarm. L =
Log, P = Print, D = Display "E" = E Mail.
High High Alarm Trigger
High high alarm activation value if high/low alarm is defined.
High High Alarm Comment
If a High High alarm is defined, the text that is assigned to that alarm.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 73

High Alarm Trigger


High alarm activation value if high/low alarm is defined.
High Alarm Comment
If a High alarm is defined, the text that is assigned to that alarm.
Low Alarm Trigger
Low alarm activation value if high/low alarm is defined.
Low Alarm Comment
If a Low alarm is defined, the text that is assigned to that alarm.
Low Low Alarm Trigger
Low Low alarm activation value if high/low alarm is defined.
Low Low Alarm Comment
If a Low alarm is defined, the text that is assigned to that alarm.
Level Alarm Severity
If a Level alarm is defined, the severity that is assigned to that alarm. 0 to 16.
Level Alarm Access Level
If a Level alarm is defined, the Access level that is assigned to that alarm. 0 to
255.
Level Alarm Action
If a Level alarm is defined, the actions that are assigned to the alarm. L = Log,
P = Print, D = Display "E" = E Mail.
Target
The target value if a deviation alarm is defined.
Major Dev
The major deviation percentage if a deviation alarm is defined.
Minor Dev
The minor deviation percentage if a deviation alarm is defined.
Notes
1. System tags are not included in the CSV output.
2. Data change and Alarm scripts are not included in the CSV output
3. If a tag database that contains scripts is exported, modified and then imported
back into the same project, the scripts will remain intact.
4. When importing a tag database, the fields of an identification record are not
required to be in any specific order.
5. When importing a tag database, only required fields need be included but
each included field must have a matching field in the identification record.

Copyright 2004 KEP, Inc.

Tag Groups and Tags 74

Importing the Tag Database


You can use the Import Tag Database item on the Tools menu to merge the
contents of a .CSV (comma separated variable) text file consisting of node and tag
data with the existing node and tag data for the current project. You can use the
Export Tag Database function to create a template that can then be expanded in a
spreadsheet application that supports CSV files. The result can then be saved to
disk and imported back into Infilink using this tool.

Copyright 2004 KEP, Inc.

75

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 76

Animations: Your Process in Action

Overview
Now that you have learned a little about Infilink, we will take the opportunity to
discuss animations. In Infilink, every object can be animated in some fashion to
respond either to mouse clicks or changes in the data of an associated control tag.
This section discusses all of the Animations available from the Animations Dialog
Box.

About Animations
The following types of animation are defined in Infilink:
1.
2.
3.
4.
5.
6.

Show/Hide
Blink
Stretch Horizontally
Stretch Vertically
Move Horizontally
Move Vertically

7.
8.
9.
10.
11.
12.

Change Color
Rotate
Enter Data
Show Value
Slider
Take Action

Not all forms of animation are available for all objects. For example, a Text object
can have a Show Value animation whereas a Rectangle object cannot, yet both
objects can have a Take Action animation. Objects can have several animations
defined at once.
Animations are defined using the Animations dialog box accessed from the
Animations menu item on the Edit menu, by selecting Animations from the
short cut menu or by pressing the F5 key. An object or group must be selected
before you can use the Animations dialog box. Once you are in the Animations
dialog box, only those animations that are appropriate to the object or group are
made available.
You will not be able to assign conflicting animations to the same objects or to the
groups that contain those objects. For example, you cannot place an Enter Data
and Slider animation on the same object.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 77

Animating an Object
Making an Object Blink
The Blink animation
cannot be assigned to a
group

The Blink Animation is used for Blinking an object; either alternately making it
visible, then invisible, or alternately making it one color, then another color. Three
blinking speeds are provided.

1. Press the

tool or press the Blink button in the Animations dialog box.

2. Press the
Tags... button in order to view the Tag List. An Analog
tag must be attached to this animation. Select a tag to create a tag name or
expression.
3. Check the Substitute zero for input value if tag data is not valid if desired.
Checked: Whenever the Tag value is outside of the specified range the move
animation puts the object in the zero position.
Unchecked: Whenever the Tag value is outside of the specified range the
move animation leaves the object in the last valid position.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 78

4. If a Discrete tag is selected, then choose whether to blink the object when the
value of the tag is Logical TRUE (ON) or Logical FALSE (OFF).
5. If an Analog tag is selected then choose whether to blink when the value is
either Within the Range (Inclusive) or Outside the Range of assigned values
you enter under Input value range. If Within the Range is selected, the object
will blink when the tag value falls within the given Low to High range.
6. Select a Blink type. Show/hide will alternately show and hide the object when
the blink condition is TRUE. Change colors will alternately change the color of
the border, interior or text of an object when the blink condition is TRUE. You
set the colors by clicking on the colored rectangles and choosing the desired
color in the Color Selection Dialog.
7. Select the desired Blink rate Slow, Medium or Fast. The Fast cycle time is
approximately 400 ms, Medium is approximately 800 ms and Slow is
approximately 1.2 seconds.
8. Choose OK to accept the animation definition.

Showing and Hiding Objects


The Show/Hide Animation is used to provide conditional visibility or invisibility of an
object. It can be used with overlapping images to show multiple states of an
object.
The Show/Hide
animation may be
assigned to any object.

1. Press the
button in the Animations Toolbar. Or, right click on the object
and select animations. Then select the Show/Hide animation button.
2. Press the
Tags... button in order to view the Tag List. An Analog
tag must be attached to this animation. Select a tag to create a tag name or
expression.
3. Check the Substitute zero for input value if tag data is not valid if desired.
Checked: Whenever the Tag value is outside of the specified range the move
animation puts the object in the zero position.
Unchecked: Whenever the Tag value is outside of the specified range the
move animation leaves the object in the last valid position.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 79

The Show/Hide
Animation can be used
with overlapping images
to show multiple states
of an object.

4. If a Discrete tag is selected then choose whether to make the object visible
when the value of the tag is Logical TRUE (ON) or Logical FALSE (OFF).
5. If an Analog tag is selected, use the Show when input value is dropdown to
choose Within the Range or Outside the Range. Enter the desired value
range under Input value range. If the value of the tag is chosen Within the
Range, then the object will only be shown when the tag value falls within that
Low - High range.
6. Choose OK to accept the animation definition.

Moving Objects Left and Right (Horizontally) or Up and Down


(Vertically)
The Move animation
may be assigned to any
object except Alarm
viewers and Trends.

Move Left/Right in
combination with Move
Up/Down, using equal
steps, displays a
diagonal path of
movement.

1. The Move Left/Right Animation is used to move an object in the x-direction.


The Move Up/Down Animation is used to move an object in the y-direction.
2. Press the
dialog box

Move Horizontal or

Move Vertical button in the Animations

Tags... button in order to view the Tag List. An Analog


3. Press the
tag must be attached to this animation. Select a tag to create a tag name or
expression.
4. Check the Substitute zero for input value if tag data is not valid if desired.
Checked: Whenever the Tag value is outside of the specified range the move
animation puts the object in the zero position.
Unchecked: Whenever the Tag value is outside of the specified range the
move animation leaves the object in the last valid position.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 80

5. Enter the Input Value Range for Low and High that corresponds to the analog
ranges. High limit should always be greater than the low limit.
6. The related position of the object for each tag value can be set either by the
keyboard or by clicking the Low or High Related position button
. Clicking
one of these buttons takes you to the object where you can graphically set the
desired initial and final object positions using the mouse.
7. Choose OK to accept the animation definition.

The Stretch animation


cannot be assigned to
objects of type line or
text.

Stretching Objects Left and Right (Horizontally) or Up


and Down (Vertically)
The Stretch Left/Right Animation is used for re-sizing an object by changing its
width.
The Stretch Up/Down Animation is used for re-sizing an object by changing its
height.

Left/Right stretch and


Up/Down stretch used
together gives an object
a zoom in/out effect.

1. Press the
or
buttons in the Animations Toolbar. Alternatively, right
click on the object and select animations. Then select the Slider animation
button.

The Stretch animation is


used to create Bargraph
objects.

2. Press the
Tags... button in order to view the Tag List. An Analog
tag must be attached to this animation. Select a tag to create a tag name or
expression.
3. An Analog tag must be attached to this animation. Enter the value that the tag
has at the end points of motion in the Input value range Low and High edit
fields. The high limit should always be greater than the low limit.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 81

4. Choose the Direction in which to stretch the object.


Left/top edge - Vertical Stretch from the top down; Horizontal Stretch from left
to right.
Center - Vertical Stretch from the center up and down; Horizontal Stretch
from the center left and right.
Right/bottom edge - Vertical Stretch from the bottom up; Horizontal Stretch
from right to left.
User Defined - allows the user to set and anchor graphically using the related
position button in the Stretch from frame and the mouse. The top and bottom
limits of stretch are set graphically using the other related position buttons.
5. The related position of the object can be set for each tag value either by the
keyboard or by clicking the Low or High Related position button
. Clicking
one of these buttons takes you to the object where you can graphically set the
desired initial and final size using the mouse.
6. Choose OK to accept the animation definition.

The Rotate animation


can only be assigned to
line objects.

Rotating a Line
The Rotate Animation can be attached to a line object. The center of rotation can
be defined anywhere within the window. Typical use is as an indicator needle of a
meter or to show the rotation of a wheel.
1. Press the

tool or Rotate button in the Animations dialog box

2. Press the
Tags... button in order to view the Tag List. An Analog
tag must be attached to this animation. Select a tag to create a tag name or
expression.
3. Check the Substitute zero for input value if tag data is not valid if desired.
Checked: Whenever the Tag value is outside of the specified range the move
animation puts the object in the zero position.
Unchecked: Whenever the Tag value is outside of the specified range the
move animation leaves the object in the last valid position.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 82

4. Enter the Input Value Range for Low and High values that correspond to the
tag ranges. High should always be greater than the low value.
5. The Angle of rotation in degrees of the object for each tag value can be set
relative position buttons. Clicking
either by the keyboard or by clicking the
one of these buttons takes you to the object where you can graphically set the
desired initial and final object rotations using the mouse. Angles of rotation
are measured in degrees as shown in the following diagram:

6. Select the Center of rotation (the pivot point). This can be:
Start point - The beginning of where the object was drawn.
Center point - The center of the object.
End point - The end of where the object was drawn.
User defined - If selected, the
relative position button is used to
graphically set the center of rotation using the mouse.
7. Choose OK to accept the animation definition.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 83

Enter Data Into a Tag


The Enter Data Animation allows the operator to assign a value to a tag in Run
Mode.
The Enter Data
animation cannot be
assigned to objects of
type line, arc, pie or
chord.

The Enter Data


animation can be
assigned to a group
even if one or more of
the objects in the group
cannot accept the Enter
Data animation.

1. Press the
box.
2. Press the
tag.

tool or press the Enter Data button in the Animations dialog

Tags... button in order to view the Tag List. Select a

3. Once the tag is selected, then select the Entry Method you want to use. There
are 6 different methods to choose from:
Popup - Displays a popup dialog box that allows the operator to make an
on/off selection or keypad if the tag is numerical or keyboard if the tag is a
string. A plain data entry field is shown if the Keyboard attached option is
selected in Project Properties. All data entry is done in signed decimal format.
Toggle TRUE/FALSE - The value of the assigned tag will be toggled from
TRUE to FALSE or from FALSE to TRUE when the mouse button or assigned
key is depressed.
Force SET/TRUE (1) - A one will be written to the tag whenever the animation
is invoked.
Force RESET/FALSE (0) - A zero will be written to the tag whenever the
animation is invoked.
Momentary - NO - The value of the assigned tag will change to TRUE when
the mouse button or assigned key is depressed and back to FALSE when
released.
Momentary - NC - The value of the assigned tag will change to FALSE when
the mouse button or assigned key is depressed and back to TRUE when
released.
4. If the tag is a numerical value, select the Significant figures to display (1-12).

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 84

5. Check Invoke using a keyboard shortcut if you want to supply a keyboard


shortcut to activate the animation. Fill out the shortcut controls as desired.
6. If a Numeric tag is selected, Select to limit the range of entry in one of two
ways.
Default for data type: Limits entry to the range for that Data type.
User defined: Limits the range to the settings entered in the High and Low text
fields.
7. If your project supports multi-user security, enter the Access level that the
operator must have to activate the animation.
8. Choose OK to accept the animation definition.

Using Sliders to Input Data


Slider Animation is used to vary an analog tag value within a given range. The
new value depends on the position of the Slider. It acts like a volume control.
The Slider animation
cannot be assigned to
objects of type line, arc,
pie or chord.

Slider animations may


be assigned to any
group.

Copyright 2004 KEP, Inc.

button in the Animations Toolbar. Alternatively, right click on the


1. Press the
object and select animations. Then select the Show/Hide animation button.
2. Press the
Tags... button in order to view the Tag List. An Analog
tag must be attached to this animation. Select a tag.
3. Enter the value that the tag should assume at the end points of motion in the
Output value range Low and High edit fields.

Animations: Your Process in Action 85

4. Choose the Direction in which to slide the object, Horizontal (Left/Right) or


Vertical (Up/Down).
5. The related position of the object can be set for each tag value either by the
keyboard or by clicking the @low value or @high value Related position
buttons
. Clicking one of these buttons takes you to the object where you
can graphically set the desired initial and final location using the mouse.
6. Select While sliding to update the value of the tag while the slider is in motion
or On release to update the value of the tag following release of the mouse
button.
7. If your project supports multi-user security, enter the Access level that the
operator must have to activate the animation.
8. Choose OK to accept the animation definition.

The Change Color


animation cannot be
assigned to objects of
type bitmap, metafile or
group.

Changing the Color of an Object


The Change Color Animation is used for changing the color of an object based on
the value of a tag. With a Discrete tag, two colors may be chosen - one for each
possible state. With an Analog tag, up to seven colors may be chosen.

1. Press the
box.

tool or press the Change color button in the Animations dialog

Tags... button in order to view the Tag List. An Analog


2. Press the
tag must be attached to this animation. Select a tag to create a tag name or
expression.
3. Check the Substitute zero for input value if tag data is not valid if desired.
Checked: Whenever the Tag value is outside of the specified range the move
animation puts the object in the zero position.
Unchecked: Whenever the Tag value is outside of the specified range the
move animation leaves the object in the last valid position.
4. If the object to which you are assigning the animation has a border then you
may choose whether to change the border color by selecting the appropriate
choice in the Border Ranges dropdown selection list.
5. If the object to which you are assigning the animation has an interior then you
may choose whether to change the fill color by selecting the appropriate
choice in the Interior Ranges dropdown selection list.
6. Selecting None disables the color change for the corresponding feature,
Border or Interior.
7. If a Discrete tag is selected, choose a color for each of the two states, Off and
On using the Color Selection Dialog.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 86

If an Analog tag is selected, choose the Range number 2 - 7 and the Color for
each range. The first color is assigned when the tag value is below the first value
in the range, the next when the tag value is between the first and second values,
etc. The last color is assigned when the tag value is greater than the last value
given.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 87

8. Choose OK to accept the animation definition.

Showing the Value of a Tag


The Show Value Animation shows the dynamic value of a Tag. It works with both
Discrete tags and Analog tags. It can be used to monitor a value while a process
is running.
The Show Value
animation can only be
assigned to button and
text objects.

1. Press the
button on the Toolbar. Or, right click on the object and select
animations. Select the Show Value button in the Animations dialog box.
Tags... button in order to view the Tag List. Select a
2. Press the
tag to create a tag name or expression.
3. Select the Data type that matches the Tag in the Treat value as frame and fill
in its format settings.
String - Char, String tags. If a String tag is selected then no formatting is
required. The string will be displayed as it appears in the tag. Char is
displayed as the ASCII character designated by its numeric value.
Discrete - Discrete tags. If a Discrete tag is selected then enter the text to
show when the tag value is ON and when the tag value is OFF.
Integer Byte, Short, Word, Long, DWord. Choose the desired Integer Format
from the list. Available formats are Decimal (Signed), Decimal (Unsigned),
Hexadecimal, Octal and Binary. Specify the field width and if you want to show
leading zeros.
Real - Real, Double. Set the Real Format fields. Select to display the value
with a given number of significant numbers (a fixed field width with floating DP
(decimal point)). Or, select to display the value in a fixed format with a
specified number of digits to the Left of the DP and a specified number of
digits to the Right of the DP.
4. Choose OK to accept the animation definition.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 88

Formatting examples
Value Format
String
Discrete (On, Off)
Short, Decimal (Signed)
Word, Decimal (Unsigned) with leading zeros
Real, 3 significant figures
Real, Fixed field, 3 Left, 3 Right
The Take Action
animation cannot be
assigned to objects of
type line, arc, pie or
chord.

Tag Value
"Running"
0 - False
-54
54
12.34
12.34

Displayed Text
Running
Off
-54
00054
12.3
12.340

Executing a Script With a Button Click


In Run Mode, positioning the mouse cursor over an object with a Take Action
animation causes the cursor to change to a pointing finger. Clicking with the left
mouse button executes the associated At Key Down Take Action script.
Take Action Scripts are for those functions and operations that should occur as a
direct result of pressing/clicking on a button or other object. Typically, these
scripts would be used for reading and writing files, opening windows, setting
presets, or acknowledging an event.
There are three types of window scripts: On button down, While button pressed,
and On button up. One Script may be written for each type. While the left button
remains down the assigned While Key Pressed script will execute at the specified
interval. After the mouse button is released, the assigned After Key Up script will
execute.
You may assign these scripts in any combination using the following steps.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 89

1. Press the

Take Action button on the Animations toolbar.

2. Select when the script will occur.

3. If your project will support multi-user security, enter the Access level that the
operator must have to activate the animation.
See Scripting for more
information.

4. If desired, check Invoke using keyboard shortcut and choose an optional Short
Cut Key equivalent to the mouse button.
5. Enter the script and Verify that the syntax is correct.
6. Choose OK to accept the animation definition.

Copyright 2004 KEP, Inc.

Animations: Your Process in Action 90

Libraries: The Quick Path to Great Looking Apps

Overview
Libraries are files containing previously drawn objects and groups. Infilink has a
Library Manager to help you organize objects used in a project. The Library
Manager has some tools to help you accomplish this.

Library Manager tools


Create a New Library

Cut an object

Create a New Object Group

Copy an object

Open a library

Paste an object

Save a library

Delete an object or object group


Rename an object or object group
Library Manager Treebar

Copyright 2004 KEP, Inc.

Libraries: The Quick Path to Great Looking Apps 91

Create a New Library


1. To create your own libraries, select the New Library item from the File menu or
click on the
tool. Enter a logical name for the library, e.g.., "PumpProject",
"CanningMachine", etc. then click OK. A new empty Library will be created with
an empty object group called Untitled.
2. Click on the
Rename tool to give the new untitled group an appropriate
name. Object group names should reflect the type of objects that are in them.
You are now ready to begin saving objects to the Object group.

Create a New Object Group


All objects must be placed in a group.
To create a new group simply click on the
Then, rename the group using the

tool.

tool.

The new group is ready to accept objects.

Open a library
. All Infilink libraries have an extension of *.kol or *.lib. System Library
Click on
is the default library that comes with Infilink.
Scroll to the library you want to open, click on it, and then press Open.

Copyright 2004 KEP, Inc.

Libraries: The Quick Path to Great Looking Apps 92

Save a library
Click on
to save an existing library or enter a filename in the popup dialog if
this is a new file and click Save to save the current library.

The Library Manager Treebar


A Treebar is a tool that displays the Object Groups and their Objects in a
hierarchical fashion. It is located to the left of the object field as shown.

The selected object has its name highlighted in the Treebar. To Rename an object
or object group, click on its name then click on the
name may be up to 64 characters long.

Copyright 2004 KEP, Inc.

Rename tool. An Object

Libraries: The Quick Path to Great Looking Apps 93

Saving Objects to a Library


Any drawn object placed
or drawn on a window
including groups of
objects can be saved to
a library. All of the
animations and scripts
will be saved along with
the object or group. This
makes objects and
groups in libraries a
useful resource for future
projects. Entire windows
can be lassoed, grouped
and then saved to a
library if desired.

1. Click on the object or group to save. Right click to the shortcut menu and
select Copy.
2. Open the library and object group where you want to save the selected
object or group.
3. Right click in the object field of the library and select Paste from the shortcut
menu. A new Untitled object will be added to the treebar to the left of the
object field. Use Rename to assign an appropriate name, up to 64 characters
long, to the object or group.
Be sure to save the library so that the new object or group is not lost!
Design Tip
Note: The object to be saved must be copied from an Infilink window. Objects
copied from other programs such as Word or Paint cannot be pasted directly to a
library. Paste them to an Infilink window first then copy them from the window and
paste them to the library.

Placing an Object or Group from a Library


See Appendix A for a
list of Infilink libraries.

Using predefined library


objects speeds
development of a
project. Objects from a
library can be placed in
any Infilink window.

Copyright 2004 KEP, Inc.

1. To place an object or group from a library in a project window, simply click on


and drag it on to the project window. Once an object has been placed, it may
be moved, edited, or animated.
2. Resize and adjust the object as desired. Objects that have been animated and
copied to a library retain these animations and the tags associated with them.
If these objects are copied from the library into a project window you will have to
supply valid tag names to support the animations. Infilink allows you to reassign
the tags in your library objects when you paste them onto your project window. If
the object has an animation assigned to it the Reassign Tag dialog pops up.

Libraries: The Quick Path to Great Looking Apps 94

Reassigning Tags
The Reassign Tag
function can be invoked
at any time on any
window by simply right
clicking on an object. If
the object contains tags,
the Reassign Tags
selection will be
available from the
shortcut menu.

Design Tip
If you duplicate objects
which contain tag
information such as a
display, you can quickly
change the tags in the
newly duplicated objects
using the reassign tags
function. The
combination of these two
functions allows you to
create an object once
then quickly populate
your window with
duplicates each attached
to their proper tags by
the reassign tags
function.

The Reassign Tag dialog is used to replace one or more tag names assigned to
the selected object. Each animation and script assigned to the object will be
scanned for tag usage. You will be shown a dialog box for each different tag that
is assigned to the object.
The dialog appears as follows:

The text to the right of Old name: indicates the name of a tag found in the scan.
This tag may be assigned to more than one animation or script. To reassign this
button
tag you can either type in a valid tag name or press the New name:
and select a tag from the Tag List dialog. When you press the OK button all
occurrences of Old name will be replaced with the tag name shown in the edit
control.
You can skip reassignment of a tag by pressing OK without making any changes
to the name.
Press Cancel at any time to stop the reassignment process.

Copyright 2004 KEP, Inc.

Libraries: The Quick Path to Great Looking Apps 95

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 96

Scripts: The Final Word in Flexibility

Overview
Scripts provide the additional functionality your application may need. Infilink
scripts allow you to perform tasks such as complex scaling operations, file
manipulation, string handling, and user interactions with your process. This
section is provided as a reference for the script functions.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 97

Introduction
Scripts are automated sequences of commands that are executed by Infilink at
run-time. There are five types of scripts:
1.
2.
3.
4.
5.

Project Scripts - Assigned at the project level.


Window Scripts - Assigned at the window level.
Take Action Scripts - Assigned as an animation at the object level.
Tag Scripts - Assigned to individual tags.
Alarm Scripts - Assigned to individual Alarms

This editor is used to edit


each type of script.

The following buttons are common to all the editors:


Opens the Tag Group dialog box. You can select a tag from the tag
list and its name will automatically be inserted into the script at the cursor location.
Searches the script for errors. If an error is found, a description of
the error will appear in the status bar at the bottom of the dialog and the cursor will
be placed at the approximate location of the error.
Launches help for the type of script you are editing.
Quits the current edit.
Validates and assigns the script.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 98

Project Script
Access to the project script editor is granted by selecting the Scripts tab in the
Project Options dialog box. There are three types of project scripts: On project
open, While project running, and On project close. One Script may be written for
each type.
Project Scripts will
contain those functions
and operations that you
need to have perform
independently to what
the operator is doing
somewhere else in the
project.

You should not attempt


to access tags assigned
to user defined nodes
from an On project open
or On project close script
because external data
may not be available
when the script is
executed.

On project open
Initialization steps that you want to perform when your project starts could be
taken care of with a On project open script. This type of script executes once
when the project is initially loaded. You might use an On project open script to set
the state of some internal memory tags or launch an external application.
While project running
Periodic operations at the project level can be performed in a While project
running script. While project running scripts execute on a user defined Interval
anywhere between 100 and 99999 ms. While project running scripts are executed
before any On window open scripts if such scripts are defined.
On project close
Any project level cleanup that you need to perform can be done in an On project
close script.
Entering a Project Script
1. Press the Scripts tab and select when the script will occur.
2. Enter the script and Verify that the syntax is correct.
3. Choose OK to accept the script definition.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 99

Example: While running script @ 5000 MS scan rate


# If the acknowledge bit for the chlorine alarm
# is on. Show the Hazard window and beep the speaker
# 5 times.
If (chlorine_ack == ON) then
Show "Hazard";
Beep(5);
Chlorine_ack = OFF;
Endif;

Window Scripts
Access to the window script editor is granted from the Window Properties dialog.
You can display the Window Properties dialog for the selected window by selecting
properties from the window's shortcut menu. There are three types of window
scripts: On project open, While project running, and On project close. One Script
may be written for each type. The types of script that you may define for a window
are defined below.
Window Scripts are used
for those functions and
operations that are only
important while the
window is opened. For
example you may want
to show or hide certain
objects, or you may wish
to perform some
calculation that only
displays on the window.

On window show
Initialization steps that you want to perform prior to showing a window could be
taken care of with an On window show. You might use an On window show script
to initialize the properties of one or more objects on the window.
While window showing
Periodic operations at the window level can be performed in a While window
showing script. While window showing scripts execute on a user defined Interval
anywhere between 100 and 99999 ms. You might use this type of script to cycle
the value of a memory tag that is used on the window.
Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 100

On window hide
Any window level cleanup that you need to perform when a window is removed
from view can be done with an On window hide script. You might use this type of
script to show a different window.
Entering a Window Script
1. Press the Scripts tab and select when the script will occur.
2. Enter the script and Verify that the syntax is correct.
3. Choose OK to accept the script definition.
Example: While showing script
# Calculate the percentage of capacity used in the brewing vat.
# The vat is 27 feet deep. Each foot equals 4800 gallons or 400
# GPI. Capacity is initialized at 129,600. Level is recorded in
# inches and GPI is initialized at 400.
percap = (level * GPI) / capacity;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 101

Take Action Scripts


Access to the Take Action script editor is granted from the Animations dialog box.
You can display the Animations dialog for the selected object or group by pressing
F5. There are three types of window scripts: On button down, While button
pressed, and On button up. One Script may be written for each type.
Take Action Scripts are
for those functions and
operations that should
occur as a direct result
of pressing/clicking on a
button or other object.
Typically, these scripts
would be used for
reading and writing files,
opening windows, setting
presets, or
acknowledging an event.

On button down
The script assigned to this phase of the button or key press will execute as soon
as the mouse button or assigned short cut key is pressed.
While button pressed
This script executes at the specified Interval from 100 to 99999 ms while the
mouse button or assigned short cut key remains pressed. You might use this type
of script to change the value of a memory tag at a slightly faster rate than could be
attained from repeatedly pressing the key.
On button up
This script executes when the mouse button or assigned short cut key is released.
To emulate a Windows style button that initiates a single action you would use this
type of script.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 102

Executing a Script With a Button Click


You may assign these scripts in any combination using the following steps.
1. Press the Take Action button on the Animations toolbar. Select when the
script will occur.
2. If your project will support multi-user security, enter the Access Level that the
operator must have to activate the animation.
3. If desired, check Invoke using keyboard shortcut and choose an optional Short
Cut Key equivalent to the mouse button.
4. Enter the script and Verify that the syntax is correct.
5. Choose OK to accept the animation definition.

Example: On button up script


# When the button is pressed and released,
# the Chlorine Gas Alarm is acknowledged.
Chlorine_ack = TRUE;
PostMsg ("Acknowledge Chlorine Gas Alarm by operator" +_User);

Tag Data Change Scripts


Data Change Scripts are
for those functions and
operations that you want
to perform when data
changes. You might use
a Data Change Script to
modify a process when a
tag exceeds a certain
value.

Copyright 2004 KEP, Inc.

Access to the data change script editor is granted by selecting the Scripts tab in a
Tag's Properties dialog box. You can display the Tag Groups dialog box by
pressing F6.

Scripts: The Final Word in Flexibility 103

When defining numerical


tags, you can assign a
Deadband. The
Deadband specifies the
minimum amount by
which the tag value must
change before a change
event will be triggered.

On data change
An On data change script assigned to a tag in the tag database will execute
whenever the tag value changes. If the tag has an assigned deadband, the value
must change by at least that value before the script will execute.
Entering a Tag Script
1. Select a tag by clicking the Tag Group tool button to display the defined tags
and then choose one by double-clicking it with the mouse or use the shortcut
menu and select Properties. From the Tags Properties dialog box, click on
the Scripts Tab.
2. Enter the script and Verify that the syntax is correct.
3. Choose OK to accept the script definition.
Example:
# If the chlorine sensor detects chlorine the chlorine
# acknowledge bit is set on.
If (chlorine_detect == 1) then
Chlorine_act = 1;
Endif;

Alarm Scripts
Access to the alarm script editor is through a Tags properties dialog when you
assign an alarm to a tag.
Alarm Scripts are for
those functions and
operations that you want
to perform when an
alarm condition is active.
You might use an Alarm
Script to sound an alarm
when a tag exceeds a
certain value. The script
may take place at any to
all of the possible times.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 104

On active transition
Actions that you want to perform when the alarm occurs could be taken care of
with a On active transition script. This type of script executes once when the
alarm initially occurs. You might use a On active transition script to trigger an
annunciator or show a diagnostic window.
While active
Periodic operations while an alarm condition exists can be performed with a While
active script. While active scripts execute on a user defined Interval anywhere
between 100 and 99999 ms.
On acknowledge
Periodic operations after an alarm is acknowledged can be performed with an On
acknowledge script. On acknowledge scripts execute once when the alarm is
acknowledged. Acknowledging an alarm does not stop any While active scripts
from executing.
On inactive transition
Any alarm housekeeping that you need to perform can be done in an On inactive
transition script.
Entering an Alarm Script
1. Select a tag by clicking the Tag Group tool button to display the defined tags
and then choose one by double-clicking it with the mouse or use the shortcut
menu and select Properties. From the Tags Properties dialog box, click on
the appropriate Alarm Tab then click on the Script button.
2. Enter the script and Verify that the syntax is correct.
3. Choose OK to accept the script definition.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 105

Script Reference
General
The remainder of this chapter deals with the commands and constructs that may
be used when writing a script. Here are some basics:

A valid script contains at least one statement.


Each statement must end with a semicolon (;)
Keywords such as IF, THEN, While and _SysCmd are not case sensitive.
Window names, tag names and object names are not case sensitive.

Comments
In order to continue a
comment on the next line
you must place a # at the
beginning.

You will find it helpful to include comments in your scripts so that when others
review your work (or even you at a later date) the intended operation of the script
will be clear.
A comment is defined by preceding the comment text with a pound sign (#) as in:
# This is a sample comment
#
# Show the value of a numeric expression by assigning it
# to a text object.
#

Logical Constants
The following constants are provided for use in expressions involving the discrete
data type. They can be used anywhere a logical TRUE or FALSE is required.
ON or TRUE may be used to indicate a logical TRUE (1)
OFF or FALSE may be used to indicate a logical FALSE (0)

Example:
# Sound a beep from the PC speaker if the value of
# DiscreteTag1 is TRUE
If DiscreteTag1 == ON Then
Beep;
EndIf;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 106

Conditional Operators
Conditional operators are used when creating relational expressions for use in IFTHEN-ELSE or WHILE statements. The following operators are available:
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
= or == Equal to
<> Not Equal to
Parentheses may be
used to set the desired
order of execution of
logical operations.
Operations written in
parentheses are
evaluated first from the
inside out.

Example:
If (tag1 > tag2) then
tag3 = 1;
elseif (tag1 == tag2) then
tag3 = 0;
else
tag3 = -1;
endif;

Logical Operators
Logical operators are used when combining conditional expressions.
AND Logical AND
Logical expressions involving AND evaluate to TRUE if both sides of the
expression are TRUE.
OR Logical OR
Logical expressions involving OR evaluate to TRUE if either side of the expression
is TRUE.
NOT Logical Inversion
Inverts the result of a logical expression.
Infilink assumes that any
non-zero value is TRUE.

Copyright 2004 KEP, Inc.

Examples:
If (tag1 > tag2) OR (tag1 > tag3) then
tag4 = tag1;
endif;
DiscreteTag1 = DiscreteTag2 AND DiscreteTag3;
DiscreteTag1 = NOT (DiscreteTag2 AND DiscreteTag3);

Scripts: The Final Word in Flexibility 107

Assignment Operator
To make an assignment to a tag or object property you would use the equals sign
(=) as in:
<tag name> = <expression>
<window name>.<object name>.<object property> = <expression>
When working with the assignment operator, <expression> can be a literal value,
tag name, object property, or any combination of these that have compatible data
types. Compatible simply means that all components of the expression must be
either string or numeric. The target of the assignment determines the appropriate
type.

Virtual Tag assignment


Virtual tags can be used to hold other tag's values. No matter what type of value
that may be. This is done by using the assignment operator. The virtual tag's
name property is assigned to a string that is actually another tag's name. The
syntax for this assignment operation is:
<virtual tag name>.name="<tag name>";

Examples:
# Assign the result of a numeric expression to a tag
tag1 = tag2 + tag3;
# Assign a numeric constant to a tag
tag1 = 5;
# Assign a logical constant to a discrete tag
DiscreteTag1 = ON;
# Assign a string literal to a string tag
StringTag1 = This is a string;
# Assign another tags value to a virtual tag
virTags\virTag1.name="memTags\boolTag";

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 108

Arithmetic Operators
Arithmetic operators are used when constructing numeric expressions. The
following operators are available:
The addition operator
may also be used to
concatenate strings.
Division by zero
evaluates to zero.
% may be used with
integer data types only.

+
*
/
%

Addition
Subtraction
Multiplication
Division
Modulo division. Returns the remainder from the division of two numbers.

Operators that act on tags or object properties:


Toggle <discrete tag/object property>
Toggles the value of a discrete tag or object property from 1 to 0 or 0 to 1.
Decr <numeric tag/object property>
Decrements the value of a numeric tag or object property by one.
Incr <numeric tag/object property>
Increments the value of a numeric tag or object property by one.
Examples:
# Modulo counter
nAngleTag = (nAngleTag + 1) % 360;
# Toggle the visibility of an object
Toggle _ThisWin.Rect1.Show;
# Increment the value of a tag
Incr tag1;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 109

Flow Control
IF-THEN-ELSE conditional construct.
Syntax:
If <relational expression> Then
Statement 1;
Statement 2;
.
Statement n;
ElseIf <relational expression> Then
Statement 1;
Statement 2;
.
Statement n;
Else
Statement 1;
Statement 2;
.
Statement n;
EndIf;
If a <relational expression> resolves to a logical TRUE the statements following
the Then keyword are executed followed by a jump to the first statement following
the EndIf keyword. If a <relational expression> resolves to a logical FALSE each
successive ElseIf condition will be evaluated until a logical TRUE <relational
expression> is found. If all ElseIf conditions are found to be FALSE, the Else
section will execute if present otherwise execution will jump to the first statement
following the EndIf keyword.
You may include as many or as few ElseIf sections as are necessary to qualify
the set of conditions you are scripting.
You may omit the Else section if no default processing is required.
While Loop
Syntax:
While <relational expression>
Statement 1;
Statement 2;
.
Statement n;
EndWhile;
A While Loop can only be used in a While Showing Window Script, While Running
Project Script, or While Key Pressed Take Action Script.
If the <relational expression> resolves to a logical FALSE, execution jumps to the
first statement following the EndWhile keyword. If the <relational expression>
resolves to a logical TRUE, the body of the loop will execute up to the EndWhile
keyword and the script will be suspended until the next interval as specified in the
Interval setting. When execution resumes, the <relational expression> is
evaluated again and the process repeated.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 110

Math Functions
Each of the following functions returns and expects arguments of the real data
type.
Sin (<angle in degrees>)
Returns the trigonometric sine of <angle in degrees>
Cos (<angle in degrees>)
Returns the trigonometric cosine of <angle in degrees>
Tan (<angle in degrees>)
Returns the trigonometric tangent of <angle in degrees>
Asin (<real>)
Returns the inverse sine of <real>
Acos (<real>)
Returns the inverse cosine of <real>
Atan (<real>)
Returns the inverse tangent of <real>
Sqrt (<real>)
Returns the square root of <real> (returns zero if <real> is negative)
Pow (<number>, <exponent>)
Returns <number> raised to the power <exponent>
Abs (<real>)
Returns the absolute value of <real>

Examples:
# Calc the hypotenuse of a right triangle from the lengths
# of its other two sides.
Hyp = sqrt ((s1 * s1) + (s2 * s2));
# Calc the angle between Hyp and S2
Angle = atan (s1 / s2);

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 111

String Functions
String functions operate on string expressions. You can specify a string
expression by using a string literal or string tag or by concatenating string literals
and string tags in any combination using the + operator.
A string literal can be up
to 127 characters in
length.

You create a string literal by enclosing the characters you wish to use in double
quotation marks as in "This is a string." If you need to include the
double quotation character () in the string you can precede it with a backslash
character (\). If the literal must end with the backslash character because the
string will represent a path name then you should add one additional backslash to
prevent the closing quote from being included as part of the string.
LTrim (<string expression>)
Returns <string expression> with leading spaces removed.
RTrim (<string expression>)
Returns <string expression> with trailing spaces removed.
Trim (<string expression>)
Returns <string expression> with leading and trailing spaces removed.
Str (<numeric expression>)
Returns the string representation of <numeric expression>
Val (<string expression>)
Returns the numeric value of <string expression>.
UCase (<string expression>)
Returns <string expression> with all characters converted to upper case.
LCase (<string expression>)
Returns <string expression> with all characters converted to lower case.
Chr (<numeric expression>)
Returns a single character string consisting of the ASCII character indicated by
<numeric expression>.
Len (<string expression>)
Returns the number of characters in <string expression>.
Equal (<string expression1>, <string expression2>)
Returns 1 if <string expression1> is equal to <string expression2>, 0 if not.
Left (<string expression>, <num chars>)
Returns the leftmost <num chars> characters from <string expression>.
Right (<string expression>, <num chars>)
Returns the rightmost <num chars> characters from <string expression>.
Mid (<string expression>, <first char>, <num chars>)
Returns the middle <num chars> characters from <string expression> starting at
<first char>.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 112

StrPathName (<string expression>)


Returns the path portion of a file specification identified by <string expression>.
If <string expression> were given as c:\path\file.ext the return would be
c:\path\
StrFileName (<string expression>)
Returns the file name portion of a file specification identified by <string
expression>.
If <string expression> were given as c:\path\file.ext the return would be
file.ext
Examples:
# Simple string assignment
StringTag = "My String";
# Assignment of a string containing embedded quotes
QuotedStringTag = "This string needs \"quotes\"";
# Assignment of a path to string tag (note the extra
# backslash)
PathStringTag = "c:\dir1\dir2\\";
# Convert a string to a number
NumTag = Val (StringTag);

File Functions
The <tag name> passed to the following two functions may be used as <file
name> when calling the file read/write functions described below. The tag name
supplied must be a string type.
FileGetWriteName (<tag name>)
Displays a dialog box that allows the operator to select/enter a file specification
and assign it to the string tag identified by <tag name>. The string tag will contain
a complete file specification including drive, path and filename.
When a selection is
made from this dialog,
the path is remembered
between uses.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 113

FileGetReadName (<tag name>)


Displays a dialog box that allows the operator to select/enter a file specification
and assign it to the string tag identified by <tag name>. The string tag will contain
a complete file specification including drive, path and filename.
The difference between this function and FileGetWriteName() is that for this
function the operator must choose an existing file.
When a selection is
made from this dialog,
the path is remembered
between uses.

Notes:
1. The file name functions should only be called from a Take Action script (On
button down or On button up).
2. The dialog box that is displayed by calling either of these functions will not be
displayed until after the function returns. You should not include any
statements following FileGetReadName() or FileGetWriteName() that
depend on the file name that is to be selected.
3. You should only call these functions from an On button down or On button up
Take Action script.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 114

Each of the following functions returns a Large Integer value indicating the byte
offset into the file where the operation completed. This return value may be used
as the <offset> argument in subsequent calls to the file functions. If an error
occurs, the function will return -1 and the system tag _FileOpStatus will contain a
value indicating the type of error.
FileWriteText (<file name>, <offset>, <string expression>, <length>)

Writes <length> characters from <string expression> to the file specified by


<file name> starting at byte offset <offset>.
e.g. FileWriteText(PathTag, 5, StringTag, LengthTag); Writes StringTag data
over existing file data beginning after character 5.
If <offset> is given as -1, the characters will be appended to the file.
e.g. FileWriteText(PathTag, -1, StringTag, LengthTag); Writes StringTag data
to end of existing file data.
If <offset> is given as -2, the specified file is completely erased prior to
performing the write operation.
e.g. FileWriteText(PathTag, -2, StringTag, LengthTag); File will contain only
characters from StringTag
If an <offset> is given that is past the end of the file, the space between the
current file endpoint and the new characters will be padded with spaces.
If <length> is given as -1, all characters in <string expression> will be written.
No carriage return line feed is appended to the output text. If the text should
be terminated with a CR-LF pair you can append +Chr(13)+Chr(10) to <string
expression>.

Example:
# The string parameters used within the FileWriteText
# function can also be entered as literals such as:
# FileWriteText
#("C:\testfile.txt", -1, "String", Len("String));
PathTag = "C:\temp\testfile.txt";
StringTag = "New Message: " + plc_string + Chr(13) + Chr(10);
LengthTag = Len (StringTag);
FileWriteText (PathTag, -1, StringTag, LengthTag);
if _FileOpStatus <> 0 Then
Show "MyErrorWindow";
endif;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 115

FileReadText (<file name>, <offset>, <string tag/object property>, <length>)

Reads <length> characters from the file specified by <file name> starting at
byte offset <offset> into <string tag/object property>
If a read past end of file is attempted, the function will read as much data as it
can and return -1. _FileOpStatus will be set to -4.
If an <offset> is given that is negative or past the end of the file no action will
occur.
The tag or object property specified must have write permission and be a string
type.
Example:
# The string parameters used within the FileReadText
# function can also be entered as literals such as:
# FileReadText("C:\temp\testfile.txt", 0, StringTag, 100);
PathTag = "C:\temp\testfile.txt";
FileReadText(PathTag, 0, StringTag, 2000);
if _FileOpStatus <> 0 And _FileOpStatus <> -4 Then
Show "MyErrorWindow";
endif;
FileWriteCSV (<file name>, <offset>, <tag name>, <number of tags>)

Generates a record which consists of comma separated data fields from


<number of tags> tags starting with <tag name>.
<tag name> must be of the form "base name+numeric suffix" i.e. Tag43,
DataVal20.
<tag name> and <number of tags> must be literals.
CSV data fields are limited to 250 characters each.
The <offset> is the starting record where new data fields are written to the
specified file.
If <offset> is given as -1, output is appended to the specified file.
If <offset> is given as -2, the specified file is erased prior to performing the
write operation.

Example:
# The file name parameter used within the FileWriteCSV
# function can also be entered as a literal such as:
# FileWriteCSV ("C:\temp\testrec.csv", -1, UserTag1, 10);
#
#
#
#
#

In order for this script to compile properly, your tag


database would need to contain tags UserTag1,
UserTag2,...,UserTag10.
The values of these ten tags would then be written to
the CSV output file.

PathTag = "C:\temp\testrec.csv";
FileWriteCSV(PathTag, -1, UserTag1, 10);
if _FileOpStatus <> 0 Then
Show "MyErrorWindow";
endif;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 116

FileReadCSV (<file name>, <offset>, <tag name>, <number of tags>)


Reads comma separated data from <file name> starting at <offset> record.
The data is read into tags starting with <tag name> and progressing until
<number of tags> fields are read.
<tag name> must be of the form "base name+numeric suffix" i.e. Tag43,
DataVal20.
<tag name> and <number of tags> must be literals.
The <offset> is the number of records into the file, each record may any
number of data fields.
Example:
# The file name parameter used within the FileReadCSV
# function can also be entered a literal such as:
# FileReadCSV ("C:\temp\testrec.csv", 0, UserTag1, 10);
#
#
#
#
#

In order for this script to compile properly, your tag


database would need to contain tags UserTag1,
UserTag2,...,UserTag10.
These ten tags would then be loaded with the data read
from the CSV input file.

PathTag = "C:\temp\testrec.csv";
FileReadCSV(PathTag, 0, UserTag1, 10);
if _FileOpStatus <> 0 Then
Show "MyErrorWindow";
endif;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 117

Sound Functions
The function that you will use to generate sound from a Infilink project depends on
whether or not the target PC will have an installed sound card and speakers.
Beep (<numeric expression>)
Issues one or more beep to the PC speaker.
If <numeric expression> is given then the result of that expression will determine
the beep count, otherwise a single beep will be issued.
No special audio hardware is required to use this function.
PlaySound (<string expression>)
Plays the sound specified by <string expression>.
<string expression> can be a .WAV file specification or the name of a system
sound as defined in WIN.INI.
The size of a .WAV file specified to this function should be < 100 KB in length.
This function requires a sound card.
Example:
# Sound an alarm when the fluid level exceeds our limit
if (TankLevel > TankLimit) then
TankInlet = OFF;
PlaySound (WaveFilePath + "tanklim.wav");
endif;

Window Functions
The argument to each of the following functions is the name of a window (not the
window title). In all cases <window name> must be quoted as in "Win001".
Hide <window name>
Makes a window invisible, but does not unload it from memory.
Load <window name>
Loads a window into memory, but does not make it visible.
Move <window name> To <new left>, <new top>
Changes the location of a window. Coordinates are relative to the upper left
corner of the main application window.
Move <window name> By <horizontal change>, <vertical change>
Changes location of a window relative to its current location.
Resize <window name> To <new width>, <new height>
Changes the size of a window.
Resize <window name> By <change in width>, <change in height>
Changes size of a window relative to its current size.
Show <window name>
Makes a window visible. If the window is not already in memory, it will be loaded.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 118

Unload <window name>


Removes a window from memory.
Examples:
# Move this window to the right by 10 pixels (Because we
# are operating from Take Action script assigned to a
# button on the window we want to move we can use _ThisWin.)
# Move _ThisWin by 10, 0;
# Hide a window and show a different one
Hide MainMenu;
Show TrendView;

System Functions
All system functions have the following syntax: _SysCmd.<identifier>
Supported identifiers are described below. If a command corresponds to a menu
item, the item is given as <Menu>/<Item>.
AboutBox Help/About...
Displays the Run Mode About Box.
AlarmLogStart Logger/Start alarm logger
Turns on the Alarm Logger.
AlarmLogStop Logger/Stop alarm logger
Turns off the Alarm Logger.
CloseWin File/Close windows...
Displays a list of open windows that may be selectively closed.
DataLogStart Logger/Start data logger
Turns on the Data Logger.
DataLogStop Logger/Stop data logger
Turns off the Data Logger.
DataLogPulse Logger/Pulse data logger
Pulses the Data Logger, causing it to take a snap-shot of all tags that have the
Log Data attribute set.
DesignMode Project/Design mode
Returns the project to Design Mode for editing.
EventLog Windows/Show events
Brings the Event Logger to the foreground.
Exit Project/Exit
Exits Infilink Run Mode.
HideMenus
Causes the menu bar at the top of the main window to be hidden, restricting
access to the menu commands.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 119

LogIn Users/Login...
Displays the login dialog box.
LogOut Users/Log out
Logs the current user out of the system. A user must be logged in for this
command to succeed.
OpenWin Project/Open windows...
Displays a list of unopened windows that may be selectively opened.
ShowMenus
Causes the menu bar at the top of the main window to be shown, allowing access
to the menu commands.
GroupConnect (<"group name">)
Causes the specified OPC tag group to attempt to establish a connection with
the server.
GroupDisconnect (<"group name">)
Causes the specified OPC tag group to break a connection with the server.
GroupDisable (<"group name">)
Causes the specified DDE tag group to stop communicating with the server.
GroupEnable (<"group name">)
Causes the specified DDE tag group to resume communications with the
server.
GroupReset (<"group name">)
Causes the specified DDE tag group to break then re-establish a link with the
server.
Examples:
# Initialize the display on start
_SysCmd.HideMenus;
_SysCmd.Login;

Miscellaneous Functions
Run (<string expression>)
Evaluates <string expression> and attempts to launch a Windows application of
that name. The return value will be TRUE if the application is launched and
FALSE if not.
PostMsg (<string expression>)
Posts the result of string expression to the Event Logger window. This function
can be used when debugging a script or to post messages about the result of an
operation.
Exit
Stops executing the current script.
Exit Application and
PulseDataLogger are
provided for compatibility
with previous versions of
Infilink.

Copyright 2004 KEP, Inc.

Exit Application (same as _SysCommand.Exit () )


Closes the project and exits Infilink Run Mode.
PulseDataLogger (same as _SysCommand.DataLogPulse () )
Causes the data logger to take a snapshot of all tags that are being logged.
Scripts: The Final Word in Flexibility 120

Examples:
# This example loads Microsoft Excel with a specific
# spreadsheet and if successful, sends the values of tags
# PlcTagPressure and PlcTagTemp to the spreadsheet by
# assigning those values to tags that reference cells R1C1
# and R1C2
if Run ("excel.exe calc.xls") then
ExcelTagR1C1 = PlcTagPressure;
ExcelTagR1C2 = PlcTagTemp;
endif;
# Post a message to the event logger
PostMsg (Tank filled by operator + _User);

Color Constants
All color constants have the following syntax : _SysColor.<identifier>
Color Identifier

Red Value

Green Value

Blue Value

Aqua
Black
Blue
Fuchsia
Green
Gray or Grey
Lime
Maroon
Navy
Olive
Purple
Red
Silver
Teal
White
Yellow

0
0
0
255
0
128
0
128
0
128
128
255
192
0
255
255

255
0
0
0
128
128
255
0
0
128
0
0
192
128
255
255

255
0
255
255
0
128
0
0
128
0
128
0
192
128
255
0

Example
# Change fill color;
_ThisWin.MyRectangle.FillColor = _SysColor.Maroon;

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 121

Object Properties
Access to the properties of an object requires the following syntax:
<window name>.<object name>.<property name>
When accessing an object from within a Window Script or Take Action Script and
that object is on the same window that the script is being assigned to, <window
name> may be substituted with the keyword _ThisWin.
Example:
# Change the fill color of an object to RED
_ThisWin.Rect1.FillColor = _SysColor.RED;

General Object Properties


Show Discrete
Sets/returns the visible state of the object. TRUE = Visible, FALSE = Hidden.
Name String
Returns the name of the object assigned in Design Mode.
LineColor Long
Sets/returns the color used to draw the object border.
LineStyle Integer
Sets/returns the style of lines used to draw the object border. Values are as
follows: 0 = solid, 1 = dashed, 2 = dotted, 3 = dash dot, 4 = dash dot dot. Nonsolid line styles are only applied if the LineWidth property is set to 0 or 1.
LineWidth Integer
Sets/returns the thickness of lines used to draw the object border. Values range
from 0 to 7 where 7 is the thickest.
FillColor Long
Sets/returns the color used to draw the interior of filled objects.
FillStyle Word
Sets/returns the pattern style used to fill the interior of filled objects.
Text String
Sets/returns the text assigned to the object
TextColor Long
Sets/returns the color used to draw text.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 122

The following table shows the accessible properties of each object


Line
Line
Line
Show
Name
Object
Color*
Width
Style
R/W
R/W
R/W
R/W
RO
Line
R/W
R/W
R/W
R/W
RO
Rectangle
R/W
R/W
R/W
R/W
RO
Rounded Rectangle
R/W
R/W
R/W
R/W
RO
Ellipse
N/A
N/A
N/A
R/W
RO
Group
N/A
N/A
N/A
R/W
RO
Button
R/W
R/W
R/W
R/W
RO
Polyline
R/W
R/W
R/W
R/W
RO
Polygon
R/W
R/W
R/W
R/W
RO
Arc
R/W
R/W
R/W
R/W
RO
Pie
R/W
R/W
R/W
R/W
RO
Chord
N/A
N/A
N/A
R/W
RO
Bitmap
N/A
N/A
N/A
R/W
RO
Text
N/A
N/A
N/A
R/W
RO
Trend
N/A
N/A
N/A
R/W
RO
Alarm History Viewer
N/A
N/A
N/A
R/W
RO
Alarm

Fill
Color*
N/A
R/W
R/W
R/W
N/A
R/W
N/A
R/W
N/A
R/W
R/W
N/A
R/W
N/A
N/A
N/A

Text
N/A
N/A
N/A
N/A
N/A
R/W
N/A
N/A
N/A
N/A
N/A
N/A
R/W
N/A
N/A
N/A

Text
Color
N/A
N/A
N/A
N/A
N/A
R/W
N/A
N/A
N/A
N/A
N/A
N/A
R/W
N/A
N/A
N/A

RO = Read Only, R/W = Read/Write, N/A = Not available


* Note: Colors are formed by combining 8 bit Red, Green and Blue intensity values into a 24 bit integer of the
form: (Blue * 65536) + (Green * 256) + Red. You can also use one of the predefined color constants when
assigning colors at run time.
Arc, Pie and Chord Properties
StartAngle Integer
Sets/returns the angle in degrees between the horizontal centerline of the object
and a line drawn from the center point to the point on the border at which drawing
begins.
EndAngle Integer
Sets/returns the angle in degrees between the horizontal centerline of the object
and a line drawn from the center point to the point on the border at which drawing
ends.
Clockwise Discrete
Sets/returns the direction in which the object is drawn. TRUE = Clockwise from
StartAngle, FALSE = Counterclockwise from StartAngle.
Rounded Rectangle Properties
CornerWidth Integer
Sets/returns the width of the ellipse used to create the rounded corners.
CornerHeight Integer
Sets/returns the height of the ellipse used to create the rounded corners.
Alarm Viewer Properties
Severity Integer
Sets/returns the severity of alarms that can be displayed in the alarm window. This
property has a valid range of 0 to 9. Alarms of severity greater than or equal to this
value will be displayed.
AckAll Service
Acknowledges all current alarms.
ScrollUp, ScrollDown Service
Scrolls the alarm display up/down by one line.
Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 123

ScrollLeft, ScrollRight Service


Scrolls the alarm display left/right by one column.
AlarmCount Integer
Read only property that identifies the number of alarms displayed in the viewer.
Alarm History Viewer Properties
Filter Service
Displays a dialog box that allows the operator to select filter settings for the viewer.
ScrollLeft, ScrollRight Service
Scrolls the alarm display left/right by one column.
ScrollUp, ScrollDown Service
Scrolls the alarm display up/down by one line.
PageUp, PageDown Service
Scrolls the alarm display up/down by the number of lines that may be viewed at
one time.
Home Service
Positions the first available alarm at the top of the view.
End Service
Positions the last available alarm at the bottom of the view.
AlarmCount Large Integer
Read only property that identifies the number of alarms displayed in the window.
StartDate, StartTime String
Sets/returns the date/time used to determine the first alarm that will be shown by
the viewer. The format used when reading input or generating output will be that
defined under the [intl] section of the WIN.INI file. Refer to your Windows
operating documentation for more information on how to change the format of
these items.
Print Service
Sends the alarm history to the default Windows printer.
Trend Properties
Mode Discrete
Sets/returns the operating mode of the trend where 0 = Real-time and 1 =
Historical.
TimeSpan Long
Sets/returns the time span of a historical trend in seconds. The valid range of this
property is from 0 to 2147483.
DrawMode Integer
Sets/returns the drawing mode for historical data where 0 = Scatter, 1 = Discrete
and 2 = Smooth.
Scatter plots data points only along the line of the graph.
Discrete joins data points assuming the value is constant until the next data
point (i.e. a stair step pattern).
Smooth joins data points directly, this is the default mode used for trends. Even
with this mode set, the graph can appear to be squared if data changes are
abrupt.
Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 124

Redraw Service
Refreshes the historical trend using the current trend properties.
StartDate, StartTime String
Sets/returns the start date/time used when displaying historical data. The format
used when reading input or generating output will be that defined under the [intl]
section of the WIN.INI file. Refer to your Windows operating documentation to
change the format if these items.
See also: Logging Data

Path String
Sets/returns the DOS path name used when obtaining historical data. It is
initialized to the default data logger path when the object is created.
MinRange, MaxRange Real
Sets/returns the vertical range of data values displayed on a historical trend.
Skip Long (Write only)
Scrolls a historical trend forward or backward by the specified number of
milliseconds. Assigning a positive value scrolls the trend forward in time, a
negative value scrolls it backward. Typically you would use this property in a Take
Action script assigned to a button. One button would use a script to assign a
negative value when pressed and another would assign a positive value.

The following four properties work together:


CurrentPen Integer
Sets/returns the current history pen used with the next three properties. Valid
values range from 1 to 10.
PenTag String
Sets/returns the name of the tag assigned to the current pen. Changing this
property changes the source of data for the pen.
Cursor Long
Sets/returns the current cursor position in milliseconds relative to the start time of
the trend. The cursor value is subtracted from the StartTime and used with
CurrentPen to determine PenValue. The cursor value cannot exceed the time
span of the trend.
PenValue Real
Returns the value of the CurrentPen at the current Cursor position. If the cursor is
between samples, the value returned is for the previous sample.

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 125

Copyright 2004 KEP, Inc.

Scripts: The Final Word in Flexibility 126

Lesson 2: Using Infilink to Mimic A Process

Overview
If you need help, the
completed lessons may
be found in the Infilink
lessons directory.
These lessons are
provided to give you a
reference of what a
project should look like
when completed.

In the last lesson, you learned some of the capabilities of Infilink as a graphical
tool. You should now be familiar with:
How to draw objects in a window.
How to access and edit object properties.
How to use the Short Cuts and Toolbars.
How to create groups.
How to reshape objects.
In this lesson, you will create a simple process and animate it. As the previous
lesson acquainted you with how to navigate in Infilink this lesson will provide an
additional foundation for the lessons that follow.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 127

Lesson Objectives
All lesson projects,
although written to work
with memory tags, will
work with PLC's with
minimal modification.

This lesson is designed to provide you with the basics needed to create a simple
Infilink project that can be applied to a real-world situation. In this project you will
learn:

How to copy objects from the supplied Libraries.


How to enter tags.
How to create a Project Script.
How to animate an object by associating a tag with it.
You will reinforce editing skills learned in Lesson 1.

When this lesson is


completed, it will
simulate the filling of a
tank.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 128

Creating a Project
You will start by creating a new project as you did in Lesson 1. For this lesson you
will need to create a project called Lesson2.
Assign properties to the default window as shown. (Name, Title, Type,
Background Color)
Although in this lesson
you are going to resize
the window by the Click
and Drag method, you
can position and size a
window using the
dimension settings in the
Window Properties
Dialog.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 129

Copying Library Objects


Place a Pump from the Library
To help reduce the development time of your project, Infilink provides an extensive
object library. All you need to do is find the objects that you want and drag them
into your project windows. A complete preview of all library objects can be found
in Appendix A. For more information on libraries see Libraries: A Quick Path to
Great Looking Apps., later in this document.
1. From the Infilink Main Menu, select the Library Manager item from the View
If you make a mistake
when drawing an object,
you can choose Undo
from the Edit menu or
press CTRL-Z to back
up a step.

menu or click on the


Project tools toolbar. In the Library Manager Select
Open from the File menu.

Find and open the System Library.kol Infilink library file.


2. Scroll down through the list of library groups until you find the library group
named Pumps. Click on Pumps to display the pump objects.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 130

3.

You can use the Library Manager


Treebar to expand Library Group
trees and find objects as well.

Move the mouse over each of the objects on the library window. You will
notice that momentarily holding the mouse cursor over an object will display a
description of that object. Use this method to find and select the object
identified as Horizontal Pump - left shown below.

4. Once your have selected the object, drag and drop the pump to the upper half
of the window and about one third of the way.
If the Library Manager is on top
of the Window, you may have to
move Library Manager out of the
way.

Unchecking Always On Top in


the Library Managers View
menu will send the Library
Manager to the background once
the mouse leaves the Library
Manger window during drag and
drop.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 131

5. Use the procedure from above to drag and drop object Tank 28 from library
group Tanks1 into the project window as shown below.

6. Drag and drop object Control Valve - vertical from library group Valves into
the project window.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 132

7. Drag and drop object Long horizontal pipe from library group Pipes1 into the
project window.

8. Drag and drop object Long vertical pipe from library group Pipes1 into the
project window.

9. Close the Library Manager.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 133

Edit/Arrange the Objects in the Window


Now that you have all of the objects you need its time to start placing them
together on the window. Our goal is to have a tank that will be filled using a pump.
The inlet to the pump comes from an off screen source via a pipe. A control valve
will be employed to empty the tank to an off screen location. You will place a level
indicator on the tank to display its fill level. The tank fill level will be the only
animation assigned in this lesson.
Turn off the grid if it is on by
unchecking the Grid item in the
View menu.

Rotate, Enlarge, and Place the Tank


Because the focal point of the lesson is the tank you will place and size it first.
1. Select the Tank by placing the cursor over it and pressing the left mouse
button.
2. Once selected, click the Rotate Counterclockwise button
on the Toolbar to
rotate the tank 90 Degrees in the counterclockwise direction.
3. You will now resize the tank vertically by placing the cursor over the object
handle at top center of the object until it becomes a double arrow. Click and
hold the left mouse button, and slowly drag the top edge of the tank up. Our
goal is to stretch the flange on the inlet so that it is slightly larger then the
horizontal pipe. You can check this by dragging the pipe over next to the
flange and comparing the ends.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 134

4. You will now resize the tank horizontally. Our goal is to stretch the flange on
the outlet so that it is slightly larger than the vertical pipe. You can check this
by dragging the pipe over next to the flange and comparing the ends. First,
resize the Window larger so that it can hold the resized objects.

5. Next place the tank in the upper right corner of the window.
As an alternative to duplicating
the section of pipe, you could
make a copy of it and paste the
copy into the project window.

Copy, Size, and Place a Section of Horizontal Pipe


Now you are going to place a section of pipe at the inlet flange of the tank so that
you can connect the pump to the tank.
1. Select the Horizontal Pipe.
on the toolbar. A second section of horizontal
2. Click the Duplicate Button
pipe should appear below and to the right of the original. (Ctrl-D does the same
thing.)

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 135

3. Drag the duplicated pipe to the tank and place it as close to the flange as you
can. If the pipe is not aligned properly use the arrow keys on the keyboard to
move the object while it is still selected. When the grid is disabled the object
will move one pixel width for each key click, otherwise it will move one grid
width.

Resize and Place the Pump


You will now place the pump so that it is connected to the inlet pipe.
1. Select the Pump.
2. Drag the pump so that its flange is aligned as close to the pipe as you can get
it.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 136

3. Resize the pump until its flanges and pipes are the proper size for the
horizontal pipe.
4. Use the keyboard arrow keys to position the pump flanges against the
horizontal pipe.

Place and Resize the Horizontal Pipe


Now you are going to place the remaining section of horizontal pipe. Resize it to
give the appearance that it is coming from an off screen source connected to the
pump.
1. Select the Horizontal Pipe.
2. Drag the pipe and place it as close as you can to the inlet flange on the pump.
3. Use the cursor keys to align the pipe properly with the pump inlet flange.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 137

4. Resize the pipe by dragging its left side to the edge of the screen.

Copy, Place and Size a Section of Vertical Pipe


You are now going to create and place a section of vertical pipe at the outlet to the
tank.
1. Select the Vertical Pipe and duplicate it.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 138

2. Drag the duplicated pipe to the tank and place it as close to the outlet flange
as you can.
3. Use the keyboard arrow keys to align the pipe to the outlet flange and pipe.

Place and Resize the Control Valve


Now you will place the outlet control valve for the tank. Youll assume that there is
a gravity drain on the tank.
1. Select the Control Valve and place it as close as you can to the bottom end of
the vertical pipe.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 139

3. Resize the valve until the pipe ends are close to the same size.
4. Use the keyboard cursor keys to align the valve to the bottom of the vertical
pipe.

Place and Resize the Vertical Pipe


You are now going to place the last section of vertical pipe. This will simulate the
tank draining to a location somewhere off screen.
1. Select the Vertical Pipe. Align it as close to the outlet flange of the valve as
you can.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 140

2. Use the keyboard arrow keys to align the pipe with the outlet flange of the
valve.
3. Resize the pipe so that it goes to the bottom edge of the window.

You will be writing a script to


simulate a level sensor in the
tank. If this were a live project
you would simply assign a PLC
tag to the animation.

Add a Fill Meter to the Tank


Finally you are going to place two rectangles on the tank to show the level of fill.
The first will be a black rectangle that will act as the background for the second,
which will be animated to indicate the fluid level inside the tank.
1. Click the Draw Rectangle button

on the Toolbar.

2. Draw a black filled rectangle above the outlet flange of the tank as shown
below.

3. If the Rectangle is not black then click the Fill Color button
and choose black from the color palette.

on the Toolbar

on the Toolbar. A second rectangle should


4. Click the Duplicate button
appear below and to the right of the first.
5. Click the Fill Color button
color palette.

Copyright 2004 KEP, Inc.

on the Toolbar and choose a light blue from the

Lesson 2: Using Infilink to Mimic A Process 141

6. Resize the rectangle until it is half the size of the black one.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 142

7. Use the keyboard arrow keys to align the rectangle so that it covers the
bottom half of the black rectangle.

8. While you have the rectangle selected, you are going to identify it as an
important object. Press F4 to display the Rectangle Properties dialog box.
9. Enter "T1_level" in the Name field and click OK to close the dialog box.
It is a good idea to assign a
name to an object that will be
animated. The name will help
you locate the object if you must
edit the animation at a later time.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 143

Define a Tag to Assign to the Fill Level Animation


Tag names are not case
sensitive.

You are now going to create a tag that will be used to drive the animation for the
fill level on the tank. You will only go over the steps necessary to build this tag.
For details on creating tags see the chapter on Groups and Tags.
In a live application that accesses data from a PLC, the tag that you create would
be associated with a PLC register connected to a level sensor in the tank. As the
tank level increases or decreases, the value in the PLC register would change and
the indicator in Infilink would change in proportion.
1. Select the Tag Groups item from the Project menu or click the
display the Tag Groups dialog box.
2. Click the
Memory.

tool to

tool to create a new Memory tag group. Name the tag group

New Tag enter


3. In the Tag Name field right click and select
"Tank_level" for the tag name.
4. Choose a Data Type of Word and Security for Internal as Read/write.
5. Click the OK button to add the tag to the database.

6. Click the Olose button to exit.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 144

Animate the Object T1_level


Now you are going to create the animation, with the aid of the tag you just added,
which will give the rectangle named T1-level the appearance that it is indicating
the exact level of fluid in the tank.
1. Make sure that you still have the rectangle T1_level selected. You can verify
this by checking the object name in the status bar at the bottom of the Infilink
window.
2. With the cursor positioned over the light blue rectangle, press the right mouse
button to activate the short cut menu and select Animations.

3. From the Animations dialog, click the Stretch Vertically button

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 145

button and select the "Tank_level" tag you created


4. Click on the
earlier.
5. Click the Stretch from dropdown and select Right/bottom edge.

6. Click the Offset from initial size, Low position button


line with the bottom edge of the rectangles.

and align the cursor

7. Click the Offset from initial size, High position button


and align the cursor
line with the top of the black rectangle.
8. Change the Input value range High value to 1000.
9. Click OK to accept the animation and exit the Stretch Vertically dialog box.
10. Click Close to exit the Animations dialog box.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 146

Create a Script to Simulate an Increasing Fill Level


Because you are only using a memory tag, you need to write a script to allow us to
simulate a rising fluid level in the tank. Normally you would be using a sensor
attached to a PLC or smart device to measure the exact fluid level in the tank.
1. Select Properties from the Project menu.

For a complete
understanding of scripts
and how to use them,
See Scripting.

Copyright 2004 KEP, Inc.

2. Select the Scripts tab.


3. There are 3 possible types of scripts at the project level: On project open, While
project running and On project close. If the Script Editor did not open by default
to While project running then select it now.

Lesson 2: Using Infilink to Mimic A Process 147

4. Type in the following Script:

5.

If Tank_Level < 1001 then


Tank_Level = Tank_Level + 1;
Endif;
In the Scan rate field change the number to 100 msec.

button to verify that the script is correct. If it is, the


6. Click the
message No errors. will appear at the bottom of the window.
This script will execute
every 100 milliseconds.
If the value of
"Tank_level" is less than
1001 then it will be
incremented by 1. If it is
greater than or equal to
1001, the script will do
nothing.

7. Click OK to close the Project Properties dialog box and accept the changes.

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 148

Save the Project


If a project is modified
you will be prompted to
save changes when you
choose Exit or Run.

Now you need to save the project.


1. Select the Save item from the Project menu.

Run the Project


1. Select the Run item from the Project menu or click on the
tool.
2. When the Run Mode starts, you should start to see the blue fill indicator
moving slowly toward the top of the tank.

Exit Run Mode


If you want to keep the
Run Mode open for the
next lesson then click
Design Mode in the
Project menu.

Copyright 2004 KEP, Inc.

1. Click on the Project menu and select Exit.


2. The Run Mode is now closed.

Lesson 2: Using Infilink to Mimic A Process 149

Copyright 2004 KEP, Inc.

Lesson 2: Using Infilink to Mimic A Process 150

Lesson 3: Controlling a Process

Overview
If you need help, the
completed lessons may
be found in the Infilink
lessons directory.

You have now learned:


How to create a simple animation to monitor a process.
How to copy objects from the object libraries.
How to add a tag.
How to write a simple script.
In later lessons you will select and use some library objects that have animations
already assigned to them. In this lesson, you will learn:
How to create and animate buttons and text.
How to create scripts that are more complex.
How to control a process from Infilink.
You will see that controlling a process is as easy as monitoring it was in the last
lesson.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 151

Lesson 3 Objectives
All lesson projects,
although written to work
with memory tags, will
work with PLC's with
minimal modification.

Lesson 3 is designed to advance your basic knowledge of creating Infilink


applications by building upon Lesson 2. You will build upon the previous lesson by
adding button controls for the valve and pump, text objects to display the fill rate,
drain rate and tank level, and a slider control to vary the drain rate of the tank.
In this lesson you will learn:

How to draw and animate buttons for use in a control environment.


How to draw and animate text for use as data output and input.
How to create your own slider controls.
How to write a script that controls a process and performs some error
checking.

Continuing from Lesson 2


Opening Lesson 2
If you did not close Lesson 2 then skip to the "Adding Some New Tags" section of
this lesson.
1. Start Infilink Design Mode.
2. The Open Project dialog box will be displayed with lesson2 highlighted by
default. If lesson2 is not highlighted you can browse the directory tree until you
find it.
3. Click OK to open the project.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 152

Adding Some New Tags


Adding Tags
You will start by adding tags for the new animations. Adding tags first will allow
you to immediately animate an object when you create it. You will be adding 4
new tags named Pump_on, Valve_on, Fill_rate, and Drain_rate.
1. Select the Tag Groups item from the Project menu or click the
display the Tag Groups dialog box. (or press F6).
2. Click on the Memory tag group. Click on
3.
4.
5.
6.

Copyright 2004 KEP, Inc.

tool to

to create a new tag.

Type Pump_on in the tag name field located to the left of the
Select Discrete from the Data type drop-down list.
Select Read/Write from the Security Internal drop-down list.
Click the OK button to add the tag to the database.

button.

Lesson 3: Controlling a Process 153

7.
8.
9.
10.

Click on
to create a new tag.
Type Valve_on in the tag name field.
Select Discrete from the Data type drop-down list.
Click the OK button to add the tag to the database.

11.
12.
13.
14.

Click on
to create a new tag.
Type Fill_rate in the tag name field.
Select Word from the Data type drop-down list.
Click the OK button.

As long as you click Add


after making a change
you can add new tags by
modifying the previous
one.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 154

15.
16.
17.
18.

Click on
to create a new tag.
Type Drain_rate in the tag name field.
Select Word from the Data type drop-down list.
Click the OK button.

19. Click the Close button.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 155

Add and Animate the New Objects


Add a Button to Turn the Pump On and Off
You are now going to add a button to the project that will turn the pump on and off.
You are going to assign three animations to it. The first will be an Enter Data
animation that will allow us to turn the control bit on and off. The second will be a
Show Value animation that will indicate the status of the control bit using the
button text. The third and final animation will be a change color animation which,
will allow us to visually verify the status of the control bit by turning the button red
when it is off and green when it is on. First you will draw the button.
Object names are limited
to 32 characters.

1. Click the
button on the Toolbar and draw a button in the project window
next to the pump.
2. Display the properties dialog for the button and name it ctrlPump.
3. Click OK.

Text will be added to the


button using a Show
Value animation.

4. Press F5 to display the Animations dialog box for the button you just created.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 156

You may double click a


tag name to highlight
and select it
immediately.

5. Click the Enter Data button

in the Animations dialog box.

6. In the Enter Data animation dialog box, click the


button to open
the tag list.
7. Click on the tag Pump_on to highlight it then click the Select button.

You may have noticed the drop down box for Entry Method. Discrete tags offer
you 6 ways to enter or change their data.
Popup - Displays a popup dialog box that allows the operator to make an
on/off selection.

Toggle TRUE/FALSE- The value of the assigned tag will be toggled from
TRUE to FALSE or from FALSE to TRUE when the mouse button or
assigned key is depressed.
Force SET/TRUE - A one will be written to the tag whenever the animation
is invoked.
Force RESET/FALSE - A zero will be written to the tag whenever the
animation is invoked.
Momentary-NO - The value of the assigned tag will change to TRUE when
the mouse button or assigned key is depressed and back to FALSE when
released.
Momentary-NC - The value of the assigned tag will change to FALSE when
the mouse button or assigned key is depressed and back to TRUE when
released.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 157

10. Select Toggle from the Entry Method drop-down list.


11. Click OK to accept the animation.
Notice that you can
assign short cut keys to
this animation. Any
animation that requires
the operator to perform
an action can be
assigned a shortcut.

Access level can be


used to control which
operators have access to
this animation.

12. Click the Show Value button

Copyright 2004 KEP, Inc.

on the Animations dialog box.

Lesson 3: Controlling a Process 158

13. In the Show Value animation dialog box, click the Tags button and select
Pump_on.
14. Click on the Discrete radio button.
15. Notice that the Discrete format fields become active: one field to enter the text
that should be displayed when the tags value is ON, and one for when the
value is OFF.

16. Type "Pump On" in the ON text field and type Pump Off in the OFF text field.
17. Click OK to accept the animation.
18. Click the Change Color button

Copyright 2004 KEP, Inc.

on the Animations dialog box.

Lesson 3: Controlling a Process 159

19. Select or type in the name of the Pump_on tag.


20. You will notice that there are two Ranges fields and color selection arrays,
Border and Interior. Each has two dropdown lists boxes that allow you to
select the number of colors for the object. Change both dropdowns to
Discrete.
21. You will notice that the labels for the color selection boxes change to Off and
On. These color selections will represent the objects color when the tag is ON
or OFF.
22. Click on the Interior rectangle labeled ON and select a bright green.
23. Click on the Interior rectangle labeled OFF and select a bright red.
24. Click OK to accept the animation.

25. Click Close at the main Animations dialog to accept all the animations and exit.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 160

Add a Text Object to Enter and Display the Pump Fill Rate
Next, you are going to add a text object that you will interface with the Fill_rate tag
to show its value and provide a click point for data entry.
1. Click the
button on the Toolbar and draw a text object immediately
beneath the pump.
2. Display the properties dialog for the object and name it dspFillrt. The content
of the Text field is not important because you will be assigning a Show Value
animation to the object.
3. Click OK.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 161

4. Click the Enter Data button


in the Animations toolbar or use the Short Cut
menu to display the Animations dialog for dspFillrt and click the Enter Data
button there.
5. Assign the tag Fill_rate by selecting it from the tag list or typing in the name
manually.
6. Click on the Output value range dropdown and select User defined.
7. Type "0" in the Low field and 10 in the High field. These values limit the
range of numbers the operator can enter into the assigned tag.
8. Click OK to accept the animation.

9. Click the Show Value button


in the Animation toolbar.
10. Assign the tag Fill_rate by either selecting it from the tag list or typing the name
manually.
11. Check Field width and type "2" in the Field width text field. This format
specifies that the output will have a maximum of two digits. Leaving Leading
zeroes unchecked indicates that leading zeroes will not be displayed.
12. Click OK to accept the animation.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 162

13. Click OK to accept all the animations and exit the Animations dialog box.

14. If the text object is no longer centered under the pump then either drag the
object with the mouse or align it with the cursor keys until it is.

Build a Slider to Control the Tank Drain Rate


Many sliders are
available for your use in
the Libraries. This lesson
is designed to show you
how easy it is to create
your own object and
animate it.

You are now going to build a slider that you will use to control the drain rate of the
tank through the drain valve. You will create a Slider animation to set the value of
tag Drain_rate. You will also create a Show Value animation to display the setting
assigned to Drain_rate.
1. Click the
button on the Toolbar and draw a rectangle in the lower left
corner of the project window.
2. Use the

You may want to enable


the grid so you can
measure distances using
grid lines.

3. Click the
button on the Toolbar and draw a line on top of the rectangle
about a third of the height from the top. Place the line ends so that they are
approximately a cursor width from either end of the rectangle.
4. Use the
5. Click the

Copyright 2004 KEP, Inc.

button on the Fill Tools Toolbar to set the fill color to light gray.

button on the Line Tolls Toolbar to set the line color to black.
button to select a triple thick line.

Lesson 3: Controlling a Process 163

6. Click the
button on the Toolbar and draw a button centered over the left
end point of the line.
7. Display the properties dialog for the button and name it sldDrain.

8.

With the button still selected click the Slider button


Toolbar.

9.

Assign the tag Drain_rate by either selecting it from the tag list or typing the
name manually.

on the Animations

10. Set the slide direction to Horizontal (This should be the default setting.)
11. Type "0" in the Low Tag value field and 10 in the High Tag value field.
12. Click the Related position selector buttons to graphically position the end points
of the slider. You will want the low end to be at the left end of the line, and the
high end to be at the right end of the line.
13. Click While sliding to allow the Slider to update the tag as you move it.
14. Click OK to accept the animation.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 164

15. Click the


button and draw a text object on the rectangle centered below
the line. This object will be used to display the setting Drain_rate assigned by
the slider.
16. Display the properties dialog for the button and name it dspDrain.

17. Assign a Show Value animation to the object that will display the Integer value
of tag Drain_rate using Field width, 2.
18. If the text object is no longer centered below the line then drag it so that it is.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 165

Duplicate the Slider Text Object and Modify It to Display the


Tank Level
You are now going to make a duplicate of the text object on the slider and modify
it so that you can display the value of tag Tank_level.
1. Select text object dspDrain and right click to Duplicate on the shortcut menu to
make a copy of it.
2. Place the duplicated text object just above the tank over the fill indicator.
3. Click on the object with right mouse button to display the Short Cut menu and
select Reassign Tags.
Reassign tags allows
you to selectively
replace one tag name for
another in each
animation and script
assigned to an object.

4. When the Replace Tag dialog appears, change Drain_rate to Tank_level.


5. Click OK to complete the replacement.
6. Display the properties dialog for the object and change the name from
dpsDrain1 to dspTnklvl.
7. Click the Show Value button
in the Animation toolbar to edit the Show
Value animation.
8. Type "4" in the Field width to replace the old width of "2".
9. If the text object is out of position, drag it so that it is in position.
10. Click OK to accept the animation.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 166

Duplicate the Pump Control Button and Modify to use as a


Valve Control
You are now going to perform the same process on the button that controls the
pump to make a button to control the drain valve.
1. Select the pump control button, ctrlPump and duplicate it.
2. Display the Reassign Tag dialog and change the tag name from Pump_on to
Valve_on.
3. Use the properties dialog to change the name of the object from ctrlPump1 to
ctrlValve.
4. Edit the Show Value animation assigned to ctrlValve to display Unlocked
when Valve_on is ON and Locked when Valve_on is OFF.
5. Your completed project window should appear as shown below.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 167

Modify the Existing Project Script


You are now going to modify your existing project script so that it will work with the
new objects in simulating a tank control. If you were using an actual PLC, you
would have flow sensors monitoring the rate of flow at the inlet and outlet, as well
as the tank level. The pump control button would then turn on an actual pump.
The slider would then control the butterfly in the valve.
1. Display the Project Options dialog by selecting Properties from the Project
menu.
2. Click the Scripts tab to display the Script Editor.
3. Replace the existing While project running script with the following:

The pound sign (#) is


used in Infilink scripting
to allow you to comment
your scripts.

# If the pump is turned on and the tank is not


# full then fill the tank at the specified rate.
If Pump_on AND (Tank_Level < 1001) Then
Tank_Level = Tank_Level + Fill_rate;
Endif;
# If the tank is full then turn the pump off.
If Tank_Level = 1000 Then
Pump_on = OFF;
Endif;
# If the valve is unlocked and the tank is not
# empty the tank at the specified rate.
If Valve_on AND (Tank_Level > 0) Then
Tank_Level = Tank_Level - Drain_rate;
Endif;
# If the pump is on then the valve cannot be
# unlocked.
If Pump_on Then
Valve_on = OFF;
endif;
# If the Valve is Unlocked then the Pump cannot be
#turned on.
If Valve_on Then
Pump_on = OFF;
endif;

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 168

1. Click the Check button to verify that there were no typing errors. Fix any errors
that may be indicated.
2. Click General tab and click the Use popup keypad for data entry startup option
and the Create a project summary compile option.
3. Click OK to accept the script and new project options.

The popup keypad


allows you to enter data
using the mouse if the
project will be run on a
system that doesnt
support a standard
keyboard.

Create project summary


causes Infilink to
generate a report
whenever you save the
project. This report
contains a detailed listing
of every tag, window,
and object. The report is
stored in a file called
COMPILE.TXT located
in the project directory.
You can use Notepad to
view the contents of this
file.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 169

Save and Run the Project


1. Click the Project menu and select Run or press F9.
2. You will be prompted to save changes. You should select Yes.

3. Once the project window has opened in run mode, click on the Fill Rate text
beneath the pump.
4. On the popup keypad, click or type "5".
5. Click OK to accept the new value for Fill_rate.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 170

6. The text object will now display 5.


7. Click on the pump control button above the pump. The button should turn
green and the text should change from Pump Off to Pump On.

8. Once the tank level reaches 1000, the color of the pump control button should
change to red.
9. Click on the slider button and drag it to the right until the text beneath it
displays 8.

10. Click on the valve control button to unlock the valve.


11. The valve should drain the tank in increments of 8. Move the slider and
watch this value change.
12. When you are done, select Exit from the Project menu. If you want to make
changes select Design Mode.

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 171

Copyright 2004 KEP, Inc.

Lesson 3: Controlling a Process 172

Logging: Data and Alarms

Overview
This section covers alarm and data logger setup, assigning alarm information to a
tag, alarm viewer properties and setup of the alarm printer.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 173

The Alarm Logger


Infilink logs alarm data to disk using a proprietary binary format. Infilink Run Mode
uses data in this form when working with an alarm history viewer. To also
generate data files that may be viewed in other applications such as Microsoft
Excel you must check the Generate DBF output files option. This option causes a
DBF (Data Base Format) file to be created and updated in parallel with each of
Infilink's proprietary data files. Because DBF files are about twice the size of
standard Infilink alarm log files you should only check this option if you truly need
to generate portable alarm data.
An alarm log entry is generated when one of the following events is detected:
A tag is entering an alarm state.
A tag is leaving an alarm state.
The operator acknowledges an alarm.
Each entry contains the following information:
A time stamp indicating when the event occurred.
The name of the operator who was logged in at the time of the event.
The event type.
The value of the tag at the time the event was detected.
The user defined comment associated with the alarm.

The Project Properties Alarm Logger tab allows you to specify the destination and
control the scheduling of alarm log file activity.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 174

Basic Settings
See Lesson4

Logging
Only alarms with the Log attribute enabled will be recorded. You can control
whether or not the alarm logger should start automatically when the project starts
by using the Start logger when project starts option.
Directory
The Default option saves alarm log files to a directory called ALARMLOG that is
appended to the project directory. For example, if your project directory is
c:\Infilink\projects\process1 then Infilink will store the alarm log files to
c:\Infilink\projects\process1\alarmlog. Infilink will create this directory if it does not
already exist.
The User specified option allows you to control where logged data will be recorded.
You must enter a fully qualified DOS path name consisting of 256 characters or
less. Whatever you type here will then have the name ALARMLOG appended to
it. If the directory you specify doesn't exist Infilink will create it. To specify a
network directory, you must first map the network resource to a logical drive.
The naming convention of each log file stored in the chosen directory is
YYMMDDHH.ALF. Where YY is the year, MM is the month, DD is the day and HH
is the hour when the data in the file begins. If you choose to also generate DBF
files you will see files of the same base name but with a .LOG extension.

Log File Timings


Change files every n hours
This value specifies how long after the start time to record alarms before creating
a new log file.
Start at hour n
This value specifies the hour of the day that will be used to determine the start of
the first log file for that day.
Keep log files for n days
This value specifies how long after completion of the last update a log file should
be preserved before being deleted.
Example:
Assume the following:
1. Alarm logging is enabled and at least one alarm in the project will be
logged.
2. Start logging immediately is enabled for the project.
3. Start at Hour = 9:00 am.
4. Change Files After = 3 hours.
These settings would yield a cycle of log files created at 9:00 AM, 12:00 PM, 3:00
PM, 6:00 PM, 9:00 PM, 12:00 AM, 3:00 AM and finally 6:00 AM before repeating.
If you start your project running at 7:00 AM with these settings, your first log file will
be named in accordance with the 6:00 AM interval in the cycle. Data will be
logged to this file until the next scheduled log file change at 9:00 AM.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 175

Preferences
Generate DBF output files
Check this option to generate a copy of your logged alarms in DBF format. Many
Windows applications recognize this portable format.
Generate MDB output files
Check this option to generate a copy of your logged alarm data in MDB format.
This is the Data Object format used by Microsoft Access and similar programs.
Note: Support for Data Objects must be installed on the PC to use the MDB
option. See: Installing DAO
Buffer size
The number you specify here will determine how many records the alarm logger
will buffer before performing a disk write.
Max holding period
The number you specify here will determine how long the alarm logger should hold
on to unwritten data waiting for the buffer size number of records to be available.
Req. disk space
The number you specify here will determine how much disk space must be
available for the alarm logger to run. If the amount of free disk space falls below
this value while the alarm logger is running, it will stop and post a message to the
Event Logger. If the disk space is below this value when Infilink Run Mode is
launched, the alarm logger simply will not start.
Each alarm log record consumes approximately 100 bytes of disk space. If you
are also generating DBF output then this number increases to approximately 300
bytes.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 176

Defining Alarms
One or more alarms can be assigned to a tag from the Tag Group Properties
dialog. Select the desired tag and click on one of the Alarm tabs to display the
alarm parameters.
Level Alarms
Level alarms are used to trigger an event when the value of a tag exceeds or goes
below an assigned limit.

Comment Text
Enter text to describe the alarm. This text will be displayed in the comment
column when the alarm is shown in an alarm viewer or an Alarm History Viewer
window object.
High/Low Alarms
Lo, LoLo

An alarm is triggered for this tag when the value falls below these values. A
separate alarm is issued for each case.
Hi, HiHi

An alarm is triggered for this tag when the value rises above these values. A
separate alarm is issued for each case.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 177

Deviation Alarms
Allows two alarms, minor and major to be defined using percentages of the
specified target value to trigger the alarms.

Discrete Alarms
For tags defined with the discrete (Boolean) data type, you can specify whether
you want an alarm condition to occur when the value is TRUE (1) or FALSE (0) by
checking the appropriate box.

Severity
All Alarms can be assigned a severity level in the range 0 to 15. The severity level
of an alarm determines which alarm window(s) in your project will display the
alarm. The default severity is 5.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 178

Access Level
Assign an Access level 0 to 255. Only users who are logged in with access levels
greater than or equal to the alarm access level can acknowledge the alarm in Run
Mode. The default Access level is 0.
Actions
Display

Alarm events will be displayed in any active alarm viewer that has a severity level
set equal to the severity of this alarm. Events that will cause the display to update
are transition from inactive to active, change in value while active, and transition
from active to inactive. Acknowledged alarms are deleted from all views upon
transition from active to inactive.
Log

Alarm events will be logged to disk and accessible to any active alarm history
viewer. Events that will be logged are transition from inactive to active, user
acknowledge, and transition from active to inactive.
Print

Alarm events will be sent to the local alarms printer on each transition from
inactive to active, user acknowledge and transition from active to inactive. See
Setup Alarm Printer later in this section for more information.
E Mail
When Internet access is enabled, alarm notification is sent via E Mail to the
address specified in the Project Properties Internet Tab.
Scripts
Alarm Scripts are for those functions and operations that you want to perform
when an alarm condition is active. You might use an Alarm Script to sound an
alarm when a tag exceeds a certain value. The script may take place at any to all
of the possible times.
On active transition
Actions that you want to perform when the alarm occurs could be taken care of
with a On active transition script. This type of script executes once when the
alarm initially occurs. You might use a On active transition script to trigger an
annunciator or show a diagnostic window.
While active
Periodic operations while an alarm condition exists can be performed with a While
active script. While active scripts execute on a user defined Interval anywhere
between 100 and 99999 ms.
On acknowledge
Periodic operations after an alarm is acknowledged can be performed with an On
acknowledge script. On acknowledge scripts execute once when the alarm is
acknowledged. Acknowledging an alarm does not stop any While active scripts
from executing.
On inactive transition
Any alarm housekeeping that you need to perform can be done in an On inactive
transition script.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 179

Alarm Viewer Properties


General Tab

See Lesson4 for


directions on how to use
the Alarm Viewer.

Name
The name that you will use to refer to this viewer when using script commands.
X, Y Pos
Sets the location of the upper left corner of the object to the specified coordinates.
These coordinates are relative to the upper left corner of the window where the
object resides.
Width
Adjusts the horizontal size of the bounding rectangle.
Height
Adjusts the vertical size of the bounding rectangle.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 180

Text Tab

Severities Tab

Copyright 2004 KEP, Inc.

Alarm Text Colors


Text colors may be used to select the color of the column headings and to indicate
individual alarm status. When an alarm is triggered, it will appear in the alarm
viewer with the text color chosen as Active alarm. Double-clicking the alarm will
cause it to change to the Active and acknowledged color. If it is not acknowledged
and the tag state that caused the alarm no longer exists, the alarm will change to
the Inactive alarm color. Acknowledged alarms disappear when no longer active.

Minimum Severity Level


A number between 0 and 15. The viewer will display alarms with severity greater
than or equal to the value specified here. The default is 0.

Logging: Data and Alarms 181

Other Tab

Sort on:
Select from the dropdown: Date/Time, Tag Name, Event type, Alarm type, or
Severity heading to sort the listed alarms based on that column. Additionally select
to sort in Ascending or Descending order.

Allow acknowledge on double click


Check this item to allow alarms to be acknowledged at run time by double clicking
on the displayed alarm text.
See Scripting for more
information.

Copyright 2004 KEP, Inc.

Minimum Access Level for Acknowledgment


A number between 0 and 255. Users with access level greater than or equal to
this number may acknowledge alarms displayed by this window. Alarms may be
acknowledged by either clicking, as described above, or invoking the AckAll viewer
property from a script.

Logging: Data and Alarms 182

Alarm History Viewer Properties


General Tab

See Lesson4 for


directions on how to use
the Alarm History
Viewer.

Name
The name that you will use to refer to this viewer when using script commands.
X, Y Pos
Sets the location of the upper left corner of the object to the specified coordinates.
These coordinates are relative to the upper left corner of the window where the
object resides.
Width
Adjusts the horizontal size of the bounding rectangle.
Height
Adjusts the vertical size of the bounding rectangle.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 183

Text Tab

Copyright 2004 KEP, Inc.

Alarm Text Colors


Text colors may be used to select the color of the column headings and to indicate
individual alarm status. When an alarm is triggered, it will appear in the alarm
viewer with the text color chosen as Active alarm. Double-clicking the alarm will
cause it to change to the Active and acknowledged color. If it is not acknowledged
and the tag state that caused the alarm no longer exists, the alarm will change to
the Inactive alarm color. Acknowledged alarms disappear when no longer active.

Logging: Data and Alarms 184

Setup Alarm Printer


The Project Properties Alarm Printer tab is used to choose a target device and/or
file for the alarm printer as well as the format that will be applied to the output.

Send Output To
Local Printer
Check this box to direct alarm output to a local printer specified by the drop-down
list. Valid selections are LPT1 through LPT3.
Lines per page
Specify the number of alarms you would like printed on each page. Once the
number of lines is reached, a form feed is sent to the printer.
Text file
Check this box to direct alarm output to a text file. You specify the file by typing
the name into the supplied edit control. When this option is selected, the contents
of the file will be reset at project start up.
Event Logger
Check this box to direct alarm output to the Event Logger window.
See Lesson4 for
directions on using the
reshape method.

Copyright 2004 KEP, Inc.

Sample Format
Configure the output format using the reshape method described for an alarm
viewer. Available columns are:
Date, Time, User, Type, Severity, Event, Tag Name, Value at Event, Comment.

Logging: Data and Alarms 185

The Data Logger


Infilink logs tag data to disk using a proprietary binary format. Infilink Run Mode
uses data in this form when working with a historical trend object. To also
generate data files that may by viewed in other applications such as Microsoft
Excel you must check the Generate DBF output files option. This option causes a
DBF (Data Base Format) file to be created and updated in parallel with each of
Infilink's proprietary data files. Because DBF files are about 50% larger than
standard Infilink log files you should only check this option if you truly need to
generate portable log data.
Tag values are logged once when the initial value of the tag is determined and
then once every time the value of the tag changes. Each entry in a log file is
stamped with the date and time the data was determined to have changed so an
accurate history of its activity can be presented.
Infilink also provides a script command called _SysCmd.DataLogPulse that you can
use to generate log entries on demand or at timed intervals instead of or in
addition to the standard log on data change method described above.

The Setup Data Logger dialog box allows you to specify the destination and
control the scheduling of data log file activity.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 186

Basic Settings
Default
This option saves log files to a directory called DATALOG that is appended to the
project directory. For example, if your project directory is
c:\Infilink\projects\process1 then Infilink will store the database files to
c:\Infilink\projects\process1\datalog. Infilink will create this directory if it does not
already exist.
See Nodes and Tags.
See Lesson5 for
direction on viewing
logged data in a
historical trend.

User specified
This option allows you to control where logged data will be recorded. You must
enter a fully qualified path name consisting of 256 characters or less. Whatever
you type here will then have the name DATALOG appended to it. If the directory
you specify doesn't exist, Infilink will create it. To specify a network directory, you
must first map the network resource to a logical drive.
The naming convention of each log file stored in the chosen directory is
YYMMDDHH.DLF. Where YY is the year, MM is the month, DD is the day and HH
is the hour when the data in the file begins. If you choose to also generate DBF
files you will see files of the same base name but with a .LOG extension.

Log File Timings


Start logger when project starts
Checking this item enables the recording of tag data and automatically starts the
data logger when the project is executed in Run mode. Only tags with the Log
Data attribute enabled will be recorded. Data logging can still be invoked later on
using the _SysCmd.DataLogStart script command.
#Start the Data Logger ;
_SysCmd.DataLogStart ;
Change files every n hours
This value specifies how long after the start time to record data before creating a
new log file. The range is 1 to 24 hours.
Start at hour n
This value specifies the hour of the day that will be used to determine the start of
the first log file for that day. The range is 0 to 23.
Keep log files for n days
This value specifies how long after completion of the last data update a log file
should be preserved before being deleted.
Example:
Assume the following:
Data logging is enabled and at least one tag in the project will be logged.
Start logging immediately is enabled for the project. (See Project Options.)
Start at Hour = 9:00 am.
Change Files After = 3 hours.
These settings would yield a cycle of log files created at 9:00 AM, 12:00 PM, 3:00
PM, 6:00 PM, 9:00 PM, 12:00 AM, 3:00 AM and finally 6:00 AM before repeating.
If you start your project running at 7:00 AM with these settings, your first log file will
be named in accordance with the 6:00 AM interval in the cycle. Data will be
logged to this file until the next scheduled log file change at 9:00 AM.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 187

Preferences
Generate DBF output files
Check this option to generate a copy of your logged data in DBF format. Many
Windows applications recognize this portable format.
Generate MDB output files
Check this option to generate a copy of your logged data in MDB format. This is
the Data Object format used by Microsoft Access and similar programs.
Note: Support for Data Objects must be installed on the PC to use the MDB
option. See: Installing DAO
Buffer size
The number you specify here will determine how many records the data logger will
buffer before performing a disk write.
Max holding period
The number you specify here will determine how long the data logger should hold
on to unwritten data waiting for the Buffer size number of records to be available.
Req. disk space
The number you specify here will determine how much disk space must be
available for the data logger to run. If the amount of free disk space falls below
this value while the data logger is running, it will stop and post a message to the
Event Logger. If the disk space is below this value when Infilink Run Mode is
launched, the data logger simply will not start.
Each log record consumes approximately 40 bytes of disk space. If you are also
generating DBF output then this number increases to approximately 130 bytes.

Copyright 2004 KEP, Inc.

Logging: Data and Alarms 188

Lesson 4: Alarms and Alarm Logging

Overview
If you need help, the
completed Infilink lesson
4 may be found in the
Infilink lessons directory.
These lessons are
designed to run without
the use of a PLC.

Copyright 2004 KEP, Inc.

Alarms are used to inform the operator that something important has happened in
a process that Infilink is monitoring. You can define High/Low and Deviation type
alarms for analog values and On/Off alarms for discrete values. When an alarm
event is detected for a particular tag, the details of the event can be displayed in an
alarm viewer, sent to a local printer, and logged to disk. In this Lesson you will see
how to define and view alarm events using Infilink.
In Lesson 4, you will learn how to:
1. Draw an Alarm Viewer and add control buttons.
2. Draw an Alarm History Viewer, add control buttons, and enable alarm logging.
3. Define alarms for analog and discrete tags.
4. Create sliders and a button to generate alarms.
5. Display the active alarm count using a Show Value animation.
6. Run a project and manipulate real time and historical alarms.

Lesson 4: Alarms and Alarm Logging 189

Lesson Objectives
This lesson will guide you through the utilization of Alarms and Alarm Logging in a
Infilink project. In this lesson you will learn:
1. How to design Alarm and Alarm History Displays.
2. How to add control buttons to interface with Alarm and Alarm History Displays.
3. How to enable alarm logging.
4. How to define High/Low, Deviation, and Discrete alarms.
5. How to add previously drawn objects from Infilink libraries to your project.
6. How to manipulate alarms at Runtime.
This lesson is intended for intermediate users of Infilink.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 190

Creating a New Project


1. Open Infilink's Design Mode.
2. Click Cancel in the Open Project dialog box.
3. Click the File menu, then click on New
4. Type in a name for your project, such as lesson4, and click Create.
5. Click Yes to verify the name and path of your project.
6. Right click and open the Windows Properties dialog box. Type
Alarm_Lesson for a window Name and type Alarm Lesson Panel for a
Title. Click Show at Startup, then click OK. Size the window so that it fills the
screen.

Drawing the Alarm Viewer


An alarm viewer displays alarm events as they occur in real time.
1. From the Infilink Main Menu, select Draw, then select Alarm viewer or click the
button on the Toolbar.
2. Move the Pencil cursor to the window and draw an alarm viewer, leaving room
to the left and above for text and buttons.
3. If all of the alarm viewer column titles are not visible, resize the object such
that it appears like the figure below.

4. To modify column widths select Reshape from the Short Cut Menu. Reshape
mode can also be invoked from the Infilink Main Menu by selecting Edit then
Reshape, or from the Toolbox by selecting the Reshape tool

5.

6. When in Reshape mode the alarm viewer will appear in a black and white
format as seen above. To make changes to column widths, use the mouse to
drag the appropriate column divider lines to the left or right. Other column
editing options are available from the Short Cut Menu. To view these options
place the cursor in the column that you would like to edit, right click, then
choose the appropriate option from the menu as shown below.

7. To return from Reshape mode you can double click the mouse or press the
Esc key.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 191

Creating Alarm Viewer Control Buttons


In order to scroll the contents on an alarm view you need to utilize the Service type
properties of the Alarm view object. For simplicity, you will use library objects that
have been predefined for this purpose.
1. From the Infilink View Menu, select Library Manager, then Open System
Library.kol
2. Select and expand the library group named ALARMCTR.
3. Drag and drop the buttons shown below from the ALARMCTR library group
and place them into the Main Window above the Alarm Viewer. Leave space
above the Alarm Viewer and Control Buttons because later you will add two
Sliders and a Button to generate alarms.

4. After you have finished placing in all of the control buttons, minimize the
Library Manager window.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 192

Drawing the Alarm History Viewer


An Alarm History Viewer displays alarms that have been logged to disk.
1. From the Infilink Main Menu, select Draw, then select Alarm History Viewer or
click the
button on the Toolbar.
2. Draw an alarm history viewer leaving room to the left and above for buttons.
Make the alarm history viewer object the same width as the alarm viewer
object.
The colors used by the
Alarm Viewer object can
be set by right clicking
on the object and
selecting Properties...
from the Short Cut
Menu. Border color and
font can be set using the
Toolbars.

3. Next use the Reshape mode to adjust the column format of the Alarm History
Viewer. Delete the User and Severity columns and move other columns such
that the Alarm History Viewer is formatted as shown below.

4. Exit from Reshape mode.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 193

Creating Alarm History Viewer Control Buttons


Again you will use library objects to provide control functions.
1. Restore the Library Manager.
2. Select and expand the library group named ALARMHST.
3. Drag and drop the buttons shown below from the ALARMHST library group
and place them into the Main Window to the left and above the Alarm History
Viewer. Resize the window and the buttons as necessary.

4. After you have finished placing in all of the control buttons, minimize the
Library Manager.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 194

Enabling the Alarm Logger


Now that you have an Alarm history viewer, you need to enable alarm logging.
1. From the Infilink Project Menu, select Properties, then select Alarm Logger tab.

2. In the Buffer size: text field enter 5, and in the Max holding period: text field enter
1. Accept the defaults for the remaining alarm logger setup properties and
click OK.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 195

Defining Tags with Alarms


In this section you will add three tags and for each tag you will define an alarm.
1. Click on the

from the Toolbar.

2. In the Tag Groups dialog box click on


named Memory.
3. Click
below.

to create a memory tag group

to enter a new tag. Set the tag properties of the first tag as shown

4. Click the Level Alarm tab. Set the alarm properties as shown below.

7. Click OK
Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 196

8. The HighLowTag Attributes column now includes an A indicating that an


alarm is assigned to the tag.

9. Now add a second tag with the properties shown below.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 197

11. Click the Deviation Alarms tab.


12. Set the alarm properties of the second tag as shown below.

13. Click OK
14. Add the third tag with the properties shown below.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 198

15. Click the Discrete Alarm tab.


16. Set the alarm properties of the third tag as shown below.

17. Click OK then click Close to close the Tag Groups dialog.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 199

Creating Animations to Generate Alarms


In this section, you will add two sliders and a button from Infilink libraries. When
you run the project, you will use these objects to change the values of our three
tags, and generate alarms. The alarm data will appear in the views that you have
configured.
1. Drag Slider19(Range 0-100)Horizontal from the SLIDERS3 library group and
drop it into the Main Window above the Alarm Viewer. When you place in this
Slider, you will be prompted to Replace assigned tag names?. Click Yes and
replace the old name with a new name of "HighLowTag". Resize the slider to
fit in the window as shown below.
2. Duplicate the slider that you just pasted into the Main Window, and use the
Reassign tags option from the Short Cut Menu to assign the tag
"DeviationTag" to the new slider.
3. Drag Button Style 3 from the BUTTONS4 library group and drop it into the
Main Window above the Alarm Viewer. When you place in this Toggle Button
you will be prompted to Replace assigned tag names?. Click Yes and
replace the old name with a new name of "DiscreteTag".
4. Close the Library Manager.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 200

Displaying the Active Alarm Count


You will use a Show Value animation on a Text object, to show the Active Alarm
Count.
1. Draw a couple of Text objects over to the left of the Alarm Viewer.
2. For the upper Text object edit its properties and in the text field type Active
Alarms.
3. For the lower Text object, edit its animations and add a Show Value animation
with the System Tag "_ActiveAlarmCnt" assigned to it.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 201

Save and Run the Project


1. Click the Project menu, then click Save.
2. Click the Project menu, then click Run.
3. At startup the Sliders will display initial values of 50, and the Button will be
Red(OFF). Both the Alarm Viewer and Alarm History Viewer should be blank.
4. Move the first Slider to its outer limits, this will trigger the Low and High alarms
defined for tag "HighLowTag".
5. Move the second Slider to its outer limits, this will trigger the Major Deviation
alarm defined for tag "DeviationTag".
6. Click on the Button between the Sliders to trigger the alarm defined for tag
"DiscreteTag".

7. Alarms displayed in the Alarm Viewer can be sorted according to Date, Time,
Alarm Type, and Tag Name. To sort alarms, position the cursor on one of
these Column Headings and click the left mouse once. To reverse the sort
order, click again.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 202

8. Alarms displayed in the Alarm Viewer can be Acknowledged one at a time by


using the left mouse to double click on individual alarm rows. Or, they can be
Acknowledged all at once using the Alarm Viewer object's AckAll service that
can be attached to a button or used in a script.
9. Alarms will be logged to disk and viewable in the Alarm History Viewer,
according to the Buffer Size and Max Holding Period that were assigned when
you enabled the Alarm Logger in the design portion of this lesson. In our
example, the alarm log is updated after every five alarm events, or after one
minute has elapsed, whichever comes first. For more information on setting
up the alarm logger, consult the Infilink help file.
10. The Scrolling, Paging, Home, and End buttons use At Key Down and While
Key Pressed animations to invoke Service type object properties of the
associated Alarm Viewer or Alarm History Viewer object. See Object
Properties in the Infilink help file.

11. The History Filter button allows you to filter out logged alarms that you do not
wish to see in the Alarm History Viewer window. Only alarms that meet
criteria checked in the Alarm Log Filtering dialog box will be shown.

Copyright 2004 KEP, Inc.

Lesson 4: Alarms and Alarm Logging 203

Exit Run Mode


.

Copyright 2004 KEP, Inc.

1. Click on the Project menu, then click Exit.


2. The project is now closed. The Event Logger window is still open.
3. To close the Event Logger, select the Event Loggers File menu and click Exit.

Lesson 4: Alarms and Alarm Logging 204

Lesson 5: Real-Time and Historical Trends

Overview
If you need help, the
completed Infilink lesson
5 may be found in the
Infilink lessons directory.

These lessons are


provided to give you a
reference of what a
project should look like
when completed.

Copyright 2004 KEP, Inc.

When monitoring process values it is often important to log a history of those


values over a period as well as display a portion of the logged data on the screen.
Infilink allows you to store the logged data to a file contained in the project
directory as well as display real-time and historical data on the screen.
In this lesson, you will:
Draw a trend object and edit its properties.
Toggle a trend between real-time and historical mode.
View historical data in scatter, discrete and smooth modes.
Scroll through historical data.
Increase or decrease the range of the value scale.
Create a sliding cursor that will display values chosen graphically from a
trend.

Lesson 5: Real-Time and Historical Trends 205

Lesson Objectives
Lesson 5 will guide you through the design and utilization of Real Time and
Historical trends. In this lesson you will learn:
Some basic properties of trends.
How to toggle between Real Time and Historical trend data.
How to scroll historical data.
How to change between historical data modes.
How to modify trend value scales.
How to determine a pen value at any point on a historical trend.
This lesson is intended for intermediate users of Infilink.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 206

Creating a New Project


1.
2.
3.
4.
5.
6.

Open Infilink's Design Mode.


Click Cancel in the Open Project dialog box.
Click the File menu, then click on New
Type in a name for your project, such as lesson5, and click OK.
Click Yes to verify the name and path of your project.
Right click and open the Windows Properties dialog box. Type
Trend_Lesson for a window Name and type Trend Lesson Panel for a
Title. Click Show at Startup, then click OK.

Defining Tags
You will need to define four tags for this lesson. These tags will allow you to
produce data for a real-time and a historical trend. They will also allow you to
display data values as the historical trend is scrolled.
1. Click on the

from the Toolbar.

2. In the Tag Groups dialog box click on the Memory Group tool
memory tag group named Memory.

to create a

3. Click
to enter a new tag. In the Name field enter PenData for a tag
name. Using the provided drop down list, choose a Data type of Real and
an Internal Security of Read/Write. Since you will want to view historical
data on this tag, click on the Log on data change selection for this tag. Accept
the default values for the other fields.
4. Click OK to add the tag to the Memory tag group.
5. Click
. Enter Cursor for a tag name, Long for the Data Type and
Read/write for the Internal Security. Click OK.
6. Click
. Enter Increment for a tag name, Discrete for the Data Type
and Read/write for the Internal Security. Click OK.
7. Click
. Enter Value for a tag name, Real for the Data Type and
Read/write for the Internal Security. Click OK.
8. Press Close to exit the Tag Groups dialog.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 207

Drawing the Trend and Editing Trend Properties


The first thing you need to do is create a trend object and edit its properties.
1. From the Infilink Main Menu, select Draw, then select Trends or click the
button on the Toolbar.
2. Draw a trend window leaving room to the left and below for buttons. Resize
the window if necessary.
3. Right click on the trend and select properties, the Trend Viewer Properties
dialog box will appear.
4. In the Trend Name edit
box type Trend1,
this is the name used
to refer to this object.

While in Design Mode


you can return to the
Trend Property dialog
at any time by right
clicking your mouse on
the trend object and
selecting Properties.

Copyright 2004 KEP, Inc.

5. Click on the Time Axis


tab. Change the Time
span to 8 Seconds.
6. Change the Refresh
Rate to 250
Milliseconds.
7. Change the Major grid
lines to 3.

Lesson 5: Real-Time and Historical Trends 208

If the Enable Historical


Display box is not
checked, you will not be
able to switch to
Historical Mode when
running the project.

8. Click on the Value Axis


tab. Change the
Minimum and Maximum
value to range from -25

to 25.
9. Change the Major grid
lines to 3.

10. Click on the Pens tab.


Click

, the new

pen tool. Click

and select "PenData".


11. Click the OK button to
exit the Pen Properties
dialog box.
12. Click OK to exit the
Trend Viewer
Properties dialog box.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 209

Creating Trend Control Buttons


There are library objects
provided that will perform
most of the functions you
are about to create. You
may use them rather
than create all of these
animations. The library
objects found in the
TRENDHST library
assume a Trend object
name of "Trend". The
trend in this lesson uses
a name of "Trend1".
Following this lesson will
give you a better
understanding of how
object properties can be
used.
A description of the use
of these buttons will be
explained in the
animation process.

Here you will create buttons to toggle between Real Time and Historical Trend
Modes, increment and decrement the Trend Value Scale, change the Historical
Draw Mode, and Scroll through historical data.
1. From the Infilink Main Menu, select Draw, then select Button or click the
button on the Toolbar.
2. Draw a Button.
3. Right click on the button and select Properties.
4. In the Button Properties dialog type Mode for the Name and Historical for
the button Text. The button text may not be displayed if the button is to
narrow. If this occurs, simply widen the button.
5. Either repeat the above steps for the remaining buttons or use the duplicate
function
to make copies of this button. Change the names and text of the
copies to match those below.
Name:
Name:
Name:
Name:
Name:
Name:
Name:

YRangeInc
YRangeDec
Smooth
Scatter
Discrete
SkipInc
SkipDec

Text +Y Range
Text: -Y Range
Text: Smooth
Text: Scatter
Text: Discrete
Text: +10 Sec
Text: -10 Sec.

6. Arrange the buttons by dragging each one to a new location. Place the
buttons as shown below.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 210

Create and Animate a Historical Cursor


You will now build a historical cursor animation to graphically determine historical
data values at runtime. The value at which the cursor intersects the data will be
displayed.

You can also click on the


Fill button on the Fill
tools toolbar.

Copyright 2004 KEP, Inc.

1. From the Infilink Main Menu, select Draw, then select Polygon or click the
button on the Toolbar.
2. Draw a polygon as shown below just above the trend object. This will be our
Cursor. Place the polygon as shown.
3. Right click on the polygon and select Properties. Enter Marker for the
polygon objects name and press OK.
4. From the Interior tab, then select Color. A Fill Color Palette will appear. Select
a color for the Marker.
5. Click OK to close the Polygon Properties dialog.

Lesson 5: Real-Time and Historical Trends 211

1. Select the Marker and click


appear.

The Cursor position


represents the time in
milliseconds relative to
the start time of the
trend.
The starting position for
a trend is the right hand
side. It scrolls from the
right to the left.

Copyright 2004 KEP, Inc.

. The Slider animation dialog box will

2. Click
. For the Tag select Memory\Cursor.
3. Set the Low value to 0. Set the High value to 7999. This is the range in
milliseconds that will be available on the trend at all times. Recall that you set
the Trend Time Span to 8 seconds (8000 msec.).
4. Now you need to set the Related positions. Click the Low Related Position cursor
. A cursor will appear on the screen. Center this cursor over the right
edge of the trend window and click the mouse button.
5. Now click the High Related Position cursor
and center the cursor over the
left edge of the trend. Again click the mouse button to return to the animations
dialog box.
6. Click OK to accept the slider animation.

Lesson 5: Real-Time and Historical Trends 212

Animating Trend Control Buttons


Now you will add some functionality to the buttons that have been created. You
accomplish this by adding animations to each button.
The Mode Button is the
one we assigned a text
of Historical to earlier.

In place of the window


name you can use
_ThisWin to refer to an
object on the current
window.

If you are viewing this


document online, simply
cut this script out and
paste it into the script
window.
This script also shows
how the text on a button
can be changed on the
fly.

Create an On button down Script for the Mode Button


The Mode button will allow us to toggle between real-time and historical mode at
runtime.
1. Click on the Mode button.
2. From the Animation toolbar, select
. The Take Action animation dialog will
appear.
3. Select the On button down option, if it does not open there by default.
4. Enter the following script:
If (_ThisWin.Trend1.Mode = 0) Then
_ThisWin.Trend1.Mode = 1; # Change to Historical
_ThisWin.Mode.Text = "Real Time"; # Update Button
_ThisWin.Marker.Show = 1; # Show Marker
Else
_ThisWin.Trend1.Mode = 0; # Change to Real Time
_ThisWin.Mode.Text = "Historical"; # Update Button
_ThisWin.Marker.Show = 0; # Hide Marker
Endif;

5. Click the Verify button to make sure there are no errors in the script.
6. Click OK to accept the animation.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 213

The YRangeInc Button is


the one we assigned the
text +Y Range to
earlier.

Create an On button down Script for the YRangeInc Button


The "YRangeInc" button will allow us to increment the value span of the trend
1. Click on the YRangeInc button and create an On button down, Take Action
Animation for "YRangeInc".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# ALLOW THE TRENDS VALUE RANGE TO
# SPAN TO A MAXIMUM OF 50 TO 50.
If (_ThisWin.Trend1.MaxRange - _ThisWin.Trend1.MinRange < 100) Then
_ThisWin.Trend1.MaxRange = _ThisWin.Trend1.MaxRange + 5;
_ThisWin.Trend1.MinRange = _ThisWin.Trend1.MinRange - 5;
Endif;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

The YRangeDec Button


is the one we assigned
the text -Y Range to
earlier.

Create an On button down Script for the YRangeDec


Button
The "YRangeDec" button will allow us to decrement the value span of the trend.
1. Click on the YRangeDec button and create an On button down, Take Action
Animation for "YRangeDec".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# ALLOW THE TRENDS VALUE RANGE TO
# SPAN TO A MINIMUM OF 10 TO 10.
If (_ThisWin.Trend1.MaxRange - _ThisWin.Trend1.MinRange > 20) Then
_ThisWin.Trend1.MaxRange = _ThisWin.Trend1.MaxRange - 5;
_ThisWin.Trend1.MinRange = _ThisWin.Trend1.MinRange + 5;
Endif;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

Create an On button down Script for the Smooth Button


The "Smooth" button will redraw the trend by joining data points as lines.
1. Click on the Smooth button and create an On button down, Take Action
Animation for "Smooth".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# SET THE TREND DRAWMODE TO SMOOTH
# HISTORICAL MODE
_ThisWin.Trend1.DrawMode = 2;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 214

Create an On button down Script for the Discrete Button


The "Discrete" button will redraw the trend by assuming data is constant until the
next data change. The result is a square wave.
1. Click on the Discrete button and create an On button down, Take Action
Animation for "Discrete".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# SET THE TREND DRAWMODE TO DISCRETE
# HISTORICAL MODE (SQUARE LINES)
_ThisWin.Trend1.DrawMode = 1;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

Create an On button down Script for the Scatter Button


The "Scatter" button will redraw the trend as data points.
1. Click on the Scatter button and create an On button down, Take Action
Animation for "Scatter".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# SET THE TREND DRAWMODE TO SCATTER
# HISTORICAL MODE (POINTS ONLY, NO LINES)
_ThisWin.Trend1.DrawMode = 0;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

Create an On button down Script for the SkipInc Button


The "SkipInc" button will allow us to scroll forward in time while in historical mode.
1. Click on the SkipInc button and create an On button down, Take Action
Animation for "SkipInc".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# SKIP THE TREND WINDOW FORWARD BY
# 10000 MSEC. OR 10 SECONDS
_ThisWin.Trend1.Skip = 10000;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

Create an On button down Script for the SkipDec Button


The "SkipDec" button will allow us to scroll backward in time while in historical
mode.
1. Click on the SkipDec button and create an On button down, Take Action
Animation for "SkipDec".
2. Enter the following script for the action. The # symbol is used to indicate
comments within the script.
# SKIP THE TREND WINDOW BACKWARD BY
# 10000 MSEC. OR 10 SECONDS
_ThisWin.Trend1.Skip = -10000;
3. Click the Verify button to make sure there are no errors in the script.
4. Click OK to accept the animation.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 215

Create a Current Value Display


In order to view the value associated with the Marker position, you need to create
a display. This can be accomplished with a text object and the show value
animation.
1. From the Infilink Main Menu, select Draw, then select Text or click the
button on the Toolbar.
2. Move the pencil cursor and Draw a Text object below the lower right edge of
the trend.
3. Right click on the Text object and select Properties. The Properties dialog
will appear.
4. Type "dspValue" in the object name field.
5. Click OK to exit the dialog box.
6. Press the Show Value button
. For the Tag name Enter Memory\Value.
7. Because Value represents a Real number, select Treat value as Real.
Change the Real format to Fixed field with Left of DP set to 6 and Right of DP
set to 2.
8. Click OK to accept the Show Value animation.
9. Draw a second text object above the "dspValue". This will be used as a label.
10. Right click on the Text object and select Properties. The Properties dialog
will appear.
11. Type "Marker Value" in the text field.
12. From the Infilink Toolbar, click the Bold button
Select the dspValue bold as well.

Copyright 2004 KEP, Inc.

to make the text field bold.

Lesson 5: Real-Time and Historical Trends 216

Writing a Project Script


Because you are only using memory tags you need to write a script to simulate a
change in data. Normally you would be collecting data from an external device
and displaying it in a real-time trend.
1. From the Infilink Main Menu, select Project, then select Properties. The Project
Properties dialog will appear.
2. Press the Scripts tab.
3. Select While project running because you want the script to execute
continuously when in run mode.
4. Set the Interval to 250 msec.
5. Type in the following script:
If (PenData >= 30) Then
Increment = 0;
ElseIf (PenData <= -30) Then
Increment = 1;
Endif;

This script will be


evaluated every 250
milliseconds. The Pen
value will always stay in
the range of 30 and will
increment or decrement
by 2.5 units.

If (Increment) Then
PenData = PenData + 2.5;
Else
PenData = PenData 2.5;
Endif;

6.

# When in Historical mode, load the historical trend's


# cursor position with the position of the marker and
# retrieve the value of the data at that position.
If (Trend_Lesson.Trend1.Mode) Then
Trend_Lesson.Trend1.Cursor = Cursor;
Value = Trend_Lesson.Trend1.PenValue;
Endif;
Click the Verify button to make sure there are no errors in the script. If it is,

No errors will appear at the bottom of the window.


7. Press OK to exit the Project Properties dialog box.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 217

Save and Run the Project


1. Click the Project menu, then Click Save.
2. Click the Project menu, then click Run.
3. The Trend will appear on the screen. Data from PenData will be displayed on
the trend.

4. Because the default value span was set to 25 to 25, some data will be out of
range and will not displayed on the trend. You can correct this by pressing the
+Y Range button that you created. Click the +Y Range button and notice
the value span increases to 35 to 35. The PenData waveform should now
be in complete view on the trend.
Changing the Y value
range in the Real Time
trend does not change it
in the Historical Mode.
When you switch to
Historical Mode you will
have to increase the
range again to be able to
see all of the data.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 218

5. Wait for a minute to pass, then click the "Historical" button. The historical data
will load to the trend window.
6. Click the +10 Sec. Button to scroll 10 seconds forward. The historical data
will now come in to view. You can continue to scroll forward in time. At any
time you wish to return click -10 Sec. to scroll backward in time.

Trend is in Discrete draw


mode. Notice that
dspValue is displaying
the value of the data
beneath the marker.

The draw mode


functions (Scatter,
Discrete, and Smooth)
are only available while a
trend object is in
historical mode.

7. You can click on the "Scatter", "Discrete", or "Smooth" buttons to change the
draw mode of the trend. Scatter will plot individual points only. Discrete plots
the points in a squared line, assuming that data is constant until the next data
change. Smooth moves the pen in a straight line between points. The figure
above and the two that follow show identical data in scatter, discrete, and
smooth draw modes.
8. Drag the Marker Cursor that you created. Notice that the value display
changes as the marker intersects a data change.
9. You can return to real-time mode by pressing the "Real Time" button.

Trend in smooth draw


mode.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 219

Trend in scatter draw


mode.

Exit Run Mode


1. Click on the Project menu, then click Exit.
2. The project is now closed. The Event Log Viewer window is still open.
3. To close the Event Log Viewer, select the Event Log Viewers Project menu
and click Exit.

Copyright 2004 KEP, Inc.

Lesson 5: Real-Time and Historical Trends 220

ActiveX Controls

Overview
Most ActiveX controls are
not compatible with
Infilink.

Copyright 2004 KEP, Inc.

Infilink is an ActiveX container. ActiveX controls are independent objects that can
be placed into an Infilink Project. These controls come in many varieties. Infilink
is designed to handle ActiveX controls with OPC connectivity. In particular, we
have tested for compatibility ioCompTM ActiveX controls. These controls are
included in the Infilink setup software. ActiveX controls from other vendors have
not been verified for operation.

ActiveX Controls 221

Inserting ActiveX Controls into a Project


Use the Tools|Load ActiveX controls menu command to call up the ActiveX
Select controls dialog. A list of the Active X controls installed on the PC is
displayed.

Select the controls to include in your


project by checking the box in front of the
controls name.
Note: Up to 24 ActiveX components may
be assigned to a project.
Once all the desired controls are selected
click OK. The selected controls appear on
the tool bar as an icon.
Place a control by clicking on its icon and
dragging a rectangle in the project
window.
Access the controls properties by right
clicking on the shaded border and
selecting Properties from the pop-up
shortcut menu.
Refer to the help provided with the
ActiveX control for further information
about the controls properties.

Copyright 2004 KEP, Inc.

ActiveX Controls 222

Scheduler

Overview
This section describes how to use the Scheduler to manage tag operations by
time and date.
The Scheduler allows you to specify a particular time and date a tag is to be
modified. There are also features to set tags to be changed on a weekly basis at
specified times. Such events are useful for daily or weekly startup and shutdown
of equipment, building controls and regularly scheduled maintenance.

Copyright 2004 KEP, Inc.

Scheduler 223

Introduction
Use the Scheduler to program in actions to occur at desired dates
and times or on a regular basis. Use Action groups to make several
actions occur at the same time. As actions and times are
programmed, they are displayed in list boxes throughout Scheduler.

Use Single and Double events to make actions occur on a given


date and time.
Use Weekly Schedule to make actions occur on a daily basis
every week.
Use the Holiday settings to override the weekly schedule.

Using the Calendar Tool


and
buttons to scroll through months.
Use the
Click on a day to select that day.
Days that have events assigned to them are shown in Bold.
Week numbers are shown in the leftmost column.

Copyright 2004 KEP, Inc.

Scheduler 224

Holidays
Use the Holidays dialog box to specify holidays. Holidays cause the Weekly
Schedule events to be ignored.

Yearly Add
Use this to add a holiday that occurs every year to the list of holidays.
For example: January 1st is always a holiday.
Holiday Others Add
Use this command to enter Holidays that may vary from year to year.
For example: Thanksgiving (USA) changes with each passing year.
How to define a Holiday
1. Use the calendar scrolling features to get to the dates you need to specify as
holidays.
2. As you click on dates, a popup dialog prompts you for a label for the holiday.

3. Enter the label and click OK. The holiday will automatically be listed in the
appropriate holiday list box.
4. Continue clicking on dates and assigning labels.
5. Click Done after all desired dates are selected.
Copyright 2004 KEP, Inc.

Scheduler 225

Action Groups
Use the Action groups dialog box to create groups of actions. This way, instead of
specifying a tag to be changed at a particular time and date you can specify the
group of actions to occur at that time. The dates and times that these actions
occur are specified in the Single Event, Double Event and Weekly Schedule dialog
boxes.

Creating an Action Group


1. Select the type of action to occur.
New Single Action A single action is a command that occurs when the action
is called.
New Double Action
A Double Action is a command that changes state at a start time and then
changes the state back to its previous condition at an end time.

Copyright 2004 KEP, Inc.

Scheduler 226

2. When the Action Group Dialog pops up enter a name for the group. Group
names may be up to 20 characters long.

3. Click on
to enter a new Single or Double Action. See following
pages entering these actions.
4. Continue to click on New to add more actions, Edit to modify actions
highlighted in the list box or Delete to remove the highlighted action from the
list box.
5. Click OK when you are done creating the group.

Copyright 2004 KEP, Inc.

Scheduler 227

Entering a New Single Action

1. Enter the Tag to modify. If you do not know the tag name, click on the
button to browse for the Tag to modify.
2. Select the type of action to perform on this tag.
On/Off forces a 1 or 0 into a tag.
Force Value forces a constant into a tag.
Modify Value to changes the tags value by a percentage. The
percentage is always a positive whole number.
3. Click OK when done

Copyright 2004 KEP, Inc.

Scheduler 228

Entering a New Double Action


This dialog box is used to define what an action does. Because a double
action is a duration, two actions need to be specified, a start action and
an end action

1. Enter the Tag to modify. If you do not know the tag name, click on the
button to browse for the Tag to modify.
2. Select the type of action to perform on this tag when the action is called.
On/Off forces a 1 or 0 into a tag.
Force Value forces a constant into a tag.
Modify Value to changes the tags value by a percentage. The
percentage is always a positive whole number.
3. Select the type of action to perform on this tag when the action period is
ended.
Check the Restore value box to put the tags previous value (before
the start action) back into the tag.
On/Off forces a 1 or 0 into the tag.
Force Value forces another constant into the tag.
Modify Value to changes the tags value by another percentage.
4. Click OK when done

Copyright 2004 KEP, Inc.

Scheduler 229

Events
Use Events to specify when a tag or action group is to be changed. The dates and
times that these actions occur are specified in the Single Event, Double Event and
Weekly Schedule dialog boxes.

Creating a Single Event


A Single Event is used to execute a data change, once, when it is called. Use this
to change values at some designated time and date.
1. Click on

to begin programming this type of Event.

2. When the Single Event Dialog box pops up enter a name for the Event. Event
names may be up to 20 characters long
3. Check the Disable execution if you want to suspend this event from
happening. Typically this is used in Run Mode to stop an event from
happening because it could cause a problem or is no longer necessary.

Copyright 2004 KEP, Inc.

Scheduler 230

4. Specify the Date and Time that the action is to take place.
5. Select the Action to perform.
New Single Tag A single action is defined to occur at the Date and Time
specified.
New Action Group An Action group is selected. This means that all
actions specified in the group will happen at the Date and Time.
6. Use the Edit and Delete buttons to modify the list.
7. Click OK when done creating the single event.

Creating a Double Event


A Double Event is used to execute an action at a given time and another
complimentary action at an end time.
3. Click on

to begin programming this type of Event.

4. When the Double Event Dialog box pops up enter a name for the Event. Event
names may be up to 20 characters long
5. Check the Disable execution if you want to suspend this event from
happening. Typically, this is used in Run Mode to stop an event from
happening because it could cause a problem or is no longer necessary.

Copyright 2004 KEP, Inc.

Scheduler 231

4. Specify the Date and Time that the action is to take place (Start) and when the
action is to cease (End).
5. Select the Action to perform.
New Single Tag A double action is defined to occur for the duration
specified.
New Action Group An Action group is selected. This means that all single
actions specified in the group will happen at the Start time and double
actions in the group will continue to the End time.Use the Edit and Delete
buttons to modify the list.
6. Click OK when done creating the single event.

Creating a Weekly Schedule


Use this command to set up a series of events to occur on a weekly basis. Each
day can have various events assigned to it. Events assigned to a day are ignored
if that day is specified as a holiday.
1. Click on
type of Event.

to begin programming this

2. When the Weekly Schedule Dialog box pops up enter a name for the Event.
Event names may be up to 20 characters long.
3. Check the Disable execution if you want to suspend this event from
happening. Typically, this is used in Run Mode to stop an event from
happening because it could cause a problem or is no longer necessary.

Copyright 2004 KEP, Inc.

Scheduler 232

4. Specify the Dates that this weekly schedule is to be in effect. Check the
Forever box to always have this weekly schedule active.
5. Click the Add button to bring up the Schedule dialog box. Select the days of
the week and times for actions to occur. Repeat this action until all days and
times are entered.
6. Select the Actions to perform during the times in the Schedule list.
New Single Tag A single action is defined to occur at the scheduled Days
and Times specified.
New Action Group An Action group is selected. This means that all actions
in the group will happen on the Days and Times of the weekly schedule.
Use the Edit and Delete buttons to modify the list.
7. Click OK when done creating the single event.

Copyright 2004 KEP, Inc.

Scheduler 233

Preferences
Use preferences to change overall operation of the Scheduler.

Because the scheduler is available at run time for review Access can be restricted
to prevent unauthorized access and changes.
Minimum user level to access scheduler at run time
Enter the user level required to access Scheduler once in the Run Mode.
Allow run mode editing.
Select to allow editing of Scheduler settings.
Execute events and schedules on defined second.
Scheduler tracks events accurately up to the minute. The scheduler can be made
to operate on a per second track if desired.
Minimum and Maximum Dates
Displays the minimum and maximum dates allowed for use with Scheduler. These
dates are fixed and cannot be changed.

Copyright 2004 KEP, Inc.

Scheduler 234

Using OPC and DDE

Overview
This section describes how to use Infilink in a client/server configuration with DDE.

About OPC (OLE for Process Control) and DDE (Dynamic


Data Exchange)
Object Linking and Embedding (OLE) for Process Control (OPC)
and Dynamic Data Exchange (DDE) allows Infilink to operate in a
client/server relationship with other Windows applications. Any
application that supports OPC or DDE can be a client to Infilink, in
that it can access data from Infilink's tag database, and a server that
provides data to Infilink through a link that has been defined by an
OPC or DDE tag group.
OPC Link Specifications
The general format of a local OPC link specification is:
<Application>|<Channel Name>.<Device Name>!<Item>
<Application> is the name used to identify the server application.
<Channel Name>.<Device Name> is the path to the data set that will be
referenced.
<Item> is the individual piece of data that is requested.
Access to Networked machine data is similar to DDE Link Specifications given
below.

DDE Link Specifications


The general format of a local DDE link specification is:
<Application>|<Topic>!<Item>
<Application> is the name used to identify the server application.
<Topic> is the data set that will be referenced.
<Item> is the individual piece of data that is requested.
This format is used when the client and the server reside on the same PC.

Copyright 2003 KEP, Inc.

Using OPC and DDE 235

A Network DDE link specification takes the form:


\\<Computer Name>\ndde$|<Share Name>!<Item>
<Computer Name> is the name of the network PC where the DDE server
application is located.
<Share Name> is a registered DDE share name identifying the application and
topic.
<Item> is the individual piece of data that is requested.
This format is used when the client and the server reside on different PCs
connected to the same network.

Copyright 2003 KEP, Inc.

Using OPC and DDE 236

Infilink as a DDE Client


The client in a DDE conversation is the recipient of data from another application.

Supported DDE Formats


Infilink supports two DDE formats when used as a client: AdvancedDDE and
CF_TEXT. By default Infilink will try to connect using the AdvancedDDE format
and upon failure, fall back to CF_TEXT. You can override the default behavior by
specifying a format for each DDE tag group in your project by modifying the Data
format section of the DDE Tag group's properties.

Using Infilink as a Local Client


See Tag Groups.

Although KEPware's
DDE server is now called
KEPServerEX, the
application name is still
KEPDDE.EXE and
should be used as the
application name in DDE
links.

To use Infilink as a client to a local server (one on the same PC) you will first need
to:
1. Create a DDE Tag Group
2. Identify the server
3. Specify the topic
4. Define one or more tags that will be assigned to that tag group.
Each tag will identify the item portion of the DDE link in its address field. The item
refers to the data that the server should provide.
Although any DDE enabled Windows application can be a server to Infilink, let's
use KEPServerEX as an example (formerly KEPDDE). Assume you need to get
the data from address 40001 of a Modbus device and assign it to a tag called
"RegData". You would first create a project in KEPServerEX that identifies the
channel as COM1 and device as something like "Modbus1". (Refer to the
KEPServerEX online documentation for details.) Next you will define a Infilink
DDE Tag Group with KEPDDE as the Server name and
_ddedata.COM1.Modbus1 as the topic. Finally, create a tag called RegData with
address 40001.
Now when you place the server on line and run your Infilink project, the value of
"RegData" will be updated every time register 40001 of the Modbus device
changes.

Using Infilink as a Remote Client


To use Infilink as a client to a remote server you will perform the same steps as if
you were using a local server except the application name that you assign to the
node will be of the form \\<computer name>\ndde$ and the topic will have a $
appended to it.
The Network DDE services must be started on the PC that Infilink is running on
before a connection attempt can be made. Under Windows 95/98 you would do
this by running the application NETDDE.EXE. Once you start the Network DDE
services they remain active until you restart the computer.
The server PC that you specify may require you to log in before a connection can
be established. If this is the case, you will be presented with a log in dialog from
the NETDDE agent on the client PC. You will need to specify an appropriate user
name and password when this dialog is displayed in order to complete the DDE
link.
If a connection attempt fails, Infilink will only attempt to connect one more time
before assuming the server is unavailable. You can tell Infilink to retry by using
the Reinitialize Links item on the Run Mode DDE menu. You can also perform
this function using the script command _SysCommand.DDEReset.

Copyright 2003 KEP, Inc.

Using OPC and DDE 237

Using the same example from above let's assume that the KEPServerEX will be
running on a computer named NETPC. You will define an Infilink node with
\\NETPC\ndde$ as the application and _ddedata.COM1.Modbus1$ as the topic.
Finally, create a tag called RegData with address 40001 and assign it to this node.
Notes
1. KEPServerEX is a 32-bit application. It must be run on either Windows 95/98,

Windows NT or Windows 2000.


2. A link to a DDE server item will be started and remain active only as long as some
demand is made on the data provided by that link. See The PROJECT.INI File
[tuning] section in the Infilink help file for further information.

Infilink as a DDE Server


The server in a DDE conversation is the application that is providing data.

A Note About Discrete Tags


When using Infilink as a DDE server it is important to understand how the client
will write Boolean values to discrete tags. By default Infilink assumes that if a
client writes a non-zero value to a discrete tag then that tag will be assigned a
value of TRUE. Some clients do not observe this convention but rather only
consider the least significant bit of the value they are writing to be what should be
assigned.

Using Infilink as a Local Server


To use Infilink as a server to a local client, you need to tell the client application
how to reference the data in Infilink's tag database. To do this, you will need to
find the DDE link setup area of the application that you intend to use as a client,
specify Infilink as the application, the name of a Tag Group as the topic and the
name of a tag in the Tag group as the item.
Let's use Microsoft Excel as an example. Assume you want to get the data for a
Tag group called "FlowInfo" and a tag called "FlowRate" and store it in cell location
A5. You would place the cursor in cell A5 and enter the formula:
=Infilink|FlowInfo!FlowRate
Now whenever the value of FlowRate changes, the text in cell A5 will be updated.
If FlowRate is defined as a Read/Write tag, you could write an Excel macro to
"Poke" a new value to FlowRate. This macro might appear as follows:
Sub PokeFlowRate()
Dim rangetopoke
Dim channel
channel = Application.DDEInitiate("Infilink", "FlowInfo")
Set rangetopoke = Worksheets("Sheet1").Cells(1, 5)
Application.DDEPoke channel, "FlowRate", rangetopoke
Application.DDETerminate channel
End Sub

Copyright 2003 KEP, Inc.

Using OPC and DDE 238

MS Excel as a DDE Server


Tag Group setup
To identify Microsoft Excel as a local DDE server you will define a DDE Tag Group
that identifies Excel as the Server name and sheet1 as the Server topic.
If the copy of Excel that you want to use is on another PC connected to your
network the application would be \\<computer name>\ndde$ and the topic
sheet1$. You will need to create a DDE share for sheet1$ so that it will be
recognized by the NETDDE agent.

Tag Addresses
To address spreadsheet locations on sheet1 assign addresses of the form r#c#
where the #'s would be replaced by the row and column of the cell you are
interested in. Be sure to enter your addresses using only lower case characters.

Copyright 2003 KEP, Inc.

Using OPC and DDE 239

Security

Overview
The purpose of this section is to explain Design and Run Mode Security options
available with Infilink HMI.

Design Mode Security


Infilink projects can be protected from unauthorized editing by assigning a
password. By default a project is not password protected.
To assign a password to a project that is not protected, the Current Password field
should be left blank. Otherwise, you will need to enter the password that is
currently assigned prior to making any changes.
Note: There is no way
to access a password
protected project without
the password. If you
forget your password,
you will not be able to
open the project.

1. From the Project menu, select Properties... then click on the Password tab.
When entering a password for a project that is currently protected,

enter the Current Password then click OK.


2. When entering a new password for a project that is not currently protected,
simply leave the Current Password empty. Enter up to six characters in the New
Password field.

Copyright 2003 KEP, Inc.

Security 240

If you are a systems


integrator and are
responsible for
installation of Infilink and
a completed Infilink
project at a customer site
you should password
protect the project to
prevent unauthorized
editing. You will not be
able to prevent design
time access to the
project any other way
because Infilink Design
Mode is available free of
charge to anyone who
visits our web site.

3. Enter the same characters in the Confirm field.


4. Click OK. The new password will be assigned when the project is saved.
To remove the password from a project leave the New Password and Confirm
fields blank. Click OK for both selections and the password will be removed when
the project is saved.

Copyright 2003 KEP, Inc.

Security 241

Run Mode Security


Infilink provides 256 user access levels. When Run Mode is initially started, the
user is set to NOUSER. This default name has an access level of 0. This default
user can only access windows and user triggered animations that have been
assigned an access level of 0.
To define a user with a higher access level you must log in with an access level at
least one level higher than the level you wish to assign.
When a user logs in, the system tags _User and _AccessLevel are updated to
identify the user name and assigned access level respectively.

If no users exist, the


login menu is disabled.

Logging in to a Project
Access to windows and user triggered animations is based on the
access level of the logged in user. The system administrator
assigns login names and access levels for an Infilink project. The
login dialog allows the operator to enter one of these names thus
gaining access to the features of the current project. When the
User, Log In menu is selected the Log In dialog appears.

User Name

Type the name of a user that has been defined for the current project.
Password

Enter the password that is assigned for the user name.


Click Ok to perform the login or Cancel to return with no further action.
Note:
- These buttons are used to call up a popup touchscreen or mouse
accessible keyboard when a physical keyboard is not attached to the unit.

Logging Out as a User


The user can log out of the project by selecting Log Out from the User menu. This
removes the current user from the system access list and sets the access level to
0.

Copyright 2003 KEP, Inc.

Security 242

Adding/Editing a User List


A project programmer may create or modify the list of users. User names and
passwords are not case sensitive and limited to sixteen characters.
The Project Properties dialog User List tab allows you to create and edit a list of
users for your project.

Copyright 2003 KEP, Inc.

Security 243

User List Tools


Add a new User to the list. This tool calls up the User Properties dialog for
you to enter user information.

Creating a New User


1. Type the Name of a user that has been defined for the current project.
2. Enter a brief but meaningful Description of this user.
3. Enter the Password (up to 16 characters) that is assigned for the user name.
4. Confirm the password by entering it again.
5. Set the Access level. This is the maximum level that this user will be allowed
to access.
6. Check if you want the user to have access to this project's run-time tag data
via the Internet using the iViewer utility.
Note: Infilink software must be licensed for iViewer access before this feature can
be used. If this box is checked without the software being licensed, a window
displaying an error message will appear when entering Run mode.

Edit an existing user's properties using the User Properties dialog.

Delete a User from the list.


Minimum user level to allow move license
Assigns an Access level that will allow the user to transfer the Infilink license from
one computer to another. We recommend setting this level high.

Copyright 2003 KEP, Inc.

Security 244

iViewer Utility

Overview
The iViewer utility is available through KEP's website. (www.kep.com). It is used to
display screen captures and tag data at a remote location via the Internet. Tags
assigned Internet Read/Write permission can be changed; provided the user has
an appropriate Access level.
Note: The Infilink package must be licensed to allow Internet access. Use the
Upgrade License procedure to add Internet capability.

Copyright 2003 KEP, Inc.

iViewer Utility 245

Connecting to a remote PC
Getting Started
Before using iViewer there are some things that need to be done:
Make sure the copy of Infilink on the remote PC is licensed for remote iViewer
access.

Make sure the Project Properties Internet tab has "Enable tag value access
over internet" enabled.

Make sure the Project Properties, User List tab, has a user defined and that
the user has "Allow access using iViewer" enabled.

Make sure that both computers have internet connections.

Find out the URL (or IP) address of the remote PC that you are trying to
access.

@ Design Tip: The IP address of a PC can be determined by running "ipconfig"


from the command line or DOS prompt.

Connecting
Start up iViewer and select Connect from the Action Menu.
Enter the Remote PC's URL (or IP) address.

Enter A valid User Name and password.

Click on the "Connect to server button"

iViewer should connect to the Remote PC and display all of the tags designated
for internet viewing.

Disconnect
Select Disconnect from the Action menu to end the communications link to the
remote Server.

Copyright 2003 KEP, Inc.

iViewer Utility 246

Server
The Server is the remote PC that is running Infilink. Enter the URL (or IP) address
of the remote PC in this field.
Port
The port address of the PC that is running iViewer. 9000 is the default for most
PC's. if your PC has more than one Port address put the appropriate number of
the port in this field.
User name and Password
Enter the name of a User from the project User List that has Internet access
enabled. Enter the corresponding password for that user in the Password field.
Enable the check box to remember this User and Password the next time you
attempt to connect to the Server.

Copyright 2003 KEP, Inc.

iViewer Utility 247

iViewer Setup
Use the Setup menu to modify how iViewer displays screen shots and tag
information. You can also set up a list of frequently accessed URL's.

iViewer Setup Dialog

Copyright 2003 KEP, Inc.

iViewer Utility 248

Adding/Editing a Server

Server name
Enter a familiar name for the remote PC acting as a Server.
Description
Enter a brief and meaningful description of the Server.
URL
Enter the URL (or IP) address of the Server. The URL is typically given as
<Computer name>.<company name> com.
Port
The port address of the PC that is running iViewer. 9000 is the default for most
PC's. if your PC has more than one Port address put the appropriate number of
the port in this field.

Screen Shots
iViewer can get a screen shot of the remote PCs display. Use the Action menu
Get Screen shot menu item to get a one-time screen shot. Infilink must not be
minimized on the remote PC. Sheen shots can be done automatically by making
the proper settings in the iViewer Setup Dialog.

Check the box to enable automatic retrieval of screen shots from the Server.
If the box is not checked, screen shots can still be done manually using the
Get Screen shot menu item from the Action Menu.
Set the interval at which screen shots are to be taken. Internet connection
speed should be taken into consideration when making this selection. The
time to the next screen shot is displayed in the Status Bar.
@ Design Tip: Do a screen shot manually first and time how long it takes
the screen shot to arrive. Make sure that the minutes setting is longer
than the time it takes to actually get a screen shot.
Copyright 2003 KEP, Inc.

iViewer Utility 249

iViewer Tag Display


The tags in the project that have Internet read or write capabilities are available for
viewing with iViewer. From this list the user can select the tags to be displayed in
the Tag values dialog by using the Setup|Tag List menu item.
Tags that are in an alarm condition are highlighted with the alarm type displayed in
the Alarm column.
To hide or show the Tag list, make select the Tags menu item from the View
menu.

If write ability has been assigned to the tag and the user access level for the tag is
less than the user level of the iViewer user, the tag's value can be changed.
Double click on the tag name in the Tag values dialog. The dialog shown below
pops up. Enter the new value for the tag and click the
button. If the value entered is valid, the new value will be displayed in the Tag
values dialog.

Copyright 2003 KEP, Inc.

iViewer Utility 250

Modifying the Tag list display


Select the Setup|Tag List menu item to call up the Select tags to view dialog.
Check the boxes of the Tag groups and Tags you would like to be displayed in the
Tag Values window. Click

when you are done.

iViewer Status Bar


The status bar can be enabled (View menu item is checked) or disabled by
selection.

The status bar shows the state of iViewer (Ready), the time until the next Screen
Shot (NSS) and the URL (or IP) address of the Server (Connected to:).

Copyright 2003 KEP, Inc.

iViewer Utility 251

Automatically Running a Project

Overview
The KEPServerEX is a
32 bit product and
cannot run on Windows
3.x.

Copyright 2003 KEP, Inc.

In this section we will show you how to setup Infilink and the KEPServerEX to start
running a project automatically when your PC is started, or when selecting a
shortcut or program item.

Automatically Running a Project 252

Windows 95/98
Making Infilink Auto Start in Win 95/98
1. Locate the Startup folder and create a new shortcut. The Startup folder is
accessed by right clicking the Windows Start button and selecting Open from
the popup menu. You then double click the Programs folder icon from the
displayed Start Menu folder to display the Programs folder. You then double
click the Startup folder icon to display the Startup folder contents. You then
select the File menu and choose New and Shortcut to start the Shortcut
wizard.
2. Use the Browse button on the displayed Create Shortcut dialog to find
RunMode.exe. Your command line should look something like
c:\Infilink\RunMode.exe.
3. Click Next and give your new Shortcut a name.

4. Right click on the new Shortcut and select properties from the popup shortcut
menu.
5. Now append a space, quotation marks, the path to the project you wish to
load, the words 'project.hmi', and close the quotes. (ie.
"c:\Infilink\proj1\project.hmi"). All together it should look something like:
"c:\Infilink\RunMode.exe" "c:\Infilink\proj1\project.hmi".

Copyright 2003 KEP, Inc.

Automatically Running a Project 253

Infilink requires you to


provide the full path to
the directory where the
project is located. It also
requires the Working or
Start in directory where
the Infilink executables
are located.

6. Click OK to complete the shortcut. The Infilink Runtime icon should appear in
the StartUp folder with the name that you chose in step 4.
7. Restart Windows to test your shortcut.

Copyright 2003 KEP, Inc.

Automatically Running a Project 254

Making KEPServerEX Auto Start in Win 95/98


Now we'll setup the KEPServerEX to start automatically.
1. Use Windows Explorer to find the ServerMain.exe application in the
KEPServerEX folder.
2. Open the startup folder as described above. Drag ServerMain.exe to the
Startup folder. This creates a new shortcut in the startup folder to
ServerMain.exe. You can rename the shortcut as you would any other
windows file.
3. Right click on the new Shortcut and select Properties from the shortcut
menu.
4. Select the Shortcut tab.

Quotes (") are needed


because of the space
between Program and
Files in the path.

5. The Target will be as follows:


"C:\Program Files\KEPServerEX\ServerMain.exe /run myproject.kdp
6. The Start in directory will be the directory in which the server project is saved:
"C:\Program Files\KEPServerEX\Projects "
7. In the Run list box select Minimized.

Copyright 2003 KEP, Inc.

Automatically Running a Project 255

8. Click Apply to accept the shortcut and click OK to exit the dialog.

Copyright 2003 KEP, Inc.

Automatically Running a Project 256

Windows NT
Making Infilink Auto Start in Win NT
The only difference between setting up shortcuts in Windows NT and Windows
95/98 is that Windows NT has an extra tab for share permissions. The default is
for everyone to have access.
1. Drag the Infilink RunMode from the Infilink Products folder to the Startup folder.
This creates a shortcut to RunMode.exe.
2. Right mouse click on the new shortcut and select Properties from the
shortcut menu.
3. By default, the dialog will default to general properties. Select the Shortcut
tab.

4. In shortcuts, the Target will be the same the Command Line we used in the
Windows 95/98 example. You will have the full path to the Infilink executable
followed by a space and the full path to the project directory. For example:
D:\INFILINK\RunMode.EXE c:\project1\.
5. The Start in directory will be the path to the folder where RunMode.exe is
located. For example: D:\Infilink.

Copyright 2003 KEP, Inc.

Automatically Running a Project 257

6. Click Apply to accept the shortcut and click OK to exit the dialog.

Copyright 2003 KEP, Inc.

Automatically Running a Project 258

Making KEPServer Auto Start in Win NT


Now we'll setup the KEPServerEX to start automatically.
7. Drag ServerMain.exe from the KEPware Product folder to the Startup folder.
This creates a shortcut to ServerMain.exe.
8. Select Properties from the shortcut menu.
9. Select the Shortcut tab.

Quotes (") are needed


because of the space
between Program and
Files in the path.

10. For example the Target will be as follows:


"D:\Program Files\KEPware\ServerMain.exe" /run myproject.kdp
11. The Start in directory will be the directory in which the server project is saved:
"D:\Program Files\KEPware\Projects"
12. In the Run list box select Minimized.

Copyright 2003 KEP, Inc.

Automatically Running a Project 259

13. Click Apply to accept the shortcut and click OK to exit the dialog.

Copyright 2003 KEP, Inc.

Automatically Running a Project 260

Appendix A: Library Objects

LIBRARY FILE: 2D_ISA_1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-1

LIBRARY FILE: 2D_ISA_2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-2

LIBRARY FILE: 2D_ISA_3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-3

LIBRARY FILE: 3D_ISA_1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-4

LIBRARY FILE: 3D_ISA_2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-5

LIBRARY FILE: 3D_ISA_3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-6

LIBRARY FILE: AIRCOND1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-7

LIBRARY FILE: AIRCOND2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-8

LIBRARY FILE: AIRCOND3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-9

LIBRARY FILE: ALARMHST

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-10

LIBRARY FILE: ARROWS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-11

LIBRARY FILE: BITMAPS1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-12

LIBRARY FILE: BITMAPS2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-13

LIBRARY FILE: BITMAPS3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-14

LIBRARY FILE: BUTTONS1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-15

LIBRARY FILE: BUTTONS2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-16

LIBRARY FILE: BUTTONS3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-17

LIBRARY FILE: BUTTONS4

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-18

LIBRARY FILE: BUTTONS5

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-19

LIBRARY FILE: BUTTONS6

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-20

LIBRARY FILE: COMPUTER

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-21

LIBRARY FILE: CONTROLR

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-22

LIBRARY FILE: DATADISP

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-23

LIBRARY FILE: DIALS1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-24

LIBRARY FILE: DIALS2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-25

LIBRARY FILE: DUCTS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-26

LIBRARY FILE: ELECTRC1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-27

LIBRARY FILE: ELECTRC2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-28

LIBRARY FILE: FACILITY

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-29

LIBRARY FILE: FLEXTUBE

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-30

LIBRARY FILE: FLOWMTRS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-31

LIBRARY FILE: GENERMFG

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-32

LIBRARY FILE: HEATING1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-33

LIBRARY FILE: HEATING2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-34

LIBRARY FILE: INDICATR

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-35

LIBRARY FILE: INTLSYMS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-36

LIBRARY FILE: MAPSFLAG

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-37

LIBRARY FILE: MATHANDL

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-38

LIBRARY FILE: METERS1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-39

LIBRARY FILE: METERS2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-40

LIBRARY FILE: METERS3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-41

LIBRARY FILE: METERS4

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-42

LIBRARY FILE: MISCSYM1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-43

LIBRARY FILE: MISCSYM2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-44

LIBRARY FILE: MISCSYM3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-45

LIBRARY FILE: MISCSYM4

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-46

LIBRARY FILE: MIXERS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-47

LIBRARY FILE: MOTORS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-48

LIBRARY FILE: NATURE

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-49

LIBRARY FILE: OP_INTFC

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-50

LIBRARY FILE: PIPES1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-51

LIBRARY FILE: PIPES2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-52

LIBRARY FILE: PIPES3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-53

LIBRARY FILE: POWER

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-54

LIBRARY FILE: PROCESS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-55

LIBRARY FILE: PUMPS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-56

LIBRARY FILE: SAFETY

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-57

LIBRARY FILE: SENSORS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-58

LIBRARY FILE: SHAPES1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-59

LIBRARY FILE: SHAPES2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-60

LIBRARY FILE: SLIDERS1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-61

LIBRARY FILE: SLIDERS2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-62

LIBRARY FILE: SLIDERS3

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-63

LIBRARY FILE: SLIDERS4

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-64

LIBRARY FILE: SYSCMDS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-65

LIBRARY FILE: TANKCUTS

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-66

LIBRARY FILE: TANKS1

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-67

LIBRARY FILE: TANKS2

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-68

LIBRARY FILE: TIMEDATE

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-69

LIBRARY FILE: TRENDHST


Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-70

LIBRARY FILE: VALVES

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-71

LIBRARY FILE: VEHICLES

Copyright 2004 KEP, Inc.

Appendix A: Library Objects A-72

Technical Support
Kessler-Ellis Products
Phone 800-621-2165 or 732-935-1320 extension 332
Website www.kep.com
Licensing website http://infilock.kep.com
Email plc@kep.com
KEP technical support by telephone or email is free.
Information KEP will generally need to provide the best possible technical support includes:
Version of Infilink (Help / About)
If the problem is related to licensing, we will need serial number, website login code, or at least the
approximate date of purchase and the name of the distributor.
Company name and phone number.
Your email address.
A description of the problem.
New Features:
KEP values user input on what features should be added to the product. Please contact us with any ideas you
have which can make our product more useful to you.
Updates:
Would you like to know when Infilink-HMI updates are available?
I suggest that you signup for KEPs enewsletter. You can signup on www.kep.com, or by emailing plc@kep.com.

Thank you for your support of Infilink-HMI.


--The Infilink-HMI Team.

Copyright 2004 KEP, Inc.

Technical Support B-1

You might also like