Semaphore Twinsoft Manual



Comments



Description

TWinSoft 8.32 Getting started Revision: USA 8.32 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 6.2. Saving the source............................................................................................................... 15 6.3. Working modes of TBox.................................................................................................... 16 Mode 1a: the program is running .......................................................................................................16 Mode 1b: the program is running and in alarm mode ........................................................................16 Mode 2: the program is stopped (Global Reset) ................................................................................16 Mode 3: The Operating System is stopped ........................................................................................17 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.2. Ladder - Modes................................................................................................................ 25 Display mode .....................................................................................................................................25 Edit mode ...........................................................................................................................................26 10.3. Ladder - Toolbar ............................................................................................................. 27 Display mode .....................................................................................................................................27 Edit mode ...........................................................................................................................................28 10.4. Variables.......................................................................................................................... 29 Local Tags..........................................................................................................................................29 Global Tags ........................................................................................................................................29 The colors of the Tags........................................................................................................................29 10.5. Create Ladder Diagram .................................................................................................. 30 Inserting items....................................................................................................................................31 The colors of the Tags........................................................................................................................31 The Keys ............................................................................................................................................31 TWinSoft: 8.32 – Getting Started 2 10.6. Step by step creating of Ladder ....................................................................................... 32 10.7. Mathematical Block......................................................................................................... 36 Introduction........................................................................................................................................36 Assignments .......................................................................................................................................36 Arithmetic operations.........................................................................................................................37 Comparisons.......................................................................................................................................37 Bit manipulations ...............................................................................................................................38 Boolean operations.............................................................................................................................39 Conversion + Indirect addressing.......................................................................................................39 PID regulation ....................................................................................................................................41 Miscellaneous.....................................................................................................................................42 Floating point functions .....................................................................................................................43 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 10.10. POU – Function............................................................................................................. 47 Creating a POU Function ...................................................................................................................47 Example of a Function .......................................................................................................................49 Calling a POU Function in a POU Program ......................................................................................50 10.11. POU - Function block.................................................................................................... 51 Creating a POU Function Block ........................................................................................................51 Example of a Function Block.............................................................................................................53 Calling a POU Function Block in a POU Program............................................................................54 Debugging of a Function block..........................................................................................................55 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 ......................32) TWinSoft: 8.......................Tags.......................................................................................Chronologies ................. XP are trademarks of Microsoft Corp............................................................................. 82 Create Tags in the list of Tags (Copy/Paste).......... .............................. Import ......................... TVIEW ...........3................................... General rules .................................................2............. WebForm Studio and A are registered trademarks of Techno Trade s.......................... MODBUS is a registered trademark of Gould Modicon..............................................................a.......83 Modifying the sequence of the elements in all lists (Drag'n'Drop)..........2..................................1...86 Export ............................................................................................. 84 18.................. Unpack................................ Examples.......................................................... Login/Logout ........................................................................................................ assumes no responsibility for the accuracy of the information............................82 Copy a POU in the same document (Copy/Paste)............................... Internet Explorer is a trademark of Microsoft Corp..3..................89 Export ..........................................................................................a................................................98 19............................................................................................................................................ PACK & GO.. .................................. Export .......................................................................................... All rights reserved...................................1...................1....91 Export .................................... 99 19.................. 82 17..................................................83 Copy Ladder from one document to another document (Drag’n’Drop) ...................................................................83 Move or copy Ladder from one POU to another POU (Drag’n’Drop or Copy/Paste).....87 Export .......................94 Analog Units ................. ’98................................................A.............................................................................. Alarm condition...4.... IMPORT / EXPORT ..................................................................................) from one document to another document (Copy/Paste) ................................................32 – Getting Started 4 ........ Techno Trade S.................................. However.................................................................. 81 17.................................................. Edition: November 2....................98 Replace................83 18........................... 2004 (original 8.... COPY/PASTE .......................................................................................Alarm conditions...........................................................................................................................Sampling tables.................................................................................................. 99 19.........................92 Export .....................83 Copy entries of any list (Recipient...................................................... NT................................................................. Deactivating protection ....16....... Windows ’95........................................... 85 Example files.............................................97 Exact replace .................................................... Remote Tags..............................................................95 Digital States ....... AB Copyright © 1999-2004 by Techno Trade s....... Pack ... 81 16...... TWinSoft...................................................DRAG'N'DROP ...........................................................................98 Append ...........2..................................................93 Terminal Tags ..................................................... is a registered trademark of Axeda. Presentation.....................................................................................................................................................................96 18. 99 19......................... 97 Working with an Empty Document .............Alarm message................... 82 17.......................... Product information is subject to change without notice............................... TSOFT ....... 2000.............................................................................................................................. 100 Disclaimer Every effort has been made to ensure the accuracy of the information in this guide................................................................... Alarms. 2. Radio…). A is a Web Server: TCP/IP has been implemented as standard protocol. GSM. Programs (the automation programs in Ladder programming). automation programs can be developed. A is a multi-port system: A is equipped with different communication ports that allow local communication with other equipment. saved in the A. A supports as standard. to send email. It also allows communicating with your RTU to visualize its process. Remote Tags. you can define criteria of recording values of Tags. This manual helps you to understand the concept of A and to create basic configurations as: Tags (the variable of the A). It means A can be configured for all those features without needing supplementary software or hardware.00 and OS 5400. An Ethernet card is also available (10 Base/T). A is able to handle concurrent communications on different ports in multi-tasking and at different speeds.1. A is a PLC: with the help of the IEC1131-3 standard Ladder programming. A Access Security. 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. PSTN. A is presented as the “6 in 1” Tele-control system. A also allows remote communication through different types of modems (ISDN. What are those six features? 1. It is also able to send e-mail through a provider and send a file to a FTP site. A is an alarming system: on alarm conditions (digital and/or analog). Concerning Low Power RTU a specific manual is available. TCP/IP protocol and Minitel protocol on all ports. Cellular. 3.32 – Getting Started 5 . to call a supervisor. to pager(s). Introduction TWinSoft is the software necessary to create running application for A RTU and Low Power RTU. GSM and other cellular systems. 4. etc… 5. Data logging criteria. A can be called by a Browser to display HTML images. A is a Data logger: in order to memorize events of your process. TWinSoft: 8. PID loops and user definable function blocks. Those values can be stored “on event” and/or periodically. This feature is available from versions TWinSoft 7. A is able to send messages to printer(s). 6. including mathematical functions. Recording can be FIFO (circular buffer – continuous) and event driven. ModBus RTU protocol. We recommend 800 x 600. Operating system: Windows 95. Windows 98 or Windows NT (service pack 3 or higher).00 or higher is recommended to take benefit of the dialer. Starting TWinSoft 2. Internet Explorer only can be used. Display: VGA. Windows XP. (A software license is also available) Serial port: required for a local connection to Aor for an external modem.00. Parallel port: required in case of dongle protection. We recommend 32 MB. • To Browse A: Internet Browser: as ActiveX is used. Windows 2000. Mouse: any Windows compatible mouse. System requirements Hardware: Pentium or higher. Memory: 16-MB minimum. The CD-ROM of TWinSoft includes MSIE version 5.2.32 – Getting Started 6 . SVGA with a minimum resolution of 640 x 480. Hard Disk: 10 MB required plus the application files. TWinSoft: 8.1. Version 5. Modem: any PCMCIA or external modem properly configured in Windows. • TBox Mail This software is used to display a Chart view from datalogging attached to an e-mail. when TWinSoft is not required. The basis for configuring a A application is explained in this manual. Installation of TWinSoft includes ‘WebForm Studio’: HTML editor dedicated to RTU).32 TWinSoft is the software required for developing an application for the A RTU.2. Starting the CD-ROM of TWinSoft When inserting the CD-ROM of ‘TWinSoft Suite’ into the PC. • • DreamWeaver Trial version Report Studio for DreamWeaver Dreamweaver is a standard HTML editor. It needs to be installed on the PC used by a operator to dial A with Internet Explorer. the following software’s are available from the Setup: • TWinSoft 8. It also contains the ‘ActiveX’ used to display RTU dedicated objects.2. • Acrobat Reader Software needed to read our documentation. It can be used with the plug-in ‘Report Studio for Dreamweaver’ to develop standard HTML pages that do not use the ActiveX.32 – Getting Started 7 . ‘Report studio’: Report editor dedicated to RTU and ‘WebForm Viewer’: Internet Explorer ‘TBox Dialer’ and ActiveX (see next). TWinSoft: 8. • WebForm Viewer This software contains the tool TBox Dial It ! used to dial a A with Internet Explorer. • Accessories: group containing the utility ‘Password generator’ and ‘Reset User preferences’: reset of registry information to restore the default configuration of TWinSoft. figure 1 Other programs and menus: • TBox drivers: when 'C' custom drivers have been installed.32 – Getting Started 8 . • Explore this CD-ROM You will find on the CD-ROM many information related to A and accessories: datasheets. The ‘on line’ help of the driver configuration is available in this folder. • Documentation: group containing the various documents associated to TWinSoft and RTU. a group of programs is created where TWinSoft can be started. TWinSoft: 8. • Samples: group with TWinSoft documents installed as example.3. … 2.• Internet Explorer 5 Minimum version required to dial A and display properly the ActiveX. Programs of ‘TWinSoft Suite’ During installation of TWinSoft. • WebForm Studio: to start the HTML editor. • TWinSoft: to start TWinSoft. dedicated to A when it is used as a Web Server. manuals. • Report Studio: to create reports dedicated to A. you have the possibility to remove registration on the first PC and register back on the second.2. It allows you to send applications to as many A’s as you want. The Code (License) Available from the menu ‘Help’ ‘License Register.3. 3. The Dongle It is a hardware device placed on the parallel port of your PC.32 – Getting Started 9 . The only protected operation is the insertion of an application in the A. it can be installed on any PC and used to develop TWinSoft documents Offline or to monitor/control a running program locally or remotely.1. we create a code that you enter in the 'License' field.4. it allows you to send an application to the A for which you have the code. The Evaluation mode You don't need any software or hardware dongle. TWinSoft LITE code is linked to one A. with any PC. it will stop after 2 hours. The A dongle or a code might be too expensive. The TWinSoft LITE Available from the menu ‘Help’ ‘TWinSoft LITE configuration. The only restriction is that it must always be on the same PC. the Serial Number). the User name.’ This protection mode is ideal for users having one or two A units. 3. TWinSoft: 8. This is a good solution for testing programs or creating a demo. 3. If you wish to use another PC.3. TWinSoft regularly checks the presence of it. In order to find the best way for you we offer different possibilities: 3. but when you send the application to the A. Once entered. you can send any application as if you had a dongle (see previous). You are able to develop a complete TWinSoft document without any restriction.’ Using information of the PC (the Company name. TWinSoft Protection The software itself is not protected. the Wizard helps you to define the basic configuration: According to the hardware you want to program.32 – Getting Started 10 . According to this data TwinSoft will dial country. Wizard When starting TWinSoft the first time or when creating a new document. area code or prefix when calling the A. select the proper type of RTU. figure 3 TWinSoft: 8. Telephone information the location where the A will be placed.4. figure 2 This configuration can be modified using the RTU properties dialog boxes. Warning : you cannot change later from one type to another type : LP100 to LP200 for instance. You type the other data according to the information received from the ISP. the Wizard offers to define a connection to an ISP. in order to send e-mail. figure 4 Part of the data appear automatically according to the ‘dial up entry’.32 – Getting Started 11 . OR Select ‘New connection…’ You type these data according to the information received from the ISP. Available ‘dial up entries’ to ISP existing on your PC.In case you have selected a modem (see previous page). figure 5 TWinSoft: 8. 32 – Getting Started 12 .The Wizard then asks you whether you use an Ethernet card and offers to configure it. figure 6 TWinSoft: 8. <ALT + 4>: Cross-reference (gives complete information of 1 Tag). and more using lists. figure 7 To open a list of items. The status line indicates the type and status of the communication. You can open several views to see more than one list at a time: In the Window menu. <ALT + 3>: Watch (to display a custom design list of values of Tags). It can be opened (or closed) by pressing the accelerator keys: <ALT + 1>: Open / Close the Project Workspace. choose New.5. you can easily create all needed items such as Tags. simply select the type of item you want to see in the project workspace (the tree in the left panel of the main window). <ALT + 2>: Build results (results of the compilation and use of the memory of the A). The window in the bottom can be selected to display utility information. alarm conditions.32 – Getting Started 13 . TWinSoft opens a view (new window) showing these items. Presentation Using TWinSoft. TWinSoft: 8. alarm recipients. data logging criteria. • The Off line option is selected to avoid sampling a A that is not connected. • 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. The development of a document can be done “off line”.3: Working modes of A) figure 8 • To communicate with your A in TCP/IP (typically with a A equipped with an Ethernet card). TWinSoft will then establish a communication with the IP address specified in the tab ‘TCP/IP – LAN’ (see chapter 7: ‘RTU Properties’). you select the option ‘TCP/IP (Ethernet…). • In case of a local connection. If you don’t know the Baudrate of A. For more information. A communication can be carried out locally or remotely. After having selected the communication mode. you can set it to a default configuration (see chapter 6.32 – Getting Started 14 . TWinSoft: 8. The Baudrate must fit with the speed of the port of the A to which your PC is connected. Communication (PC set up) Communicating with your A is necessary to send a program or to visualize the process. select the port of the PC that is used to communicate with the A. It is defined in the PC set up configuration. you can check the communication doing a ‘RTU identification’ from the ‘Communication’ menu.6. click ‘Help’. 6.1. Sending a program Compile + test of available memory. Compile the program before sending to A. This can be done to test the integrity of a TWinSoft document or to check the memory available in the A To compile without sending the TWinSoft document use the icon from the main menu bar: 'File' -> 'Compile' or directly the key <F9>. from the Main Toolbar, or 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. 6.2. Saving the source The source is the TWinSoft document. It can be sent at the same time as the compiled program: check the box ‘Also upload Program source’ in the dialog box when sending a program (see previous). You can therefore have a back-up of the application saved inside the A. To copy it back to the PC, click from the main menu Bar: ‘Communication’ ‘Download’ ‘Program source’. TWinSoft: 8.32 – Getting Started 15 6.3. Working modes of TBox A has three working modes: 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 don’t 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). Mode 1a: the program is running USR LED blinks twice per second If you wish to restart the program: • Press the RST button, and then release it. Restarting the program has the following effects: Current alarms are stopped and the stack is erased Data logging is maintained Values of counters are maintained Timers are reset Reset (to 0) of the DIR, AIR, STO, according to the start up conditions (see the ‘RTU properties’ dialog box ‘Advanced’ tab) Reset (to 0) or do not reset the physical digital outputs, according to the start up conditions The 3 digital outputs of the CPU are always reset (hardware reset) Mode 1b: the program is running and in alarm mode USR LED blinks 8 times / sec. There is currently one (or more) alarm(s) in A. Typically the sending of SMS, e-mail, call to a Supervisor, … Mode 2: the program is stopped (Global Reset) USR LED blinks once every 2 seconds A global reset is used to stop, but not erase, the program in the A. Pressing RST 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 Mode 3: The Operating System is stopped Lighted USR LED and blinking ERR LED The OS of the A contains all the features. In very rare situations it might be stopped. Procedure to stop the OS: • Hold the PGM button pressed. • Then press and release the RST button. • Wait for TxD and RxD to blink four times, then release PGM. The A is in 'loader' mode. A is configured as follows: COM1, COM2, COM3: 9600 baud + even parity + ModBus protocol. COM4: V22, PSTN (non protected). station address number: 1 (ModBus address). TWinSoft: 8.32 – Getting Started 17 7. use the icon of the Main Toolbar: figure 9 7. figure 10 For more information. General If the Wizard was used. To open the RTU Properties dialog boxes. click ‘Help’. the information entered is displayed.1. 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. TWinSoft: 8. Information can be updated.32 – Getting Started 18 . depending on the number of A and the line quality. figure 11 • COM1 and COM2 are RS232 communication ports for any local connection to a supervisory PC. It allows to connect A to a Hub. … in order to establish a local connection (LAN) or a remote connection (WAN). ModBus equipment. GSM. The maximum distance. TWinSoft can use any port for the visualization or sending of a document. For more information.2. The maximum distance. click ‘Help’. depending on line quality. The maximum distance is 12 m. TWinSoft: 8. Click ‘Parameters’ to configure the Ethernet card. HF. ISDN or GSM) or with a network modem for network connection of A (maximum 10). • COM4 is an option. RADIO. V22. • COM6 is an Ethernet interface. Router. can be up to 10 km.32 – Getting Started 19 . ISDN. • COM5 is an option that can be equipped with a PCMCIA modem (PSTN.). printer. • 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. Communication ports Each communication port can be configured independently.7. V22b or V23) or on leased lines (in mode V22). or to an external modem (PSTN. can be up to 50 km. An internal modem can be used on PSTN lines (in modes V21. click ‘Help’.32 – Getting Started 20 . • Format: According to the address selected. it is the number of a specific register. • Select: opens from ‘Resources’.8. TWinSoft: 8. Selection: only the Tags that have the option ‘export’ checked (not implemented yet). click in the main bar ‘File’ ‘Export’. analog outputs of an extension rack. etc. card number and channel number). Other types are internal registers of the CPU. a register. This option is available while being in the ‘Tags’ folder. data logging. any configuration requiring the Tag can be accessed. It allows you to check easily which I/O or Registers are still free. For registers. Tags are of all variables that the A program recognizes : digital inputs to the CPU. ASCII files. different formats are available. You can choose between: All list: all the Tags.e. … To declare a Tag. i. From the TAG definition box. either in AB format or in ‘text’ format. Creating Tags Configuration is carried out using Tags. the list of variables associated to the current type. For more information. and then choose Digital or Analog: figure 12 • Type: for physical input/output select I/O. open the list of ‘Tags’ and click ‘Add a Tag’. • Address: it is the location of the physical I/O (rack number. alarms. • Export: allows export of the Tag definition in external. Click ‘Resources’ then ‘CPU’ to list the variables. the default startup only shows the variables of the CPU that are available. • 256 analog registers. • 4096 storage digital registers. The Resources The resources represent the list of all variables that are available for your application. When starting a new document. Project workspace Physical I/O 8 DIGITAL INPUTS. I/O of the CPU appear as cards. Click the card to see • 256 counters. box of ‘Creating a Tag’. check The different groups of • 256 timers. Registers • 2048 digital registers. • Analog special registers. • 2 analog inputs (8 bits). • 1 internal lithium battery • 64 Floating point registers. the list of I/Os.32 – Getting Started 21 . • 1 external battery check • 6144 storage analog registers (16 bits).9. • 3 digital outputs. It relates to the I/O of your A and any extension racks or external equipment. • 64 totalizers figure 13 TWinSoft: 8. Clicking an I/O opens the • Digital special registers. the latter become part of its Resources. • Multi I/O card is a custom design card within the CPU (local). Available for Remote A only. RS232. The A communicates to Remote equipment with the help of ‘Remote Tags’ (see chapter 14: ‘Remote Tags’). modem.9. When creating such equipment you must specify the following parameters: Example for a ‘Remote TBox’: figure 15 • Name: you type any name. It must be different from the Master A and possible other equipment on the same network. Double click ‘I/O’ to add additional blocks of I/O – as per your hardware configuration: List of I/O Blocks Blocks of I/O • Rack4 and Rack8 are extension racks of the CPU (local). • Address: it is the ModBus address of the Remote equipment.32 – Getting Started 22 . • Remote TBox is a distant A (remote). • RTU Port: the communication port used by the Master to communicate with the equipment. TWinSoft: 8. Creating a block of I/O Under the folder ‘I/O’ you see the CPU as the default block of I/O.1. • IP address: in case the communication port of the Master is COM6 (Ethernet card). • ModBus device is any ModBus equipment (remote). figure 14 Creating a Remote block of I/O: Remote blocks of I/O are equipment connected to A through a communication port (RS485. …). the IP address of the Remote equipment must be specified here. • RM-10 and RM-21 are remote modules (remote). The A being Master and the Remote equipment Slave(s). From the moment a A needs to communicate with other equipment. It will be available in a list of available equipment when creating ‘Remote Tags’. Figure 16 9.Creating Remote modules RM-xx The different groups of I/O of the RM modules appear as cards.2. • 16 Digital outputs . Double-clicking an I/O opens the ‘Creating a Tag’ box. click on it to create cards. Creating a card After having created an extension rack. List of cards Cards description • 4 Analog inputs (8 bits full isolated).(transistor/PNP) • 16 Digital outputs (old) (transistor/NPN) No longer available. figure 17 TWinSoft: 8. • Test the I/O (digital). 9. Double-clicking an I/O opens the box of ‘Creating a Tag’.32 – Getting Started 23 . Click the card to see the I/O list. • 16 Digital inputs. • 2 Analog output card (8 bits full isolated) • 8 Analog inputs (12 bits).3. • 8 Digital output (Relays 250 VAC). Creating a Tag from a list of I/Os Example of I/O of an 8 Analog Input card: For each channel 2 variables are available: • The I/O (analog). 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).10. can be combined to create logical equations (two inputs follow on the same line for an <AND>. Outputs Digital output functions are engagements (SET relay) or disengagement (RESET relay). data logging or sending of DTMF tone.1. The different types of Input conditions are accessible in the LD Toolbar. To process analog outputs. Other functions have been introduced proper to telemetry like transmission of alarms.32 – Getting Started 24 . many mathematical functions and POU (Program Organization Units) functions have been implemented. whether digital or analog. Ladder – Principle Introduction The principle of the Ladder diagram is based on an electrical description of the process or machine. Inputs All inputs. and one above the other and linked by a vertical bar for an <OR>). The selection of different types of outputs is accessible in the LD Toolbar. All analog comparison functions and/or digital inputs on the same program line will represent true or false. Programs 10. they can be the image or the opposite of the result of the tested input conditions (OUTPUT relay and NEGATIVE relay). using relay logic. figure 18 TWinSoft: 8. The result defines the actions of the output (will or will not be performed). The mnemonic is a LABEL that appears in black text. at the end or between two existing lines. the current value is displayed in the bottom left corner of the screen. a green overlay on the function is used. The Ladder diagram appears in red lines with the Tags associated at each input contact. the jump’s mnemonic appears at the right side of a double arrow. The 'MAIN' tab is the main program. which allows inserting a new line anywhere in the Ladder. The cycle time is displayed when doing a A Identification from the main Toolbar menu 'Communication'. for digital outputs. If this occurs. When a jump (JUMP) is programmed. The cycle can never be greater than 1 second. A call to another program appears in a red block with one IN/OUT line. click in the Project Workspace on the 'Programs' folder. one page at a time. Display mode To access the Ladder in Display mode. at the beginning. 10. etc are executed while they are scanned (read). It is in this mode that you can see the state or the value of variables in real time. contacts.tbox' that you find in the 'Samples' directory of TWinSoft.Cycle time Ladder Logic is executed on a fixed basis.Modes Introduction The Ladder programming operates in two different modes. which allows you to see the entire program. the result represents the last level attained).32 – Getting Started 25 . Lines are scanned from left to right and from top to bottom. output relay or IN/OUT of functions. the green overlay represents the status of the associated Tag. The first is display mode. When bottom is reached. 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. an internal watchdog timer resets the A automatically. The Comment lines appear as gray blocks. The second mode is edit mode. if the result of an analog comparison is true. the other POUs having to be called from the ‘MAIN’. To see an example. Similarly. When moving the cursor on analog Tags in Functions or Math blocks. Ladder .2. load the TWinSoft document 'Ladder. The white tab underneath indicates the active program. For digital gates the display indicates <On> or <Off> according to the current value. that is automatically executed by A. it starts again from top. math calculations. This mode also allows modifying an existing line. The last Ladder that was opened is displayed. functions. relays. TWinSoft: 8. Moreover. To insert a line. the line must be compiled to proceed with the next one: To save and compile a line. To quit editing and discard changes. you return to display mode. To select any item (line. If an error occurs. TWinSoft: 8. When a line is selected. 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. Once selected it can be edited by a double click to replace Tags. a dialog box informs you on the error. Inserting a new line between 2 existing lines To insert a line between 2 existing lines.Edit mode The Edit mode is used when inserting a new line or modifying an existing line. If you were editing an existing line. You can also erase the selected item by pressing the key <Delete> or insert a new contact. Modifying an existing line To modify an existing line. Using the keyboard UP and DOWN arrows moves the selected line. The arrow icon of the LD Toolbar is automatically selected. Then double-click it. place the cursor at the end of the last line and click the icon corresponding to the type of line you wish to insert. When editing is finished. place the cursor on the line you wish to modify. use the LD Toolbar. Then click the icon corresponding to the type of line you wish to insert. place the cursor on the existing line that the new line will correspond to. contact. you stay in edit mode. relays or Functions) of a Ladder line. 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). The line you placed the cursor on will be moved downwards. The new line will move the existing line to next position after it is inserted. 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.32 – Getting Started 26 . If you were inserting a new line. it is surrounded. The key <+> can also be used to save and compile a line. The key <ESC> can also be used. TWinSoft: 8. Ladder .Toolbar The LD Toolbar is the panel of tools necessary to edit Ladder.32 – Getting Started 27 . according to the current mode of Ladder: Different icons are active Display mode Clicking one of the following icons lets you enter in the edit mode: To insert a line of Ladder. To insert a Label that will be called by a JUMP.3. To insert a line of Comment.10. see above in the list of icons of 'Display mode'). The condition will be true only once when the input passes from an inactive level to an active level. To insert a Positive input trigger for digital input. In this block. Output is set and memorized if the result of the input condition(s) are true. contact. If an error occurs. To Save and Compile a line. Output is activated if the results of the input condition(s) are false. You can also erase the selected item by pressing the key <Delete> or insert a new contact. Once selected it can be edited by a double click to replace Tags. See chapter 10. this type of output is typically used with a 'trigger' input To draw continuous horizontal or vertical lines. 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.7 for a list of available functions. To insert an Invert input contact for digital input. To insert a Digital output inverted. relays or Functions) of a Ladder line.32 – Getting Started 28 .Edit mode To Select any item (line. relay or Function by selecting the proper icon in the LD Toolbar. 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. Output is activated if the results of the input condition(s) are true. a dialog box informs you of the error. this type of output is typically used with a 'trigger' input To insert a Digital output reset. The key <ESC> can also be used. It is called a rung. The key <+ >can also be used to save and compile a line. The condition will be true if the input is active. Output is reset and memorized if the result of the input condition(s) are true. To insert a Normal input contact for digital input. To insert a Digital output normal. The condition will be true if the input is inactive. To insert a Function or Function Block. TWinSoft: 8. To Quit editing and discard changes. 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. Initiates a Jump to the line whose label corresponds to the one that is entered here (to enter a label. To insert a Digital output set. mathematical functions can be inserted by clicking on 'New Math Function' . DSPE. According to the use we make of the variables in Ladder programming. but only when it is declared.4. When compiling the TWinSoft document a free register (DIR. we consider it as a Tag. Global Tag-Names can be used in POU Program and in POU Function Block (see next). and ASPE. AIR. STO. Any variable is available. 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. They appear in the list of Local Tags. Blue: Local Tag. above the Ladder diagram of the POU (see next). The colors of the Tags The color used to display the Tag in Ladder programming informs you of its type: Black: Global Tag.. AIR or STO) is assigned to it according to the registers that are already used. Global Tags A Global Tag can be of two types: A specific register (DIR.32 – Getting Started 29 .. Variables Introduction Variables can be physical I/O or internal registers: Analog registers (AIR.) Digital registers (DIR.. Brown: Special register (analog or digital) it is always considered as Global Tag TWinSoft: 8.10..) that you wish to use. Local Tags are only used in the POU where they have been created.). and SPE. A physical I/O of the CPU created in the List of Tags... TWinSoft: 8.5. The grid shows you the places where you can place contacts. 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). The lines as a whole represent your local automation. Every contact. Create Ladder Diagram Introduction Creating Ladder diagram consists of 'drawing' program lines with input contacts or functions and output relays or functions placed between 2 vertical Power Rails. Be careful when using an output at different places of the Ladder. select the proper icon in the Toolbar. figure 19 According to the item you wish to use. To help you. The Ladder is executed from left to right and from top to bottom. a rectangle appears with a line number. functions and relay is treated when it is read. relays and functions. unless you do SET and RESET. check the Cross reference of the Tags. In the LD Toolbar click .32 – Getting Started 30 . In the window of Ladder programming.10.to insert a new Ladder Line. The two rails can be considered as electrical wires between which items are placed. Brown: Special register (analog or digital) it is always considered as Global Tag The Keys <+> To compile a line. 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. You type its name and press <ENTER> to create it.When a line is selected: to quit edit mode. According to the field you are in. The colors of the Tags The color used to display the Tag in Ladder programming informs you of its type: Black: Global Tag. Digital or Analog Tags for Functions. it is not possible to select the number of a register in the list of registers. '???' will be inserted instead. You have to work with Tags. . To enter a Tag afterwards. The Tag exists The Tag does not exist .When an item is selected: to release the item and return to selection mode (arrow). Local Tag and Special registers (see previous chapter ‘Variables’). Blue: Local Tag. You have the choice between Global Tag. so you can type it in capital or small letters. A Tag (local or global) can be created while inserting an item. you must declare the variable(s) associated to it: Digital Tag for a contact and a relay. double click '??? ' <DEL> To delete the selected item. TWinSoft: 8.You don’t know the name of the Tag: you click the button to open the list of Tags.You know the name of the Tag: you type its name. TWinSoft is not case sensitive. Use also the icon . .32 – Getting Started 31 .Inserting items When inserting an item. you can select a Tag or type a constant. There are two possibilities to select a Tag: .When Tag box is opened: to carry on without specifying a Tag. The Tag can be either Local Tag or Global Tag (see previous chapter ‘Variables’). Use also the icon <ESC> . Step by step creating of Ladder We assume that Tags already exist and that we work with global Tags.is at 1 and activates the output MAINTENANCE. When 6000 minutes are reached. The PUMP can also be started manually. digital state of the timer (DTI. the timer . When it reaches the value 150. digital input. At the same time.10) digital output. TWinSoft: 8. We will create the following lines: figure 20 We use the following Tags (see chapter 8 ‘Creating Tags’): LEVEL MANUAL PUMP TIMER MAINTENANCE RESET analog input. we start an INTEGRAL timer that memorizes the number of minutes the pump has been working.10. digital output.32 – Getting Started 32 . we start the PUMP to remove water. digital input.6.status TIMER . Suppose we are controlling a Reservoir LEVEL. In the program ‘MAIN’. The edit block is ready to create the second line. click the icon click ‘OK’. A horizontal line is automatically drawn to the right rail. figure 21 4. Enter the Tag name LEVEL or select it from the list of Tags and then enter the constant 150. Type you text and 2nd line of Ladder: 2. Enter the Tag name PUMP or select it from the list of Tags. TWinSoft: 8. Click the icon to insert the function A>B then click close to the left Rail.32 – Getting Started 33 . Click the icon to insert an output relay. and draw a horizontal and vertical line to join the output of the comparison 8. Click the icon to insert a new line. to insert a digital contact. Click the icon Function. 3. 5. to insert a line of comment.1st line of Ladder: 1. 7. 9. The grid shows the position where you can place the items. Click the icon the left rail. then click on the output of the comparison Function. then click the comparison Function and close to 6. Enter the Tag name MANUAL or select it from the list of Tags. Enter the Tag name RESET or select it from the list of Tags. Click the icon to insert a SET output relay. 21. Enter an ID number (between 0 and 255). or click the icon ready to create the third line. in our example: 10.. Click the icon to insert the reset timer Function. or click the icon ready to create the fourth line. Click the icon to insert a Positive edge trigger contact. 16. 13. then click close to the left side of the contact TIMER. A horizontal line is automatically drawn to the right rails. then click close to the left rail. Doing this. the ID of the timer to reset (in our example: 10). Enter 10. in our example 6000. Press the key <+>. Enter the Tag name MAINTENANCE or select it from the list of Tags. figure 22 11. Press the key <+>. Click the icon to insert the timer Integral with a basis time in minutes (TI_min) then click under the relay PUMP. then click close to the left rail. then the preset (number of minutes). 15. then click close to the contact RESET. 12. TWinSoft: 8.10. the edition block is 3rd line of Ladder: 14. Doing this. Enter the Tag name TIMER. Click the icon to insert a Positive edge trigger contact. to compile the line. 22. the edition block is 4th line of Ladder: 19. 18. 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. to compile the line. 17.32 – Getting Started 34 . 20. 26. Press <ESC> to come back in Display mode. or click the icon ready to create the next line. 28. Press the key <+>. to compile the line. A horizontal line is automatically drawn to the right rail. Click the icon and draw a horizontal and vertical line to join the input contact to the output relay MAINTENANCE. 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. 27.23. the edition block is 29. Doing this.32 – Getting Started 35 . 24. Enter the Tag name MAINTENANCE or select it from the list of Tags. Click the icon to insert a MAINTENANCE output relay then click under the reset timer Function. TWinSoft: 8. and draw a horizontal between the RESET contact and the reset timer 25. Click the icon Function. etc. in the edit mode of Ladder Programming. BCD.Tot1. and press the key 'Insert' of keyboard. . • Arithmetic operations. even if it appears 'Signed'. click the icon Toolbar. and indirect addressing. an analog variable of the pointer is considered as 'Unsigned'.7. • Boolean operations. even if they have been defined as 'Unsigned' Tags. If used in 'Indirect addressing' functions. • Text and miscellaneous functions. .A. Assignments A = B 'A' contains a copy of the value of 'B' A = -B 'A' contains the invert value of 'B' A = Low(B) 'A' contains a copy of the 8 lowest bits of 'B' A = High(B) 'A' contains a copy of the 8 highest bits of 'B' A = Abs (B) 'A' contains a copy of the absolute value of 'B' A = Swap(B) 'A' contains the inversion of the 8 highest bits and the 8 lowest bits of 'B' inc (A) increase the value of Tag 'A' by 1 bit dec (A) decrease the value of Tag 'A' by 1 bit TWinSoft: 8. multiplication. indirect addressing.32 – Getting Started 36 . In other words.Flt: Floating point The equality operations are always executed from the right to the left. • Conversion (PID. Bit: Digital Tag. and D: Analog Tags. division. . 16 bit analog numbers on are always worked out as signed values in TBox. • Comparisons. .. Tot2: Analog double word. place the cursor at the position you want to insert the function. In the functions. of the LD Introduction There are 8 categories of mathematical functions available (to use in math blocks): • Assignment functions. to insert a 'Math function' between 2 functions in a Math block. B. To insert a Math block.BOOL. the Arguments to replace by Tags (or constant) are represented as follows: .Ptr: Pointer in indirect addressing. bit manipulation. C. Mathematical Block A mathematical Block allows to carry out analog output operations like addition.). In edit mode. • Floating point. analog Tag. subtraction. • Bit manipulations..10. we have: result = operation or: output = input (means the value of Input variable is copied in the Output variable). 20mA of 'B'.C 'A' is the subtraction of 'B' and 'C' A = B * C 'A' is the multiplication of 'B' and 'C' A = B / C 'A' is the division of 'B' and 'C' A = B AND C 'A' is the result of the logical AND between 'B' and 'C' Example: 0001000011111111 AND 0001100000001111 0001000000001111 A = B OR C 'A' is the result of the logical OR between 'B' and 'C' Example: 0000000011111111 OR 1111000000001111 1111000011111111 A = B XOR C 'A' is the result of the logical XOR between 'B' and 'C' Example: 0000000011111111 XOR 1111000000001111 1111000011110000 A = B MOD C 'A' contains the rest after the division of 'B' and ‘C’. otherwise it is FALSE BOOL = B <= C 'BOOL' is TRUE if 'B' is smaller than or equal to 'C'. otherwise it is FALSE BOOL = B >= C 'BOOL' is TRUE if 'B' is greater than or equal to 'C'. otherwise it is FALSE BOOL = B < C 'BOOL' is TRUE if 'B' is smaller than 'C'. otherwise it is FALSE A= conv 0/20 4/20 (B) 'A' is the conversion from 0. otherwise it is FALSE BOOL = B <> C 'BOOL' is TRUE if 'B' and 'C' are different..20mA to 4. Example: 2 = 17 MOD 3 Comparisons BOOL = B == C 'BOOL' is TRUE if 'B' equal 'C'. otherwise it is FALSE BOOL = B > C 'BOOL' is TRUE if 'B' is greater than 'C'.Arithmetic operations A = B + C 'A' is the addition of 'B' and 'C' A = B .. It is a scaling in order to start binary counting at 4 mA instead of 0 mA TWinSoft: 8.32 – Getting Started 37 . otherwise it is FALSE BOOL = odd B 'BOOL' is TRUE if the value of 'B' is odd. 15) of the word 'B' (with wraparound). starting with ' 0 ' for Lsb. Example: A: 1100101000010010 BitNb: 5 Bit: 0 A = shl(B. starting with ' 0 ' for Lsb.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. A = ror byte(B. 15) of the word 'B' (without wraparound).BitNb) = Bit The status of digital 'Bit' will be copied in the analog 'A' at the position indicated by 'BitNb'.shift) 'A' has the number of Bits indicated by 'shift' shift to the right (max. bit (A. Example: B: 0000000011111111 Shift: 4 A: 0000111111110000 A = ror word(B. 7) of the byte 'B' (with wraparound). Example: B: 0000000011111111 Shift: 4 A: 0000111111110000 A = shr(B.shift) 'A' has the number of Bits indicated by 'shift' shift to the left (max. A = rol word(B. Example: B: 0000000011111111 Shift: 4 A: 1111000000001111 TWinSoft: 8. Example: B: 0000000011111111 Shift: 4 A: 0000000000001111 A = rol byte(B. 15) of the word 'B' (without wraparound). 15) of the word 'B' (with wraparound).32 – Getting Started 38 .shift) 'A' has the number of Bits indicated by 'shift' shift to the right (max. 7) of the byte 'B' (with wraparound). Example: Bit: 1 BitNb: 3 A: 0011010011001001 Bit = bit( A.BitNb) The status of the bit of the analog 'A' indicated by 'BitNb' will be copied in the digital 'Bit'.shift) 'A' has the number of Bits indicated by 'shift' shift to the left (max.shift) 'A' has the number of Bits indicated by 'shift' shift to the right (max.shift) 'A' has the number of Bits indicated by 'shift' shift to the left (max. Bit = indirect (Ptr) the Tag or Constant 'Ptr' contains the absolute ModBus address of the digital variable that will have its status assigned to the digital Tag 'Bit'. because there is not 16 successive addresses. put A in ana chrono Writing of the analog Tag 'A' in the Analog Chronology. 'B' must be less than 10000 to prevent an overflow condition. Conversion + Indirect addressing A = bcd(B) transforms the word 'B' to a BCD format and transfers the result to the word 'A'. first copy the 8 inputs in successive registers that have 8 free registers after those used for the copy of the inputs 16 x (Bit) = A places the 16 bits of the word 'A' in the 16 digital variables of successive addresses. but 8. If it is needed. A = 16 x (Bit) places the 16 digital variables of successive addresses. Example: to SET or RESET 16 DO of an extension card using an analog variable. TWinSoft: 8. starting with the digital Tag 'Bit' in the word' A'. Example: to read the status of the output 'Q0' of the CPU (ModBus address 32): dir0 = indirect (32).32 – Getting Started 39 . starting with the digital Tag 'Bit'. Example: to copy 16 digital inputs of an extension card in a word. This function cannot be used with the 8 digital inputs of the CPU.Boolean operations Bit = not(Bit) the inverse of the digital Tag of the right is assigned to the digital Tag of the left Bit = bit AND Bit the result of the logical AND between the two digital Tags of the right is assigned to the digital Tag of the left Bit = Bit OR Bit the result of the logical OR between the two digital Tags of the right is assigned to the digital Tag of the left Bit = Bit XOR Bit the result of the logical XOR between the two digital Tags of the right is assigned to the digital Tag of the left A = B * C / D (Unsigned) 'A' is the result of the 32 bits multiplication of Words 'B' and 'C' then divided by 'D' A = B * C / D (Signed) A' is the result of the 32 bits multiplication of Integers 'B' and 'C' then divided by 'D' put Bit in dig chrono Writing of the digital Tag 'Bit' in the Digital Chronology. Indirect (Ptr) = Bit 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'. Channel 0 (ModBus address 288): Indirect (288) = ana0.32 – Getting Started 40 . Example: to write the status of dir0 in the output 'Q2' of the CPU (ModBus address 34): Indirect (34): dir0. Example: to write the value of ana0 of the CPU in the analog output: Rack 1. 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'. Card 1. TWinSoft: 8. 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). It is therefore only necessary to enter the first of these registers in the mathematical function. The PID can also be stopped or single stepped. index number of the AIR associated to the 'Set-point'. integral coefficient. between -2047 and 2047. and derivative are stored in internal registers allows dynamic modification following some conditional changes specified in the Ladder diagram. Tag associated to the input of PID function. integral. The global result has the same range limits. but this number can be limited due to the size of the memory A and the availability of analog registers. AIR. 'Input' = x: input value.PID regulation Function available in the group ‘Conversion + Indirect addressing’ Out = PID(Input. derivative coefficient. Values and coefficients are placed in variables and registers: 'Output' = y: output value. The fact that the proportional coefficients. value of the measurement. An example is available on web site: www. proportional coefficient.0001 'AIR+ 2'=10 TD=100 'AIR+ 3'=800 'AIR'. For example: R=20 'AIR+ 1'=640 TI=0.32 – Getting Started 41 . between 0 and 2047.tbox. between -2047 and 2047. the intermediate results of each group (proportional group. 2.+2047. 'AIR+ 1' = R x 32: proportional coefficient.) Out: Input: AIR: Tag associated to the output of PID function.. between 0 and 2047. 'AIR+ 3' represent 4 analog internal registers of successive addresses. between 0 and 2047. The PID is calculated every cycle for as long as the condition that precedes the mathematical block in the Ladder diagram is true. NOTES: 1. PIDs require knowledge of this type of regulation. It is therefore necessary to link the PID calculation to a timer to obtain a time cycle different from that of the Ladder diagram. A PID in a mathematical formula occupies 5 supplementary bytes for calculation. A PID is computed in less than one millisecond. 'AIR' = w: set point value. between -2047 and 2047. 'AIR+ 2' = 1 / (1024 x TI): integral coefficient. 'AIR+ 3' = TD x 8: derivative coefficient. Those 3 last calculations must be implemented in the Ladder diagram. Calculations have 24-bit precision. 'AIR+ 1'. TWinSoft: 8. value of set point.biz -> Support -> Examples Application of the PID to the TBox The maximum number of PIDs per TBox is 64. integral group and derivative group) are limited to the range -2047. 'AIR+ 2'.. This function performs a PID regulation according to the formula: y = R * (x-w) + 1/TI where: y: x: w: R: TI: TD: (x-w) + TD * d(x-w) / dt value of output. supplementary mathematical functions. for instance a LF or a CR. A) increments the totalizer 'Tot' with the value contained in the analog Tag 'A' Tot1 = Tot2 copy of the value of totalizer 'Tot2' in the Totalizer 'Tot1' NOTE: With Totalizer registers.32 – Getting Started 42 . can be executed using the 'C' driver Fcthmath2. The Latter must be specified with a mathematical function 'Select Port # Port' (see next function). before calling this function. It allows to use 'A' as an input and/or an output. You must. Clear Totalizer (Tot) sets to 0 the totalizer 'Tot'. write in the Special Analog register <Drvld> the unique ID number of the driver.biz -> Support -> Drivers TWinSoft: 8. The available ports are: 1: COM1 2: COM2 3: 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.insert a control character into the string. Inc Totalizer (Tot. Maximum: 30 characters It is possible to . See the web site: www.Miscellaneous Send Text: Text Sending of the text indicated in the field 'Text' to a communication port. like arithmetic operation and comparison. The text is sent in ASCII protocol.tbox. ^M = CR ^J = LF Select Port # Port Call Driver With (A) Selection of a communication port for sending text (see previous function). Flt = IntToFloat (A) * 10 E Const) conversion from the Integer 'A' to the Float 'Flt'. The exponent must be a constant:'Const'. Flt A = Flt B .32 – Getting Started 43 .Flt C Float 'A' is the subtraction of Float 'B' and Float 'C'. The exponent must be a constant:'Const'. Flt A = Flt B * Flt C Float 'A' is the multiplication of Float 'B' and Float 'C'.Floating point functions A = FloatToInt (Flt * 10 E Const) conversion from the Float 'Flt' to the Integer 'A' . Flt A = Flt B / Flt C Float 'A' is the division of Float 'B' and Float 'C'. with a possible scaling from 10E-4 to 10E+4. Flt A = Flt B + Flt C Float 'A' is the addition of Float 'B' and Float 'C'. TWinSoft: 8. with a possible scaling from 10E-4 to 10E+4. No equivalence Functions. math.10. POU function: standard functions (comparison. we have kept mathematical functions in order to execute analog operations.32 – Getting Started 44 ..) For users accustomed to work with TSoft (the DOS editor). regulating temperature. all of which use the same Ladder programming tools: List of POU Equivalence in TSoft (DOS Editor) POU program: sub-program that is called in the ‘Main’ Modules program or any other POU program. timers...8.. POU (Program Organization Units) IEC1131-3 Ladder programming is organized not only with contacts and relays. POU function block: user defined small 'applet' that Macros performs a function (start of a pump. but also with different POUs and functions.) or user defined functions.. TWinSoft: 8. Three types of POU are available. The 'main'.32 – Getting Started 45 . TWinSoft: 8. click the 'Programs' folder in the Project Workspace. Click OK. The POU program 'main' is the main Ladder program..10. In practice. When starting TWinSoft the first time. and can be called from anywhere in the ‘Main’ program or any other POU program. type a Name (accents and space are not supported) and check 'Program'.. These sub-programs contained within a Ladder diagram precisely define an action such as. You have created a POU Program and it appears in the 'Programs' folder. start pump.etc. they can be tested individually and allow you to make things easier for changing. It is the default POU program when starting a new TWinSoft document.9. If you use POU Programs that call other POU Programs. POU – Program Introduction POU programs allow you to structure your Ladder program into several sub-programs. which calls sub-programs. A POU program can call another POU Program that can call another POU Program etc. figure 23 Double click 'Add a POU'. the only one is the 'main'. intrusion control. This program must be unique and called ‘main’. They give you a clearer view of the whole automation program. alarms management. you have a main Ladder program.. In the right window appears the list of existing POUs (all types of POU). be careful to avoid loops: like Program 1 calling Program 2 calling Program 3 that calls Program 1.. Creating a POU Program To create a POU Program. to be used to call other POU programs (sub-programs). 32 – Getting Started 46 . Calling a POU Program is like calling a sub-routine. otherwise it can be connected to an input condition. it will be executed at each cycle of the Ladder. It is usually connected to the right rail but can be also connected to a contact or a relay. click the icon in the LD Toolbar. 'This File' select the POU Program you wish to insert. TWinSoft: 8. ENO is TRUE. The program associated to it is executed at the position where it is called.ENO: Enable Output: it is the image of EN. figure 24 Now you can create a Ladder Diagram for the Program you have defined. a Mathematical block or a Function. . Calling a POU Program in another Program To call a POU Program. All POU Programs have the following parameters: .When you double click the name of the Program in the list. In the folder. If it is connected directly to the left rail. the window for Ladder programming appears with a new Tab for the current Program. If EN is TRUE.EN: Enable Input: Connection to the Ladder line. EN must be TRUE to run the Program. You will not find this formula in the Standard Functions or in the Mathematical Function block. The Function executes the scaling of an 8-bit analog input. When starting TWinSoft the first time. LONG: analog output 16 bits signed. Click OK. click the 'Programs' folder in the Project Workspace. the same code is always executed. You use it in POU Programs every time you need to execute the calculation. WORD: analog output 16 bits unsigned. In the right window appears the list of existing POUs (all types of POU). LONG or FLOAT.10. When a Function is used many times in a POU Program. According to the type of the output. Example: You need regularly to execute the calculation: y= [(a+b) * (c+d)] /2. Creating a POU Function To create a POU Function.10. You will then create your own Function that will execute your calculation every time you call it. An example of user defined Function is available in the TWinSoft document ‘Ladder. FLOAT: floating point output. Select the type of the output (result of the calculation): BOOL . type a Name (accents and space are not supported) and check 'Function'. You have created a POU Function and it appears in the 'Programs' folder. It is useful when a calculation you regularly need to execute does not exist in the list of Standard Functions. POU – Function Introduction A POU Function is a user-defined piece of Ladder that executes a calculation ending in one result. figure 25 Double click 'Add a POU'. there are 4 types of Functions: BOOL: digital output. WORD. in the 'Samples' directory of TWinSoft.32 – Getting Started 47 . TWinSoft: 8. It has one or many inputs and only one output.tbox’. the only one is the 'main' POU Program. TWinSoft: 8. the window for Ladder programming appears with a new Tab for the current Function.32 – Getting Started 48 . using the Library manager menu.When you double click the name of the Function in the list. You can rename the output by using the context menu on its name (mouse right clicking on the name). Now you can create Ladder Diagram for the Program you have defined. figure 26 By default. POU Functions can be exported in a Library to be used in other TWinSoft documents. the name of the Output is the name of the Function. figure 26A The Tags : Inputs and the Output of a Function are the arguments to be replaced when calling the Function. The Ladder : A math block using 3 functions is used. TWinSoft: 8. Delta. involves that one can define only local Tags in a POU Function. tmp0: local analog Tags used as temporary variables necessary to calculate the scaling.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. MIN. Scaled: the output of the Function. The way a POU Function works. It is unique and is the result of the calculation.MAX: are the Inputs of the Function.32 – Getting Started 49 . IN. if the Function is Digital: ENO and the Output of the Function are linked inside the Function. All inputs are at the left side of the Function Block. If it is connected directly to the left rail. a Mathematical block or another Function. ENO is TRUE. If the Function owns to a Library. If EN is TRUE. .Calling a POU Function in a POU Program To call a Function. you must assign to the (unique) Output a Tag and for each Input a Tag or constant. EN must be TRUE to perform the Function. It is usually connected to the right rail but can be also connected to a contact or a relay. It must then be connected to contact or a relay. In this example. it will execute at each cycle of the Ladder. figure 26B When calling the Function in a POU Program. the latter appears as a Folder. The folder. It is TRUE if the result of the calculation AND EN are TRUE. 'This File' contains Functions and Function Blocks created in the current document. a Mathematical block or another Function.ENO: Enable Output: if the Function is Analog: it is the image of EN. Select the Function you wish to insert.32 – Getting Started 50 . otherwise it can be connected to an input condition. All Functions have the following parameters: . The result is copied into the Internal Analog register 'AIR0'.EN: Enable Input: Connection to the Ladder line. we wish to have an 8-bit analog input 'ANA0' scaled between MIN '0' and MAX '1000'. the output at the right side. TWinSoft: 8. click the icon in the LD Toolbar. A POU Function Block has new Tags (local and global) assigned every time it is called in a POU Program. We advise you against using POU Functions in a POU Function Block.. Click OK.10.32 – Getting Started 51 . When starting TWinSoft the first time. You have created a POU Function Block and it appears in the 'Programs' folder. If this function is repetitive in your program & you don't wish to define it every time you need it. a POU Function exists only once and always has the same variables that are used when inserting the POU Function. with Input and Output arguments and it is then a POU Function Block. figure 27 Double click 'Add a POU'.. the only one is the 'main' POU Program. In the right window appears the list of existing POUs (all types of POU). click the 'Programs' folder in the Project Workspace. type a Name (accents and space are not supported) and check 'Function Block'. Creating a POU Function Block To create a POU Function Block. POU .Function block Introduction POU function Blocks are user defined small 'applets' that performs a function (start of a pump. then you create it once. In fact. You use it in POU Programs every time you need to execute the function and you assign Tags of the POU Program to it.). regulating temperature. TWinSoft: 8.11. Now you can create Ladder Diagram for the Program you have defined.32 – Getting Started 52 . figure 28 POU Function Blocks can be exported in a Library to be used in other TWinSoft documents. TWinSoft: 8.When you double click the name of the Function Block in the list. using the Library manager menu. the window for Ladder programming appears with a new Tab for the current Function Block. DELAY is an analog input containing the number of seconds of the delay. preset is a Local analog Tag of the type 'Timer Preset'. timer is a Local digital Tag of the type 'Timer Status'. here 0). (Note: when working with an external Preset (the local variable 'preset'). A negative edge on INPUT resets the OUTPUT. for instance when calling the Function Block. It must be associated to the timer used in the Function Block. it starts the timer Single Shot with a base time in seconds (SS_sec). OUTPUT is a digital output. TWinSoft: 8.32 – Getting Started 53 . When INPUT changes to 1. It will be connected to a motor. the output is set to 1. INPUT is a digital input that will start the OUTPUT after the DELAY. The Ladder : The DELAY is copied in the preset of the timer. figure 28A The Tags: Inputs and Outputs of a Function Block are the arguments to be replaced when calling the Function Block. When the timer has finished counting AND the INPUT is still active.Example of a Function Block The following Function Block performs the start of a digital output with a programmable delay. the Preset of the timer can be set to any value. . Each call of Function Block is unique and different from each other. If the Function Block owns to a Library. It makes development easier but it increases the code size. you are asked to enter an 'FB Instance name'. ENO is TRUE. Execute compilation regularly to test A memory. This name allows TWinSoft to distinguish between Function Blocks. will be assigned to free registers. when multiple calls of similar Function Blocks are defined. figure 28 B When Calling the Function Block in a POU Program. Select the Function Block you wish to insert. It is usually connected to the right rail but can be also connected to a contact or a relay.32 – Getting Started 54 . all outputs at the right side. otherwise it can be connected to an input condition. All inputs are at the left side of the Function Block. local Tags of the Function Block as well as timer ID and counter ID.EN: Enable Input: Connection to the Ladder line. The folder. 'This File' contains Function Blocks and Functions created in the current document. the input ‘D0’ activate the output ‘Q2’ with a delay of 5 seconds. If EN is TRUE. TWinSoft: 8.Calling a POU Function Block in a POU Program To call a Function Block. its code is inserted every time it is called. the FB is called ‘Motor1’. it will execute at each cycle of the Ladder. All Function Blocks have the following parameters: .ENO: Enable Output: it is the image of EN. Afterwards you must assign to the Output(s) and Input(s) Tags or constant. a Mathematical block or another Function. click the icon on the LD Toolbar. timers and counters when compiling. A maximum of 16 timers and counters can be used in a POU function. When a Function Block is called many times in POU Program. the latter appears as a Folder. EN must be TRUE to perform the Function Block. If it is connected directly to the left rail. In this example. If TWinSoft is opened after the document has been sent. because TWinSoft needs to know which instance concerned is.Debugging of a Function block As explained above. the column 'Value' displays values of each local Tag. TWinSoft: 8. The document must have been sent to TBox.32 – Getting Started 55 . In order to debug a function block. To debug the FB. In the list of POU Tags. to allow TWinSoft assigning registers to the local Tags. while in 'Vizualization mode'.with the last changes 2. double click the call of the FB from the POU program it is used: The source code (Ladder) of the FB is then opened and dynamized according to its instance. it is not sufficient to enter the code of the FB. the document must be compiled. 3. the same piece of Ladder of the POU FB can be called several times (several instances). The complete path from the Program 'main' must be followed to access the FB. to check values and status of the local Tags. Example: 'Main' -> 'Motors' -> FB 'Motor1'. IMPORTANT: 1. to see the internal code. 2. click 'Tools' on the main menu bar and select 'Library manager' figure 29 Only POU Functions and Function Blocks can be saved in a library.LIB saved by default in the directory of TWinSoft. You open the list of available POUs of the current document ('Edit' ->'Import POU.. Libraries can be protected by a password.1. You select an existing library ('File' -> 'Open'). You select the POUs you wish to save in the Library. 3.'). POU programs cannot be saved in a Library. It corresponds for instance to a customer or to a category of functions. Library management TWinSoft offers the possibility to save POU Functions and POU Function Blocks in external files called ‘Libraries’ in order to use those POU in other TWinSoft documents. TWinSoft: 8. 1. 4. so that it is impossible to ‘Export’ it into a TWinSoft document. 11. You save the Library ('File' -> 'Save'). or you create a new library ('File' -> 'New'). you repeat operations 2 and 3 for each POU. Import of POUs (saving POUs in a Library) To access the Import menu..11. A library can contain several POUs.32 – Getting Started 56 . It is a file with the extension . all its POU Functions. 11. To add a Library to the current TWinSoft document. When a library appears in the list. and POU Function Blocks are available to be used in Ladder programming: in the list of Functions. 1. select the Library and click 'Remove'. 2. This operation is available only if you don’t use POU of the concerned library in the current document. in the Project Workspace. the Libraries appear as Folders. You open a library ('File' -> 'Open')..3. click 'Tools' on the main menu bar and select 'Library manager' (see import of POUs here above) Export is necessary if you wish to edit a POU in the current document that has been saved in a Library.2.' figure 30 The ‘Available Libraries’ are the Libraries present in the directory of the current TWinSoft document or in the directory of TWinSoft. the POUs appear in the top window. select it from the list of ‘Available Libraries’ and click 'Add'. Export of POUs (retrieval of POUs from a library) To access the Export menu. You select the POU and export it ('Edit' -> 'Export'). Use of a Library in a TWinSoft document To access the 'Libraries' menu. TWinSoft: 8.. you repeat this operation for each POU. The button 'Manager' jumps to the creation of Library menu. To remove a Library from the current TWinSoft document. click 'File' on the main menu bar and select 'Libraries. each containing their own POUs.32 – Getting Started 57 . The POUs are then available in the list of 'Programs'. 3.11. .. to print events. If the alarm is time stamped.g. Alarms can be sent to different recipients depending on the day or hour (this is called time slice management). TWinSoft: 8. through the different communication ports. With the alarm module.) and the communication port it uses. 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. if an alarm requires the internal modem. 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 order in which these alarms will be processed will not necessarily be the order of their arrival. it will need to wait until the modem is available before it can be transmitted. the latter can then monitor the A. Introduction Alarm module of A is the gate to the outside world. this data accompanies the alarm message. Recipients can be linked or chained. 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). pager etc. 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. to call a SCADA. or even a complete report of activity.12. you are able to send messages to pagers. or on a combination of conditions defined in the Ladder diagram. every day at midnight. For example. Alarms can be sent to a printer (local or remote) in order to print current events. Via alarms.32 – Getting Started 58 . For example. your process is 'under control' ! The initiation of alarms in the A relies on the variation of digital or analog Tags. with adjustable hysteresis. Each new alarm is immediately entered into a 48-alarm queue (maximum) and processed according to its type (printer. Alarms 12...1. e. By the Ladder diagram: a complex Ladder sequence generates an alarm through a specific function. • The filter (the time in minutes and seconds. This feature is handled by a ‘C’ driver (see RTU Properties → ‘Modules’).12.10. alarms of type ‘e-mail’ and ‘Pager/SMS’.2. Digital Tag Condition To access the definition of Conditions. figure 31 • The Tag. may be configured to be acknowledged from a SMS sent to A. This type of acknowledgment is only possible with a A equipped with a GSM data modem ! TWinSoft: 8. supervisor.…see below). • The type on which the alarm is going to be started (rising. before the alarm is started. • SMS acknowledgment : from TWinSoft 7. pager. falling or both). 256 digital alarm conditions can be created. click the folder 'Alarms' in the Project workspace and select 'Conditions'. e-mail. • The inhibition (the alarm will always be started or disabled according to certain conditions).32 – Getting Started 59 . • The recipient (printer. • The message or report. once the alarm condition is present). Analog Tag Condition 256 analog alarm conditions can be created.12. which means that the alarm will be activated immediately.10. supervisor. before the alarm is started. This feature is handled by a ‘C’ driver (see RTU Properties → ‘Modules’). . • 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. If an alarm must be generated for both a maximum and a minimum threshold.…see below • Message: the value of a Tag can be sent within the message (see Message below) • Filter: the time in minutes and seconds. • 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.'. alarms of type ‘e-mail’ and ‘Pager/SMS’. This type of acknowledgment is only possible with a A equipped with a GSM data modem ! For more information. set point before an alarm can be re-started • Recipient: printer. TWinSoft: 8. or Min. e-mail. figure 32 • The Tag.0 sec. pager. • Hysteresis: the amount that the value must fall or rise below or above the Max.32 – Getting Started 60 . once the alarm condition is present It is always possible to choose a FILTER equal to '0 min. the alarm is started). 2 alarms must be declared with the same Tag. may be configured to be acknowledged from a SMS sent to A. click ‘Help’.3. FTP: refreshing of a Portal (Web Site) with HTML pages. click the folder 'Alarms' in the Project workspace and select 'Recipients'. the data of the ISP account are declared in the ‘RTU Properties’ → ‘TCP/IP’). Calling of a Minitel. E-mail: sending of e-mail. with the help of any of the available communication ports (see Chapter 7 ‘RTU Properties’). Printer: sending of message(s) or report to a printer.4. printer. 64 recipients can be declared. TWinSoft: 8. According to the type of recipient. The ports available are modems and local ports. The only information needed is (are) the e-mail address(es). to different pager or GSM addresses. Minitel: for France only. local or remote ports are available: Internal: the alarm is saved in the alarm stack and not sent anywhere. SCADA. Pager/SMS: sending of a message to a pager or a GSM.12. ModBus: it can be slave or master. remote A. … Custom: sending of an alarm with the help of a custom driver.32 – Getting Started 61 . The ports available are modems ports. The ports available are modems ports. Recipients To access the definition of Recipients. The ports available are modems ports. report. 12.32 – Getting Started 62 . Examples of recipients To a GSM figure 33 To an e-mail address figure 34 TWinSoft: 8.5. a message can contain the value of a Tag. 32768) Word (0. 9.) In all cases. only valid from 1 to 15) Time: hh:mm TWinSoft: 8. If it is for a Digital Pager. Messages To access the definition of Alarm messages. é. The value sent is the value from the moment of the call...32 – Getting Started 63 . à. This message is user specific. . click the folder 'Alarms' in the Project workspace and select 'Messages'. it will not contain accent (ü. 65535) Choice (for example edges: POS. 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. If it is for a Text Pager or for a GSM. The syntax is the following: ~Xyyyyy ~ ~ : The first character indicates that what follows is the value of a ModBus address.6.Minitel Tags. 255.. f h Description Integer (-32768. a. 256 different messages can be created. figure 36 • Message number : indicates the index of message (between 1 and 255). 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... scaled value of Terminal/.12. Type a message of maximum 30 characters.. TEL number.. it will consist only of numbers. NEG or DEL) Text (comments.…) Real (only Factor an Offset of Terminal/Minitel Tags) Byte (0. 32 – Getting Started 64 . click ‘Help’. Specify the index number of the message coming next.yyyyy: represents the ModBus address of the variable. For more information. 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). to separate each printing. This feature allows you to define a number of lines to be printed followed by an empty line (the last message of the chain) . TWinSoft: 8. by mean of changes in variables. The minimum interval between two recordings is 1 second. A contains 128 Kbytes of memory for its program and for recording events. in order to visualize historical data.13. Datalogging 13. A supplement of 512 Kbytes RAM is available in A as September 2002 and running OS 5512. Up to 64 sampling tables can be created with one Tag for each table.1. The minimum period between two recordings is 1 second. (please call your distributor) TWinSoft: 8. Tag and its status or value. 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. one for analog events with a maximum of 256 Tags in each table. Two tables are available. Introduction Datalogging relies on the database in the A. date. Each event is recorded with the time.32 – Getting Started 65 . Only the date and time of the last recording are stored. There are two categories of databases: The Chronologies Chronologies are 'On event' recordings. This extended memory is only available for Sampling tables. The Sampling Tables Recording in Sampling tables happens at regular intervals and does not depend on signal variations. one for the digital events. and they therefore require less memory than do chronologies. it allows you to memorize events of your process. the latter is what we call the database of A. 2. Disabled : never recorded. • Inhibition: Enabled : always recorded. figure 37 • Edges: recording on positive and (or) negative edge. The Chronologies Example of one Digital definition in the Digital chronology table.13. click ‘Help’. Power failure : disabled if the supply voltage (230VAC or 8 down. 56VDC) is broken For more information. TWinSoft: 8.32 – Getting Started 66 . never recorded. independent of a possible scaling in the Ladder programming. Example of one Analog definition in the Analog chronology table. disabled if the Special register ‘DisCRD’ is at 1. DisCRA : disabled if the Special register ‘DisCRA’ is at 1. • Inhibition: Enabled: Disabled: Power failure: DisCRD: always recorded. figure 38 • Variation: Recording in case of variation (higher or lower) in comparison with the previous recording. disabled if the supply voltage (230VAC or 8 56VDC) is broken down. The unit is expressed according to the binary format of the analog input. the recording will be done every minute and minute 30 seconds: 9:25:00. According to the size. 10sec.3. 6h. 4h. 1h. 2sec. For more information..32 – Getting Started 67 . Average : average value calculated during the period. 12h.13. 1min. 9:26:30. the duration is updated (see next).1 ‘Sending a program’. 5min. 9:25:30. 30min. • Size: The size can be expressed on two ways: Size: the number of records of the table. 10min. 4sec. For each period a new average is calculated Instantaneous : value at the moment of the recording. 5sec. Example: if you select as period 30 seconds. This value can be: Minimum : minimum value during the period. 15sec. It can be of maximum 32768 records. Duration : you may prefer to enter a number of days and hours. 9:26:00. 2min. 2h. 4min. 15min. in this case the size is automatically updated To adjust the sizes check the available memory with the compile option (see chapter 6. click ‘Help’. 30sec. • Period: Period between 2 recordings. Maximum : maximum value during the period. The result of the calculation is written in the table according to the period.. The recording works on the FIFO principle. TWinSoft: 8. You may choose between 1sec. The recording happens at 'birthday' time of the period selected. Sampling tables figure 39 • Type: A is able to execute calculations on a minimum time-base of 1 second. Stopping the communication is then handled by the Ladder diagram using the special digital variable [HltM-x]. If A are distant to each other. The A defined as the master reads and writes the variables of all other devices using the ModBus protocol (RTU). in this case. This is a point-to-point network. Remote Tags allow to define the information to be exchanged between equipment. A can be connected to other ModBus equipment via RS232 port (COM1 or COM2). TWinSoft: 8. This can be a multi-point network. It is called 'Master Network' because it is a Master/Slave communication: the Master executes reading and writing in slave(s).1. The communication can be established via the public telephone network with another A. A or RM modules can be connected to a master in RS485 communication (via COM3 of the A). 4. Introduction The A-Master network allows the exchange of analog and digital information between two or more ModBus stations via communication ports. the A Master will wait until an alarm of the type 'ModBus -Master' is activated to start the exchange with the slave. Examples: 1.14. This can be a multi-point communication. It can be a A to A’s or any other ModBus equipment. Remote Tag 14. Any communication port can be used to establish a Master/Slave communication as long as there is only one master for each communication port. the COM5 (modem Network) is used to establish communication between a Master and Slaves. or the call can be disconnected automatically after a defined time delay (modifiable) in the field 'Auto Hang up' (located in the A Master advanced parameters).32 – Getting Started 68 . 3. 2. N 9600.2. For a block communication you specify the first address you wish to read (or write) in the Slave and the first Tag of the Master where you save the read value (or that you write in the Slave).32 – Getting Started 69 . It is advised whenever it is possible. Block communication Block communication means the reading (or writing) of multiple variables at a time. E 9600. 17 msec. It is important to keep it in mind when you determine the cabling of the I/Os. 17000 msec.N 19200. TWinSoft: 8. 245 msec. Example of differences between Block and Single communication: Number of Tags 1 Tag analog (Single) 100 Tags analog (Single) 100 Tags analog (Block) 1 Tag digital (Single) 1000 Tags digital (Single) 1000 Tags digital (Block) Speed 19200. E Time for Query/Response 8 msec. E 9600. N 19200. 158 msec. The addresses of the Slaves as well as the Tags of the Master must be successive ModBus addresses. This will speed up communication between Master and Slave(s).14. 800 msec. The table is permanently examined and transactions are carried out according to their 'Trigger' configuration (if defined). Remote Tags are Tags that you wish to write to the Slave(s). 5. TWinSoft: 8. 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. This will speed up communication between Master and Slave(s).32 – Getting Started 70 . 4. Block communication is possible and advised whenever it is possible. 2. or that contain a status or a value that you read from the Slave(s). The Slave(s) do not need specific configuration. The transactions with slaves are asynchronous in regard to Ladder cycle. only of course the configuration of the port used to communicate that must fit with the one of the Master.The variables to Read/write in the external equipment are declared using the Remote Tags definition: figure 40 Important points : 1. 3. 6. 14.3. In case of block communication (with a quantity > 1). If the Tag does not exist. this Tag is the one corresponding to the first ModBus address. ASPE ECH 16 8 1600 (multiple of 8 for quantity. The maximum are: DESCRIPTION TYPE MAXIMUM QUANTITY • Digital I/O Analog I/O Digital registers IOD. Test4ma IOB. 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’. I4M DIR. • Operation : OPERATIONS READ WRITE MASTER (Tag) SLAVE (Address) Read : the Master executes a reading in the Slave. TWinSoft selects automatically the proper ModBus function according to the operation. you can create it after having clicked the button. it contains the value you want to write in a Slave or it is a register that contains the value that Master reads in a Slave. It is the Tag of the Master. TWinSoft: 8. According to the operation. STD Analog registers (8 bits) Analog registers (16 bits) Analog registers (32 bits) Timers Counters Special registers Register 'sampling table' STB AIR. TWinSoft selects automatically the proper ModBus function according to the address. STO TOT. Description of fields • Local Tag: Select an existing Tag by clicking on the button. See next: If it is a Remote A: the choice is Analog or Digital. DTI ACP. DCN DSPE. ACV. Write : the Master executes writing in the Slave. FLT ATP.32 – Getting Started 71 . Quantity : number of variables of successive addresses that are read (or written) in the Slave. IOW. You can create one with the button Type: select the type of the external variable: Analog or Digital. If it is a RM module: the type is not available. ATV. 32: digital output 0 of the CPU 20480: digital or analog register (according to the type).r.b.. 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 4m 4m Description. 7: digital input 7 of the CPU. The address can be typed according to a standard. Test of an analog input. S: supplementary type information. r: is the rack number.S TTT: is the type of variable. Analog output 8-bit resolution. TWinSoft: 8. Digital output. 2.32 – Getting Started 72 . Output 0 20mA converted to 4 20mA. The address can be typed with its ModBus address (see the list of ModBus addresses in the ‘Help’ menu). 1. Analog input 12-bit resolution. c: is the channel number. If it is a physical I/O: TTT.Remote A. Analog input 8-bit resolution.c. Examples: 22016: seconds.If it is a ModBus Device: the types correspond to the following ModBus functions: Operations Types ModBus Functions Read Digital Digital Input 2 Read Digital Coil 1 Read Analog Analog Input 4 Read Analog Holding Register 3 Write Single Digital Coil 5 Write Single Analog Holding Register 6 Write Multiple Digital Coil 15 Write Multiple Analog Holding Register 16 Address : There are different possibilities according to the type of device: . Digital input. b: is the card number. Input 0 20mA converted to 4 20mA. 2. TWinSoft: 8. channel 4. Leading Zeros can be omitted.32 – Getting Started 73 .0.nnnn is the type of variable. Storage 16 bits register.1.5.1.2: Digital register 1000.4m: Digital input 7 of the CPU. channel 4.0. Storage digital register.4. Analog input (8 bits) 1 of the CPU.1. Timer status. Totalizer (32 bits). Storage 8 bits register. Digital Special register. card 5.5.1: AIW. Time value. card 5. Analog Special register. Digital register.7: DO. Counter preset. TTT DIR AIR STO STB STD FLT TOT ATP ATV DTI ACP ACV DCN DSPE ASPE Description. Floating point register.0. Timer preset.0. Counter value. Digital output 0 of the CPU. register number.20: DSPE.128: DTI. Digital special variable 2. Counter status.4: DI.0: AIB. Digital state of timer 20. If it is a register: TTT: nnnn: TTT. Analog input (16 bits) rack 1. Analog register. Examples: DIR. Test of the analog input rack 1.1000: AIR.Examples: DI. Analog register 128. Auto-acknowledge: this feature concerns only the registers latched and reset by writing '0' (with the switch 'SM').1..0. You must check this option for A to execute automatically the writing '0' to the RM. Outputs disconnected. 1. TWinSoft: 8.V: AIW. Addressing the Digital Special registers DSPE TmpError Shortcut RstShortcut Examples: DI. Test of the digital output. 2. TTT DI DI b 0 0 c x x S DI DI 0 0 x x SM+ S- DI DI DO AIW AIW DI 0 0 0 0 1 1 x x x x x x SMV S+ C 4m Description.0.b.0: DO. DI Latched on positive edge and reset by writing '0'. Analog input 16-bit resolution.S TTT: is the type of variable. Digital input (instantaneous).3. Analog input (16 bits) 0.1. b: is the number of the block of I/O c: is the channel number. Re-initialize the outputs after a short circuit Digital input 0. S: supplementary type information. Totalizer of the pulse on DI 3. DI Latched on negative edge and reset by the communication.C: AIW.32 – Getting Started 74 .RM 10. Digital output. Digital output 1.1: DI. The address can be typed according to a standard: TTT.0. DI Latched on positive edge and reset by the communication.0. Test of an analog input. Test of the Digital output 1. 16-bit Totalizer of pulse on a DI.0: TTT DI DI DO b 2 2 2 c 0 1 2 Description Temporary error on an output.c. DI Latched on negative edge and reset by writing '0'. Click the button to browse the list of available variables of the RM10. DI Latched on negative edge and reset by writing '0'.S TTT: is the type of variable.1. Re-initialize the outputs after a short circuit. b: is the number of I/O .RM21. c: is the channel number. Analog input 16-bit resolution.0.2. 1 : LEDs used. You must check this option for A to execute automatically the writing '0' to the RM.3.0: DO. TWinSoft: 8. Addressing the Digital Special registers DSPE TmpError Shortcut RstShortcut ReBoot LEDs Examples: DI.0.C: AIW.1: DI. Use of LEDs associated to DI: 0 : LEDs deactivated. TTT DI DI b x x c x x S DI DI x x x x SM+ S- DI DO DI AIW AIW DI AOW x 1 1 0 2 3 3 x x x x x x x SM- S+ C 4m Description. 16-bit Totalizer of pulse on the 8 first DI. Digital input (instantaneous). The address can be typed according to a standard: TTT.1. Reboot of the RM21. DI Latched on positive edge and reset by writing '0'. Test of the Digital output 1. DI Latched on negative edge and reset by the communication.b.V: AIW. DI Latched on positive edge and reset by the communication. Analog output. 2. Auto-acknowledge: this feature concerns only the registers latched and reset by writing '0' (with the switch 'SM').. Outputs disconnected.1.32 – Getting Started 75 . Click the button to browse the list of available variables of the RM21. Digital output. Totalizer of the pulse on DI 3. Test of a Digital output. 1. S: supplementary type information. Digital input 0.1: TTT DI DI DO DO DI B 5 5 5 5 5 c 0 1 2 4 7 Description Temporary error on an output. Digital output 1.c. Addressing the Digital Analog register ASPE RstCounter TTT AOB B c 4 0 Description Counter of resets of the RM21. Analog input (16 bits) 0.3. Test of an analog input.0: AOW. Analog output (16 bits) 1. .. If you wish to select a condition yourself. select a Tag of a Digital Internal register multiple of 8 (DIR 0. Negative Edge or High State. The triggering happens via a digital Internal register (DIR). the transaction happens. the A will permanently execute the transaction). Tag : if Trigger is checked. DIR 8. In this case. • Trigger : Each transaction must be triggered to be executed.). select a condition: Positive Edge.. Condition : if Trigger is checked. This operation can be done automatically (you don't need to declare it and leave the box cleared. .32 – Getting Started 76 .ModBus device. When it is in the condition programmed (see below). check this box. TWinSoft: 8. DIR 16. The address must be typed (see the manual of your ModBus equipment). 32 – Getting Started 77 .gif. create the HTM images (see ‘WebForm Studio Getting started’ manual). Procedure to work with TBox as a Web Server 1. created with the WebForm studio. meaning it contains HTML pages that can be called from Internet Explorer browser.Getting started’ manual).Report files created with the Report Studio (see chapter 15. Three types of file can be sent to A: . From the ‘Web & Report files’ folder.HTM pages with their associated WebForm. 2. To dial-up A. use ‘TBox Dial It!’ utility (see ‘WebForm Studio .2: Report Studio) . When sending the TWinSoft application to A. all files comprising the ‘Web Module’ are also sent . .15. Web & Report files A can be used as a Web Server. . 3. Define the TCP/IP properties of A (RTU properties TCP/IP). …) 15.Any file (.1. All the files contained in this folder comprise the ‘Web Module’.bmp. The ‘Web files’ contained in this folder will be sent together with the TBox application. TWinSoft: 8. When connected to A.32 – Getting Started 78 . start Report Studio and look at the online ‘Help’. a list of historic data can be inserted.2. Sending a report through e-mail. This is one of the features of ' TBox Web Server'. Inside the report. databases. the report is printed (see in TWinSoft 'Alarms' Recipient).txt For more information. Files can be attached to a report. the report is sent. On an alarm condition.0/report.trep’ file. COM1 or COM2. the selection of Tags is made very easy. Report Studio Report Studio. The remote printer must be equipped with a specific modem (please call your distributor). On an alarm condition. 4. Report Studio can be started directly from the group of programs where TWinSoft is started (by default ‘Techno Trade’) or from the folder ‘Web and Report files’ by clicking a ‘. By a single click. On an alarm condition. a list of alarms can be inserted. (see in TWinSoft 'Alarms' Recipient). The database of A (alarm & historic) can be attached to a report (TBox mail feature). TWinSoft: 8. In this way. Report Studio has the following features: A report is associated to a TWinSoft document. with its associated report is sent (see in TWinSoft 'Alarms' Recipient). the e-mail.15. Report Studio has been developed to make creation of reports dedicated to A easier than ever. the report editor is available since version 7. 3. Local print via a RS232 port. Example: http://1. Different ways to use a report 1. alarms.2. with protocol 'printer'. 2. fields are declared to display dynamic data (Tags. Display of the report with Microsoft Internet Explorer.3.10 of TWinSoft. …) The Tags can be printed as single fields or in a table. Remote print through a modem port of the A. By a single click. you type the URL of the report (see in TWinSoft 'Web & Report files'). 16. click ‘Help’. Three authority levels are available: • • • Level 1: Surveillance mode or VISUALIZATION MODE. If the Access security option is validated. TBox Access security This (optional) access security of the A prevents non-authorized persons from accessing the A. The others will be protected only if it is necessary to prevent on-site access. the operator can view all the values and execute commands (locally or remotely). The operator can view all A values (local or remote). but can not execute any command. The protection is based on a four-digit hexadecimal global code that is saved in the A. TBox configuration To access the A configuration click ‘RTU Properties’ ‘Security’ tab. each port of the A can be independently protected.1. the operator can view all the values and execute commands and alter or send new TWinSoft documents (locally or remotely). Level 2: COMMAND MODE. 16. figure 41 For more information. This allows different access codes related to different users having different access levels to the same A.32 – Getting Started 79 . TWinSoft: 8. Level 3: ENGINEER MODE. usually COM4 (internal modem) is the default-protected port. The operator can view all A values (local or remote). • Global code: type in the code you used to generate the Access Codes with the utility PASSWORD. all the security features are disabled. only COM4 (Internal modem) is protected. Type it a second time in the Confirmation field. • Protected ports: Check the box of the COM port you want access protection. When this information has been entered. • Global code: This hexadecimal code of 4 characters is the basis for password generation. to be sure.• Access security: Check this box if you want to use access protection to the ports of the A. when selecting access security features. • User name: The name you use when logging in logs into TWinSoft. Password utility When installing TWinSoft a password-creation program named PASSWORD is installed in the same directory as TWinSoft. This program generates a password that will be necessary to Login to the A (see next). Level 3: ENGINEER MODE.2. Two codes have been created: The PASSWORD: this password must be used toegether with the NAME when logging into TWinSoft. the user’s name and the access level. It can be started from the 'Start' button of Windows and is located in the group of programs “Techno Trade” → “Accessories” created while installing TWinSoft. It will be entered in the ‘RTU Properties’ → ‘Security’ menu of TWinSoft and sent to the A. It is based on a complex algorithm using the global code.32 – Getting Started 80 . Level 2: COMMAND MODE. If it is cleared. with the help of Special analog variables. click on the button "Get password". This means that if different users with different access levels must communicate with A. By default. the latter checks if the NAME and PASSWORD entered fit with the global code within A. This password is composed of 4 hexadecimal characters in response to information’s related to the user. This information can be used to trace users for example by inserting this number into a database. • Access level : Three access levels are available: Level 1: Surveillance mode or VISUALIZATION MODE. but can not execute any command. the operator can view all the values and execute commands and alter or send new TWinSoft documents (locally or remotely). 16. the operator can view all the values and execute commands (locally or remotely).EXE (see next). The access codes are generated by the utility software Password (see next). When a user TWinSoft. The password is accompanied by a 5-digit number that identifies persons who have accessed the A station. The USER ID: this number is available in a special analog variable when a user is connected to a port of A that is protected. the global code used to generate passwords must be the same. TWinSoft: 8. an unprotected TWinSoft document must be sent to A (see next). it will still be protected even after a global reset.3. Login/Logout The Login feature allows users to connect to a protected port of the A according to their own access level. According to those.3) The first method is by performing a global reset. the local port is longer protected. Deactivating protection There are two methods of deactivating A access protection: Global reset (see chapter 6. Sending an unprotected TWinSoft document The second method involves modifying the TWinSoft document and deactivating the Access Security option. When the program has stopped. figure 42 You type the Name you used in the ‘Password’ utility and the Password that was created (see previous). Logout If the TWinSoft is connected to a protected port. If a port is unprotected. If it is not checked and TWinSoft is connected to a protected port: TWinSoft starts in 'Read only' mode. To deactivate protection. it uses the access level corresponding to the password saved (see the status line). you are in: Read only mode Read/write mode Read/write + send TWinSoft document It is displayed in the Status bar. the Logout sets TWinSoft in 'Read only' mode. The document must then be sent to the A after having done a Login as 'Engineer'. Login When being connected to a port of A that is protected. 16. The Login/Logout can be executed from the main menu bar in the 'Tools'.32 – Getting Started 81 . You need to do a Login to get your access level. the access level is automatically 3: Engineer. you need to do a Login to get an access level.16.4. which must be done on site. If 'Save password' is checked and TWinSoft is connected to a protected port: when TWinSoft starts. TWinSoft: 8. If the internal modem was declared protected. Example: <second> or <sec> if it concerns the ASPE . They allow to move or copy Ladder. The I/O cannot be automatically created. Example: you copy an alarm condition from one document to another: the recipient will be automatically created as well as the Tag used as condition (in case it is available in the Resources). TWinSoft: 8.. 17.. those are automatically created. Example: 'register' -> 'register_1' . The creation of a new object is based on the name of the original object. In case a special register is already declared. If the creation of a new object needs the creation of other objects. In case it exists. 17..2. Copy/Paste . It is then possible to open several sessions of TWinSoft to access different documents at the same time. 2. NOTES: 1. Paste the new Tag <CTRL + V>.1.. and to copy from one document to another document.. TWinSoft uses it.. except the creation of Resources (the I/O cards must already be declared). TWinSoft offers you to create the object.Drag'n'Drop These standard functions of Windows are supported since version 7. 3.0. Copy the Tag <CTRL + C>.addresses. -number in name... The sequence is: create the Tag (or select the Tag). Examples Following are examples how these features can be used in TWinSoft: Create Tags in the list of Tags (Copy/Paste) Tags can be copied with automatic increment of . 2. Tags. 'register_2' . Example: you copy ‘Register’ many times. AIR. In case the name must be unique. TWinSoft will increment name and address ‘Register_1’. ‘Register_2’.inside a document or to another document. . The increment on number in a comment only applies if the number is the last character.10.32 – Getting Started 82 . TWinSoft creates a new object and increments the name. . Definition . it is used with its original name. If the name does not include a number as last character..). General rules 1. only registers (DIR.… 2. In case it does not exist. -number in comment . TWinSoft looks for an existing name of the same type (for Tags: digital or analog). TWinSoft automatically creates and increments a number. Exceptions: 1.17. Drag’n’Drop in a list is not allowed in the list of Tags. … Even if it is possible. address. they are automatically created. .) only applies to the display of the list. the entries are created with the existing Tags.Copy a POU in the same document (Copy/Paste) The type of POU is the same and TWinSoft automatically increments the name. The sorting (by name. with similar names and addresses. TWinSoft: 8. You have to edit the Ladder and change the type of the local Tags: Input. Example: 'My_Program' -> 'My_Program_1' Move or copy Ladder from one POU to another POU (Drag’n’Drop or Copy/Paste) NOTES: 1. If the Tags of I/O with similar addresses exist but with other names. or from a ‘Function’ to a ‘Program’.. If Tags of I/O are needed and already exist with similar addresses but with other names.32 – Getting Started 83 . for instance from a 'Program' to a 'Function Block': The local Tags are automatically created in the list of the 'POU Tags'.. TWinSoft automatically creates Tags of similar type and increments the address. If the Tags of register with similar addresses exist. TWinSoft automatically creates Tags of similar type and increments the address. If Tags of register are needed and already exist with similar addresses.. 2. Copy entries of any list (Recipient. 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. with similar names and addresses. Alarm condition. they are automatically created. Copy Ladder from one document to another document (Drag’n’Drop) - If Tags already exist. as they are executed in the sequence of the indexes in the list.. This can be particular useful in the List of Remote Tags. . the entries are not created. the Ladder is not created. WARNING: do not make copy/paste between different types of POU. and the global Tags are created as they are. If Tags are needed and do not exist. NOTES: 1. In case the types of POU are not the same. Output or local. and replace the global Tags with local Tags if needed.) from one document to another document (Copy/Paste) - If Tags are needed and already exist. It allows changing the sequence of entries in a list. Remote Tags. If the Tags do not exist. it is not allowed as the result is unpredictable. For instance from a ‘Program’ to a Function block’. the Ladder is created with the existing Tags. 2. Modifying the sequence of the elements in all lists (Drag'n'Drop). ) or even to create full configuration with 'text' files (see Export following). The separator used in the CSV file depends on the regional settings configuration of windows. . This is very useful to edit list of configurations using an external software (Excel. Import / Export TWinSoft supports since version 8. Notepad. ' according to the language. 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. in CSV format.. ' or ' . we advise you to follow the procedure: Export Modify/add Import TWinSoft: 8.18. Typically it is ' .32 – Getting Started 84 ..10 Import / Export of configuration file. NOTE: Be careful when working on different PC that the regional settings (at least the separator) are configured on the same way. 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 TWinSoft: 8.32 – Getting Started 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, ...) TWinSoft: 8.32 – Getting Started 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. TWinSoft: 8.32 – Getting Started 87 When nothing is mentionned. it is considered as a 'yes'. TWinSoft: 8. With Registers : determines the format. Any field not needed must be left empty. With I/O : it is not used. The format depends of the physical address.32 – Getting Started 88 .I/O Input or Output. Signed Yes or No. With Register : determines the format. Yes 2.Threshold.Filter. Index The index in the list of conditions.32 – Getting Started 89 .560.Hyst. • Syntax If you want to modify or create your own file. the alarm condition cannot be imported.Inhibition.0. Otherwise.Type.ON. with the 'separator' between each field.Export . Otherwise.-- Title The title must be at the first line and must be AlarmCondition.1:30:00. It will not be imported.25. The syntax is: Index Tag Type Threshold (analog) Recipient Message Filter Hysteres (analog) Inhibit AutoEnd Example: AlarmCondition *Index.POS.Motor. 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. the alarm condition cannot be imported.Recipient. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. Maximum 256 digital and 256 analog conditions can be defined.00:2:00.End 1.Alarm conditions You export the list of Alarm conditions.”Temperature above 55 degree”. The Tag must exist in the TWinSoft document.”Motor is started”.Tag.FLOW1.Message.Max. Tag Maximum 15 characters.Temperature. TWinSoft: 8..0.0. It must be typed between brackets.256 .. 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.a report: if is not a message but a report. If the message does not exist. it will be created. (Ex:“this is a text message”). (Ex:“ThisReport. TWinSoft: 8.an index : a number between 1. .Message The message can be: . The report must be declared in the folder ‘Web & Report files’.32 – Getting Started 90 . It must be typed between brackets.trep”).a text : a message of 30 characters. on a printer. Available for message to be printed. or with some 'C' driver."This message.Export . the complete message must be typed between brackets. A maximum of 256 messages can be defined. The syntax is Index Message Next Example: AlarmMessage *Index. • Syntax If you want to modify or create your own file.32 – Getting Started 91 . TWinSoft: 8. Message The message can be of maximum 30 characters.This is a long message to send . In case the message must includes the separator ('.D0 Input has been activated. 2.' for instance).0 Next The index of the next message. When it is longer. It will not be imported.3 3.Alarm message You export the Alarm messages. includes a coma".Message. with the 'separator' between each field. Title The title must be at the first line and must be AlarmMessage. Any field not needed must be left empty.Next 1. Example:. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. it will be truncated during import. Index The index in the list of messages. 2. It will not be imported. Index The index in the list of chronologies. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment. NEG ou DEL ANALOG: Var (for Variation.32 – Getting Started 92 .Var.Export . TWinSoft: 8.Var..D0 .Chronologies You export the list of Chronologies.Tag. the chronology cannot be imported.0 2. Otherwise. 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.Type. Maximum 256 digital and 256 analog entries can be defined.Level . The Tag must exist in the TWinSoft document.5 .2 Title The title must be at the first line and must be Chronologies. The syntax is: Index Tag Type Var Inhibit Example: Chronologies *Index. Type DIGITAL: POS.DEL. Tag Maximum 15 characters.Inhibition 1. • Syntax If you want to modify or create your own file. with the 'separator' between each field. TWinSoft: 8.Size.yes 2.Export .180. Otherwise.Type. The syntax is: Index Tag Type Period Size Reset Tag Example: SamplingTable *Index. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment.FLOW1. It will not be imported. with the 'separator' between each field. • Syntax If you want to modify or create your own file.60.FLOW2. Type Minimum: Min Maximum: Max Average: Mean Instantaneous: Inst Period The period between 2 recordings.Mean. Reset Tag Yes or No Determine whether the Tag is reset after recording (with registers only). Title The title must be at the first line and must be SamplingTable.01:00:00.FLOW3.00:30:00.Min.32 – Getting Started 93 . Check in the Sampling table configuration which are the available period.1200. 3. the sampling table cannot be imported.Tag.Max.Sampling tables You export the list of Sampling tables.Reset Tag 1. Size The number of Records you wish to save in A. Maximum 64 sampling tables can be defined. Any field not needed must be left empty.Period. Index The index in the list of sampling tables.00:03:00. The Tag must exist in the TWinSoft document. Tag Analog Tag of maximum 15 characters. .000.No.State 0.00. 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. The syntax is: Index Tag Comment Write allowed State1 State0 Min Max Meas. 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.0..Q0... Index The index in the list of Web/Minitel/Terminal Tags.00.00..1000. Unit Example: TerminalTagname *Index. The number of decimals depends on the quantity selected (see below).1000..ANA0.3. Max # dec.# dec..000. Title The title must be at the first line and must be TerminalTagname.000...255. the range in which a value can be written (analog Tags only)..STOP.Converted Max.ANA1.ACTIVE.. Minimum / Maximum When the option 'write allowed' is selected (see above). Tag Maximum 15 characters.Unit 1. Min Meas.1000.4.Minimum..Converted Min..Measured Min.IN.State 1. The decimals can be omitted.32 – Getting Started 94 . It will not be imported.Yes.m³ 2.1000. Maximum 256.Tag. TWinSoft: 8. Max Conv.liters 3.2.0.Terminal Tags Syntax If you want to modify or create your own file..Maximum.Measured Max.Comment.. Otherwise.255.No.. * Line of Comment Any complete line starting with ' * ' can be inserting anywhere in the file as comment..00. Min Conv.0.analog 1.0..Pomp 0.D0.Read Only.OUT.0.Input 0.analog 0.No. the Terminal Tag cannot be imported.000.. The Tag must exist in the TWinSoft document.0. with the ‘separator’ between each field. Example: 8bits analog input (0.liters Title The title must be at the first line and must be TerminalAnalogUnit. Analog Units Syntax If you want to modify or create your own file. Number of decimals (maximum 3) Unit The text associated to analog Tag.255) corresponds to 0.. 1000 # dec.. If you change the text of an index. The syntax is: Index Unit Example: TerminalAnalogUnit *Index.Measured Min / Max Converted Min / Max To define a scaling converting a physical range (measured) to a real range (converted).. Any field not needed must be left empty. WARNING: An analog Tag Web/Minitel/Terminal refers to an index of an analog unit. 255 Converted: 0 .Unit 1.. TWinSoft: 8.m³ 2. * LINE OF COMMENT Any complete line starting with ' * ' can be inserting anywhere in the file as comment. Maximum 256. Index The index in the list of Analog units. it will be updated in the Terminal Tags.1000 mm Measured: 0 . Maximum 8 characters. with the 'separator' between each field.32 – Getting Started 95 .. It will not be imported. Unit The text associated to analog Tag.. Maximum 8 characters. It will not be imported.ACTIVE.State 0 1.IN. State 0 The text associated to the digital Tags when it is at '0'. * LINE OF COMMENT Any complete line starting with ' * ' can be inserting anywhere in the file as comment.32 – Getting Started 96 . Index The index in the list of digital states.STOP Title The title must be at the first line and must be TerminalDigitalState. Maximum 8 characters.State 1. TWinSoft: 8. Both states fields have to be filled. Maximum 256. it will be updated in the Terminal Tags. The syntax is: Index State 1 State 0 Example: TerminalDigitalState *Index. State 1 The text associated to the digital Tags when it is at '1'. with the 'separator' between each field.OUT 2. If you change the text of an index.Digital States Syntax If you want to modify or create your own file. WARNING: A digital Tag Web/Minitel/Terminal refers to an index of a digital state. TWinSoft: 8. Import After you have exported files for modification (see previous). The Message are created. Import menu is available from the main menu of TWinSoft: 'File' -> 'Import'. If the file contains I/O declared in extension blocks (Rack4 or Rack8). The lists you can import are: Tags Alarm condition Alarm messages Chronologies Sampling tables Web/Minitel/Terminal Tags Analog Units Digital States Working with an Empty Document • Import of Tags When doing an import into an empty document Tags & groups are created from the file. the racks and cards must be first created in the 'Resources'. • Import of Messages When doing an import into an empty document Messages are created from the file. • With Chronologies and Sampling tables The import is only possible when Tags exist.18.32 – Getting Started 97 . • With Alarm Condition The import in only possible when Tags and Recipient exist.2. or you have created your own file. you can Import them. When doing an import. a Tag name is the same than the one present in the document. different from the one you see in the list of Tags.32 – Getting Started 98 . the following options appear: Exact replace You want to erase an exiting list and replace it with the file. . Each time there is an existing configuration with the same index as the one in the file. if within the file. the import cannot be done. Datalogging. TWinSoft: 8. Append You want to add some new entries to an existing list. and add the new one. • With Tags The indexes you have defined in the file have no importance. • With Tags Tags within TWinSoft have an internal index. Sampling tables Check the last index in the TWinSoft document and use the next one when creating the file. If Tag names or addresses are already existing within the document.. The list is first erased. Not with Tags (see following) Be careful all indexes are re-defined according to the file. if the corresponding list in TWinSoft contains already at least one configuration. The list of the TWinSoft document is replaced by the file. This index is used as internal reference for every configuration where the Tag is used (Alarm. Alarm condition.) When importing a list of Tags. That is why we advise you to always work with an Exported file. The import will keep or modify the existing configuration. The entries are added to the existing list. Groups of Tags are also created. and then replaced by the file. you are prompt to choose the one(s) you wish to save.. • With Messages. the import will be refused. but with another index. Replace You have modified some entries and/or have added some entries in the file. Ladder. Chronologies. It can even be the same for each Tag. A message box then informs you. WebForms. Presentation Pack & Go is a tool that builds up one file with your complete project.19.. select from the main menu ‘File’ ‘Pack & Go…’ Select the button ‘Pack …’ TWinSoft: 8. it can be unpacked and/or updated to the RTU from a double click on the . Once a project is packed. including TWinSoft document. The goal is to backup a complete project without missing files or to update a RTU with the complete project without requiring advanced knowledge of TWinSoft. 19. Pack & Go 19. OS..1. All files are compressed and packed into one file with the extension . Reports.tpg file.32 – Getting Started 99 .2. Pack To access Pack & Go menu..tpg (TWinSoft Pack & Go). This option is very convenient for backing up a project being sure you don't miss any file.All Files of the project.tpg.3. TWinSoft: 8. TWinSoft document. WebForm.tpg 19. double click a file with the extension . html pages. Unpack menu offers 2 features: 1. … are packed in one file. OS. Option available from the main menu: ‘Tools’ Unpack. Unpack To open the Unpack window. with the extension .32 – Getting Started 100 . Restore a project Extract a project into a directory of your PC. 2. The button ‘PC Setup…’ gives you access to the configuration of the PC..from a unique file. It cannot be selected from 'Unpack' menu but changed from TWinSoft main menu: 'Tools' 'Language' TWinSoft: 8.32 – Getting Started 101 . to communicate with the RTU. The button ‘Update RTU’ sends the project and OS to the RTU. French and German. .. WebForms. OS. Languages supported are English. including the application. report. Update a RTU Update a RTU with a complete project.
Copyright © 2024 DOKUMEN.SITE Inc.