Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
32 Getting started
Table of Contents
1. INTRODUCTION ............................................................................................................................... 5 2. STARTING TWINSOFT .................................................................................................................... 6 2.1. System requirements ............................................................................................................ 6 2.2. Starting the CD-ROM of TWinSoft...................................................................................... 7 2.3. Programs of TWinSoft Suite ............................................................................................. 8 3. TWINSOFT PROTECTION ............................................................................................................... 9 3.1. The Evaluation mode ........................................................................................................... 9 3.2. The Dongle .......................................................................................................................... 9 3.3. The Code (License).............................................................................................................. 9 3.4. The TWinSoft LITE .............................................................................................................. 9 4. WIZARD......................................................................................................................................... 10 5. PRESENTATION ............................................................................................................................. 13 6. COMMUNICATION (PC SET UP) .................................................................................................... 14 6.1. Sending a program ............................................................................................................ 15
Compile + test of available memory. .................................................................................................15 Upload................................................................................................................................................15
7. RTU PROPERTIES ......................................................................................................................... 18 7.1. General .............................................................................................................................. 18 7.2. Communication ports ........................................................................................................ 19 8. CREATING TAGS ........................................................................................................................... 20 9. THE RESOURCES ........................................................................................................................... 21 9.1. Creating a block of I/O...................................................................................................... 22
Creating a Remote block of I/O: ........................................................................................................22 Creating Remote modules RM-xx .....................................................................................................23
9.2. Creating a card.................................................................................................................. 23 9.3. Creating a Tag from a list of I/Os ..................................................................................... 23 10. PROGRAMS .................................................................................................................................. 24 10.1. Ladder Principle........................................................................................................... 24
Inputs..................................................................................................................................................24 Outputs ...............................................................................................................................................24 Cycle time ..........................................................................................................................................25
10.4. Variables.......................................................................................................................... 29
Local Tags..........................................................................................................................................29 Global Tags ........................................................................................................................................29 The colors of the Tags........................................................................................................................29
10.8. POU (Program Organization Units)............................................................................... 44 10.8. POU (Program Organization Units)............................................................................... 44 10.9. POU Program............................................................................................................... 45
The 'main'. ..........................................................................................................................................45 Creating a POU Program ...................................................................................................................45 Calling a POU Program in another Program......................................................................................46
11. LIBRARY MANAGEMENT ............................................................................................................. 56 11.1. Import of POUs (saving POUs in a Library) .................................................................. 56 11.2. Export of POUs (retrieval of POUs from a library) ....................................................... 57 11.3. Use of a Library in a TWinSoft document ....................................................................... 57 12. ALARMS ...................................................................................................................................... 58 12.1. Introduction ..................................................................................................................... 58 12.2. Digital Tag Condition...................................................................................................... 59 12.3. Analog Tag Condition .....................................................................................................60 12.4. Recipients......................................................................................................................... 61 12.5. Examples of recipients..................................................................................................... 62
To a GSM...........................................................................................................................................62 To an e-mail address ..........................................................................................................................62
13. DATALOGGING ............................................................................................................................ 65 13.1. Introduction ..................................................................................................................... 65 13.2. The Chronologies ............................................................................................................ 66 13.3. Sampling tables ............................................................................................................... 67 14. REMOTE TAG .............................................................................................................................. 68 14.1. Introduction ..................................................................................................................... 68 14.2. Block communication ...................................................................................................... 69 14.3. Description of fields......................................................................................................... 71 15. WEB & REPORT FILES ................................................................................................................ 77 15.1. Procedure to work with TBox as a Web Server............................................................... 77 15.2. Report Studio ................................................................................................................... 78
Different ways to use a report ............................................................................................................78
16. TBOX ACCESS SECURITY ............................................................................................................ 79 16.1. TBox configuration .......................................................................................................... 79 16.2. Password utility ............................................................................................................... 80
TWinSoft: 8.32 Getting Started 3
16.3. Login/Logout ................................................................................................................... 81 16.4. Deactivating protection ................................................................................................... 81 17. COPY/PASTE - DRAG'N'DROP .................................................................................................... 82 17.1. General rules ................................................................................................................... 82 17.2. Examples.......................................................................................................................... 82
Create Tags in the list of Tags (Copy/Paste)......................................................................................82 Copy a POU in the same document (Copy/Paste)..............................................................................83 Move or copy Ladder from one POU to another POU (DragnDrop or Copy/Paste).......................83 Copy Ladder from one document to another document (DragnDrop) ............................................83 Copy entries of any list (Recipient, Alarm condition, Remote Tags, ...) from one document to another document (Copy/Paste) .........................................................................................................83 Modifying the sequence of the elements in all lists (Drag'n'Drop). ...................................................83
19. PACK & GO................................................................................................................................. 99 19.1. Presentation..................................................................................................................... 99 19.2. Pack ................................................................................................................................. 99 19.3. Unpack........................................................................................................................... 100
Disclaimer
Every effort has been made to ensure the accuracy of the information in this guide. However, Techno Trade S.A. assumes no responsibility for the accuracy of the information. Product information is subject to change without notice. is a registered trademark of Axeda. MODBUS is a registered trademark of Gould Modicon. TSOFT , TVIEW , TWinSoft, WebForm Studio and A are registered trademarks of Techno Trade s.a. Windows 95, 98, NT, 2000, XP are trademarks of Microsoft Corp. Internet Explorer is a trademark of Microsoft Corp.
AB
Copyright
1. Introduction
TWinSoft is the software necessary to create running application for A RTU and Low
Power RTU. It also allows communicating with your RTU to visualize its process.
This manual helps you to understand the concept of A and to create basic configurations as: Tags (the variable of the A). Programs (the automation programs in Ladder programming). Alarms. Data logging criteria. Remote Tags. A Access Security. Concerning Low Power RTU a specific manual is available.
A is presented as the 6 in 1 Tele-control system. It means A can be configured for
all those features without needing supplementary software or hardware. What are those six features? 1. A is a Web Server: TCP/IP has been implemented as standard protocol. A can be called by a Browser to display HTML images, saved in the A. It is also able to send e-mail through a provider and send a file to a FTP site. This feature is available from versions TWinSoft 7.00 and OS 5400. 2. A is a multi-port system: A is equipped with different communication ports that allow local communication with other equipment. A also allows remote communication through different types of modems (ISDN, PSTN, GSM, Cellular, Radio). A supports as standard, ModBus RTU protocol, TCP/IP protocol and Minitel protocol on all ports. A is able to handle concurrent communications on different ports in multi-tasking and at different speeds. An Ethernet card is also available (10 Base/T). 3. A is a PLC: with the help of the IEC1131-3 standard Ladder programming, automation programs can be developed; including mathematical functions, PID loops and user definable function blocks. 4. A is an alarming system: on alarm conditions (digital and/or analog), A is able to send messages to printer(s), to pager(s), GSM and other cellular systems, to call a supervisor, to send email, etc 5. A is a Data logger: in order to memorize events of your process, you can define criteria of recording values of Tags. Those values can be stored on event and/or periodically. Recording can be FIFO (circular buffer continuous) and event driven. 6. A is protocol converter: with the help of external C drivers that you can write, A can be used to translate a proprietary protocol to ModBus protocol for a connection to a standard supervisor package or translate between devices of different manufacture.
2. Starting TWinSoft
2.1. System requirements
Hardware: Pentium or higher. Memory: 16-MB minimum. We recommend 32 MB. Hard Disk: 10 MB required plus the application files. Display: VGA, SVGA with a minimum resolution of 640 x 480. We recommend 800 x 600. Mouse: any Windows compatible mouse. Parallel port: required in case of dongle protection. (A software license is also available) Serial port: required for a local connection to Aor for an external modem. Modem: any PCMCIA or external modem properly configured in Windows. Operating system: Windows 95, Windows 98 or Windows NT (service pack 3 or higher), Windows 2000, Windows XP.
To Browse A:
Internet Browser: as ActiveX is used, Internet Explorer only can be used. Version 5.00 or higher is recommended to take benefit of the dialer. The CD-ROM of TWinSoft includes MSIE version 5.00.
TWinSoft 8.32 TWinSoft is the software required for developing an application for the A RTU. The basis for configuring a A application is explained in this manual. Installation of TWinSoft includes WebForm Studio: HTML editor dedicated to RTU), Report studio: Report editor dedicated to RTU and WebForm Viewer: Internet Explorer TBox Dialer and ActiveX (see next).
WebForm Viewer This software contains the tool TBox Dial It ! used to dial a A with Internet Explorer. It also contains the ActiveX used to display RTU dedicated objects. It needs to be installed on the PC used by a operator to dial A with Internet Explorer, when TWinSoft is not required.
TBox Mail This software is used to display a Chart view from datalogging attached to an e-mail.
DreamWeaver Trial version Report Studio for DreamWeaver Dreamweaver is a standard HTML editor. It can be used with the plug-in Report Studio for Dreamweaver to develop standard HTML pages that do not use the ActiveX.
Internet Explorer 5 Minimum version required to dial A and display properly the ActiveX.
Explore this CD-ROM You will find on the CD-ROM many information related to A and accessories: datasheets, manuals,
figure 1 Other programs and menus: TBox drivers: when 'C' custom drivers have been installed. The on line help of the driver configuration is available in this folder. Samples: group with TWinSoft documents installed as example. Accessories: group containing the utility Password generator and Reset User preferences: reset of registry information to restore the default configuration of TWinSoft. Documentation: group containing the various documents associated to TWinSoft and RTU. Report Studio: to create reports dedicated to A. TWinSoft: to start TWinSoft. WebForm Studio: to start the HTML editor, dedicated to A when it is used as a Web Server.
3. TWinSoft Protection
The software itself is not protected; it can be installed on any PC and used to develop TWinSoft documents Offline or to monitor/control a running program locally or remotely. The only protected operation is the insertion of an application in the A. In order to find the best way for you we offer different possibilities:
4. Wizard
When starting TWinSoft the first time or when creating a new document, the Wizard helps you to define the basic configuration:
According to the hardware you want to program, select the proper type of RTU. Warning : you cannot change later from one type to another type : LP100 to LP200 for instance.
figure 2 This configuration can be modified using the RTU properties dialog boxes.
Telephone information the location where the A will be placed. According to this data TwinSoft will dial country, area code or prefix when calling the A.
figure 3
10
In case you have selected a modem (see previous page), the Wizard offers to define a connection to an ISP, in order to send e-mail.
Available dial up entries to ISP existing on your PC. OR Select New connection
You type these data according to the information received from the ISP.
figure 4
Part of the data appear automatically according to the dial up entry. You type the other data according to the information received from the ISP.
figure 5
11
The Wizard then asks you whether you use an Ethernet card and offers to configure it.
figure 6
12
5. Presentation
Using TWinSoft, you can easily create all needed items such as Tags, alarm recipients, alarm conditions, data logging criteria, and more using lists.
figure 7
To open a list of items, simply select the type of item you want to see in the project workspace (the tree in the left panel of the main window). TWinSoft opens a view (new window) showing these items. You can open several views to see more than one list at a time: In the Window menu, choose New. The window in the bottom can be selected to display utility information. It can be opened (or closed) by pressing the accelerator keys: <ALT + 1>: Open / Close the Project Workspace. <ALT + 2>: Build results (results of the compilation and use of the memory of the A). <ALT + 3>: Watch (to display a custom design list of values of Tags). <ALT + 4>: Cross-reference (gives complete information of 1 Tag). The status line indicates the type and status of the communication.
TWinSoft: 8.32 Getting Started 13
configuration. The Off line option is selected to avoid sampling a A that is not connected. In case of a local connection, select the port of the PC that is used to communicate with the A. The Baudrate must fit with the speed of the port of the A to which your PC is connected. If you dont know the Baudrate of A, you can set it to a default configuration (see chapter 6.3: Working modes of A)
figure 8 To communicate with your A in TCP/IP (typically with a A equipped with an Ethernet card), you select the option TCP/IP (Ethernet). TWinSoft will then establish a communication with the IP address specified in the tab TCP/IP LAN (see chapter 7: RTU Properties). Communicating with your A using a modem is easier than ever since TWinSoft takes full advantage of Windows' built-in modem support: Simply install your modem in the control panel's Modems applet and you are ready to call your A.
After having selected the communication mode, you can check the communication doing a RTU identification from the Communication menu. For more information, click Help.
TWinSoft: 8.32 Getting Started 14
The result of compilation is available in the 'Results' window. This window is automatically opened if the compilation fails, otherwise you can open it with the accelerator keys <ALT + 2>, or from the main menu bar 'View' -> 'Build Results': Information: Warning: Error: Indicated in black Indicated in bold dark green. Indicated in bold red
Available information: OS Version: TWinSoft reads the OS version of the A, to test if the TWinSoft document fits with the material. Program + Chrono: RAM memory available for Program, chronologies and Sampling Tables. Sampling Tables: RAM memory available for Sampling Tables. ROM: EEPROM memory for the program sent by TWinSoft. When the A starts, a part of program is copied in (battery-backed) RAM.
Upload
Upload means transferring information from the PC to the A, locally or remotely. To access Upload features, click 'Communication' -> 'Upload' from the main menu bar. Upload of the program. The PC sends the current TWinSoft document (program) to the A. The document is first compiled then sent to the A. It is carried out by the icon pressing the keys <CTRL + F9>. on the main Toolbar or by
It must be executed every time a modification is implemented within your document, in order to apply it to the A.
15
The program is running. The program is running and in alarm mode. The program is stopped (via a global reset). The Operating System is stopped. If you dont know the communication parameters of the A you are connected to, you will not be able to communicate with it. In order to set the A to a known configuration, you need to do a global reset of the A(see mode 2 below).
again restarts the program (see previous). Procedure to stop the program: Hold the PGM button pressed Then press and release the RST button Wait for TxD and RxD to blink once, then release PGM
A is configured as follows:
COM1, COM2, COM3: 9600 baud + even parity + ModBus protocol (unprotected). COM4: V22, PSTN (protected if it was programmed). station address number: 1 (ModBus address).
TWinSoft: 8.32 Getting Started 16
17
7. RTU properties
Setting the parameters of the A to specific values has never been so easy thanks to a new set of comprehensive dialog boxes. To open the RTU Properties dialog boxes, use the icon of the Main Toolbar:
figure 9
7.1. General
If the Wizard was used, the information entered is displayed. Information can be updated.
18
figure 11
COM1 and COM2 are RS232 communication ports for any local connection to a supervisory PC, printer, ModBus equipment, or to an external modem (PSTN, ISDN, GSM, RADIO, HF,). The maximum distance is 12 m. COM3 is an RS485 communication port for network connection to other A (maximum 32) to RM modules (maximum 255) or to any other ModBus equipment having an RS 485 port. The maximum distance, depending on line quality, can be up to 10 km. COM4 is an option. An internal modem can be used on PSTN lines (in modes V21, V22, V22b or V23) or on leased lines (in mode V22). COM5 is an option that can be equipped with a PCMCIA modem (PSTN, ISDN or GSM) or with a network modem for network connection of A (maximum 10). The maximum distance, depending on the number of A and the line quality, can be up to 50 km. COM6 is an Ethernet interface. It allows to connect A to a Hub, Router, in order to establish a local connection (LAN) or a remote connection (WAN). Click Parameters to configure the Ethernet card.
TWinSoft can use any port for the visualization or sending of a document.
8. Creating Tags
Configuration is carried out using Tags. Tags are of all variables that the A program recognizes : digital inputs to the CPU, analog outputs of an extension rack, a register, To declare a Tag, open the list of Tags and click Add a Tag, and then choose Digital or Analog:
figure 12 Type: for physical input/output select I/O. Other types are internal registers of the CPU. Select: opens from Resources, the list of variables associated to the current type. It allows you to check easily which I/O or Registers are still free. Address: it is the location of the physical I/O (rack number, card number and channel number). For registers, it is the number of a specific register. Format: According to the address selected, different formats are available. Export: allows export of the Tag definition in external, ASCII files, either in AB format or in text format. This option is available while being in the Tags folder, click in the main bar File Export. You can choose between: All list: all the Tags. Selection: only the Tags that have the option export checked (not implemented yet).
From the TAG definition box, any configuration requiring the Tag can be accessed, i.e. alarms, data logging, etc. For more information, click Help.
20
9. The Resources
The resources represent the list of all variables that are available for your application. It relates to the I/O of your A and any extension racks or external equipment. When starting a new document, the default startup only shows the variables of the CPU that are available. Click Resources then CPU to list the variables. Project workspace Physical I/O 8 DIGITAL INPUTS. 3 digital outputs. 2 analog inputs (8 bits). 1 external battery check Registers 2048 digital registers. 256 analog registers. 4096 storage digital registers. 6144 storage analog registers (16 bits).
1 internal lithium battery 64 Floating point registers. check The different groups of 256 timers. I/O of the CPU appear as cards. Click the card to see 256 counters. the list of I/Os. Clicking an I/O opens the Digital special registers. box of Creating a Tag. Analog special registers. 64 totalizers figure 13
21
figure 14
figure 15 Name: you type any name. It will be available in a list of available equipment when creating Remote Tags. Address: it is the ModBus address of the Remote equipment. It must be different from the Master A and possible other equipment on the same network. RTU Port: the communication port used by the Master to communicate with the equipment. IP address: in case the communication port of the Master is COM6 (Ethernet card), the IP address of the Remote equipment must be specified here. Available for Remote A only.
TWinSoft: 8.32 Getting Started 22
Figure 16
For each channel 2 variables are available: The I/O (analog). Test the I/O (digital). Double-clicking an I/O opens the box of Creating a Tag.
figure 17
23
10. Programs
10.1. Ladder Principle
Introduction The principle of the Ladder diagram is based on an electrical description of the process or machine, using relay logic. To the left of the screen are the inputs (they are conditions for which an action will be undertaken) and to the right are the outputs (which result from these actions).
Inputs
All inputs, whether digital or analog, can be combined to create logical equations (two inputs follow on the same line for an <AND>, and one above the other and linked by a vertical bar for an <OR>). All analog comparison functions and/or digital inputs on the same program line will represent true or false. The result defines the actions of the output (will or will not be performed). The different types of Input conditions are accessible in the LD Toolbar.
Outputs
Digital output functions are engagements (SET relay) or disengagement (RESET relay), they can be the image or the opposite of the result of the tested input conditions (OUTPUT relay and NEGATIVE relay). Other functions have been introduced proper to telemetry like transmission of alarms, data logging or sending of DTMF tone. To process analog outputs, many mathematical functions and POU (Program Organization Units) functions have been implemented. The selection of different types of outputs is accessible in the LD Toolbar.
figure 18
24
Cycle time
Ladder Logic is executed on a fixed basis; contacts, relays, functions; math calculations, etc are executed while they are scanned (read). Lines are scanned from left to right and from top to bottom. When bottom is reached, it starts again from top. The cycle time is displayed when doing a A Identification from the main Toolbar menu 'Communication'. The cycle can never be greater than 1 second. If this occurs, an internal watchdog timer resets the A automatically.
Display mode
To access the Ladder in Display mode, click in the Project Workspace on the 'Programs' folder. The last Ladder that was opened is displayed. The white tab underneath indicates the active program. The 'MAIN' tab is the main program, that is automatically executed by A; the other POUs having to be called from the MAIN. The Ladder diagram appears in red lines with the Tags associated at each input contact, output relay or IN/OUT of functions. The Comment lines appear as gray blocks. When a jump (JUMP) is programmed, the jumps mnemonic appears at the right side of a double arrow. The mnemonic is a LABEL that appears in black text.
A call to another program appears in a red block with one IN/OUT line.
The state of the digital input contacts is displayed as a green overlay if the condition represented by the contact is true (in the case of a trigger contact, the result represents the last level attained). Similarly, if the result of an analog comparison is true, a green overlay on the function is used. Moreover, for digital outputs, the green overlay represents the status of the associated Tag. When moving the cursor on analog Tags in Functions or Math blocks, the current value is displayed in the bottom left corner of the screen. For digital gates the display indicates <On> or <Off> according to the current value.
25
Edit mode
The Edit mode is used when inserting a new line or modifying an existing line. To insert a line, use the LD Toolbar. Three types of lines can be inserted using the following buttons:
to insert a line of Ladder to insert a line of Comment to insert a Label that will be called by a JUMP
The Ladder diagram is made of several lines that are numbered starting at 1. Only one line at a time can be edited with only one rung (a rung is a set of Input conditions connected to only one set of Outputs). When editing is finished, the line must be compiled to proceed with the next one: To save and compile a line. If an error occurs, a dialog box informs you on the error. The key <+> can also be used to save and compile a line. If you were editing an existing line, you return to display mode. If you were inserting a new line, you stay in edit mode. To quit editing and discard changes. The key <ESC> can also be used. To select any item (line, contact, relays or Functions) of a Ladder line. Once selected it can be edited by a double click to replace Tags. You can also erase the selected item by pressing the key <Delete> or insert a new contact, relay or Function by selecting the proper icon in the LD Toolbar.
Inserting a new line as last line To insert a new line as last line, place the cursor at the end of the last line and click the icon corresponding to the type of line you wish to insert.
Inserting a new line between 2 existing lines To insert a line between 2 existing lines, place the cursor on the existing line that the new line will correspond to. The new line will move the existing line to next position after it is inserted. When a line is selected, it is surrounded. Then click the icon corresponding to the type of line you wish to insert. The line you placed the cursor on will be moved downwards. Using the keyboard UP and DOWN arrows moves the selected line.
Modifying an existing line To modify an existing line, place the cursor on the line you wish to modify. Then double-click it. The arrow icon of the LD Toolbar is automatically selected.
26
Display mode
Clicking one of the following icons lets you enter in the edit mode: To insert a line of Ladder. To insert a line of Comment. To insert a Label that will be called by a JUMP.
27
Edit mode
To Select any item (line, contact, relays or Functions) of a Ladder line. Once selected it can be edited by a double click to replace Tags. You can also erase the selected item by pressing the key <Delete> or insert a new contact, relay or Function by selecting the proper icon in the LD Toolbar. To Save and Compile a line. If an error occurs, a dialog box informs you of the error. The key <+ >can also be used to save and compile a line. To Quit editing and discard changes. The key <ESC> can also be used. To insert a Normal input contact for digital input. The condition will be true if the input is active. To insert an Invert input contact for digital input. The condition will be true if the input is inactive. To insert a Positive input trigger for digital input. The condition will be true only once when the input passes from an inactive level to an active level. To insert a Negative input trigger for digital input. The condition will be true only once when the input passes from an active level to an inactive level. To insert a Digital output normal. Output is activated if the results of the input condition(s) are true. To insert a Digital output inverted. Output is activated if the results of the input condition(s) are false. To insert a Digital output set. Output is set and memorized if the result of the input condition(s) are true; this type of output is typically used with a 'trigger' input To insert a Digital output reset. Output is reset and memorized if the result of the input condition(s) are true; this type of output is typically used with a 'trigger' input To draw continuous horizontal or vertical lines. To join inputs conditions together to create logical equations and to possibly connect to many outputs. WARNING: a set of inputs can only lead through one horizontal line to only one set of outputs. It is called a rung. To insert a Function or Function Block. A list opens with the standard Functions (under the folder 'Standard') and with the user defined Functions (under the folder 'This file') To insert a Mathematical block. In this block, mathematical functions can be inserted by clicking on 'New Math Function' . See chapter 10.7 for a list of available functions. Initiates a Jump to the line whose label corresponds to the one that is entered here (to enter a label, see above in the list of icons of 'Display mode').
28
10.4. Variables
Introduction Variables can be physical I/O or internal registers: Analog registers (AIR, STO, and ASPE...) Digital registers (DIR, DSPE...). Any variable is available, but only when it is declared, we consider it as a Tag. According to the use we make of the variables in Ladder programming, there are two families of Tags: Local Tags Global Tags
Local Tags
A Local Tag is a non-specific register used as temporary value in a calculation. When compiling the TWinSoft document a free register (DIR, AIR or STO) is assigned to it according to the registers that are already used. Local Tags are only used in the POU where they have been created. They appear in the list of Local Tags, above the Ladder diagram of the POU (see next).
Global Tags
A Global Tag can be of two types: A specific register (DIR, AIR, and SPE...) that you wish to use. A physical I/O of the CPU created in the List of Tags. Global Tag-Names can be used in POU Program and in POU Function Block (see next).
29
figure 19 According to the item you wish to use, select the proper icon in the Toolbar.
30
Inserting items
When inserting an item, you must declare the variable(s) associated to it: Digital Tag for a contact and a relay, Digital or Analog Tags for Functions. You have to work with Tags; it is not possible to select the number of a register in the list of registers. A Tag (local or global) can be created while inserting an item. There are two possibilities to select a Tag: - You know the name of the Tag: you type its name. TWinSoft is not case sensitive, so you can type it in capital or small letters. The Tag exists - You dont know the name of the Tag: you click the button to open the list of Tags. You have the choice between Global Tag, Local Tag and Special registers (see previous chapter Variables). You type its name and press <ENTER> to create it. The Tag can be either Local Tag or Global Tag (see previous chapter Variables).
According to the field you are in, you can select a Tag or type a constant. A constant is a 16-bit variable that will be considered as Signed (-32768 -> 32767) or Unsigned (0 and 65535) according to the Function where it is used.
The Keys
<+> To compile a line. Use also the icon - When a line is selected: to quit edit mode. Use also the icon <ESC> .
- When an item is selected: to release the item and return to selection mode (arrow). - When Tag box is opened: to carry on without specifying a Tag. '???' will be inserted instead. To enter a Tag afterwards, double click '??? '
<DEL>
31
figure 20 We use the following Tags (see chapter 8 Creating Tags): LEVEL MANUAL PUMP TIMER MAINTENANCE RESET analog input. digital input. digital output. digital state of the timer (DTI.10) digital output. digital input.
32
1st line of Ladder: 1. In the program MAIN, click the icon click OK. 2nd line of Ladder: 2. Click the icon to insert a new line. The edit block is ready to create the second line. The grid shows the position where you can place the items. 3. Click the icon to insert the function A>B then click close to the left Rail. to insert a line of comment. Type you text and
figure 21 4. Enter the Tag name LEVEL or select it from the list of Tags and then enter the constant 150. 5. Click the icon the left rail. to insert a digital contact, then click the comparison Function and close to
6. Enter the Tag name MANUAL or select it from the list of Tags. 7. Click the icon Function. and draw a horizontal and vertical line to join the output of the comparison
8. Click the icon to insert an output relay, then click on the output of the comparison Function. A horizontal line is automatically drawn to the right rail. 9. Enter the Tag name PUMP or select it from the list of Tags.
33
10. Click the icon to insert the timer Integral with a basis time in minutes (TI_min) then click under the relay PUMP.
figure 22 11. Enter an ID number (between 0 and 255); in our example: 10, then the preset (number of minutes), in our example 6000. 12. Click the icon and draw a horizontal and vertical line to join the timer Function to the right rail and to the output of the comparison Function. 13. Press the key <+>, or click the icon ready to create the third line. 3rd line of Ladder: 14. Click the icon to insert a Positive edge trigger contact, then click close to the left rail.. to compile the line. Doing this, the edition block is
15. Enter the Tag name TIMER. 16. Click the icon to insert a SET output relay, then click close to the left side of the contact TIMER. A horizontal line is automatically drawn to the right rails. 17. Enter the Tag name MAINTENANCE or select it from the list of Tags. 18. Press the key <+>, or click the icon ready to create the fourth line. 4th line of Ladder: 19. Click the icon to insert a Positive edge trigger contact, then click close to the left rail. to compile the line. Doing this, the edition block is
20. Enter the Tag name RESET or select it from the list of Tags. 21. Click the icon to insert the reset timer Function, then click close to the contact RESET.
22. Enter 10, the ID of the timer to reset (in our example: 10).
34
23. Click the icon to select and move the reset timer function, then click the reset timer Function and drag it on step to the right. 24. Click the icon Function. and draw a horizontal between the RESET contact and the reset timer
25. Click the icon to insert a MAINTENANCE output relay then click under the reset timer Function. A horizontal line is automatically drawn to the right rail. 26. Enter the Tag name MAINTENANCE or select it from the list of Tags. 27. Click the icon and draw a horizontal and vertical line to join the input contact to the output relay MAINTENANCE. 28. Press the key <+>, or click the icon ready to create the next line. to compile the line. Doing this, the edition block is
35
Introduction
There are 8 categories of mathematical functions available (to use in math blocks): Assignment functions. Arithmetic operations. Comparisons. Bit manipulations. Boolean operations. Conversion (PID, BCD, etc.), and indirect addressing. Text and miscellaneous functions. Floating point. In the functions, the Arguments to replace by Tags (or constant) are represented as follows: - A, B, C, and D: Analog Tags. - Ptr: Pointer in indirect addressing; analog Tag. - BOOL, Bit: Digital Tag. - Tot1, Tot2: Analog double word. - Flt: Floating point The equality operations are always executed from the right to the left. In other words, we have: result = operation or: output = input (means the value of Input variable is copied in the Output variable). 16 bit analog numbers on are always worked out as signed values in TBox, even if they have been defined as 'Unsigned' Tags. If used in 'Indirect addressing' functions, an analog variable of the pointer is considered as 'Unsigned', even if it appears 'Signed'. In edit mode, to insert a 'Math function' between 2 functions in a Math block, place the cursor at the position you want to insert the function, and press the key 'Insert' of keyboard.
Assignments
A = B A = -B A = Low(B) A = High(B) A = Abs (B) A = Swap(B) inc (A) dec (A) 'A' contains a copy of the value of 'B' 'A' contains the invert value of 'B' 'A' contains a copy of the 8 lowest bits of 'B' 'A' contains a copy of the 8 highest bits of 'B' 'A' contains a copy of the absolute value of 'B' 'A' contains the inversion of the 8 highest bits and the 8 lowest bits of 'B' increase the value of Tag 'A' by 1 bit decrease the value of Tag 'A' by 1 bit
TWinSoft: 8.32 Getting Started 36
Arithmetic operations
A = B + C A = B - C A = B * C A = B / C A = B AND C 'A' is the addition of 'B' and 'C' 'A' is the subtraction of 'B' and 'C' 'A' is the multiplication of 'B' and 'C' 'A' is the division of 'B' and 'C' 'A' is the result of the logical AND between 'B' and 'C' Example: 0001000011111111 AND 0001100000001111 0001000000001111 'A' is the result of the logical OR between 'B' and 'C' Example: 0000000011111111 OR 1111000000001111 1111000011111111 'A' is the result of the logical XOR between 'B' and 'C' Example: 0000000011111111 XOR 1111000000001111 1111000011110000 'A' contains the rest after the division of 'B' and C. Example: 2 = 17 MOD 3
A = B OR C
A = B XOR C
A = B MOD C
Comparisons
BOOL = B == C BOOL = B < C BOOL = B > C BOOL = B <= C BOOL = B >= C BOOL = B <> C BOOL = odd B A= conv 0/20 'BOOL' is TRUE if 'B' equal 'C', otherwise it is FALSE 'BOOL' is TRUE if 'B' is smaller than 'C', otherwise it is FALSE 'BOOL' is TRUE if 'B' is greater than 'C', otherwise it is FALSE 'BOOL' is TRUE if 'B' is smaller than or equal to 'C', otherwise it is FALSE 'BOOL' is TRUE if 'B' is greater than or equal to 'C', otherwise it is FALSE 'BOOL' is TRUE if 'B' and 'C' are different, otherwise it is FALSE 'BOOL' is TRUE if the value of 'B' is odd, otherwise it is FALSE 4/20 (B) 'A' is the conversion from 0..20mA to 4..20mA of 'B'. It is a scaling in order to start binary counting at 4 mA instead of 0 mA
37
Bit manipulations
Wraparound means that the bits scrolling from one side of a byte (8 bits) or word (16 bits) are replaced at the other side of the byte or word.
bit (A,BitNb) = Bit The status of digital 'Bit' will be copied in the analog 'A' at the position indicated by 'BitNb', starting with ' 0 ' for Lsb. Example: Bit: 1 BitNb: 3 A: 0011010011001001 The status of the bit of the analog 'A' indicated by 'BitNb' will be copied in the digital 'Bit', starting with ' 0 ' for Lsb. Example: A: 1100101000010010 BitNb: 5 Bit: 0 'A' has the number of Bits indicated by 'shift' shift to the left (max. 15) of the word 'B' (without wraparound). Example: B: 0000000011111111 Shift: 4 A: 0000111111110000 'A' has the number of Bits indicated by 'shift' shift to the right (max. 15) of the word 'B' (without wraparound). Example: B: 0000000011111111 Shift: 4 A: 0000000000001111 'A' has the number of Bits indicated by 'shift' shift to the left (max. 7) of the byte 'B' (with wraparound). 'A' has the number of Bits indicated by 'shift' shift to the right (max. 7) of the byte 'B' (with wraparound). 'A' has the number of Bits indicated by 'shift' shift to the left (max. 15) of the word 'B' (with wraparound). Example: B: 0000000011111111 Shift: 4 A: 0000111111110000 'A' has the number of Bits indicated by 'shift' shift to the right (max. 15) of the word 'B' (with wraparound). Example: B: 0000000011111111 Shift: 4 A: 1111000000001111
A = shl(B,shift)
A = shr(B,shift)
A = rol byte(B,shift)
A = ror byte(B,shift)
A = rol word(B,shift)
A = ror word(B,shift)
38
Boolean operations
Bit = not(Bit) Bit = bit AND Bit Bit = Bit OR Bit Bit = Bit XOR Bit A = B * C / D (Unsigned) A = B * C / D (Signed) put Bit in dig chrono put A in ana chrono the inverse of the digital Tag of the right is assigned to the digital Tag of the left the result of the logical AND between the two digital Tags of the right is assigned to the digital Tag of the left the result of the logical OR between the two digital Tags of the right is assigned to the digital Tag of the left the result of the logical XOR between the two digital Tags of the right is assigned to the digital Tag of the left 'A' is the result of the 32 bits multiplication of Words 'B' and 'C' then divided by 'D' A' is the result of the 32 bits multiplication of Integers 'B' and 'C' then divided by 'D' Writing of the digital Tag 'Bit' in the Digital Chronology. Writing of the analog Tag 'A' in the Analog Chronology.
A = 16 x (Bit)
39
the status of the digital Tag 'Bit' will be copied in the digital variable whose ModBus address is defined in the Tag or Constant 'Ptr'. Example: to write the status of dir0 in the output 'Q2' of the CPU (ModBus address 34): Indirect (34): dir0.
A = indirect (Ptr)
the Tag or Constant 'Ptr' contains the absolute ModBus address of the analog variable that will have its value assigned to the analog Tag 'A' Example: to read the value of the input 'ana1' of the CPU (ModBus address 65): air0 = indirect (65).
indirect (Ptr) = A
the value of the analog Tag 'A' will be copied in the analog variable whose ModBus address is defined in the Tag or Constant 'Ptr'. Example: to write the value of ana0 of the CPU in the analog output: Rack 1, Card 1, Channel 0 (ModBus address 288): Indirect (288) = ana0.
40
PID regulation
Function available in the group Conversion + Indirect addressing
Out = PID(Input, AIR,..)
Tag associated to the output of PID function. Tag associated to the input of PID function. index number of the AIR associated to the 'Set-point'.
y = R * (x-w) + 1/TI (x-w) + TD * d(x-w) / dt
This function performs a PID regulation according to the formula: where: y: x: w: R: TI: TD: value of output. value of the measurement. value of set point. proportional coefficient. integral coefficient. derivative coefficient.
NOTES: 1. PIDs require knowledge of this type of regulation. 2. An example is available on web site: www.tbox.biz -> Support -> Examples Application of the PID to the TBox The maximum number of PIDs per TBox is 64, but this number can be limited due to the size of the memory A and the availability of analog registers. A PID in a mathematical formula occupies 5 supplementary bytes for calculation. A PID is computed in less than one millisecond. Values and coefficients are placed in variables and registers: 'Output' = y: output value, between -2047 and 2047. 'Input' = x: input value, between -2047 and 2047. 'AIR' = w: set point value, between -2047 and 2047. 'AIR+ 1' = R x 32: proportional coefficient, between 0 and 2047. 'AIR+ 2' = 1 / (1024 x TI): integral coefficient, between 0 and 2047. 'AIR+ 3' = TD x 8: derivative coefficient, between 0 and 2047. Those 3 last calculations must be implemented in the Ladder diagram. For example: R=20 'AIR+ 1'=640 TI=0,0001 'AIR+ 2'=10 TD=100 'AIR+ 3'=800 'AIR', 'AIR+ 1', 'AIR+ 2', 'AIR+ 3' represent 4 analog internal registers of successive addresses. It is therefore only necessary to enter the first of these registers in the mathematical function. The PID is calculated every cycle for as long as the condition that precedes the mathematical block in the Ladder diagram is true. It is therefore necessary to link the PID calculation to a timer to obtain a time cycle different from that of the Ladder diagram. The PID can also be stopped or single stepped. The fact that the proportional coefficients, integral, and derivative are stored in internal registers allows dynamic modification following some conditional changes specified in the Ladder diagram. Calculations have 24-bit precision, the intermediate results of each group (proportional group, integral group and derivative group) are limited to the range -2047.+2047. The global result has the same range limits.
TWinSoft: 8.32 Getting Started 41
Miscellaneous
Send Text: Text Sending of the text indicated in the field 'Text' to a communication port. The Latter must be specified with a mathematical function 'Select Port # Port' (see next function). The text is sent in ASCII protocol. Maximum: 30 characters It is possible to ,insert a control character into the string, for instance a LF or a CR. ^M = CR ^J = LF Select Port # Port Selection of a communication port for sending text (see previous function). The available ports are: 1: 2: 3: Call Driver With (A) COM1 COM2 COM3
call of the custom driver loaded in the TBox by passing it the ModBus address of the variable defined in ''A' as an argument. It allows to use 'A' as an input and/or an output. You must, before calling this function, write in the Special Analog register <Drvld> the unique ID number of the driver.
sets to 0 the totalizer 'Tot'. increments the totalizer 'Tot' with the value contained in the analog Tag 'A' copy of the value of totalizer 'Tot2' in the Totalizer 'Tot1'
NOTE: With Totalizer registers, supplementary mathematical functions, like arithmetic operation and comparison, can be executed using the 'C' driver Fcthmath2. See the web site: www.tbox.biz -> Support -> Drivers
42
Flt A = Flt B + Flt C Flt A = Flt B - Flt C Flt A = Flt B * Flt C Flt A = Flt B / Flt C
Float 'A' is the addition of Float 'B' and Float 'C'. Float 'A' is the subtraction of Float 'B' and Float 'C'. Float 'A' is the multiplication of Float 'B' and Float 'C'. Float 'A' is the division of Float 'B' and Float 'C'.
43
For users accustomed to work with TSoft (the DOS editor), we have kept mathematical functions in order to execute analog operations.
44
If you use POU Programs that call other POU Programs, be careful to avoid loops: like Program 1 calling Program 2 calling Program 3 that calls Program 1.
The 'main'.
The POU program 'main' is the main Ladder program. This program must be unique and called main, to be used to call other POU programs (sub-programs). It is the default POU program when starting a new TWinSoft document.
figure 23 Double click 'Add a POU', type a Name (accents and space are not supported) and check 'Program'. Click OK. You have created a POU Program and it appears in the 'Programs' folder.
45
When you double click the name of the Program in the list, the window for Ladder programming appears with a new Tab for the current Program.
figure 24 Now you can create a Ladder Diagram for the Program you have defined.
- ENO:
Calling a POU Program is like calling a sub-routine. The program associated to it is executed at the position where it is called.
46
Example: You need regularly to execute the calculation: y= [(a+b) * (c+d)] /2. You will not find this formula in the Standard Functions or in the Mathematical Function block. You will then create your own Function that will execute your calculation every time you call it. According to the type of the output, there are 4 types of Functions: BOOL: digital output. WORD: analog output 16 bits unsigned. LONG: analog output 16 bits signed. FLOAT: floating point output. An example of user defined Function is available in the TWinSoft document Ladder.tbox, in the 'Samples' directory of TWinSoft. The Function executes the scaling of an 8-bit analog input.
figure 25 Double click 'Add a POU', type a Name (accents and space are not supported) and check 'Function'. Select the type of the output (result of the calculation): BOOL , WORD, LONG or FLOAT. Click OK. You have created a POU Function and it appears in the 'Programs' folder.
TWinSoft: 8.32 Getting Started 47
When you double click the name of the Function in the list, the window for Ladder programming appears with a new Tab for the current Function.
figure 26 By default, the name of the Output is the name of the Function. You can rename the output by using the context menu on its name (mouse right clicking on the name). POU Functions can be exported in a Library to be used in other TWinSoft documents, using the Library manager menu. Now you can create Ladder Diagram for the Program you have defined.
48
Example of a Function
The following Function is an analog Function (it means the output is analog). It performs a scaling of an 8-bit analog input.
figure 26A The Tags : Inputs and the Output of a Function are the arguments to be replaced when calling the Function. The way a POU Function works, involves that one can define only local Tags in a POU Function. Scaled: IN, MIN,MAX: Delta, tmp0: the output of the Function. It is unique and is the result of the calculation. are the Inputs of the Function. local analog Tags used as temporary variables necessary to calculate the scaling.
The Ladder :
A math block using 3 functions is used.
49
- ENO:
figure 26B When calling the Function in a POU Program, you must assign to the (unique) Output a Tag and for each Input a Tag or constant. All inputs are at the left side of the Function Block; the output at the right side. In this example, we wish to have an 8-bit analog input 'ANA0' scaled between MIN '0' and MAX '1000'. The result is copied into the Internal Analog register 'AIR0'.
50
figure 27 Double click 'Add a POU', type a Name (accents and space are not supported) and check 'Function Block'. Click OK. You have created a POU Function Block and it appears in the 'Programs' folder.
51
When you double click the name of the Function Block in the list, the window for Ladder programming appears with a new Tab for the current Function Block.
figure 28 POU Function Blocks can be exported in a Library to be used in other TWinSoft documents, using the Library manager menu. Now you can create Ladder Diagram for the Program you have defined.
52
figure 28A The Tags: Inputs and Outputs of a Function Block are the arguments to be replaced when calling the Function Block. INPUT OUTPUT DELAY preset timer is a digital input that will start the OUTPUT after the DELAY. is a digital output. It will be connected to a motor, for instance when calling the Function Block. is an analog input containing the number of seconds of the delay. It must be associated to the timer used in the Function Block. is a Local analog Tag of the type 'Timer Preset'. is a Local digital Tag of the type 'Timer Status'.
The Ladder : The DELAY is copied in the preset of the timer. When INPUT changes to 1, it starts the timer Single Shot with a base time in seconds (SS_sec). (Note: when working with an external Preset (the local variable 'preset'), the Preset of the timer can be set to any value; here 0). When the timer has finished counting AND the INPUT is still active, the output is set to 1. A negative edge on INPUT resets the OUTPUT.
TWinSoft: 8.32 Getting Started 53
- ENO: Enable Output: it is the image of EN. If EN is TRUE, ENO is TRUE. It is usually connected to the right rail but can be also connected to a contact or a relay, a Mathematical block or another Function.
figure 28 B When Calling the Function Block in a POU Program, you are asked to enter an 'FB Instance name'. This name allows TWinSoft to distinguish between Function Blocks, when multiple calls of similar Function Blocks are defined. Afterwards you must assign to the Output(s) and Input(s) Tags or constant. All inputs are at the left side of the Function Block, all outputs at the right side. In this example, the FB is called Motor1, the input D0 activate the output Q2 with a delay of 5 seconds. Each call of Function Block is unique and different from each other; local Tags of the Function Block as well as timer ID and counter ID, will be assigned to free registers, timers and counters when compiling.
When a Function Block is called many times in POU Program, its code is inserted every time it is called. It makes development easier but it increases the code size. Execute compilation regularly to test A memory.
54
The source code (Ladder) of the FB is then opened and dynamized according to its instance. In the list of POU Tags, the column 'Value' displays values of each local Tag.
55
figure 29 Only POU Functions and Function Blocks can be saved in a library. 1. You select an existing library ('File' -> 'Open'), or you create a new library ('File' -> 'New'). 2. You open the list of available POUs of the current document ('Edit' ->'Import POU...'). 3. You select the POUs you wish to save in the Library; you repeat operations 2 and 3 for each POU. 4. You save the Library ('File' -> 'Save'). Libraries can be protected by a password, so that it is impossible to Export it into a TWinSoft document, to see the internal code.
56
figure 30 The Available Libraries are the Libraries present in the directory of the current TWinSoft document or in the directory of TWinSoft. When a library appears in the list, all its POU Functions, and POU Function Blocks are available to be used in Ladder programming: in the list of Functions, the Libraries appear as Folders, each containing their own POUs. To add a Library to the current TWinSoft document, select it from the list of Available Libraries and click 'Add'. The button 'Manager' jumps to the creation of Library menu. To remove a Library from the current TWinSoft document, select the Library and click 'Remove'. This operation is available only if you dont use POU of the concerned library in the current document.
57
12. Alarms
12.1. Introduction
Alarm module of A is the gate to the outside world, through the different communication ports. Via alarms, you are able to send messages to pagers, to print events, to call a SCADA... With the alarm module, your process is 'under control' ! The initiation of alarms in the A relies on the variation of digital or analog Tags, or on a combination of conditions defined in the Ladder diagram. For example, an intrusion contact or an alarm level at a reservoir will send a message to the world beyond A. It is also possible to remotely call a PC utilizing SCADA software, the latter can then monitor the A. Alarms can be sent to a printer (local or remote) in order to print current events, or even a complete report of activity, e.g. every day at midnight. Alarms can be sent to different recipients depending on the day or hour (this is called time slice management). Recipients can be linked or chained. There are two means of activating an alarm: By a condition: an edge on a digital Tag or the value of an analog Tag that exceeds a minimum or maximum threshold, with adjustable hysteresis. By the Ladder diagram: a complex Ladder sequence generates an alarm through a specific function. The first option affords a simple and quick way to create alarms (a state change of a digital Tag or the variation of an analog Tag value to activate the alarm). The Ladder diagram allows you to create a complex automated alarm condition by using (for example) priorities or a set of analog or Boolean conditions. Each new alarm is immediately entered into a 48-alarm queue (maximum) and processed according to its type (printer, pager etc...) and the communication port it uses. The order in which these alarms will be processed will not necessarily be the order of their arrival. For example, if an alarm requires the internal modem, it will need to wait until the modem is available before it can be transmitted. If the alarm is time stamped, this data accompanies the alarm message.
58
figure 31 The Tag. The type on which the alarm is going to be started (rising, falling or both). The recipient (printer, pager, e-mail, supervisor,see below). The message or report. The filter (the time in minutes and seconds, before the alarm is started, once the alarm condition is present). The inhibition (the alarm will always be started or disabled according to certain conditions). SMS acknowledgment : from TWinSoft 7.10, alarms of type e-mail and Pager/SMS, may be configured to be acknowledged from a SMS sent to A. This feature is handled by a C driver (see RTU Properties Modules). This type of acknowledgment is only possible with a A equipped with a GSM data modem !
59
figure 32 The Tag. Type: The maximum or minimum threshold for which the alarm will be started (if the value of the analog Tag passes under or over this threshold, the alarm is started). If an alarm must be generated for both a maximum and a minimum threshold, 2 alarms must be declared with the same Tag. Hysteresis: the amount that the value must fall or rise below or above the Max. or Min. set point before an alarm can be re-started Recipient: printer, pager, e-mail, supervisor,see below Message: the value of a Tag can be sent within the message (see Message below) Filter: the time in minutes and seconds, before the alarm is started, once the alarm condition is present
It is always possible to choose a FILTER equal to '0 min. - 0 sec.', which means that the alarm will be activated immediately. Inhibition: the alarm will be transmitted or inhibited according to certain conditions Notify of the end of alarm: An alarm is automatically sent when the condition is over SMS acknowledgment : from TWinSoft 7.10, alarms of type e-mail and Pager/SMS, may be configured to be acknowledged from a SMS sent to A. This feature is handled by a C driver (see RTU Properties Modules). This type of acknowledgment is only possible with a A equipped with a GSM data modem ! For more information, click Help.
TWinSoft: 8.32 Getting Started 60
12.4. Recipients
To access the definition of Recipients, click the folder 'Alarms' in the Project workspace and select 'Recipients'. 64 recipients can be declared, to different pager or GSM addresses, printer, SCADA, remote A, with the help of any of the available communication ports (see Chapter 7 RTU Properties). According to the type of recipient, local or remote ports are available: Internal: the alarm is saved in the alarm stack and not sent anywhere. ModBus: it can be slave or master. The ports available are modems ports. Pager/SMS: sending of a message to a pager or a GSM. The ports available are modems ports. Printer: sending of message(s) or report to a printer. The ports available are modems and local ports. Minitel: for France only. Calling of a Minitel. The ports available are modems ports. E-mail: sending of e-mail. The only information needed is (are) the e-mail address(es); the data of the ISP account are declared in the RTU Properties TCP/IP). FTP: refreshing of a Portal (Web Site) with HTML pages, report, Custom: sending of an alarm with the help of a custom driver.
61
figure 33
To an e-mail address
figure 34
TWinSoft: 8.32 Getting Started 62
12.6. Messages
To access the definition of Alarm messages, click the folder 'Alarms' in the Project workspace and select 'Messages'. 256 different messages can be created.
figure 36 Message number : indicates the index of message (between 1 and 255). Type a message of maximum 30 characters. This message is user specific. If it is for a Digital Pager, it will consist only of numbers. If it is for a Text Pager or for a GSM, it will not contain accent (, , , ...)
In all cases, a message can contain the value of a Tag. The syntax is the following: ~Xyyyyy ~ ~ : The first character indicates that what follows is the value of a ModBus address. The value sent is the value from the moment of the call. X : represents the type of the variable: Type I W C S R B t j m 0 (zero) f D d o (small letter) # 1.. 9, a.. f h Description Integer (-32768.. 32768) Word (0.. 65535) Choice (for example edges: POS, NEG or DEL) Text (comments, TEL number, scaled value of Terminal/.Minitel Tags,) Real (only Factor an Offset of Terminal/Minitel Tags) Byte (0.. 255, represented as 3 ASCII characters) Time (represented as 2 ASCII characters) Day of the week month Byte represented in binary format Floating point Double word Character string Digital state (represented as 0/1) Digital state (represented as ON/OFF) Digital state (represented as --------/########) Digital state (according to the definition of digital states, only valid from 1 to 15) Time: hh:mm
63
yyyyy: represents the ModBus address of the variable. Examples of message ANA0=~B64~too high Register AIR0=~W20480~ Motor is ~o32~ Messages sent ANA0=234 too high Register AIR0=24563 Motor is OFF
Next : Allows sending several successive messages (to a printer only). Specify the index number of the message coming next. This feature allows you to define a number of lines to be printed followed by an empty line (the last message of the chain) ; to separate each printing.
64
13. Datalogging
13.1. Introduction
Datalogging relies on the database in the A, it allows you to memorize events of your process, in order to visualize historical data.
A contains 128 Kbytes of memory for its program and for recording events; the latter is what we call the database of A. A supplement of 512 Kbytes RAM is available in A as September 2002 and running OS 5512. This extended memory is only available for Sampling tables.
The Chronologies Chronologies are 'On event' recordings, by mean of changes in variables. Each event is recorded with the time, date, Tag and its status or value. Two tables are available, one for the digital events, one for analog events with a maximum of 256 Tags in each table. The minimum interval between two recordings is 1 second.
The Sampling Tables Recording in Sampling tables happens at regular intervals and does not depend on signal variations. Only the date and time of the last recording are stored, and they therefore require less memory than do chronologies. Up to 64 sampling tables can be created with one Tag for each table. The minimum period between two recordings is 1 second. The database information recorded in the A can be retrieved with the use of SCADA software such as TView or other HMI\Scada package with A specific driver or generic RS-485 driver. (please call your distributor)
65
figure 37 Edges: recording on positive and (or) negative edge. Inhibition: Enabled: Disabled: Power failure: DisCRD:
always recorded. never recorded. disabled if the supply voltage (230VAC or 8 56VDC) is broken down. disabled if the Special register DisCRD is at 1.
figure 38 Variation: Recording in case of variation (higher or lower) in comparison with the previous recording. The unit is expressed according to the binary format of the analog input, independent of a possible scaling in the Ladder programming. Inhibition: Enabled : always recorded. Disabled : never recorded. Power failure : disabled if the supply voltage (230VAC or 8 down. DisCRA : disabled if the Special register DisCRA is at 1.
56VDC) is broken
figure 39
Type: A is able to execute calculations on a minimum time-base of 1 second. The result of the calculation is written in the table according to the period. This value can be: Minimum : minimum value during the period. Maximum : maximum value during the period. Average : average value calculated during the period. For each period a new average is calculated Instantaneous : value at the moment of the recording. Period: Period between 2 recordings. You may choose between 1sec; 2sec; 4sec; 5sec; 10sec; 15sec; 30sec; 1min; 2min; 4min; 5min; 10min; 15min; 30min; 1h; 2h; 4h; 6h; 12h. The recording happens at 'birthday' time of the period selected. Example: if you select as period 30 seconds, the recording will be done every minute and minute 30 seconds: 9:25:00; 9:25:30; 9:26:00; 9:26:30...
Size: The size can be expressed on two ways: Size: the number of records of the table. The recording works on the FIFO principle. According to the size, the duration is updated (see next). It can be of maximum 32768 records. Duration : you may prefer to enter a number of days and hours, in this case the size is automatically updated
To adjust the sizes check the available memory with the compile option (see chapter 6.1 Sending a program.
67
68
69
The variables to Read/write in the external equipment are declared using the Remote Tags definition:
figure 40
Important points : 1. Remote Tags are Tags that you wish to write to the Slave(s), or that contain a status or a value that you read from the Slave(s). 2. The Slave(s) do not need specific configuration, only of course the configuration of the port used to communicate that must fit with the one of the Master. 3. Each creation of a Remote Tag definition represents a transaction with a slave (Query + Response). The whole list of Remote Tags represents the table of TBox-master Network. 4. The table is permanently examined and transactions are carried out according to their 'Trigger' configuration (if defined). 5. The transactions with slaves are asynchronous in regard to Ladder cycle. 6. Block communication is possible and advised whenever it is possible. This will speed up communication between Master and Slave(s).
70
Read : the Master executes a reading in the Slave. Write : the Master executes writing in the Slave. Quantity : number of variables of successive addresses that are read (or written) in the Slave. The maximum are: DESCRIPTION TYPE MAXIMUM QUANTITY
Digital I/O Analog I/O Digital registers Analog registers (8 bits) Analog registers (16 bits) Analog registers (32 bits) Timers Counters Special registers Register 'sampling table' IOD, Test4ma IOB, IOW, I4M DIR, STD STB AIR, STO TOT, FLT ATP, ATV, DTI ACP, ACV, DCN DSPE, ASPE ECH 16 8 1600 (multiple of 8 for quantity, Tag address and Remote address) 8 100 8 16 16 16 16
External Source : all the following parameters concern the Slave station: Device: select an existing external device from the Resources. You can create one with the button Type: select the type of the external variable: Analog or Digital. See next:
If it is a Remote A: the choice is Analog or Digital. According to the operation, TWinSoft selects automatically the proper ModBus function according to the operation. If it is a RM module: the type is not available. TWinSoft selects automatically the proper ModBus function according to the address.
71
If it is a ModBus Device: the types correspond to the following ModBus functions: Operations Read Digital Read Digital Read Analog Read Analog Write Single Digital Write Single Analog Write Multiple Digital Write Multiple Analog Types Digital Input Coil Analog Input Holding Register Coil Holding Register Coil Holding Register ModBus Functions 2 1 4 3 5 6 15 16
- Remote A. 1. The address can be typed with its ModBus address (see the list of ModBus addresses in the Help menu). Examples: 22016: seconds. 7: digital input 7 of the CPU. 32: digital output 0 of the CPU 20480: digital or analog register (according to the type). 2. The address can be typed according to a standard. If it is a physical I/O: TTT.r.b.c.S TTT: is the type of variable. r: is the rack number.. b: is the card number. c: is the channel number. S: supplementary type information. TTT DI DI DO AIB AIB AIW AOB AOB r x x x x x x x x b x x x x x x x x c x x x x x x x x S 4m Description. Digital input. Test of an analog input. Digital output. Analog input 8-bit resolution. Input 0 20mA converted to 4 20mA. Analog input 12-bit resolution. Analog output 8-bit resolution. Output 0 20mA converted to 4 20mA.
4m
4m
72
Digital input 7 of the CPU. Digital output 0 of the CPU. Analog input (8 bits) 1 of the CPU. Analog input (16 bits) rack 1, card 5, channel 4. Test of the analog input rack 1, card 5, channel 4.
If it is a register: TTT: nnnn: TTT DIR AIR STO STB STD FLT TOT ATP ATV DTI ACP ACV DCN DSPE ASPE TTT.nnnn is the type of variable. register number. Description. Digital register. Analog register. Storage 16 bits register. Storage 8 bits register. Storage digital register. Floating point register. Totalizer (32 bits). Timer preset. Time value. Timer status. Counter preset. Counter value. Counter status. Digital Special register. Analog Special register.
Digital register 1000. Analog register 128. Digital state of timer 20. Digital special variable 2.
73
- RM 10. 1. Click the button to browse the list of available variables of the RM10.
2. The address can be typed according to a standard: TTT.b.c.S TTT: is the type of variable. b: is the number of the block of I/O c: is the channel number. S: supplementary type information. TTT DI DI DI DI DI DI DO AIW AIW DI b 0 0 0 0 0 0 0 0 1 1 c x x x x x x x x x x S S+ SM+ SSMV C 4m Description. Digital input (instantaneous). DI Latched on positive edge and reset by the communication. DI Latched on positive edge and reset by writing '0'. DI Latched on negative edge and reset by the communication. DI Latched on negative edge and reset by writing '0'. Test of the digital output. Digital output. 16-bit Totalizer of pulse on a DI. Analog input 16-bit resolution. Test of an analog input.
Addressing the Digital Special registers DSPE TmpError Shortcut RstShortcut Examples: DI.0.0: DO.0.1: DI.0.1.V: AIW.0.3.C: AIW.1.0: TTT DI DI DO b 2 2 2 c 0 1 2 Description Temporary error on an output. Outputs disconnected. Re-initialize the outputs after a short circuit
Digital input 0. Digital output 1. Test of the Digital output 1. Totalizer of the pulse on DI 3. Analog input (16 bits) 0.
Auto-acknowledge: this feature concerns only the registers latched and reset by writing '0' (with the switch 'SM'). You must check this option for A to execute automatically the writing '0' to the RM.
74
- RM21. 1. Click the button to browse the list of available variables of the RM21.
2. The address can be typed according to a standard: TTT.b.c.S TTT: is the type of variable. b: is the number of I/O . c: is the channel number. S: supplementary type information. TTT DI DI DI DI DI DO DI AIW AIW DI AOW b x x x x x 1 1 0 2 3 3 c x x x x x x x x x x x S S+ SM+ SSMDescription. Digital input (instantaneous). DI Latched on positive edge and reset by the communication. DI Latched on positive edge and reset by writing '0'. DI Latched on negative edge and reset by the communication. DI Latched on negative edge and reset by writing '0'. Digital output. Test of a Digital output. 16-bit Totalizer of pulse on the 8 first DI. Analog input 16-bit resolution. Test of an analog input. Analog output.
C 4m
Addressing the Digital Analog register ASPE RstCounter TTT AOB B c 4 0 Description Counter of resets of the RM21.
Addressing the Digital Special registers DSPE TmpError Shortcut RstShortcut ReBoot LEDs TTT DI DI DO DO DI B 5 5 5 5 5 c 0 1 2 4 7 Description Temporary error on an output. Outputs disconnected. Re-initialize the outputs after a short circuit. Reboot of the RM21. Use of LEDs associated to DI: 0 : LEDs deactivated. 1 : LEDs used.
Digital input 0. Digital output 1. Test of the Digital output 1. Totalizer of the pulse on DI 3. Analog input (16 bits) 0. Analog output (16 bits) 1.
Auto-acknowledge: this feature concerns only the registers latched and reset by writing '0' (with the switch 'SM'). You must check this option for A to execute automatically the writing '0' to the RM.
TWinSoft: 8.32 Getting Started 75
- ModBus device. The address must be typed (see the manual of your ModBus equipment). Trigger : Each transaction must be triggered to be executed. This operation can be done automatically (you don't need to declare it and leave the box cleared. In this case, the A will permanently execute the transaction). The triggering happens via a digital Internal register (DIR). When it is in the condition programmed (see below), the transaction happens. If you wish to select a condition yourself, check this box. Tag : if Trigger is checked, select a Tag of a Digital Internal register multiple of 8 (DIR 0, DIR 8, DIR 16, ...). Condition : if Trigger is checked, select a condition: Positive Edge, Negative Edge or High State.
76
The Web files contained in this folder will be sent together with the TBox application. Three types of file can be sent to A: - HTM pages with their associated WebForm, created with the WebForm studio. - Report files created with the Report Studio (see chapter 15.2: Report Studio) - Any file (.gif, .bmp, )
2. From the Web & Report files folder, create the HTM images (see WebForm Studio Getting started manual). All the files contained in this folder comprise the Web Module. 3. When sending the TWinSoft application to A, all files comprising the Web Module are also sent . To dial-up A, use TBox Dial It! utility (see WebForm Studio - Getting started manual).
77
For more information, start Report Studio and look at the online Help.
78
79
Access security: Check this box if you want to use access protection to the ports of the A. If it is cleared, all the security features are disabled. Global code: type in the code you used to generate the Access Codes with the utility PASSWORD.EXE (see next). Type it a second time in the Confirmation field, to be sure. Protected ports: Check the box of the COM port you want access protection. By default, when selecting access security features, only COM4 (Internal modem) is protected.
The access codes are generated by the utility software Password (see next).
80
16.3. Login/Logout
The Login feature allows users to connect to a protected port of the A according to their own access level. If a port is unprotected, the access level is automatically 3: Engineer. The Login/Logout can be executed from the main menu bar in the 'Tools'. Login When being connected to a port of A that is protected, you need to do a Login to get an access level.
figure 42 You type the Name you used in the Password utility and the Password that was created (see previous). According to those, you are in: Read only mode Read/write mode Read/write + send TWinSoft document It is displayed in the Status bar. If 'Save password' is checked and TWinSoft is connected to a protected port: when TWinSoft starts, it uses the access level corresponding to the password saved (see the status line). If it is not checked and TWinSoft is connected to a protected port: TWinSoft starts in 'Read only' mode. You need to do a Login to get your access level. Logout If the TWinSoft is connected to a protected port, the Logout sets TWinSoft in 'Read only' mode.
81
17.2. Examples
Following are examples how these features can be used in TWinSoft:
82
Move or copy Ladder from one POU to another POU (DragnDrop or Copy/Paste)
NOTES: 1. In case the types of POU are the same : The local Tags are automatically created in the list of 'POU Tags' of the POU target. 2. In case the types of POU are not the same, for instance from a 'Program' to a 'Function Block': The local Tags are automatically created in the list of the 'POU Tags', and the global Tags are created as they are. You have to edit the Ladder and change the type of the local Tags: Input, Output or local, and replace the global Tags with local Tags if needed.
Copy entries of any list (Recipient, Alarm condition, Remote Tags, ...) from one document to another document (Copy/Paste)
If Tags are needed and already exist, with similar names and addresses, the entries are created with the existing Tags. If Tags of I/O are needed and already exist with similar addresses but with other names, the entries are not created. If Tags of register are needed and already exist with similar addresses, TWinSoft automatically creates Tags of similar type and increments the address. If Tags are needed and do not exist, they are automatically created.
83
When working with an existing list that you wish to update with a file To avoid conflict between indexes of the TWinSoft document and those of the file, we advise you to follow the procedure: Export Modify/add Import
84
18.1. Export
Export menu is available from the main menu of TWinSoft: 'File' -> 'Export'
The different possibilities are: Export current view You export the information contained in the list opened. The available lists are: Tags:
When exporting Tags and groups of Tags, From the group where you are: all the Tags, groups and sub-groups are exported. The above group(s) are not exported.
Alarm condition Alarm messages Chronologies Sampling tables Web/Minitel/Terminal Tags Analog Units Digital States Export current selection You export the lines you have selected (a serie of Tags, of alarm conditions, ...). Export of a list You select the list you want to export
85
Example files
Example files are installed with TWinSoft. There are available from the sub-directory of TWinSoft: \Samples\CSV:
Tags.csv AlarmConditions.csv AlarmMessages.csv Chronologies.csv SamplingTables.csv TerminalTags.csv AnalogUnits.csv DigitalStates.csv
You can use them as basis for creating lists of configurations using external software (Excel, Notepad, ...)
86
The following paragraphs give a detailed description of the syntax for creating your own file.
Export - Tags
You export all the Tags and groups. Syntax If you want to modify or create your own file, with the 'separator' between each field. The syntax is:
Index Tag Address Comment Initial value I/O Signed
Example:
Tag *Index,Tag,Address,Comment,Initial Value,I/O,Signed [\Tags] 0,Reg-0,AIR000,Analog Reg. 0,123,INPUT,NO 1,D0,DI.0.0.0,Digital Input 0 CPU,,INPUT, 2,ASPE000,Second,Second of CPU,,OUTPUT,NO
Title The title must be at the first line and must be Tag. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Path The path of the group where the Tags are located, starting with \Tags. The following Tags in the file are member of this group. Example: with a group 'Inputs', the path will be : [\Tags\Inputs] Index When creating a file, any index can be used. The index is re-calculated when imported in the TWinSoft document. Tag The name of the Tag (maximum 15 characters). If it is a Tag of a card of an extension rack, the card must be declared in the Resources of the TWinSoft document. Address Refer to the allowed address types (Help of TWinSoft) Comment The comment associated to the Tag. WARNING: in case the comment includes the separator, it must be indicated bewteen brackets. Example: This register, is my favorite Initial value If you wish to assign a value to the Tag at start-up of A.
87
I/O Input or Output. With Registers : determines the format. With I/O : it is not used. The format depends of the physical address. Signed Yes or No. With Register : determines the format. When nothing is mentionned, it is considered as a 'yes'. Any field not needed must be left empty.
88
Index
Example:
AlarmCondition *Index,Tag,Type,Threshold,Recipient,Message,Filter,Hyst,Inhibition,End 1,ON,POS,0,Motor,Motor is started,1:30:00,,0,Yes 2,FLOW1,Max,560,Temperature,Temperature above 55 degree,00:2:00,25,0,--
Title The title must be at the first line and must be AlarmCondition. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of conditions. Maximum 256 digital and 256 analog conditions can be defined. Tag Maximum 15 characters. The Tag must exist in the TWinSoft document. Otherwise, the alarm condition cannot be imported. Type POS or NEG ANALOG : Max or Min Threshold DIGITAL : empty ANALOG : the value generating the alarm Recipient The Recipient must exist in the TWinSoft document. Otherwise, the alarm condition cannot be imported.
89
Message The message can be: - an index : a number between 1..256 - a text : a message of 30 characters. It must be typed between brackets. (Ex:this is a text message). If the message does not exist, it will be created. - a report: if is not a message but a report. It must be typed between brackets. (Ex:ThisReport.trep). The report must be declared in the folder Web & Report files. Filter without filter: empty with filter: the time in MM:SS Hysteresis DIGITAL: empty ANALOG: the value of hysteresis Inhibit 0 Enabled (the alarm is always active) 1 Disabled (the alarm is always inhibited) 2 Power Failure (the alarm is inhibited when there is a main power failure) 3 Disabled if DisAla=1 (the alarm is inhibited when DisAla=1) End Yes or No Any field not needed must be left empty.
90
Example:
AlarmMessage *Index,Message,Next 1,D0 Input has been activated, 2,This is a long message to send ,3 3,on a printer,
Title The title must be at the first line and must be AlarmMessage. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of messages. A maximum of 256 messages can be defined. Message The message can be of maximum 30 characters. When it is longer, it will be truncated during import. In case the message must includes the separator (',' for instance), the complete message must be typed between brackets. Example:.
2,"This message, includes a coma",0
Next The index of the next message. Available for message to be printed, or with some 'C' driver. Any field not needed must be left empty.
91
Export - Chronologies
You export the list of Chronologies. Syntax If you want to modify or create your own file, with the 'separator' between each field. The syntax is:
Index Tag Type Var Inhibit
Example:
Chronologies *Index,Tag,Type,Var,Inhibition 1,D0 ,DEL,,0 2,Level ,Var,5 ,2
Title The title must be at the first line and must be Chronologies. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of chronologies. Maximum 256 digital and 256 analog entries can be defined. Tag Maximum 15 characters. The Tag must exist in the TWinSoft document. Otherwise, the chronology cannot be imported. Type DIGITAL: POS, NEG ou DEL ANALOG: Var (for Variation. See next) Var (Variation) DIGITAL: empty ANALOG: Value of the variation Inhibit 0 Enabled (the recording is always active) 1 Disabled (the recording is always inhibited) 2 Power Failure (the recording is inhibited when there is a main power failure) 3 DIGITAL : Disabled if DisCRD=1 (the recording is inhibited when DisCRD=1) ANALOG : Disabled if DisCRA=1 (the recording is inhibited when DisCRA=1) Any field not needed must be left empty.
92
Example:
SamplingTable *Index,Tag,Type,Period,Size,Reset Tag 1,FLOW1,Mean,00:30:00,180,yes 2,FLOW2,Max,00:03:00,1200, 3,FLOW3,Min,01:00:00,60,
Title The title must be at the first line and must be SamplingTable. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of sampling tables. Maximum 64 sampling tables can be defined. Tag Analog Tag of maximum 15 characters. The Tag must exist in the TWinSoft document. Otherwise, the sampling table cannot be imported. Type Minimum: Min Maximum: Max Average: Mean Instantaneous: Inst Period The period between 2 recordings. Check in the Sampling table configuration which are the available period. Size The number of Records you wish to save in A. Reset Tag Yes or No Determine whether the Tag is reset after recording (with registers only). Any field not needed must be left empty.
93
Terminal Tags
Syntax If you want to modify or create your own file, with the separator between each field. The syntax is:
Index Tag Comment Write allowed State1 State0 Min Max Meas. Min Meas. Max Conv. Min Conv. Max # dec. Unit
Example:
TerminalTagname *Index,Tag,Comment,Read Only,State 1,State 0,Minimum,Maximum,Measured Min,Measured Max,Converted Min,Converted Max,# dec.,Unit 1,ANA0,analog 0,No,,,0.000,1000.000,0,255,0.000,1000.000,3,m 2,ANA1,analog 1,No,,,0.00,1000.00,0,255,0.00,1000.00,2,liters 3,D0,Input 0,No,IN,OUT,,,,,,,,4,Q0,Pomp 0,Yes,ACTIVE,STOP,,,,,,,,
Title The title must be at the first line and must be TerminalTagname. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of Web/Minitel/Terminal Tags. Maximum 256. Tag Maximum 15 characters. The Tag must exist in the TWinSoft document. Otherwise, the Terminal Tag cannot be imported. Comment The comment associated to the Tag Write allowed Yes: The Tag can be monitored No: Write not allowed State 1 / State 0 The text associated to the digital Tags. State 1: the text when the Tag is '1' State 0: the text when the Tag is '0' If the states do not exist they are created. Minimum / Maximum When the option 'write allowed' is selected (see above), the range in which a value can be written (analog Tags only). The number of decimals depends on the quantity selected (see below). The decimals can be omitted.
94
Measured Min / Max Converted Min / Max To define a scaling converting a physical range (measured) to a real range (converted). Example: 8bits analog input (0..255) corresponds to 0..1000 mm Measured: 0 ... 255 Converted: 0 ... 1000 # dec. Number of decimals (maximum 3) Unit The text associated to analog Tag. Any field not needed must be left empty.
Analog Units
Syntax If you want to modify or create your own file, with the 'separator' between each field. The syntax is:
Index Unit
Example:
TerminalAnalogUnit *Index,Unit 1,m 2,liters
Title The title must be at the first line and must be TerminalAnalogUnit. * LINE OF COMMENT Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of Analog units. Maximum 256. WARNING: An analog Tag Web/Minitel/Terminal refers to an index of an analog unit. If you change the text of an index, it will be updated in the Terminal Tags. Unit The text associated to analog Tag. Maximum 8 characters.
95
Digital States
Syntax If you want to modify or create your own file, with the 'separator' between each field. The syntax is:
Index State 1 State 0
Example:
TerminalDigitalState *Index,State 1,State 0 1,IN,OUT 2,ACTIVE,STOP
Title The title must be at the first line and must be TerminalDigitalState. * LINE OF COMMENT Any complete line starting with ' * ' can be inserting anywhere in the file as comment. It will not be imported. Index The index in the list of digital states. Maximum 256. WARNING: A digital Tag Web/Minitel/Terminal refers to an index of a digital state. If you change the text of an index, it will be updated in the Terminal Tags. State 1 The text associated to the digital Tags when it is at '1'. Maximum 8 characters. State 0 The text associated to the digital Tags when it is at '0'. Maximum 8 characters. Both states fields have to be filled.
96
18.2. Import
After you have exported files for modification (see previous), or you have created your own file, you can Import them. Import menu is available from the main menu of TWinSoft: 'File' -> 'Import'.
The lists you can import are: Tags Alarm condition Alarm messages Chronologies Sampling tables Web/Minitel/Terminal Tags Analog Units Digital States
When doing an import, if the corresponding list in TWinSoft contains already at least one configuration, the following options appear:
Exact replace
You want to erase an exiting list and replace it with the file. The list of the TWinSoft document is replaced by the file. The list is first erased, and then replaced by the file. Not with Tags (see following) Be careful all indexes are re-defined according to the file. With Tags Tags within TWinSoft have an internal index, different from the one you see in the list of Tags. This index is used as internal reference for every configuration where the Tag is used (Alarm, Datalogging, Ladder, ...) When importing a list of Tags, if within the file, a Tag name is the same than the one present in the document, but with another index, the import cannot be done. A message box then informs you. That is why we advise you to always work with an Exported file.
Replace
You have modified some entries and/or have added some entries in the file. The import will keep or modify the existing configuration, and add the new one. Each time there is an existing configuration with the same index as the one in the file, you are prompt to choose the one(s) you wish to save.
Append
You want to add some new entries to an existing list. The entries are added to the existing list. With Tags The indexes you have defined in the file have no importance. It can even be the same for each Tag. Groups of Tags are also created. If Tag names or addresses are already existing within the document, the import will be refused. With Messages, Alarm condition, Chronologies, Sampling tables Check the last index in the TWinSoft document and use the next one when creating the file.
98
19.2. Pack
To access Pack & Go menu, select from the main menu File Pack & Go
99
All Files of the project, TWinSoft document, WebForm, html pages, OS, are packed in one file, with the extension .tpg
19.3. Unpack
To open the Unpack window, double click a file with the extension .tpg. Unpack menu offers 2 features:
1. Restore a project Extract a project into a directory of your PC. This option is very convenient for backing up a project being sure you don't miss any file. Option available from the main menu: Tools Unpack.
100
2. Update a RTU Update a RTU with a complete project, including the application, OS, WebForms, report, ...from a unique file. The button PC Setup gives you access to the configuration of the PC, to communicate with the RTU.
The button Update RTU sends the project and OS to the RTU.
Languages supported are English, French and German. It cannot be selected from 'Unpack' menu but changed from TWinSoft main menu: 'Tools' 'Language'
101