Tutorial V51 Rev B
Tutorial V51 Rev B
2000
E-mail [email protected]
Page 1
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
1. Introduction .........................................................................................................................7 Course Overview .................................................................................................................................7 System Requirements...........................................................................................................................8 2. Installing InduSoft Web Studio ..........................................................................................9 InduSoft Web Studio Development Environment ............................................................................... 10 Features and Functionality ................................................................................................................. 10 3. InduSoft Web Studio Overview ........................................................................................13 InduSoft Web Studio Internal Structure.............................................................................................. 13 Tag Database ..................................................................................................................................... 13 Development Modules ....................................................................................................................... 14 4. Creating a New Project .....................................................................................................17 Configuring Project Settings .............................................................................................................. 18 Configuring Project Status ................................................................................................................. 21 5. Tag Database Configuration ............................................................................................23 Types of Tags .................................................................................................................................... 23 Classes, Arrays and pointer tags......................................................................................................... 24 Array tags........................................................................................................................................ 24 Classes ............................................................................................................................................ 24 Indirect tags references / pointers.................................................................................................. 25 Fields - Tag Parameters ................................................................................................................... 25 Internal, Application, and Shared Tags............................................................................................... 27 Internal Tags ................................................................................................................................... 27 Application Tags ............................................................................................................................. 27 Shared Tags..................................................................................................................................... 27 Database Exercise .............................................................................................................................. 27 6. Creating New Screens ......................................................................................................31 Creating a Standard Screen ................................................................................................................ 31 Drawing the Header Objects ............................................................................................................ 33 Creating the Footer Object............................................................................................................... 37 Creating the Main Screen ................................................................................................................... 39 7. Expressions, Functions and Script Language................................................................47 Examples to access the application database....................................................................................... 48 Arithmetic operators .......................................................................................................................... 48 Logic operators .................................................................................................................................. 49 Functions list ..................................................................................................................................... 49 SEND MESSAGES TO THE LOGWIN.......................................................................................... 49 ARITMETIC FUNCTIONS ............................................................................................................ 49 STATISTIC FUNCTIONS .............................................................................................................. 50 LOGARITIMIC FUNCTIONS........................................................................................................ 50 Page 3
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
LOGIC FUNCTIONS ..................................................................................................................... 50 FUNCTIONS FOR STRINGS MANIPULATION........................................................................... 50 DATE AND TIME MANIPULATION............................................................................................ 51 TRIGONOMETRIC FUNCTIONS ................................................................................................. 51 FUNCTIONS FOR OPENING AND CLOSING WINDOWS ......................................................... 51 SECURITY SYSTEM..................................................................................................................... 52 MODULE ACTIVATION FUNCTIONS ........................................................................................ 52 FILE MANIPULATION FUNCTIONS........................................................................................... 52 FUNCTIONS FOR GRAPHICS SCREENS PRINTING ................................................................. 53 FUNCTIONS FOR TEXT TRANSLATIONS ................................................................................. 53 MULTIMEDIA FUNCTIONS......................................................................................................... 53 SYSTEM INFORMATIONS........................................................................................................... 53 DATABASE ACCESS FUNCTIONS ............................................................................................. 54 LOOPS ........................................................................................................................................... 54 INTERNAL TAGS ......................................................................................................................... 54 MAIL.............................................................................................................................................. 54 SPECIAL FUNCTIONS.................................................................................................................. 54 8. Configuring Worksheets...................................................................................................55 Configuring a Math Worksheet (simulate the field process)................................................................ 55 Configuring a Scheduler worksheet using the events Clock, Calendar and Change.............................. 56 9. Recipes and Reports ........................................................................................................59 Creating Recipes ................................................................................................................................ 59 Creating the Recipe Worksheet........................................................................................................ 59 Creating the Recipe Screen .............................................................................................................. 60 Recipe laboratory ............................................................................................................................ 62 Creating Reports ................................................................................................................................ 62 Creating ASCII Reports................................................................................................................... 62 10. Language translation........................................................................................................65 Enabling external translation .............................................................................................................. 65 Creating the Translation worksheets................................................................................................... 65 Creating the Translation screen. ......................................................................................................... 67 11. Configuring the Security System .....................................................................................71 Security System Window ................................................................................................................... 71 Password ......................................................................................................................................... 71 Groups ............................................................................................................................................ 72 SECURITY ACCESS LEVEL ........................................................................................................... 73 Users............................................................................................................................................... 73 GUEST USER ................................................................................................................................... 74 Log On/Log Off................................................................................................................................. 74 12. Creating Alarms Group.....................................................................................................81 Creating an Alarm Group ................................................................................................................... 81 Page 4
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
ALARM WORKSHEET HEADER ................................................................................................... 82 Creating on-line Alarm screens .......................................................................................................... 83 Creating Historical Alarm screen........................................................................................................ 86 The Alarm Tag Fields ........................................................................................................................ 89 13. Trend..................................................................................................................................91 Trend On line..................................................................................................................................... 91 Creating a Historical trend.................................................................................................................. 93 Creating a Trend group.................................................................................................................... 93 Creating a Trend History screen....................................................................................................... 95 14. Communication .................................................................................................................99 PLC Drivers....................................................................................................................................... 99 Selecting a Driver............................................................................................................................ 99 Configuring the Communication Parameters.................................................................................. 100 Communication Parameters ........................................................................................................... 101 Long1, Long2, String1 and String2 Fields...................................................................................... 101 Advanced Settings......................................................................................................................... 102 Adding a new Driver worksheet.................................................................................................. 103 s Header........................................................................................................................................... 104 12.1.4.2 Body ................................................................................................................................ 107 Preparing the Application to the Driver Runtime Example ............................................................. 108 Running the application and monitoring the Driver ........................................................................ 112 TCP/IP ............................................................................................................................................ 113 Introduction................................................................................................................................... 113 Server Configuration ..................................................................................................................... 113 Client Configuration...................................................................................................................... 113 How to make a TCP/IP Client Configuration ................................................................................. 113 Running the TCP/IP Client Module ............................................................................................... 114 Custom Parameters........................................................................................................................ 114 OPC (OLE for Process Control) ....................................................................................................... 114 Introduction................................................................................................................................... 114 Preparing an OPC Server Database................................................................................................ 115 Configuring the InduSoft Web Studio OPC Client Worksheet........................................................ 118 WEB................................................................................................................................................ 120 Introduction................................................................................................................................... 120
Page 5
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
1. Introduction
Section 1 Course Introduction This section will familiarize you with the objectives and agenda of the InduSoft Web Studio course.
Course Overview
InduSoft Web Studio course is a four-day instructor-led course designed to teach all the basic functionality of the InduSoft Web Studio product as well as an overview of the underlying architecture. The purpose of this course is to give students the ability to develop Human-Machine Interface (HMI) and SCADA (Supervisory Control And Data Acquisition) applications on Windows NT/2000 and run them on Windows NT/2000 or Windows CE runtime workstations. Main Course Objective Upon completion of this course, students will be able to develop an application using InduSoft Web Studio. The following modules are included: I.1. Company Overview and Available Products I.2. InduSoft Web Studio Overview I.2.1. InduSoft Web Studio Internal Structure I.2.1.1. Development Modules (Database, Comm, Tasks, Graphics) I.2.1.2. Runtime Modules (Viewer, BGTasks, Driver Runtime, OPC Client, TCP/IP Client/Server) I.2.1.3. Utilities Modules (Database Spy, LogWin) I.2.2. InduSoft Web Studio Tasks I.2.1. Recipes I.2.2. Reports I.2.3. Math I.2.4. Alarms I.2.5. Trend I.2.3. Tag Definition I.2.3.1. Types of Tags I.2.3.2. Class, Pointer and Array I.2.3.3. Fields Page 7
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
I.2.3.4. Internal Database, Application Database and Shared Database I.2.4. Communication Tasks I.2.4.1. Drivers I.2.4.2. OPC I.2.4.4. TCP/IP I.2.5. Development / Run-Time concepts I.2.6. InduSoft Web Studio Environment I.3. Tutorial Application
System Requirements
To develop an application with the InduSoft Web Studio software, we recommend the following hardware and software: IBM-compatible computer with an Intel Pentium II-compatible processor Windows NT/2000 operating system 64 MB of random-access memory (RAM) MS Internet Explorer 4.0 or install 40comupd.exe version 4.71 or higher 150 MB of free hard disk space is required for the program without any application programs; more is recommended 3.5" floppy drive CD-ROM drive (can be on a different computer) Standard keyboard with function keys F1 through F12 Parallel printer port (optional) 100% IBM-compatible VGA or SVGA display adapter with 2 MB Video RAM (VRAM) Microsoft-compatible pointing device (e.g., mouse, trackball, joystick, touchscreen) One or two COM ports and adapters for downloading applications (optional) Ethernet connection for downloading applications (optional) To run a developed application, you must have a CE device runtime workstation with a runtime license. The operating system must be Windows CE v2.11 or higher and the files MFCCE211.DLL, ATLCE2311.DLL and OLECE211.DLL should be previously stored in the \Windows directory.
Page 8
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Page 9
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Tag[another tag]. Arrays simplify many configurations and permit the use of multiplexing in screens, recipes, and communication interfaces. Also, it saves development time during the tag declaration. Indirect tags (pointers): Use of the @Tag construct causes an indirect read or write. For example, if the X tag has the value Setpoint and you use the @X construct, then you are reading or writing value of the tag Setpoint. You can use @Tag wherever you use a tag name, such as the name of a pen in a trend graph. Classes: You can define a data structure such as: ClassPID { PV, CV, SET, KP, KI, KD } and declare tags or even arrays of the type ClassPID that will have groups of values instead of a single value. You can even combine all tags features (array, pointer and classes) - For example: @Tag[another tag] or Tag[another tag].SP. Mathematical functions InduSoft Web Studio has an internal programming language used for writing logical relationships and mathematical calculations needed in applications programs. Online configuration The runtime tasks accept new configurations immediately and without the need to restart or recompile the programs. You can change any element in the configuration, including mathematical calculations, reports, addresses in the PLC, and the type of a tag in the database. All these changes can take place on the fly, without halting the application or your process. You can also run an emulation of the application on your development computer and test it before downloading to the target runtime station. Easy addition of symbols Reusable objects or groups of objects that you store for reuse are known as symbols. In a few seconds you can add a new symbol or modify an existing symbol, which allows you to quickly reuse symbols as you build your application. Report generation InduSoft Web Studio has all the tools you need to generate and save to disk reports that contain text and graphics, without requiring the use of other software packages such as Microsoft Excel. Recipes in ASCII The InduSoft Web Studio database supports direct access to recipe files written in ASCII. DDE, NetDDE, ODBC and OPC (on Windows NT, Windows 95) The product provides DDE, NetDDE, and OPC as well as the ODBC interface for access to relational databases on the Windows NT/2000 runtime. Windows CE also supports the interface OPC.
Page 11
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Security system The internal security system allows you to assign permissions and capabilities to individual users and user groups, each with its own password. You can apply security restrictions to the applications you create with InduSoft Web Studio and you can also limit access to the development tools provided by InduSoft Web Studio. The security system is also applied to the remote clients, connected by Web (Intranet/Internet). Batch historical files InduSoft Web Studio data collection features allow your applications to save and retrieve historical data files, using archives based on time or user-defined names, an essential feature for batch systems. Alarms Your InduSoft Web Studio applications can include the following alarm features: Free formatting of alarm messages. Use of a secondary search key. Access alarms through groups or by tags. Development support InduSoft Web Studio contains many tools to help you development applications, such as an easyto-navigate user interface, message register, error codes, and event codes used during execution. Development tools also allow direct database access for the creation and verification of variables. InduSoft Web Studio application programming interface (API) All InduSoft Web Studio software modules are developed using an open API. This permits easy growth as the development kernel and the application tasks are maintained independently. The API also allows you to create new software modules in any language with .DLL support. Dynamic support for multiple languages To create an application that supports multiple languages, create your application in your primary language; create a table showing the text in other languages. Then the system can use the table for translation. This feature allows you to create applications that dynamically change languages during execution.
Page 12
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Tag Database
The tag database is the heart of InduSoft Web Studio product. In InduSoft Web Studio, you use the same tag names in the worksheets and the displays, and InduSoft Web Studio manages tag values among the modules. All modules share information through the application database. The values of the application tags and InduSoft Web Studio internal tags are stored in this database during system execution. The application database is a medium used by all modules to read or write values. Configuring an application consists of defining which tags are used by each module. This means that application development follows the same logical sequence, regardless of the number of tags involved in a particular application. Page 13
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Development Modules
Graphics The most basic function performed by InduSoft Web Studio is to provide a window into the process. This ability to display the status of the process, by interacting with instrumentation or computers, is described as the Human-Machine Interface (HMI). Note that if a system only works with sensors, controllers, and other process equipment, the HMI is often limited in scope. Applications created by InduSoft Web Studio can monitor processes using high-resolution color screens. The InduSoft Web Studio graphic tools consist of two modules: the worksheet editor, in the InduSoft Web Studio desktop, and the application runtime Viewer. The worksheet editor is what you use to create or import graphics. Graphic objects or symbols can be dynamic objects by using animation links. Animation links can make an object or symbol change appearance to reflect changes in the value of a tag or an expression. Each screen is an association of static and dynamic objects. Screens can also have an optional bitmap that acts as a background in the object window. For example, the static images in the screen below can be part of a bitmap in the background object, and objects with animation in the dynamic object layer can reflect the changes in the plant. In turn, the screen has the illusion of being three-dimensional.
Page 14
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The Viewer enables you to preview the runtime screen in an emulation mode. All of the InduSoft Web Studio configuration tasks require a Windows-compatible pointing device such as a mouse or touch pad. You can run an application in the Viewer without a pointing device if you configure keypad or keyboard keys for all commands. InduSoft Web StudioTasks
The InduSoft Web Studio tasks is where you configure task-specific worksheets, each composed of a Header, where the global information in the sheet is defined, and a Body, where the tags and expressions used in each task are configured.
Alarm groups Here you define an alarm group, its characteristics, and messages that are reported in alarm conditions. The main purpose of the alarms is to inform the operators about any problem or change of state during the process so that corrective action can be taken. To show alarm messages on the screen, you must create the alarm object on the screen. Trend groups Trend groups keep track of process variables behavior. You can store the samples in a history file and show both history and online samples in a screen trend graph. Recipe This module allows you to read and write ASCII files from and to the hard disk; it transfers values between files and real-time memory. Its typical use is to store process recipes, but these files can store any type of information such as operation logs, passwords, and so forth. It allows also you store data in XML format.
Page 15
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Report Use this module to configure your own reports with system data, in either ASCII or RTF format. The main purpose of this module is to make report creation easier and more efficient. Math Worksheet This module allows you to implement additional routines to work with the basic functions of the InduSoft Web Studio modules. A Math worksheet is a group of programming lines that are executed as one of the application Background Tasks. You can configure the mathematics in blocks in different worksheets. This worksheet provides a free environment for logical routines and mathematical calculations that the project may need. For these purposes, the scripting language is simple and easy to use. Scheduler This module generates time bases used in the application and it is capable of triggering events. ODBC Configuration (not available for WinCE applications) The ODBC interface will allow InduSoft Web Studio applications to access any database compatible with the ODBC protocol, like Access, Excel, Oracle, SQL Server and so on.
Page 16
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: You can also open InduSoft Web Studio in the Run window (accessed by Start | Run ) command line, with the following command:
"C:\Program Files\InduSoft Web Studio\Bin\R nStudio.exe" u
This command will work only if you installed InduSoft Web Studio in the default folder during installation. Otherwise you will need to enter the path that you used during installation. You can find RunStudio.exe using the Windows Find command (Start | Find | Files or Folders , then type RunStudio.exe in the Named field.) In the InduSoft Web Studio environment, select File | New (or the New button ) to open the New window. Select the Project tab and type the name of the project (Tutorial) in the Application name field. For this tutorial, the default selection (CEView for Local Interface) should be highlighted in the Target platform pane. After you are done, press the OK button.
Page 17
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The Project Wizard window will open. Select the Empty Application option in the Template options and the 640 x 480 radio button in the Resolution group box. After you are done, press the OK button.
Page 18
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The Options tab contains settings for language translation, target system, PC-based control, driver write command buffering, and general information about the application.
The Runtime Desktop tab contains global settings, for the application, that determine how it will run on the runtime workstation and what menu options will be available. You always need to specify the first screen that will open in the application when it runs in emulation mode or on the runtime workstation. For this tutorial, type Main.scr in the Startup screen field. (The file extension is optional.) Note: There is a screen group feature that allows you to open a linked set of screens all at once. It's not supported for Local Interface applications, or for screens that should be exported to HTML format.
Page 19
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: All settings defined in the Project Settings window can be changed during application development, but we recommend that these settings be configured at the beginning. For example, the Startup screen field defines which screen will be opened when the application is started and there will be an error message generated if you try to emulate or run the application without a legitimate value in this field. The Web tab contains global settings for the remote thin clients, which will access the application by a web browser (Internet Explorer). These settings can be configured at any time, however, after modify any parameter it's necessary to execute the command Verify Application from the Tools menu to update the HTML files with the new settings.
Page 20
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The System Information tab provides some general information about the development system and about the application.
Page 21
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Page 22
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Types of Tags
The value of a tag can be one of the four standard types: Boolean (4 bytes): Boolean or digital variable (0 or 1). Integer (4 bytes): Integer number (positive, negative, or zero). Equivalent to the C type long integer. (with a range of 2147483647 to 2147483647) Real (floating point, 8 bytes): Real number internally stored as a double word. Equivalent to the C type double. String (ASCII, 256 bytes): Character string up to 255 characters (from 0 to 254) that holds letters, numbers, or special characters. Examples: Recipe product X123 01/01/90, *** On *** , All tags are declared in the Application Database module of the Database tab. In addition to the four types previously listed, you can define new types called classes.
Page 23
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The tag tk is the index that contains the number of the desired tank. An array index may be a tag, a numeric value, or an expression with a value plus a tag. To refer to an array that has an index with the arithmetic operation +, you must use the following syntax: <tag name>[<tag>+N], where N is a numerical constant. Examples: temperature[tk+2], temperature[tk+6] Using array tags can save a lot of application development time. Suppose that you need tag points related to the temperature of four tanks. The conventional configuration method is:
temperature1 high temperature on tank 1 temperature2 high temperature on tank 2 temperature3 high temperature on tank 3 temperature4 high temperature on tank 4
When you create a four-position array tag, the system creates five positions (from 0 to 4). Therefore, the TagExample[15] array has 16 elements. Note: When you try to reach an invalid index, such as 20 on a 15-element array, the 0th element is used (losing any data it held), therefore you are advised not to use it for normal operations.
Classes
In addition to the standard tag types, you can also define new types of tags called classes. Classes are structures that allow a high degree of encapsulation in the application database. When a classtype tag is created, it does not contain a single value, but a whole set of values. You can create class-type tags by grouping up to 32 simple tags, called elements. When you create a class tag, its tag does not have a single value, rather it has a group of values associated with the class, for example:
Page 24
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Members of a class can hold standard values, as previously described. If you create a new tag Tank of type CTank, you are actually creating a tag with all the properties of the class CTank. To access the members of a class tag, you should use the period (.) separator. Examples: Tank.Level, Tank.Temperature If tag Tank is an array, the syntax would be: Tank[1].Level, Tank[n].Temperature
For example, assume that a tag named X holds the string Temp. Reading and/or writing to @X provides access to the value of the tag Temp. To refer to a class-type tag, you must also use the Database Manager to define a tag of type string that points to this tag. You can define the tag directly by simply declaring, for example @XClass in the Tag Name column as a member of the class. By doing so, you are making XClass a reference to another tag. To access a member of an indirect class tag, use the following syntax:
@<name of indirect tag>.<member>
Example: @XClass.Level In this case you are accessing the member Level of the tag that XClass points to. When you create tags for indirect use, place an @<name> in the tag column rather than creating them as strings. For the type, write the type of tag for which a reference is being created. Follow the XClass example:
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
You can access the following fields at runtime: Max the maximum tag value. Min the minimum tag value. Note: If you try to write a value outside of the range specified by Max and Min, it will not be accepted and a warning message will be generated in the LogWin file. If you do not wish to use these properties, enter 0 in both fields. Unit an up to 8-character string used as reference for engineering units. *HiHiLimit the numeric threshold for a High High alarm. Example: TP->HiHiLimit=70 *HiLimit the numeric threshold for a High alarm. *LoLimit the numeric threshold for a Low alarm. *LoLoLimit the numeric threshold for a Low Low alarm. *DevLimit the numeric threshold for a Deviation alarm. *RateLimit the numeric threshold for a Rate alarm. *DevSetpoint the reference setpoint for a Deviation alarm. Description the documentation-only description field. *AlrDisable disables alarm checking as follows: 1 disables alarm and 0 enables alarm Example: TMP->AlrDisable=1 Size the size of an array tag; the default is size 0 for a non-array tag. HiHi if nonzero, a High High alarm is present. Hi if nonzero, a High alarm is present. Lo if nonzero, a Low alarm is present. LoLo if nonzero, a Low Low alarm is present. Rate if nonzero, a Rate alarm is present. Dev if nonzero, a Deviation alarm is present. TimeStamp the date and time of the last tag value change. b0 through b31 allows access to each bit from an integer tag. Note: During runtime, you can modify fields related to alarm limits, indicated by the * in the description above.
Page 26
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Application Tags
Application tags are created by the user during application development (for example: displays, tags that read from and write to field equipment, tags used for control, auxiliary tags to perform mathematical calculations, and so forth).
Shared Tags
These are tags read from another software package (generally a PC-based control software package). These tags cannot be edited from Indusoft Web Studio.
Database Exercise
In the Workspace window, select the Database tab. Click the Application Tags folder to expand it and double-click the Datasheet View line to open the database worksheet.
The database may be updated during the development so that new tags may appear as they are created. We can also define tags that we already know we will need at the beginning of our application. The first tags contain values for the state of the valves that fill or empty the tanks (Valve_Fill_State and Valve_Empty_State Each valve has only two possible states ). (opened or closed), so a tag associated with these valves should be a Boolean tag. There will be three tanks in the application, each configured similarly, and there are two types of valves: one to fill and one to empty each tank. We can use arrays to quickly configure the tags associated with Page 27
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
all three tanks. We need to configure the Application Datasheet as follows (in order to fill in the field, click on the field and type the data; you can also tab to the next field):
Note: We are only using two lines in the database to configure six tags. Arrays reduce the time spent configuring the database. Also, arrays allow us to configure functions and scripts that can optimize the overall application. We have configured the tags that will receive the state of each valve. Now, we need to configure the tags that will be used to send commands to the host controller. These tags have the same number of states and other characteristics of the previously configured tags:
Finally, we need to create tags to store the properties associated with the tanks: temperature, level and pressure. These attributes are associated with one piece of equipment, a tank. We will use a tag class to tie all these properties together and associate them to a tank. To create a new class, select the folder Classes (in the Database tab), right-click it, and select Insert Class.
In the dialog box, type in the new class name, CTank and click the OK button.
In the Application Tags database worksheet, we will reference the properties of the tank by using tags of Type Class: CTank. Each tank property is defined as a member of the class CTank and each is defined similarly to a tag with a Type parameter: Boolean, Integer, Real, or String. All of the tank property class members are analog; so declare them to be real: Page 28
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: You can expand the Classes folder and its subfolders to see the data structure. Close the Class: CTank worksheet and create a tag associated with this class. To create the tag, open the Application Datasheet and insert a tag (Tank). In the Type column choose the option Class: CTank. Since we have three tanks, configure the Array Size to be 3.
You have completed creating the initial tag database for our application; now expand the Application Tag and Classes folders in the Database tab to see the database you have created:
Page 29
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: You can create new Application Tags and new Classes, right-clicking on their respective folders and choosing the Insert option. In addition, you can also modify a tag property by right clicking on its icon and choosing the Properties option. During the application development, when you type an inexistent tag, InduSoft Web Studio will prompt you if you desire to create this new tag. If you accept, it'll create a window, which allows you create the tag by an easy and fast way.
Page 30
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
In the Screen Attributes window, you must configure the general information about the screen. The first screen we are going to create is the standard screen.
Page 31
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Press the OK button and an empty screen with the selected attributes will appear. Save the screen Save icon in the Main toolbar (or File | Save or to preserve the settings by clicking the File | Save As ) and type Standard.scr (or Standard) in the File name field.
Expanding the folders in the Graphics tab, you can see the saved screen.
After creating the screen, change the background color. Select the gray background color using the Background Color button on the Tools toolbar to open the Color window, or just right-click on the screen and chose the Background Color option: Page 32
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Select the light gray color and select the OK button or double-click the light gray color.
After drawing a button, either right-click it and select Properties from the menu, use Alt + Enter while it is selected, or double-click it to open the Object Properties window for the button. In the Caption field, type Main to change the caption text on the button.
Creating the Button Links All of the buttons except for Exit are used for opening screens. The function Open("<screen name>") is used for this. Although the screens are not created yet, you can still configure the buttons.
Page 33
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
To add a dynamic property to an object, select the object, select the Command button on the Tools toolbar, and open the Object Properties window, which should have Command selected in the drop-down menu in the upper right corner. (If not, select Command on the menu.) If the Object Properties window is already opened, it will switch to the Command configuration. Select the Main button, add the Command property and enter the Open() function in the first Expression field as shown below:
After this, create eleven more buttons and label them Trend Online, Trend History, Recipe, Report, Alarm Online, Alarm History, LogOn, Exit, Translation, PLC and OPC. Note: You can use Copy (Ctrl + C) and Paste (Ctrl + V) commands to quickly create buttons that are all the same size. You can also hold the Ctrl key and click-and-drag copies off of the original button with the mouse. Using the alignment and spacing buttons on the Tools toolbar, you can easily symmetrically align and space the buttons. To change the font, press the Fonts button and select the new settings (Suggestion: Use font size=10 and font type=Arial). When you are done, the top of your screen should look like this:
After this, select another button, add the Command property, and configure the Open() function in the Object Properties window with the correct screen name. The screen names should be: TrendHistory TrendOnline, Recipe, AlarmHistory, AlarmOnline, Report, , Translation PLC and OPC. Configure the expression LogOn() for the LogOn button. , Configure the expression ShutDown() for the Exit button. Drawing the Legend Objects Rectangles Draw three rectangles with the Rectangle button, they will look like this:
Page 34
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Select all rectangles and select the Fill group box, select the Fill Color button on the Tools toolbar. Select the black fill color shown below. (You can also use the Fill Color property in each Object Properties dialog window.)
Note: Depending on the palette configured on the system, graphic objects that are imported into the InduSoft Web Studio environment may have color distortion. If this happens, change the palette configured in your system. Drawing the Legend Objects Rectangle Text Using the Tools toolbar Text button, add a text object in each rectangle consisting of ten number signs in the upper left rectangle, eight number signs in the upper right rectangle, and at least ten number signs in the lower rectangle.
In the Objects Properties window for each, select the Transparent check box and then click the Fonts button and set the text to the following parameters. (The Tools toolbar Fonts button may also be used to change text properties.)
Page 35
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: We suggest to set Arial font with size=10 and Aqua color. Adding Dynamic Properties to the Legend Text I/O button on the Tools toolbar. To associate tags or expressions to text objects, use the Select any text with a number sign character (#) then select the now-active Text I/O button. The upper text object (with ten number signs) will be used to display the system date. Open its Object Properties window. The Text I/O Object Properties window should be shown; if not, select the Text I/O option in the upper right drop-down menu. Type Date, the name of the internal tag that holds the system date, into the Tag/Expression field. When running, the application will display the system date in place of the number signs.
Copy the object twice and move them on the other two rectangles previously created. Select the middle text object and repeat the above process, entering Time, the name of the internal tag that holds the system time, into the Tag/Expression field of the Text I/O Object Properties window for that object. Repeat again for the lower text object, using UserName, the internal tag that holds that string identifying the current user of the application. At this time, we can quickly test these functions by selecting the Execution Control toolbar. This is what you should see: Test Display button of the
Page 36
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Open the Object Properties for the alarm object and configure it as shown below. Changing the Border and Win colors to black will change the alarm object to a solid black rectangle. Configure up to 30 characters in the Message text box.
Press the Font button to change the Font to Arial, Font style Bold, Size 10, Color White. (You may also use the Font button from the Tools toolbar.) The font color will be set later in an Alarm worksheet.
Page 37
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
You will need to make the alarm object rectangle about 600 pixels wide (as shown in the Status Bar) to accommodate the masking letters at a 10-point Arial typeface. When you are done, make sure that you save the Standard screen.
Page 38
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The two large arrows can be found on the arrows screen (selected in the right pane of the Library window), the two pipes are from the pipes screen, the tank is from the tanks screen, and the arrow buttons are from the buttons screen, and the indicator is from the frames screen. To move the objects from the Library to your Main screen, keep the Library window at its default size so that you can see the Main screen behind it, select the correct page, scroll to the desired object, and click-and-drag it from the Library to the screen. When you are done, close the Library window. Then rearrange the Library objects (you may need to resize the length of the pipes) on the screen so that their arrangement resembles that of the final screen:
Page 39
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
You can also draw similar objects using the tools available on the Tools toolbar, but these reconfigured objects simplify and speed the process of screen creation. After importing the symbols from the library, we can configure the links on the screen. First, create the text objects as follows:
Note: Before beginning to configure the links, create another tag in the Application Database (TankID, Type Integer, Array Size 0, Web=Local) that will be the index for the tag array. - For each text objects, associate one previously created tag in the Tag Database. To apply this association, let us use the "Text input/output" link as we did before. Select the text " ### F" and click on the "Text input/output" icon. Configure it as follows:
- Select the text " ### mca" and click on the "Text input/output" icon. Configure it as follows:
Page 40
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Finally, select the text " ### m" and click on the "Text input/output" icon. Configure as follows:
- To show the values of temperature, pressure, and level in a graphical format, we use the bargraph link. - First, we need to create three rectangles. For each one of them, associate one tag, which we previously created in the Tag Database. We will associate these tags using the "Bargraph. - Select the rectangle above the text " Temperature ### F" and click on the "Bargraph" icon. Configure the rectangle as follows:
Select the rectangle above the text "Pressure ### mca and click on the "Bargraph" icon. Configure it as follows:
Page 41
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Select the rectangle above the text "Level ### m" and click on the "Bargraph" icon. Configure it as follows:
- For the valves "Valve_Fill" and "Valve_Empty", configure two links: "Color" (to show the valve's status) and " Command" (to enable that authorized user can give commands to the valves). - Select "Valve_Fill" and select the position property. Configure it as follows: - Select "Valve_Fill" and select the position property. Configure it as follows:
Page 42
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: The "Security" associated with these valves block the action (or command) from any users who do not have the right privileges. - Finally, configure the buttons. In order to do this, we need to change the index of the Array Tags used on the screen (i.e.: switch the tank number). - Select the increase button it as follows: on the screen and click on the "Command" icon. Configure
Page 43
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- To see the number of the tanks that are being supervised, let us configure a text string (" Tank #") and associate the follow "Text input/output" function to it.
For the main tank, configure one link: "Bargraph" (to show the level animation in the tank) Select the tank object and select its "BarGraph" dynamic. Configure it as shown below:
Page 44
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
We need to save the screen and execute the application to test the configuration. Execute the command Project - Run Application from the menu or click on the Run Application from the toolbar. You can use the DBSpy and Output Window to debug your application. icon
Before we go on creating the other screens, we will learn about InduSoft Web Studio language translation and create a process simulation.
Page 45
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Example:
IMPORTANT: No attributions are done on the Expression column. If you write A=2 in this column, it means that you are comparing A with the number 2. The integer result of this expression (the Boolean value 0 if false or 1 if true) will be written to the tag in the Tag Name column. NOTE: The system is not case sensitive. NOTE: To add comments to an expression line, use the //characters. Data types
Integer numbers: 1 23 45 -123 Floating point: 1.234 -775.344 Hexadecimal integer numbers: 0x5 0xA0 0xBC4 Strings: demo new demo
Integer numbers are 32 bits. Floating numbers are 8 bytes and the strings are up to 255 characters.
Page 47
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Example 2: InduSoft Web Studio allows you to read and write in the tags using references or pointers. A tag used as pointer to another tag can be declared in two ways: as a string (a pointer to an undefined type) or as a pointer of a specific kind (recommended).
In Figure above, the pointer_default is a variable of the string type that is a pointer. The variable @pointer_to_integer is a pointer to integer values. NOTE: The syntax @tag allows a tag to access another by reference. NOTE: Any tag declared as a string can be used as an indirect tag (pointer). Operators InduSoft Web Studio supports all the following operators.
Arithmetic operators
+ * / > < addition subtraction multiplication division greater than less than Page 48
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
equal greater than or equal to less than or equal to different than (unequal to)
Logic operators
AND NOT OR XOR & | ~ ^ >>n <<n AND, logic. NOT, logic. OR, logic. exclusive or, logic. AND, bit. OR, bit. NOT, bit. XOR, bit. rotate right - Rotate n bits to right. rotate left - Rotate n bits to left.
Functions list
InduSoft Web Studio has more than one hundred functions ready for use:
ARITMETIC FUNCTIONS
ABS(numValue) DIV(numDivisor, numDividend) FORMAT(strFormatFlag, numValue) GETBIT(strTagName, strBitNumber) MOD(numDivisor, numDividend) POW(numBase, numExponent) RESETBIT(strTagName, strBitNumber) ROUND(numValue) Page 49
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
STATISTIC FUNCTIONS
AVG(numValue1, numValue2, &ldots; , numValueN) MAX(numValue1, numValue2, &ldots; , numValueN) MIN(numValue1, numValue2, &ldots; , numValueN) RAND()
LOGARITIMIC FUNCTIONS
EXP(numExponent) LOG(numLogArg) LOG10(numLogArg)
LOGIC FUNCTIONS
IF(numCondition, numThen, numElse) TRUE(numExpression) FALSE(numExpression)
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
STRRCHR(strSource, strCharSequence) STRRIGTH(strSource, numQdeChars) STRSTR(strSource, strSequence) STRSTRPOS(strSource, strCharSequence) STRTRIM(strReference, numOptionalFlag) STRUPPER(strValue) VALUETOCHAR("numArray", numQdeChar) VALUEWTOCHAR("numArray", numQdeChar)
TRIGONOMETRIC FUNCTIONS
ACOS(numValue) ASIN(numValue) ATAN(numValue) COS(numAngle) COT(numAngle) PI() SIN(numAngle) TAN(numAngle)
Page 51
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
SECURITY SYSTEM
CREATEUSER(strUserName, strGroup, strPassw) REMOVEUSER(strUserName )
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
MULTIMEDIA FUNCTIONS
PLAY(strWavFile)
SYSTEM INFORMATIONS
DBVERSION() GETAPPHORIZONTALRESOLUTION() GETAPPVERTICALRESOLUTION() GETCOMPUTERNAME() GETHARDKEYMODEL() GETHARDKEYSN() GETPRODUCTPATH() GETOS() GETPRIVATEPROFILESTRING(str_Section, str_Name, str_Default, str_FileName) GETTICKCOUNT() INFOAPPALRDIR() INFOAPPDIR() INFOAPPHSTDIR() INFODISKFREE(strDiskUnit) INFORESOURCES(numResourceCode) NOINPUTTIME() Page 53
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
LOOPS
FOR(numInitialValue, numFinalValue, numStep) NEXT
INTERNAL TAGS
GOTO LABEL
MAIL
CNFEMAIL( strSMTP , strFrom, strPOP3, strUser, strPassword, numTimeout ) SENDEMAIL( strSubject, strMessage, strTO )
SPECIAL FUNCTIONS
IMPORTANT: You can use the Database Spy module to execute any math expression; write the expression in the Tag Name field, and click the mouse over the Toggle button. The return value of the expression will display in the Value field.
Page 54
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
8. Configuring Worksheets
Configuring a Math Worksheet (simulate the field process)
Before continuing our application development, we need to create a script to simulate some variables. In a real world application, these variables would be coming from field equipment such as a PLC or a Soft Control. This simulation will be done in a math worksheet, which needs to be constantly executed Right click on the "Math" folder located in the Tasks tab, select the option "Insert" to create a new math worksheet.
The Execution field is what controls the Math Execution. You can type a full expression here, a simple condition, a tag name, a value, and when this condition is TRUE, the math will execute. So, in the header, configure the field Execution with the value 1. This enables the continuous execution of this math worksheet just because 1 is always a TRUE condition.
In the math worksheet's body, configure the functions to simulate: -The valve status, according with the command given. s -The level, temperature and pressure of each of the three tanks. - To simulate the status of each valve, just transfer the value from the command tags to the status tags. - To simulate the properties for temperature and pressure for each tank, let us consider these properties using trigonometric functions (sine and cosine). - To simulate the properties for level of each tank, remember that both valves (fill and empty) allow for the same flow. Page 55
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- So, with the above understanding, let us fill the body of the math worksheet in as follows:
F Note: In our example, worksheet 001 is executed continuously. In a real world application, it is strongly recommended that the execution of each math worksheet be carefully controlled to improve the system's performance.
Configuring a Scheduler worksheet using the events Clock, Calendar and Change
To create a new scheduler worksheet, right click on the Scheduler folder in the Task tab from the Workspace window. Select the option Insert to create a new scheduler worksheet.
Page 56
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Notes: The Clock event is used to trigger actions based on regular time intervals such as timers and counters. In the Time column, we can configure the base time (minimum of 100ms). In the Tag column, we must configure the tag that will receive the result from the expression configured in the Expression column. Finally, the Disable field can be used to prevent an expression in the line from being executed. The results of the expression in the Disable field will always be TRUE. The Calendar event is used to trigger actions on a scheduled time. Also, it is possible to specify a fixed date for the event in the Date column. The Tag, Expression and Disable columns are used the same in all three-scheduled event functions. The Change event is used to trigger an action upon a change in a tag value. In the Trigger column, we must configure a tag that will be used to trigger the event when a change in value has occurred. The Tag, Expression and Disable columns are used of the same in all three-scheduled event functions.
Page 57
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Next, create the TAG Cake of the type class:CCake. Note: Remember that the syntax to access the value from <tag_name>.<member_name>. (e.g. Cake.Sugar, Cake.Fruit, etc ). a class tag is:
So, create the type STRING tag RecipeName (it is not a CLASS type) that will be used to store the input file name used in the recipe task. Now, select the Tasks tab in the Workspace window and create a new recipe sheet.
Page 59
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Fill in the fields as shown below and save it with the default name Recipe1.rcp.
The "File Name" field is where you are going to save your recipe tags values. If you type a tag name between curly brackets (like the example), the file will use the tag value to compose the File Name. For example, you can have a "File Name" like: c:\AppName\Recipe\{RecipeName}. In this case, the value inside of the tag RecipeName will give file the name, at the c:\AppName\Recipe\ directory. Register Number Field - Tag that defines the register number to be read or written in a DBF file. Not used anymore. Number Column: Sets the number of array tag positions that are in use. So, if you want to have an array tag size 120 in a Recipe, you do not need to type a tag name and index for all the 120 positions, Tag[0], Tag[1], Tag[2], All you need to do is to type the Tag name and in the number column just type how many positions. (e.g. Tag )
Page 60
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Now, associate it to the Text I/O function to the ############ texts and fill each one of their Tag/Expression field with the tag names and members of Cake tag. Leave the Input Enabled check box checked. For example: to the ############ text in front of the Flour text, type Cake.Flour in the Tag/Expression field of the Tex I/O property.
For the Recipe Name field associate the string tag RecipeName. Insert the Command property in the Save and Load buttons. In the Save button, type the following command:
Page 61
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Recipe laboratory
Type a name to the Recipe and some values to its ingredients. Save it. Then type another name with other values and save it as well. Now type the name of the first recipe and Load it. Play a little bit with that.
Creating Reports
The InduSoft Web Studio Report tool allows you creating reports very easily, without needing any other programming tool, like VB, etc All you need to do is to prepare your report mask in a ASCII format or using our Report Writer tool (that creates RTF files) putting the Tags that you want to have the values inside of curly brackets. Let us go to the tutorial:
Configure the report worksheet as follows: Just like in the Recipe case, the "Output File" is where the report is going to be created including its name. A Tag between curly brackets can be used here for given report a name. The "Disk Append" check box will be explained in the next example.
Page 62
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Save the report worksheet with the default name Report1.rep. Create the Report Screen as follows.
To the ################### text associate the Text I/O property and configure it like shown below:
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
This command will use the Windows NotePad program to see the ASCII Report just created. The next step is to give the report a name and play with the commands Save and Open.
Page 64
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Page 65
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: It is necessary to create a blank sheet for the default language. In this tutorial our default language will be the English language as we explained before. Create a new translation sheet and fill it in as follows:
Save it with the name Portuguese.tra;. Create a new translation sheet and fill it in as follows:
Page 66
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Save it with the name Germany.tra. Note: It is possible to build an application with as many languages as necessary. To do that, we simple need to create a translation worksheet for each language used.
In the English button previously created, associate it to the Command function. Fill in the fields for the Object Properties window as follows:
Page 67
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Note: The function SetTranslationFile defines the translation worksheet that will be used in the application. In the Portuguese button previously created, associate it to the Command function. Fill in the fields for the Object Properties window as follows:
In the Germany button previously created, associate it to the Command function. Fill in the fields for the Object Properties window as follows:
Page 68
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Finally, save the screen and execute the application to test the configurations.
Page 69
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Enable Security System Check-box - Enables the InduSoft Web Studio Security System. Main Password Button - Opens the Security System Main Password window (see below). Accounts Group Box Groups Button - Opens a Groups window (see below). Users Button - Opens a Users window (see below).
Password
The Main Password button of the Security System window opens the Password window where you define a password for accessing the InduSoft Web Studio Security System.
Page 71
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Confirm Password Field - Confirm the password you typed in the New Password Field by typing it again and clicking on OK. If the password is different, the system asks you to type it again. IMPORTANT: After you define your password, you will need to use it each time you access the Security System, so it is mandatory that you remember it.
Groups
The Groups Account Button of the Security System window opens the Group Account window in which you can create and maintain user groups. In this window, you enable/disable operations and set the range level. Groups can also be accessed by opening the Groups folder within the Security folder or by selecting the Security Group option under Insert on the Main Menu Bar. Select a specific group to view.
Group Account Drop-list - Select the group to which the user belongs from the drop-list. Security Level Development Group Box - Defines the security level of each group (0 to 255). Any object for data input in the Display Screen (such as input commands, sliders, or screens) has a Security Level field. If the object level is not in the group security scale logged in at the moment, then the object is disabled. A level 0 (zero) means that the object is always enabled. Security Level Runtime Group Box - Defines the security level of each group (0 to 255). Any object for data input in the Display Screen (such as input commands, sliders, or screens) has a Security Level field. If the object level is not in the group security scale logged in at the moment, then the object is disabled. A level 0 (zero) means that the object is always enabled. Engineering Access Group Box - Lists Engineering (development) tasks that can be accessed when a user in this group is logged on. Includes check-boxes for Create, modify tags; Project Settings; Drivers, Data Sources; Network Configuration. IMPORTANT: The security level can also be set to each document (worksheets and displays) to protect them in the development environment. This refers to the Engineering Access box. Page 72
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Runtime Access Group Box - Runtime modules that this user group can access. Includes checkboxes for Start App, Close App, Database Spy (white), Task switch enabled, CreateUser enabled. NOTE: You cannot delete the Guest group (the default logged group). New Button - Opens the New Group Account window, in which you can create a new group. Delete Button - Deletes the currently selected user group.
Users
The User Account Button of the Security System window opens the User Account window in which you create and maintain accounts for application users. Define the application users that will be in each group in the Group Account list. Users can also be accessed by opening the Users folder within the Security folder or by selecting the User option under Insert on the Main Menu Bar. Select a specific user to view.
Page 73
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
User Drop-list - Lists application users in a drop-list. Security Group Drop-list - Lists application groups. New Button - Opens the New User Account window to create a new user. Delete Button - Deletes the selected user. Password Button - Opens the User Password window, in which you can define a password for the user.
New Password Enter a password to define it. Confirm Password - Confirm the password you typed in the New Password field by typing it again and clicking on OK. If the password is different, the system asks you to retype it.
GUEST USER
After you initialize InduSoft Web Studio, a default user is logged on the Guest user. If no user is logged on or the current user has logged off, Guest user is automatically logged on. The Guest group has default privileges. Since the installation parameters of the Guest group leave all tasks enabled, you should change it and set as few privileges as you want for a start up procedure.
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Studio Scripting Language module activation functions LOGON( ) and LOGOFF( ) or by selecting Logon under Project on the Main Menu Bar.
User Name - Name of the user to be logged in. Password - User password. Log Off - Logs off the current user. NOTE: When a Logoff is executed, the Guest user is automatically logged on. So now let us start the tutorial Before beginning the security system, it is important to have the groups and users that we want to configure in mind. We need to define the rights that each group has in our environment. In our example, we will create three groups: Operation, Maintenance and Development. - In the Workspace, select the "Database" tab. Click on the Security folder and select the subfolder Group. Use the right click button to open the pop-up menu and select the "Insert group" option.
- There is a default group called Guest that cannot be deleted. Let us create a new group by clicking on the button New and typing in the new group name (For example: Operation).
Page 75
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Press OK, to open the Group Account menu. We can configure the access rights for that group account as follows:
- Press the New button again and create a new group account (For example: Maintenance).
- Press OK to once again open the Group Account window. Configure the access rights for this group as follows:
- Finally, press the New button again to create the last group account (For example: Development).
Page 76
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Press OK to open the Group Account window and configure the access rights for that group account as follows:
- Press the OK button to save the configuration. F Note: Each group has a range for the level in Development and Runtime. In some sheets (for example, the math sheet) we can set an access level to provide them with access to configure that sheet. The user logged in to the system must be associated to a group in that range (development) that has access to configure the math worksheet. Buttons can also be configured with access levels so that the commands (scripts) configured in these buttons will be executed only for users that belong to a particular group for the runtime environment. Now we must create new users associated to the group accounts just created. In the Workspace, select the "Database" tab and expand the "Security" folder. Select the subfolder "Users" and click right so that the pop-up menu with the option for "Insert user" appears. Select Insert user.
Page 77
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
There is a default user account called Guest that cannot be deleted. To create a new user, click on the New button and type in the new user name (For example: Operator_1).
- Press OK, now we can associate a group accounts to the new user. For example, selecting the group "Operation" in combination with the "Security Group". In addition, we can also configure the password by clicking on the button Password. For example, the password for Operator_1 is oper_1.
- Press the New button again to create another user. For example: MaintEng_1.
- Press OK. Again, we can associate a group account to the new user. (For example, selecting the group "Maintenance" in combination with "Security Group"). In addition, we can also configure the password again by clicking on the Password button. For example, the password is main_1.
Page 78
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Press the New button again to create the last user. For example: Developer_1.
- Finally, press OK. Again, we can associate a group account to the new user. (For example, selecting the "Development" group in combination with the "Security group). In addition, we need to configure the password by clicking on the Password button. For example, the password is deve_1.
- Press the OK button to save the configuration. Now we can expand the subfolders of the folder "Security" in order to visualize all the groups and users that we have created.
Page 79
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
F Note: In the Tutorial, we created only one user for each group. However, it is possible to create a lot of users for each group. It is also possible to create a new user for an application by using the function "CreateUser".
Page 80
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
After creating the Class, let us create the Tags. The first one is the Tag called Alarm_Settings, type CAlarm. Let us also create a String TAG to be used as Alarm Filter. This tag name should be Alarm_Sel, type string and an integer tag called View as such as two Boolean tags PGUp and PGDowni. All of them with array size = 2. To create a new alarm group, click on the right button in the "Alarm" folder (in the workspace "Tasks" tab) and select the option Insert.
- Configure the alarm group worksheet as follows (Don't forget to press the diskette icon to save it):
Page 81
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
When you create an alarm worksheet you are telling the systems what tag you want to have as alarm and what kind of alarm, limits, message, priority and filter selection., as well as the message colors in the alarm object. When you check the Save To Disk box, the system will record all the alarm occurrences in an ASCII file in the alarm subfolder of the application folder, with the hst extension. The manual explanation regarding the Alarm Worksheet Header is the following:
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Total Active or Unack Field - Holds the total number of active or unacknowledged alarms in the group. The system always updates this value when one of the tags changes its alarm condition. Group Box Summary Check-box - When selected, sends alarm messages to an alarm object on the screen. IMPORTANT: If you did not select the Summary option, the alarms of this group will not appear in the alarm objects in the screens and printer, during execution. Ack Check-box - Demands the acknowledgment of the alarm messages. Only available if the Summary field is enabled. Beep Check-box - Sounds the beep until the alarm is acknowledged. Only available if the Ack and Summary fields are enabled. Printer Check-box - Sends each alarm message from this group to the printer. This option can only be used with a dot matrix printer (or any other which prints line by line). Disk Check-box - Sends the alarm messages of this group to a file on the hard disk. You must select this option if you want to have history alarm objects. Generate Ack Messages Check-box - Generates messages whenever the alarms of this group are acknowledged. Only available if the Disk or Printer fields are enabled. Generate Norm Message Check-box - Generates messages whenever the alarms of this group return to their normal state. Only available if the Disk or Printer fields are enabled. Colors Group Box When the Enable check-box is checked, the user can select the alarm messages colors. Otherwise, the default colors will be used. Click on a Color rectangle to display a Color Selection window. Double-click on the desired color or click the color and then the OK button.
- Now, double click on the "Alarm" object to bring up the "Object Alarm Properties" window. Follow the example below, but be sure that the "On-line" option is selected. (Configure the font as Arial ; 8 ; White)
Page 83
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- The first button is configured with the caption "Ack Last" using the internal tag AckAlr, which must change by value to acknowledge the last alarm that occurred. Configure the first button as shown below:
Page 84
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- The second button should be configured with the caption "Ack All" and configured with the properties below. Once again, use internal tag AckAll, which must change value to acknowledge all the alarms that have occurred.
Draw the text and objects as shown below and configure them with the Alarm_Sel tag to sort the alarm messages shown in the alarm object.
Finally, import a vertical slider from the library and configure it as shown below:
Page 85
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Page 86
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Create an "Alarm" object on the screen by clicking on the "Alarm List" icon and selecting an area on the screen to display the alarm. - Double click on the object to bring up the "Object Alarm Properties" window and configure the object following the example below, but be sure that the "History" option is selected.
- Press the Selection button to configure the filter like the example below:
Page 87
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Replace the Tags PgUp[1], PGDown[1] and View[1] for the tags PgUp[2], PGDown[2] and View[2] in the vertical slider as such as in the Alarm object. - To select the month , year and range of days in the alarm object, create a Text I/O objects and associate the tags Alarm_Settings.StartDay, Alarm_Settings.EndDay, Alarm_Settings.Month and Alarm_Settings.Year to them.
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Page 89
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
13. Trend
The Trend task keeps track of process variables behavior. You can store the samples in a history file and show both history and online samples in a screen trend graph. To show a trend graph on the screen, we must create a trend object with the Trend icon on the Object Editing Toolbar and to store the historical variable behavior we must create a trend worksheet.
Trend On line
Our on-line trend will show the Temperatures behavior in real time, updated every second. Open the Standard screen and save it as TrendOnLine. Insert the Trend object and configure it as follows:
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Save the screen and run it! After a couple of minutes you might have a chart like this on:
Page 92
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Create a new trend group by right clicking on the "Trend" folder (in the workspace under the "Tasks" tab) and selecting the option Insert.
Page 93
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
With this worksheet we are configuring the system to store the values from the tags Tank[1].Temperature, Tank[2].Temperature and Tank[3].Temperature. The check box Save on Trigger and its field beside defines the store rate. To define the store rate let us create a scheduler line toggling the Trend.update every 15 seconds.
Page 94
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Sometimes it is necessary to adjust the Date format. The InduSoft Web Studio default is MM/DD/YYYY. If in your case it is different, run the function SetDateFormat(/,MDY). This function defines the Date separator (in our example is regular slash /, but it can be period ., dash -, etc ) and the order (DMY, MDY, YDM, ). This script loads the Pen names into the pointer tags and sets the trend limits. After configuring the Pens and the Vertical Scale you will be able to understand it best. - Double-click on the trend object and fill in the "Object Trend Properties" window as follows. Be sure that the "History" option is selected
Page 95
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The cursor enables us to know the variable values in different chart positions. The Position field will be used in a slide object and the tag inside of the Date/Time output field receives Date and/or time of the cursor position. Note also the Duration field as well as the StartDate and StartTime fields are filled in with Tags. We are going to create texts with Text I/O and input enabled to allow dynamic data inputs. - Press the Vertical Scale button and configure it as follows:
Page 96
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Now the fields Min and Max from the Scale Range are filled in with tags. These tags will have texts I/O with inputs to let it be configured by on the Runtime. - Press the Pens button and configure it as follows:
With this configuration we are able to change the Chart limits (Trend.Low and Trend.High) and the tags Trend.CursorPen1, 2 and 3 will receive the intersection between the pen curve and the cursor trace. The Pointer tags inside of the Tag field will point to the Tank.Temperature tags or to an empty auxiliary tag that we are going to call EmptyTag. This resource let us choose to hide the pens, as we will see on the Runtime. The next step is to draw the remaining objects of the screen. Draw it just like picture below and configure the objects like indicated: Page 97
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Now it is time to laboratory. Start the runtime, wait for 30 seconds (2 records), fill in the StartDate, StartTime and duration with existing values.
Page 98
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
14. Communication
PLC Drivers
The driver is a part of the InduSoft Web Studio Software, and its function is to establish the communication between Devices and the InduSoft Web Studio software. Communication, in this case, means to read values from the Devices memory to applications variables called "Tags", or write values from the application tags, to the Devices memory. The following is a sample of the drivers available to the WinNT/2000 and CE Operating Systems: Allen Bradley DF1 Siemens S5 AS511 PG Port Profibus DP Master and Slave (Hilscher) Allen Bradley - ControlNet Slave OMRON Host Link GE FANUC SNP, 90-30 90-70 Series Modbus Schneider 984 series Profibus DP Master Cultler Hammer D50 D300 Series Hitachi H series Toshiba Prosec T1/T2
Selecting a Driver
When the InduSoft Web Studio is installed, all the drivers are also installed with it. To start configuring any driver, initialize the InduSoft Web Studio at the InduSoft Web Studio's icon. In the workspace, on the Comm tab, right click on the folder "Drivers", and then on "Add/Remove". On the dialog box opened, choose the desired driver, or its description then hit Select. To our examples, let choose the ModBus Driver. s
Page 99
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Page 100
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Communication Parameters
Valid values COM1 to COM8 110 to 57600bps 5 to 8 1or 2 even, odd, none, space or mark 0
Description Serial port of the PC used to communication with the device, if it is a serial driver. Communication data rate s Number of Data bits used in the protocol Number of stop bits used in the protocol Protocol Parity s Number or Name of the Computer, or Unit in a Network, if the protocol needs it.
Station
Note: The Device MUST be configured with the SAME values defined in the Communication Parameters window.
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
If you type an Invalid Entry in these fields, they will accept it, but, when you try to close the Comm Parameter dialog, an error message will be shown, avoiding close the dialog. s
Advanced Settings
By clicking in the button Advanced in the windows Communication Parameters will be possible to configure other parameters of the serial communication:
0 to 10000
500
0 to 10000
100
0 to 10000
Description Maximum time to receive the beginning of the answer from the device (time-out time) Maximum time to receive the end of the answer from the device since the beginning of the answer. (Note: the value zero mean that the driver won check t these time) Maximum time between the characters sent from the device Maximum time to receive the CTS signal after the set of the RTS signal (Note: valid only if the parameter Verify CTS has the value yes) Page 102
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Control RTS
No
Verify CTS
No
no or yes
Disable DTR
Not checked
Retries
0 to 5
Tx Buffer (bytes)
512
0 to 512
Rx Buffer (bytes)
512
0 to 512
Define if the handshake signal of RTS (Request to Send) must be set before a communication and if will have echo in the communication Define if the driver must wait for the handshaking signal of CTS (Clear to Send) before send a message If checked, the driver won set the DTR signal t before starting the communication Communication retries s number by each tag configured in the driver sheets, in failure case. Maximum size of the buffer of information to be sent from the driver Maximum size of the buffer of information to be received from the host
? ? ote: At most of times, these parameters must be changed only when is used a DCE (Data Communication Equipment) N converter (232/485, for example), modem etc - between the PC where is running the driver and the Host. It necessary to s know the features of the DCE before adjusting these parameters.
NOTE: The settings of the Communication Parameters are the same for all the Driver Configuration sheets.
Page 103
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
To our example, let insert a new Modbu Driver Worksheet s Two parts compose the driver: The Header and the Body The Header contains all the information about the reads and writes commands and the body, the operator addresses. s
Header
The Driver Configuration's header contains the required information to the driver's functions, for that sheet. As initial information, for each area that you want to communicate, you must create a new Driver Configuration sheet. Description Fill in this field with the description of the spreadsheet, like witch types of areas, their range, and if it's a reading, writing or both sheets. This description will be shown on the workspace, into the driver's folder
Page 104
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Increase read priority If it's a reading sheet, and there's more reading sheets with the same read trigger or enabled when idle, and a write event happens, the sheet with the priority increased will be the first one on the next reading called by the read trigger or the "read when idle" event. Read Trigger This field can contain a tag that will generate a read event always when changed its value. Enable Read When Idle This field can contain a tag or a value that will enable the continuous reading, always when its value is greater than zero. Read Completed This field can contain a tag that will have its value toggled when a reading event has been finished. Read Status This field can contain a tag that will have its value filled with an integer value, always when a reading event has been finished. If this value is equal to zero, the event has been Ok. Otherwise, the event has finished in error. The errors message can be viewed at the Logwin module (when in NT/2000), or checked at the MODBU.MSG file, in the DRV InduSoft Web Studio's directory. Write Trigger This field can contain a tag that will generate a write event of the whole spreadsheet, always when changed its value. Here we have an extremely important point: when using this feature, the driver will write the TAGs value in the PLCs memory. This operation writes using blocks, from the first sheet operator up to the last. If there's an operator that has not been declared in such spreadsheet, and its address is between the first and the last, it will receive the value zero. Therefore, be sure about what do you want to write when using this trigger, and check out whether there's any kind of hole in the spreadsheet, that could bring any problem to the system or to the PLC's program. Enable Write on Tag Change This field can contain a tag that, when its value is greater than zero, enables the writing of only the changed tag of the body's spreadsheet, different then the write trigger. Write Complete This field can contain a tag that will have its value toggled when a writing event has been finished. Write Status: This field can contain a tag that will have its value filled with an integer value, always when a reading event has been finished. If this value is equal to zero, the event has been Ok. Otherwise, the event has finished in error. The errors message can be viewed at the Logwin module (when in NT/2000), or checked at the OMPLC.MSG file, in the DRV InduSoft Web Studio's directory. Page 105
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Station This field must, if so indicated in the driver help file, contain the CPU's ID, or Unit Number, or PLC Address, related to this specific worksheet. Each driver has a different syntax to this field. For example, the GE Fanuc SNP driver let you identify the PLC with all ASCII characters, but the OMRON Host Link Protocol, allows only 1 to 31 addresses. They call it Unit Number. So, for each driver this syntax can vary. Most of times, this is the address of the PLC in a device network. It can also be filled with a tag, between curly brackets (For example: {tag}) NOTE: The TAG placed between the curly brackets, cannot be tested on its existence. It means, if a TAG is typed that has not been created yet on the Application Database, or in a different form then the other fields, it won't be opened the dialog window with the question regarding its creation. In other words, if you type an uncreated tag, the system won't work properly. NOTE: This is a string field, and must be filled correctly; otherwise the driver won't work properly. Header field This is one of the most important fields and must contain the worksheet header. Each driver has a different syntax to this field. Usually, you must type here something like the operator type, s followed by the initial address. Check some examples below: Meaning 4X indicates that this worksheet will communicate with the Holding Registers, MODBUS 4X:100 from the address 100 on. In the AEG 984 case, from the address 400100 on. IR indicates that this worksheet will communicate with the I/O and Internal OMPLC (Host Link) IR:0 Relays, from the address 0 on. In the C200H case, from the address IR00000 on. %M indicates that this worksheet will communicate with the %M discrete internal FANUC (SNP) %M operator. There no initial address to this s driver. N7 indicates that this worksheet will communicate with the N7 file, from the ABKE (DF1) N7:0 address 0 on. In the PLC-5/40 case, from the address N7:0. AS511 (Siemens DB5 indicates that this worksheet will DB5:10 PG Port) communicate with the Data Block number 5, from the Data word 10 on. So, for each driver this syntax can vary. Most of the time, this is the address of the PLC in a device network. Page 106 Driver Header
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
In our example case, let use the MODBUS Syntax. s The syntax here is: <reference>:<initial address>. It means, you first type the reference you wish to communicate on this sheet, type the colon ( : ), and then the initial address. For example, if the header is 4X:1, the sheet will read from the 4000001 until the highest offset configured on the Address column. The references allowed are: 0X: Coil Status 1X: Input Status (read only) 3X: Input Register (read only) 4X: Holding Register ID: Report Slave (read only) There no limit to the initial address. s Take care with the limits of the addresses. For example, if on the PLC there no 30500. The s Header field accepts the syntax 3X:500, but the runtime won find this register. t Where is indicated Read Only, the write functions won work. It not safe let write on the t s Input Status, Input Registers and the Report Slave functions. This field can also be filled with a tag between curly brackets (For example: {tag}). NOTE: Such as the Station field, the TAG placed between the curly brackets, cannot have its ? existence tested. It means, if a TAG is typed that has not been created yet on the Application Database, or in a different form then the other fields, it won't be opened the dialog window with the question regarding its creation. In other words, if you type an uncreated tag, the system won't work properly. When creating a new driver sheet, this field starts blank. Once you place the mouse's cursor on it, even you try to let it blank again, the standard string 0X:1 will take place on it. From then on, it won't be possible leave it blank again. But it's possible to changing its value to another valid header. Min / Max These fields are only enabled if the check box to the left is selected. When selected, it enables a range of values that can be converted into an engineering format. These fields determine the minimum and maximum range of values. Ex.: memory holds values from 0 to 4095 meaning 0% to 100% in the user interface. This setting takes effect for all tags in the worksheet. In this example, the tag parameters min and max must be set 0 to 100
12.1.4.2 Body
The Driver Configuration's body assigns the PLC's memory address to the declared tags, and also handles the engineering units. It has 4 columns: Tag Name, Address, Add and Div. Page 107
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Tag Name Tag name to be used by the communication driver. Address Address to read and write the tag value in the equipment. Again, as the Header field, this cell is different for each driver. Usually, here you type the offset from the initial address configured on the Header field. And also, in some cases, you can indicate the specific bit of the Address. In our driver's example case, you put the offset from the initial address configured at the Header field. It is not allowed typing a negative offset. The value 0 will overwrite it. Div / Add / Max / Min Range of Values Mean In read commands: Tag = (Host value) / DIV Any Integer or Real In write commands: Host value = Tag * DIV In read commands: Tag = (Host value) + ADD Any Integer or Real In write commands: Host value = Tag ADD Defines the minimum value assigned for the tag, when Any Integer or Real the corresponding host value is equal to the value s defined in the field Min of the Driver Sheet Header. s Defines the maximum value assigned for the tag, when Any Integer or Real the corresponding host value is equal to the value s defined in the field Max of the Driver Sheet Header. s <tag> =(( <value in the equipment>) / Div )+ Add <value in the equipment> = (<tag> - Add) * Div
Max
Note: If the columns of the table above are not configured, the tags of the drive sheet will receive the same value of the address configured.
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
0 0 0 0 0
Bool Bool
Boolean tag that will be on the "Enable Write when Idle" fields Boolean tag that will be on the "Write Complete" fields
Integer Integer tag that will be on the "Write Status" fields String String tag that will be, not in the test's beginning, on the field String String tag that will be, not in the test's beginning, on the field
The communication tags will be TAG_DRV, size 10. Develop a Driver worksheet and a screen like shown below:
Page 109
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
First CEView Application download The CE unit must have the executable software CEServer.EXE, configured for TCP/IP communications in the settings window, running before beginning. - On the develop station, hit the REMOTE button
- Type the IP address of the CE unit, and then hit Connect Page 110
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
-Wait until the Status field displays that you are connected. - Hit Install system files to install the CEView on the Remote Station. - After installing the CEView, hit the Application tab.
- Beside the Field Target, choose the remote directory where the Application will be s downloaded, by using the button .
Page 111
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
- Download the Application by using the button Send to Target. The Unit must have the CESever.exe running. - After downloading, the application can be started by the button Run, and stopped by the button Stop, while you are connected to the CE unit. - The field Status shows the last operation status.
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
PLC. Check also with the Tag WrCpl[1] changed its value each time a write event is finished, and if the Tag WrSt[1] kept its null value.
TCP/IP Introduction
The InduSoft Web Studio TCP/IP Client/Server modules enable two or more Indusoft applications to keep their databases synchronized. These modules use TCP/IP protocol to make the communication between the applications. Before using the InduSoft Web Studio TCP/IP Client/Server modules, you need to install and configure the TCP/IP protocol in the machines that will run these modules.
Server Configuration
In the server machine, you don't need to configure anything. You just need to run the module InduSoft Web Studio TCP/IP Server. In the development go to the Project Settings window and set the TCP/IP Server to run automatically. When running this program, a small icon will appear in your system tray. To close the InduSoft Web Studio TCP/IP Server module, right-click its icon in the system tray, and select Exit.
Client Configuration
In the client machine, you need to use the TCP/IP Client Configuration program to configure the Server IP address and the tags you want to share with the server.
Description: this field is used for documentation only. The TCP/IP Client module ignores it. Connection Status: this field should contain a tag name. The TCP/IP Client Configuration module will update this tag according to the connection status. If the tag value is 0 (zero), then the connection is OK. Otherwise, it's the error code returned by the Windows Socket library. Server IP Address: this field should contain the IP Address of the server. It may be a string, or you may use a tag enclosed by brackets. For example, if you fill this field with {tag_name}, the TCP/IP Client module will try to connect to the server indicated by the tag tag_name. Page 113
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Tag Name: these fields should contain the tags you want to share with the server. If the tag is an array or a class (or both), every element and member is shared. You should only put the tag name in this field, without specifying the index or class member. If you specify an index or a class, the TCP/IP Client module will ignore it. Remote Tag: these fields should contain the name of the tag that will be linked with the tag specified in the field Tag Name. This field is optional. If you leave it in blank, the same tag name will be used in the client and in the server. Warning: if you need to share an array, then the tag in the server should contain the same number of elements of the tag in the client. If the tag is a class, then the class definition should be the same in both server and client applications. If you don't follow these rules, unpredictable results may happen.
Custom Parameters
There are three parameters you can configure in the Application Configuration (.app) file. [TCP] Port=< TCP/IP port number. Default = 1234 > SendPeriod=< Time in milliseconds the client/server module will update the tag values of the other machine. Default = 250 > ConnectRetryTimeout=< Time in seconds the client should retry to connect to the server. Default = 30 > The Port parameter should be the same in both the client and server machines. Only the client module uses the ConnectionRetryTimeout.
Page 114
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Accept the next steps, like, driver name and communication settings. In the "Device Properties" window, configure it as shown below. Note the "Simulate I/O" check box checked:
Page 115
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Now you are ready for start adding new OPC Server items. This means that you are going to tell the OPC Server what PLC address you want to communicate with. You organize it in groups, sub-groups, etc To our example, let us just create two groups. Menu Add + New Group. Give it the Integer name.
Now, Add + New Tag. (Note: this new tag means an OPC Server item; it has nothing about the InduSoft Web Studio Tags). Configure the New tag as the following
Page 116
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
Create now at least two more tags inside of the Integer group, with other elements, like T4:0.ACC, C5:0.PRE, etc After that, create a new group, called Boolean and create new Tags like B3:0/200, I:0/5, N7:100/4, etc Save it as shown bellow (In the FirstTutorial folder):
Check in the Menu View the option Monitor. Now you already have an OPC Server database. We are ready to start configuring the InduSoft Web Studio OPC Client worksheets.
Page 117
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
In the OPC Client worksheet, type the Tag name OPC_Status in the OPC Status Field. In the first Tag Name column row, type the tag name OPC_N7_0. To associate it to the OPC Server item, right click on the Item column and hit OPC Browser. This will enable you browsing all the OPC Server configured items. In this case, choose the N7_0 item.
Then you are going to have an OPC Client worksheet as follows: Page 118
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
The OPC Client Screen should look similar to this one below:
All the OPC Clients start their OPC Server when starting up. As this OPC Server is just a demo and it has a Dialog Box when opening, it can cause some errors during the Start up. That is why we have a push button to start the OPC Client Runtime task. So, run the Application and check the OPC screen behavior with the OPC Server values.
Page 119
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
WEB Introduction
InduSoft Web Studio allows you to save your application screens in HTML format and export them to Internet Browsers (Internet Explorer). Once the application has been developed, you just need to set the parameters in the Web tab in the Program Settings dialog window and save each screen as HTML (menu File - Save As HTML). Caution: The Web Pages generated by the
Save As HTML function are independent of the screen file they were generated from. As such if you make a change to the Display Screen that change will not appear on the web page until you again Save As HTML.
Note: any tags which are used to display data or input commands need to have their web setting changed to server in order to communicate over the web. The computer where the HTML files are stored (Page Server) must be a WEB Server (HTTP Server driver) and the computer where the application is running (Data Server) should have a fix IP address. Note the Page Server and the WEB Server can, but do not have to be, the same computer. For this tutorial we will assume the Page and WEB Servers are the same computer.
To be able to view your web pages you must first configure the web setting. These can be found in the Project Settings window under the Web tab. First you need to input the Data Server IP Address, this is the IP address where the application is running. Next you need to enter the URL in the following format: http://<the IP address of the unit where the web server is running>/<path from the server to the web page directory>/ . Once these two fields are Page 120
InduSoft Web Studio Tutorial training Revision B Sep/10/2000 Copyright InduSoft Ltd. 2000
correct click the ok button. Then go to Tools on the menu bar and select Verify application (if you have any windows open in the development system Studio will demand you close them before verifying the application).
Caution: If you change any of the web information under the Project Settings you will need to Re-Verify the application for the new setting to take affect. Because the Web Pages Display information from the application through the Web Server, the Runtime System, the Web Server and the TCP/IP Server need to be running to view the Web Pages.
Once all the settings are correct, turn on the Web Server then run the application. With both of these running you should be able to use Internet Explorer to connect to the application By selecting the URL (http://<the IP address of the unit where the web server is running>/<path from the server to the web page directory>/<application screen name>.html) A prompt for a username and password will appear, enter one of the username and passwords from the security section. Once the screen appears you can interact with the application.
Page 121