Techno Trade TBOX MS User Manual

A
R emote
T erminal U nit
User’s Guide Technical specifications & cabling
Version: 1.06 2
Disclaimer
Every effort has been made to ensure the accuracy of the information in this guide. However, Techno Trade S.A. assumes no responsibility for the accuracy of the information. Product information is subject to change without notice.
TWinSoft
and
A
are registered trademark of Techno Trade s.a. Windows '95, '98, NT, 2000, XP are trademark of Microsoft Corp. Internet Explorer is a trademark of Microsoft Corp
.
Copyright
© 2004-2006 by Techno Trade SA Edition: February 7, 2006
Version: 1.06 3
TABLE OF CONTENTS
PRESENTATION ................................................................................................................7
1. H
OW TO USE THIS MANUAL
?..............................................................................10
1.1. What is in the manual?......................................................................................... 10
1.2. What is not in the manual?................................................................................... 10
2. T
HE HARDWARE CONCEPT
................................................................................11
2.1. The Racks............................................................................................................ 11
2.2. The Cards............................................................................................................ 12
HARDWARE.....................................................................................................................13
3. I
NSTALLATION OF THE RACK
..............................................................................14
3.1. Installation of the Rack on a DIN rail..................................................................... 14
3.2. Installation of the Rack in a 19’’ cabinet.................................................................15
4. I
NSERTION OF CARDS IN THE RACK
....................................................................16
4.1. The Power supply................................................................................................. 16
4.2. Placing the Power Supply Card.............................................................................. 17
4.3. Working without Power Supply Card...................................................................... 18
4.4. Hardware vs. Software Address of Cards ............................................................... 19
4.5. Powering ............................................................................................................. 22
TWINSOFT - GETTING STARTED ....................................................................................25
5. I
NSTALLATION OF TWINSOFT
............................................................................26
5.1. System requirements............................................................................................ 26
5.2. Installation of the CD-ROM ................................................................................... 27
5.3. Programs of ‘TWinSoft Suite’................................................................................. 29
6. S
TARTING TWINSOFT
......................................................................................30
6.1. Wizard................................................................................................................. 31
6.2. Communicating with TBox MS............................................................................... 32
6.3. PC Communication Set up..................................................................................... 32
6.4. Testing communication......................................................................................... 34
6.5. Global reset of TBox MS........................................................................................ 35
6.6. LED « RUN »........................................................................................................ 35
6.7. Saving and Sending a Program.............................................................................. 36
6.7.1. Saving a document ..................................................................................................36
6.7.2. Compiling a document.............................................................................................. 36
6.7.3. Sending a document ................................................................................................37
Version: 1.06 4
TWINSOFT - PROGRAMMING.........................................................................................39
7. I
NTRODUCTION
..............................................................................................40
8. RTU
PROPERTIES
...........................................................................................41
8.1. General properties................................................................................................ 42
8.2. Drivers.................................................................................................................43
8.3. Security ...............................................................................................................43
8.4. Info properties .....................................................................................................44
8.5. Advanced.............................................................................................................44
8.5.1. Startup...................................................................................................................44
8.5.2. Alarms....................................................................................................................45
8.5.3. Sampling Tables......................................................................................................47
8.5.4. Temperature...........................................................................................................48
8.5.5. Remote Tags...........................................................................................................48
8.5.6. TCP/IP....................................................................................................................48
8.5.7. Environment variables..............................................................................................50
9. R
ESOURCES
...................................................................................................51
9.1. The CPU-16 card .................................................................................................. 51
9.1.1. Communication ports of the CPU ..............................................................................52
9.2. Adding Cards........................................................................................................53
9.2.1. Adding an I/O card..................................................................................................55
9.2.2. Adding a ‘Modem’ Card............................................................................................56
9.2.3. Adding a ‘GSM / GPRS’ Card.....................................................................................57
9.3. Communication Variables......................................................................................62
9.3.1. Digital Communication Variable.................................................................................62
9.3.2. Analog Communication Variable................................................................................63
9.4. System variables ..................................................................................................64
9.4.1. Digital System Variables...........................................................................................64
9.4.2. Analog System Variables..........................................................................................66
9.5. Timers & Counters................................................................................................67
10. T
AGS
.......................................................................................................68
10.1. Physical I/O......................................................................................................69
10.2. Internal Variables (Registers)............................................................................. 70
10.2.1. Digital Internal Variable............................................................................................70
10.2.2. Analog Internal Variable...........................................................................................72
10.3. ModBus address................................................................................................ 74
10.3.1. ModBus address of System Variables.........................................................................74
10.4. Tags - Presentation / Write................................................................................75
11. IP P
ARAMETERS
........................................................................................76
11.1. ISP configuration .............................................................................................. 77
11.2. FTP Host ..........................................................................................................79
11.3. SMTP Server..................................................................................................... 80
Version: 1.06 5
11.3.1. About Redundancy...................................................................................................81
11.4. NTP Server....................................................................................................... 82
11.4.1. Time accuracy.........................................................................................................82
11.5. TCP/IP Debugging ............................................................................................ 83
12. A
LARMS
...................................................................................................86
12.1. Introduction ..................................................................................................... 86
12.2. Digital Alarm Condition...................................................................................... 87
12.3. Analog Alarm Condition..................................................................................... 89
12.4. Recipients ........................................................................................................ 91
12.5. Group of Recipients .......................................................................................... 93
12.6. Messages......................................................................................................... 94
12.7. Alarms table..................................................................................................... 95
12.7.1. Columns description.................................................................................................96
13. D
ATALOGGING
...........................................................................................97
13.1. Introduction ..................................................................................................... 97
13.2. The chronologies.............................................................................................. 99
13.2.1. Digital chronologies..................................................................................................99
13.2.2. Analog chronologies.................................................................................................99
13.3. The sampling tables.........................................................................................100
14. R
EMOTE TAGS
.........................................................................................101
14.1. Introduction ....................................................................................................101
14.2. Creating a Remote Device................................................................................102
14.3. Creating Remote Tag.......................................................................................103
14.4. Remote Tags through modem ..........................................................................105
14.5. Timing configuration of Remote Tags................................................................105
15. P
ERIODIC EVENTS
....................................................................................106
16. H
IGH SPEED TAGS
...................................................................................108
16.1. Processor time for executing High Speed Tag....................................................109
17. A
CCESS SECURITY
....................................................................................110
17.1. RTU configuration............................................................................................111
17.1.1. RTU Properties ......................................................................................................111
17.1.2. Modem and Serial Port Properties............................................................................111
17.2. Password utility ...............................................................................................112
17.3. Login/Logout...................................................................................................113
17.3.1. With TWinSoft.......................................................................................................113
17.3.2. With Internet Explorer............................................................................................114
17.4. Deactivating protection ....................................................................................115
Version: 1.06 6
TECHNICAL SPECIFICATIONS - CABLING....................................................................117
18. R
ACKS
& C
ARDS
.....................................................................................118
18.1. Racks............................................................................................................. 118
18.2. Power Supplies ............................................................................................... 119
18.3. CPU-16 bits .................................................................................................... 125
18.3.1. Lithium Battery......................................................................................................128
18.3.2. MultiMedia card..................................................................................................... 129
18.3.3. Button (Working modes)........................................................................................ 129
18.4. I/O Simulation ................................................................................................ 134
18.5. 16 x digital Inputs........................................................................................... 135
18.6. 16 x digital Outputs......................................................................................... 139
18.7. 16 x digital Inputs/Outputs.............................................................................. 142
18.8. COMBO (Multiple I/O) ..................................................................................... 148
18.9. 8 x Analog Inputs ........................................................................................... 155
18.10. 8 x Temperature Inputs................................................................................... 158
18.11. 4 x Analog Outputs ......................................................................................... 161
18.12. 8 x Relay Outputs ........................................................................................... 165
18.13. 4 x Analog inputs isolated................................................................................ 168
18.14. PSTN modem.................................................................................................. 171
18.15. GSM / GPRS modem ....................................................................................... 173
18.16. GPS - Timing .................................................................................................. 175
18.17. Serial Ports..................................................................................................... 178
APPENDIXES.................................................................................................................183
A
PPENDIX
A. L
ICENSES
....................................................................................184
A.1. The Evaluation mode............................................................................................. 184
A.2. The Dongle........................................................................................................... 184
A.3. The Code (License) ............................................................................................... 184
A.4. The TWinSoft LITE................................................................................................ 184
A
PPENDIX
B. T
IME IN
RTU...............................................................................185
B.1. Time in TBox MS...................................................................................................185
B.2. Data logging ......................................................................................................... 186
B.3. Special registers associated.................................................................................... 186
INDEX ...........................................................................................................................188
Version: 1.06 7
P
P
P
R
R
R
E
E
E
S
S
S
E
E
E
N
N
N
T
T
T
A
A
A
T
T
T
I
I
I
O
O
O
N
N
N
Version: 1.06 8
The unique ‘all in one’ TB
OX MS includes the best of 3 Worlds:
Telemetry
+
Internet
+
Automation
Version: 1.06 9
Overview of TB
OX
MS possibilities
Programming:
locally or remotely
Consulting
process through
HTML
pag
es
Sending of
Alarms
Communication
to a remote site
Retrieving data
locally
Retrieving data and
consulting the process
remotely
Version: 1.06 10
1. How to use this manual?
1.1. What is in the manual?
This manual represents the essential of TB
OX
MS documentation.
It first introduces to the hardware concept including nice pictures
Installation of Racks: chapter 3 Insertion of Cards: chapter 4
Then it brings you to the programming of TB
OX
MS using TWinSoft. All features are
explained using plenty of snapshots for an easy understanding
Starting TWinSoft: chapter 6 Properties of TB
OX
MS: chapter 8
Adding a card: chapter 9 Tags: chapter 10 IP configuration: chapter 11 Alarms: chapter 12 Datalogging: chapter 13 Remote Tags: chapter 14 Periodic events: chapter 15
All technical specifications of the cards and the different cablings are explained at the end of this manual.
Information related to Licenses is available in the Appendix A.
1.2. What is not in the manual?
One major topic you will not find in this manual concerns the ‘Programming’. TB
OX
MS
supports BASIC and Ladder languages for developing any advanced process. Those languages are detailed in another manual:
BASIC and LADDER for TBOX
Another important feature, which is not presented into this manual, concerns the development of HTML pages, to use TB
OX
MS as web server.
This matter is explained in details in another manual:
WEBFORM STUDIO – Getting
Started
Another software part of the TWinSoft Suite is Report Studio, for creating e-mail report or files to send. It is explained in the ‘On line’ help of Report Studio.
All along this manual, I inform you with Notes and Remarks: “What a nice manual!”
All along this manual, I warn you: “Read the manual!”
Version: 1.06 11
2. The Hardware Concept
TB
OX
MS is a Modular System.
TB
OX
MS is built using Racks and Cards.
Depending on your needs in communication(s) and in Inputs/Outputs, you select the elements required.
2.1. The Racks
Racks are made in aluminium alodined, giving a very good
electrical conductivity and equipotentiality
There are 4 models of Racks:
5 slots 10 slots 15 slots 20 slots
Version: 1.06 12
2.2. The Cards
Cards are formed of a PCB mounted in aluminium
enclosure which assures the best shielding against receiving and
emitting noise (radio emission, electromagnetic interference, …)
Bare aluminium inside the enclosure and on the edges assures a good contact of the ‘ground’ signal of the PCB between the Card and the Rack.
There are several models of Card:
Power supply CPU Communication ports
o Modem o RS232/RS485 o Ethernet o
Input/output
o Digital inputs, outputs o Analog input 14 bits o Analog outputs 12 bits o Combination of
digital/analog I/O
o
Version: 1.06 13
H
H
H
A
A
A
R
R
R
D
D
D
W
W
W
A
A
A
R
R
R
E
E
E
Version: 1.06 14
3. Installation of the Rack
3.1. Installation of the Rack on a DIN rail
Each edge of the Rack is equipped with springs for DIN rail fixing
Place the springs of the
Rack under the bottom side of the DIN rail and pull-up the Rack
Push the Rack against the
DIN rail
Version: 1.06 15
3.2. Installation of the Rack in a 19’’ cabinet
The Rack 15 slots can be mounted directly in the 19’’ cabinet. The height of the Rack is of 150 mm and adapted for a 4U cabinet (177.8 mm).
You have then enough room for cabling the Cards.
Special Sides must be fixed to the edges of the Rack
Version: 1.06 16
4. Insertion of Cards in the Rack
The Rack has a side UP and a side DOWN.
When the direction of the Rack is correct, the logo A must be at the right side and the slot numbering readable.
Example with the Rack 10
Each slot has a unique index number, starting at ‘0’ from the left side.
4.1. The Power supply
There are 2 possibilities of Powering TB
OX
MS. You have to choose one or the other:
With a Power supply Card
(230 VAC, 24 VDC or –48 VDC) This power supply supports 3 A on the BUS, includes a battery charger and provides an external 24 VDC. This is required when driving many Cards or when a backup battery is mandatory
to maintain the TB
OX
MS running even when the main power has broken down.
With the CPU Card
The CPU includes a small power supply, providing maximum 1 A on the BUS. It does not include a battery charger and is not isolated. This situation is sufficient to non-critical application that does not require Telecontrol, for instance handling few I/O cards, when only little power is required. Check the consumption of the cards with the table at the end of the manual.
UP
DOWN
LEF
T
RIGHT
Version: 1.06 17
4.2. Placing the Power Supply Card
When using a power supply card, it is always placed at the first position in the Rack. It is important for thermal issue.
The CPU is placed at the second position.
The communication cards and/or the I/O cards are placed in any following slots.
Next to ‘Power Supply’ and ‘CPU’ cards, you can leave slots empty
Version: 1.06 18
4.3. Working without Power Supply Card
If a power supply card is not required, the one from the CPU can be used. In this case the CPU is placed at the first position in the Rack
The communication ports and/or the I/O cards are placed in any following slot.
Next to the ‘CPU’ card, you can leave slots empty If you intend to use later a ‘Power Supply’ card and
don’t want to re-arrange all the cards, you can also leave the first slot empty (slot ‘0’)
Version: 1.06 19
4.4. Hardware vs. Software Address of Cards
With the following set of Cards on a Rack 10:
Slot
(hard)
Address
(soft)
Card Description
0 1 Power Supply – 230 AVC 1 0 CPU 16 2 2 Modem PSTN 3 3 16 Digital Input 4 4 16 Digital Input 5 5 16 Digital Output 6 - empty 7 7 Combo (combination Input/Output) 8 - empty 9 - empty
Later in this document, we will see how to use the software TWinSoft, the tool for programming TB
OX
MS.
But as we mention slot index of the Rack, it is important to relate it to the corresponding software address.
Version: 1.06 20
The corresponding TWinSoft configuration:
The CPU has always address 0 The Power supply (when used) has always address 1
The I/O and Communication cards must de defined with the address corresponding to their position on the Rack.
Version: 1.06 21
With the following set of Cards on a Rack 5:
Slot
(hard)
Address
(soft)
Card Description
0 0 CPU 16 1 1 Modem PSTN 2 2 16 Digital Input 3 3 16 Digital Output 5 - empty
The corresponding TWinSoft configuration:
Version: 1.06 22
4.5. Powering
Working with a Power supply, cabling of the Power supply:
See description of LED next page
Example:
30 Vac Power Supply
(ref MS-PS230V)
RS 232 : for programming
RS 485 : for communicating to other Racks
/
devices
Ethernet : for communicating to other Racks
/
devices
Button: STOP – RUN - RESET
DO : Output for synchronization DI : Input for synchronization
Line
Line
earth
Card detected by the CPU
Card in erro
r
Main voltage presen
t
Battery +
Battery -
Power supply of CPU: NO
connection when using a Power Su
pply
Card
For electrical security reason, you have to manipulate connectors with power switched OFF.
Version: 1.06 23
Working without Power supply, cabling of the CPU:
0
V
+6 .. +30 VDC
Example:
CPU16 with Ethernet
(ref MS-CPU16E)
Main voltage presen
t
‘Sync.’ output active
‘Sync.’ input active
RS 232 : for programming
RS 485 : for communicating to
other Racks / devices
Ethernet : for programming, communicating to other Racks / devices
Button: STOP - RUN - RESET
DO : Output for synchronization DI : In
p
ut for synchronization
ON: 100 Mbps - OFF: 10 Mbps
ON: Link - Flash: Communication
Full Duple
x
8 hz: sending alarm
2 hz: RUN - 0.5 hz: STOP
CPU in defaul
t
RS232: receiving data
RS232: transmitting data
RS485: receiving data
RS485: transmitting data
More information about cabling and technical specifications is available at the end of this manual
Version: 1.06 24
Version: 1.06 25
T
T
T
W
W
W
I
I
I
N
N
N
S
S
S
O
O
O
F
F
F
T
T
T
-
-
-
G
G
G
E
E
E
T
T
T
T
T
T
I
I
I
N
N
N
G
G
G
S
S
S
T
T
T
A
A
A
R
R
R
T
T
T
E
E
E
D
D
D
Version: 1.06 26
5. Installation of TWinSoft
5.1. System requirements
Hardware: Pentium or higher.
Memory: 16-MB minimum. We recommend 32 MB.
Hard Disk: 50 MB required plus the application files.
Display: VGA, SVGA with a minimum resolution of 640 x 480. We recommend
800 x 600.
Mouse: any Windows compatible mouse.
Parallel port: required in case of license with dongle for ‘parallel’ port.
USB port: required in case of license with dongle for ‘USB’ port.
Serial port: required for a local connection to TB
OX
MS and/or for an external
modem.
Ethernet port: 10/100 Mbps. Required for a connection to TB
OX
MS through a LAN.
Modem: any modem properly configured in Windows.
Operating system: Windows 95, Windows 98 or Windows NT (service pack 3 or
higher), Windows 2000, Windows XP.
To Browse the RTU:
Internet Browser: as ActiveX is used, Internet Explorer only can be used. Version 5.00 or higher is recommended to take benefit of the dialer. The CD-ROM of TWinSoft Suite includes MSIE version 5.00.
Version: 1.06 27
5.2. Installation of the CD-ROM
TWinSoft 9.00
TWinSoft is the software required for developing an application for the RTU. The basis for configuring a RTU application is explained in this manual. Installation of TWinSoft includes: WebForm Studio:
HTML editor dedicated to RTU
Report studio:
Report editor dedicated to RTU
WebForm Viewer:
ActiveX and TB
OX
MS dialer from Internet Explorer (see next).
(Administrator rights is required during installation)
WebForm Viewer
This software contains the tool TTBBooxx DDiiaall IItt !! uses to dial TB
OX
MS with Internet Explorer.
It also contains the ‘ActiveX’ used to display objects dedicated to the RTU. It must be installed on the PC used by a operator to dial TB
OX
MS with Internet Explorer,
when TWinSoft is not required. (Administrator rights is required during installation)
TBox Mail
This software is used to display a Chart view from data logging attached to e-mail. To store data in a global database, you should use T (call your local distributor). (Administrator rights is required during installation)
From the CD-ROM of TWinSoft Suite, when running the Setup, the following software’s are available
Version: 1.06 28
DreamWeaver Trial version
Report Studio for DreamWeaver
Dreamweaver is a standard HTML editor. It can be used with the plug-in ‘Report Studio for Dreamweaver’ to develop standard HTML pages that do not use the ActiveX.
Acrobat Reader
Software needed to read our documentation.
Explore this CD-ROM
You will find on the CD-ROM many information related to TB
OX
MS and accessories:
datasheets, manuals, …
Version: 1.06 29
5.3. Programs of ‘TWinSoft Suite’
During installation of TWinSoft, a group of programs is created where TWinSoft can be started.
Other programs and menus:
Accessories: group containing the utility ‘Password generator’ and ‘Reset User preferences’: reset of registry information to restore the default configuration of TWinSoft.
Documentation: group containing the various documents associated to TWinSoft and RTU.
Samples: group with TWinSoft documents installed as example.
TBox drivers: when 'C' custom drivers have been installed. The ‘on line’ help of the
driver configuration is available in this folder.
Report Studio: to create reports dedicated to TB
OX
MS.
TWinSoft: to start TWinSoft.
WebForm Studio: to start the HTML editor, dedicated to TB
OX
MS when it is used as a
Web Server.
Version: 1.06 30
6. Starting TWinSoft
I am the Wizard of TWinSoft!
When you start TWinSoft the first time, or when you create a new document, I help you with some basic configurations.
The use of TWinSoft is free, but sending of a program to TBox MS is protected.
For more info about Licenses go to Appendix A. at the end of this manual.
Version: 1.06 31
6.1. Wizard
The ‘New Document Wizard’ helps you getting started with a new application by gathering information about your hardware and some basic configuration.
Except for the ‘Type of RTU’, all those settings can be modified latter from the ‘RTU properties’.
If you have in your hardware an Ethernet interface:
According to the hardware you have, select the corresponding type of RTU.
!! You cannot change it later !!
Free name of the RTU Station address (1..255
)
Sub address (0..15
)
IP configuration of the Ethernet
IP configuration for sending e-mail or files in FTP
Version: 1.06 32
6.2. Communicating with TBox MS
Once you have opened a document, either a new one created with the Wizard or an existing one, you can establish the connection with your TB
OX
MS.
The possible communications are serial, Ethernet or modem, according to the media used to connect to TB
OX
MS.
Serial:
check the Baudrate you have given to the serial port in your application (by
default 9600,N). See chapter 9.1.1.
Ethernet: check the IP address you have given to your TB
OX
MS (see chapter 9.1.1)
and that it is in the same subnet of the PC or accessible to the PC.
Modem:
check the tel. Number of TB
OX
MS. See chapter 8.1.
6.3. PC Communication Set up
To communicate with the TB
OX
MS, you need to select a communication media on the PC.
From the main menu of TWinSoft: Communication PC Setup:
Example with a RS232 connection: default Baudrate of TBox MS : 9600,N
Version: 1.06 33
Other possibilities of PC Setup:
Offline: this option avoid sampling TB
OX
MS
Local: you select a serial port of the PC (typically RS232). The Baudrate must fit with the port of TB
OX
MS you are connected to.
TCP/IP: to establish a communication in TCP/IP, typically through the Ethernet port of TB
OX
MS. TWinSoft will establish a connection with the IP address of the
‘Ethernet’ port of the CPU (see chapter 9.1: ‘
CPU resources
’).
From this
PC Setup
menu, it is also possible to specify another IP address,
for instance if communicating to another Ethernet port or through GPRS.
Modem: to establish a remote connection to the TB
OX
MS. TWinSoft takes full
advantage of Windows' built-in modem support: simply install your modem in the control panel's Modems applet of Windows and you are ready to call your TB
OX
MS.
If your PC is equipped with USB port, you can use a converter USB-RS232
You can develop your TWinSoft document without connection to the
TB
OX
MS
, but it will be
mandatory to send it to have the RTU running! The program can be sent through RS232, RS485,
Ethernet or modem.
Version: 1.06 34
6.4. Testing communication
Once you have selected the media on the PC, you can test the communication. From the main menu of TWinSoft: Communication RTU identification:
Available information:
- Name of the RTU
- Type of Hardware
- Version of Operating System
- Status of the process
- ModBus address of the Station
- Subaddress of the Station
- IP address of the modem
- IP configuration of the Ethernet
- Access level of the current user
- Date and Time in the RTU
- General information about the program
- Process cycle time
- Unique ID of the RTU
The Status bar of TWinSoft displays the status of the connection:
The media of the PC is indicated and the access level of your connection (see chapter 17: ‘
Security
’)
If a connection cannot be established with the TB
OX
MS, it might be because the
configuration of its port does not fit with the PC setup you use (different Baudrate, different IP address, protocol other than ModBus, …).
To set the TB
OX
MS to a default configuration, you have to do a global reset. (see next)
Version: 1.06 35
6.5. Global reset of TBox MS
The Global Reset is used to set TB
OX
MS in a default, well-known configuration, in case
it does not communicate anymore. This is very useful when you take a CPU from the stock and you have no idea how the port you want to communicate with is configured.
The global reset is achieved using the button on the front side of the CPU
Procedure:
Push and maintain the button to the ‘Reset’ side
Let the LED flashes 3 times
Release the button
Global reset configuration: The global reset mode is indicated by the LED flashing at 0.5 hz (instead of 2 hz in RUN
mode). In this mode, the TB
OX
MS is configured like following:
Port Baudrate Protocol Station
address
IP
address
COM1 (RS232) 9600,N,8,1 ModBus 1 ­COM2 (RS485) 9600,N,8,1 ModBus 1 ­COM3 (Ethernet) - - 1 maintained MS-PSTN; MS-GSM - ModBus 1 ­RS232 - modem maintained ModBus 1 ­RS232 - local 9600,N,8,1 ModBus 1 -
6.6. LED « RUN »
This LED, next to the “Reset” button indicates the status of the CPU:
Program runs 2 Hz Program stopped 0.5 Hz Operating System stopped 8 Hz
More information about working modes of TB
OX
MS in
the technical specifications at the end of this manual
The Global Reset does not erase the current program. Doing an ordinary Reset will restart the program.
Version: 1.06 36
6.7. Saving and Sending a Program
Like any Windows program, TWinSoft creates ‘Documents’. One document corresponds to one TB
OX
MS application. Each of them must be saved using the Windows standard.
6.7.1. Saving a document
Possibilities for saving a document:
Use the icon
of the main tool bar
From the main menu use: ‘File’ ‘Save’
Use the accelerator keys <CTRL + S>
During the development of the application, it can be sent at any time to TB
OX
MS, for
testing the program. When sending an application to TB
OX
MS, it is first compiled and then sent, in the same
sequence.
6.7.2. Compiling a document
Compilation converts the document into microprocessor code. You can execute it:
Use the icon
of the main tool bar
Use the accelerator key <F9>
The result of the compilation is available in the Results window. This windows automatically pops up when there is a problem but it can be opened manually:
from the main menu: ‘View’ ‘Results’
using the accelerator keys <ALT + 2>
The Results window provides useful data:
Information: indicated in black
Warning: indicated in bold dark green
Error: indicated in bold red
Test of memory still available
The result window also displays memory still available:
CPU ROM: Application RAM: Application RAM: Databases
CPU-16 Max. 32768 bytes Max: 32768 bytes Max. 73728 bytes CPU-32
Version: 1.06 37
6.7.3. Sending a document
In order to have the TB
OX
MS running with the program you have developed with TWinSoft,
you have to send it. You can use any media to achieve it (RS232, modem, Ethernet, …). Possibilities for sending a program:
Use the icon
of the main tool bar
From the main menu use: ‘Communication’ ‘Send program’
Use the accelerator keys <CTRL + F9>
The sequence for sending is Compiling + Sending. If a problem occurs during compiling, the sequence is stopped and the ‘Results’ window
pops-up (see above)
If you interrupt the sending of the program or an error happens before the end of sending, TB
OX
MS will not restart, even after a reset.
The reason is that the program is composed of several modules; when starting, TB
OX
MS checks the integrity of those modules. When they do
not correspond to the same sending the program does not start, even after a reset. You have then to re-send the program.
The good news is that TB
OX
MS keeps its original settings before it
was stopped.
Version: 1.06 38
Version: 1.06 39
T
T
T
W
W
W
I
I
I
N
N
N
S
S
S
O
O
O
F
F
F
T
T
T
-
-
-
P
P
P
R
R
R
O
O
O
G
G
G
R
R
R
A
A
A
M
M
M
M
M
M
I
I
I
N
N
N
G
G
G
Version: 1.06 40
7. Introduction
TWinSoft uses the standard look and feel of ‘Windows Explorer’, with at the left side a list of folders and at the right side the content of the folder selected.
Each Folder consists in a list of items. For instance the list of Tags, or in the ‘Alarms’ folder the list of ‘Recipients’ or in the ‘Datalogging’ folder the list of ‘Sampling tables’, …
The programming of a TB
OX
MS application will be done in different steps:
 Configuring the RTU properties  Adding of the cards and Remote device from the Resources  Creating Tags  Creating Programs using automation language Ladder and/or BASIC  Creating Alarms  Creating Datalogging  If you have a Remote device, creating Remote Tags, to exchange data
The sequence in which those tasks are executed is not fixed, but at least RTU properties, Resources and Tags should be configured first, as being required for all other programming.
All those configurations are explained in the following chapters.
Version: 1.06 41
8. RTU properties
Setting the properties of the TB
OX
MS has never been so easy thanks to a set of
comprehensive dialog boxes, available from the main tool bar.
The RTU properties are divided into:
General the type of the RTU, telephone number, size of the chronologies, …
Drivers configuration of external software modules written in ‘C’, used to
execute specific task or to communicate with other protocol than standard ones.
Info to type any info about your program, its different versions, …
Advanced for some features, some advanced parameters are available: for
alarms, sampling tables, …
RTU properties can be accessed easily by clicking this icon.
Communication ports are configured from the ‘Resources’. General TCP/IP configuration is done from the ‘Workspace’ and folder IP parameters.
Version: 1.06 42
8.1. General properties
RTU Type: The type of RTU you have selected with the Wizard (see chapter 6.1). It
cannot be changed!
Name: type a free name for the TB
OX
MS. It will be displayed when doing a
‘RTU identification’ and used by the supervisory T. Maximum 8 characters.
ModBus address: with ModBus protocol, each device must have a Station number. It is its
ModBus address. Enter a number between 1 and 255 (default=1).
Sub address: if more than 255 TB
OX
MS must be installed in one project, you need to
define a Sub address. As this is not ModBus standard, it is only supported by ‘TComm.dll’ based software (TWinSoft, T, … please call your distributor for further information). Enter a number between 0 and 15 (default=0).
Version: 1.06 43
OS version: when working Offline, it is the OS used to simulate the compilation. By default it is the OS version associated to version of TWinSoft.
Telephone number: Configuration used by TWinSoft when it needs to dial TB
OX
MS.
Sizes: Number of records of Digital and Analog chronologies. The
chronologies are the ‘on event’ method of recording data in TB
OX
MS
(see chapter 13
: Data logging
).
Enter a number between 0 and 4000 (Default=100).
Time zone: The Time Zone where the TB
OX
MS is installed.
This information is used to create the time stamps when retrieving data from TB
OX
MS according to its location. TB
OX
MS uses Universal
Coordinated Time (UTC) as internal time stamp. The conversion is carried out when retrieving the data.
Summer/Winter: Allows automatic management of winter/summer time. This
selection has to be made according to the location where the TB
OX
MS is
installed.
See Appendix B :
Time in the RTU
8.2. Drivers
A driver is a module written in ‘C’ that executes a specific task, non-standard. Typically, it is communication to equipment not supporting standard protocol of TB
OX
MS.
There is no driver at the moment.
8.3. Security
Access security is discussed at chapter 17.
Version: 1.06 44
8.4. Info properties
You can enter a version number, the name of the programmer and a description of your program. This information is not sent to TB
OX
MS.
8.5. Advanced
8.5.1. Startup
By Startup we mean:
Reset of RTU (hardware or software) Sending of Program
Under those conditions two mechanisms of the RTU can be customized.
Reset all physical outputs: when active, at startup the RTU reinitializes the
outputs to ‘0’. After that the outputs are monitored
according to the process.
When not active, at startup the outputs are
maintained to their last status. After that the outputs are monitored according to the process.
Wait start of condition: this feature relates to alarm condition. The mechanism of generating alarm is based on transition:
the changing of a digital Tag or the overstepping of an analog threshold.
This option allows changing this rule at startup: With ‘Wait start of condition’ active:
With ‘Wait start of condition’ not active:
if the alarm condition is true at startup, an internal ‘start of alarm - auto-ack’ is generated. When the alarm condition disappears, the alarm is generated.
startup
Alarm Alarm
time
time
startup
Alarm Alarm
Internal
Alarm
Alarm
Version: 1.06 45
8.5.2. Alarms
The advanced parameters of alarms concern the size of the stacks and customizing of e-mail and GSM message.
Event stack: is a public stack where alarms are available with date, time, recipient,
message, status, …. The Event stack can be displayed from the main menu: ‘Communication’ ‘Download’ ‘Alarms’. The object ‘Alarms’ used in a WebForm displays the Event stack. It corresponds also to the list of Alarms sent to T.
Alarm stack: is an internal stack used to send the alarms. SMTP From: when receiving an e-mail from TB
OX
MS, the field ‘From’ indicates the origin
of the e-mail.
It accepts any text and the following parameters:
%station% : replaced by the name of the station (see General
properties)
%email% : replaced by the e-mail address of the RTU
Example:
TBox_%station% <%email%>
Version: 1.06 46
SMTP subject: when receiving an e-mail from TB
OX
MS, the field ‘Subject’ contains the
message or the title of the report (see Report Studio).
It accepts any text and the following parameters:
%station% : replaced by the name of the station (see General
properties)
%email% : replaced by the e-mail address of the RTU
%time% : the time of the RTU when the e-mail was generated
Example:
Report TBox %station% - %time% :
GSM message: when TB
OX
MS sends a SMS, you can add information to the message.
This information is sent in front of the message. You can type any text and the following parameters:
%station% : replaced by the name of the station (see General
properties)
%time% : the time of the RTU when the e-mail was generated
Check the total length of SMS message does
not exceed 160 characters
Do not use accent
Version: 1.06 47
8.5.3. Sampling Tables
This menu gives access to the parameters for long period recording in Sampling tables. (See chapter 13.3: ‘
Sampling tables
’)
Those configurations concern all sampling tables.
Daily: When ‘daily’ is selected in sampling table, it is the time of the day the recording is
executed.
Weekly:
When ‘weekly’ is selected in sampling table, it is the day of the week and the time
the recording is executed.
Monthly:
When ‘monthly’ is selected in sampling table, it is the day of the month and the
time the recording is executed.
Version: 1.06 48
8.5.4. Temperature
For Temperature analog input (PT100 or PT1000), you can define a unit: Celsius, Fahrenheit or Kelvin.
8.5.5. Remote Tags
Reset the device Trigger only if success When communicating as ‘Master’ using
‘Remote Tags’, a Trigger is associated to the device the RTU communicate with (see Remote Tags).
This Trigger activates the communication according to a ‘State’ or
‘Edge’. Working with ‘Edge’, the RTU restores automatically the Tag after the transaction(s).
- With this option active:
the Trigger is restored only when communication has been
done successfully.
- Without this option: the Trigger is restored when all Remote Tags associated to the device have been executed, with or without error.
8.5.6. TCP/IP
The unit is the same for all inputs
Version: 1.06 49
TCP Ports Numbers. Each TCP/IP service has its own unique TCP port. It provides a logical location for the delivery of TCP data.
TCP Port number complies to a standard defined by the IANA to be sure everyone using a TCP service uses the same TCP ports according to protocols used. When working with TB
OX
MS, in some cases, you might want to change this port number.
HTTP: port used to access TB
OX
MS as WebServer.
ModBus/TCP-Slave: port used by a ‘Master’ to access TB
OX
MS as ‘Slave’.
ModBus/TCP-Master: port used by TB
OX
MS as ‘Master’.
MTU. The MTU determines the maximum size of a TCP frames, by default 1500 bytes. 1500 bytes is the maximum. Some intermediate equipment (router, switch, …) does not support this value. It can then be reduced.
TCP/IP addresses for incoming calls. Range of addresses used during incoming calls.
TB
OX
MS uses the first address of the range and applies the following to the remote
equipment. Typically, this information is needed when TB
OX
MS is used as a Web Server, dialed from
Internet Explorer and TTBBooxx DDiiaall IItt !!. The utility TTBBooxx DDiiaall IItt !! , used to dial TB
OX
MS automatically, detects the IP address and uses
it as URL.
Avoid using addresses in the same range as the IP address defined for the LAN card of the PC used as
Browser.
1. Changing the TCP port does not affect access from TWinSoft. This is always possible.
2. The changing of TCP port is automatically applied to 'WebForms' when building the HTML pages using WebForm Studio.
Version: 1.06 50
8.5.7. Environment variables
The environment variables are used when particular configuration might be needed in external software.
Variable Value Description
TViewPath
\path The path in which the station will be created when
importing data in T. The path is the relative path from the Project workspace of T.
Example:
with the Value: \Lines\10
Result in T :
Longname
Type any long name The name typed here will be used in T,
instead of the one declared in the ‘General’ properties, which is limited to 8 characters
Version: 1.06 51
9. Resources
The resources represent the list of the hardware that your TB
OX
MS has to its disposal.
The CPU card, with its communication ports (see chapter 9.1:
‘The CPU card’
)
The hardware can be composed of Cards
fixed in the same Rack as the CPU. It can be
I/O cards or Communication cards (see chapter 9.2:
‘Adding Cards’
)
If the CPU needs to communicate in ‘ModBus Master’ to another device
(CPU, or an external ModBus device), the latter must be declared as a Remote I/O card (see chapter 14:
Remote Tags
’)
The Resources also contain 2 lists with System variables
. Systems variables have pre-
defined function (see chapter 9.4:
‘System variables’
)
9.1. The CPU-16 card
When starting a new document, TWinSoft creates automatically the CPU card; the minimum for a TBox MS project !
The communication ports of the CPU with their associated configuration and the I/O of the CPU are available from the ‘Resources’:
The CPU card is divided in several groups:
Group 0 : communication ports Group 1 : 2 digital inputs - 1 digital output (Sync. Input, Sync. Output, STOP input,) Group 2 : 1 Analog input - 2 digital inputs (Power supply voltage, temperature
warnings)
Version: 1.06 52
9.1.1. Communication ports of the CPU
By selecting the Group 0 Communication ports in the workspace, you access each port separately.
To enter the configuration of the communication port, double click the port.
Example with COM1 – RS232
Depending on the type of communication port (RS232. RS485, modem or Ethernet), different tabs are available:
Parameters: general parameters (local or modem, Baudrate, Protocol). DCV: Digital Communication Variables. Special variables with a pre-defined
function (communication error, modem online, …). (see chapter 9.3)
ACV: Analog Communication Variables. Special variables with a pre-defined
function (time-out, user ID, …). (see chapter 9.3)
Advanced: mainly ‘timing’ parameters required when CPU is ‘Master’ or ‘Slave’ in a
ModBus communication.
TCP/IP: TCP IP configuration dedicated to the communication port, when available.
Version: 1.06 53
9.2. Adding Cards
All cards other than the CPU must be added in the ‘Resources’ folder: I/O cards as well as communication cards.
Starting a new document, the only card available is the CPU. You will add all cards corresponding to your hardware into this list.
TWinSoft does not detect the Cards automatically. You have to add the Cards manually using the menu
Add a card
Version: 1.06 54
Example:
Adding a Power Supply card:
Id number of the cards in TWinSoft vs. Slot in the Rack: Type of Card Slot used in the Rack Address in TWinSoft
Power Supply (if used) Always 0 1 CPU 0: when used without Power Supply
1: when used with a Power supply or alone in prevision of using a Power Supply
Always 0
I/O card Communication card
Any slot following the CPU Same as the slot index
Example:
Version: 1.06 55
9.2.1. Adding an I/O card
The Hardware is represented in TWinSoft with a hierarchy of 3 levels:
CARD : CPU card, 16 DI card, COMBO card, Modem card, … GROUP : when there are several types of I/O on a Card, they are separated into
Groups: group of DI, group of DO, group of AI, …
CHANNEL : each physical connection, within a Group, corresponds to a channel.
See technical specifications of all I/O cards at the end of the manual.
GROUP
CARD
CHANNEL
When connected to a TB
OX
MS, the column
‘Value’ displays the current value, when the channel has been declared as a Tag.
(see chapter 10 : ‘Tags’)
When adding a Card, its Id number must correspond to its position on the Rack. Check the slot index written in the Rack.
See exam
p
les in chapter 4.4.
Version: 1.06 56
9.2.2. Adding a ‘Modem’ Card
A modem card (PSTN or GSM) is composed of a modem and a serial port (RS232 or RS485). Technical specifications are available at the end of the manual.
Once created, a ‘modem’ provides one Group 0 with communication ports.
To enter the
configuration of the modem, double
click the ‘modem’ port in the list
Example with COM4 – PSTN modem
Modem type: It cannot be changed. It corresponds to the modem of the card. Initialization: The initialization string is sent at power up of the modem and after
each connection.
If changed, it is saved in the TWinSoft document.
The numbering of communication port starts at COM4 (the previous ports are used by of the CPU). The numbering is automatically incremented at each insertion of communication card.
Version: 1.06 57
Outside line prefix: if TB
OX
MS is placed behind a telephone switch (PABX), it is the
number to get the outside line. This prefix will be applied automatically each time TB
OX
MS dials out.
Auto Answer: Number of rings after which the modem will go off hook.
Tab DCV: Digital Communication Variables
Special variables with a pre-defined function (communication error, modem online,
…) (see chapter 9.3).
Tab ACV: Analog Communication Variables
Special variables with a pre-defined function (time-out, user ID, …) (see chapter 9.3).
Tab Advanced
Mainly ‘timing’ parameters required when modem is ‘Master’ or ‘Slave’ in a ModBus communication.
9.2.3. Adding a ‘GSM / GPRS’ Card
In addition to configuration described here above, a GSM modem can be used in 2 modes:
as a GSM data modem in GPRS mode
In addition to standard modem configuration, some parameters are specific to GSM.
The main option ‘GPRS’ determine the working mode of the card:
GSM data OR
GPRS
Default Initialization and prefix can be modified from the file ‘ModemProfiles.xml’. Changes will be applied to all new document created.
Version: 1.06 58
GSM-data settings
Initialization: should not be changed PIN Code: If the SIM card you have inserted uses a PIN code, type it at the place
of the letter n
.
Example:
with the PIN code 4896, you should have in the field: AT+CPIN=“4896”
If the SIM card you have does not require a PIN code, you can leave the field as it is or erase it.
Auto Answer: number of RINGS before the modem picks-up the line.
Dialing to a GSM-data
The SIM card of a GSM has three telephone numbers: VOICE (the one you use to speak), DATA and FAX. To dial to TB
OX
MS, you have to be sure that data service is activated and you dial the
DATA number (please call your GSM operator).
About sending e-mail or Files with GSM-data
Some ISP requires specific telephone number for connecting through GSM (please check with your ISP).
In some countries, like in US for instance, GSM operators do not provide DATA service. DATA communication is then only available in GPRS mode (see below)
If you type the wrong PIN code, or you type a PIN code when the SIM card does not require one, you risk blocking the SIM card. It must then be restored with the PUK code using a mobile.
Version: 1.06 59
GPRS settings
Once you have declared a MS-GSM card, you have to activate the GPRS mode.
When selecting GPRS, TWinSoft automatically adapts Initialization and Operator Phone number fields (see next).
If the connection requires a login, select the option ‘The server requires authentication’.
If you receive a fixed IP address, declare it in ‘TCP/IP’ tab.
Initialization: You have to add in the initialization string the APN. Replace in the string
the apn
with the URL you receive from your GSM operator.
Example with Mobistar:
AT+CGDCONT=1,“IP”,“WEB.PRO.BE”. PIN Code: If the SIM card you have inserted uses a PIN code, type it at the place
of the letter n
.
Example:
with the PIN code 4896, you should have in the field: AT+CPIN=“4896”
If the SIM card you have does not require a PIN code, you can leave the field as it is or erase it.
Operator Phone number: special number to establish the GPRS connection. Typically, the number is *99***1#. Check with your operator
and type it following the command ATD.
Example with Mobistar, Proximus, SFR, AllIP, …:
ATD*99***1#
Connection at start up: when this option is selected (by default) TB
OX
MS handles
the modem to keep the connection permanently.
when this option is removed, TB
OX
MS handles the
connection according to communication variables: GPRSCon (see below)
You have to choose either ‘GSM-Data’ mode OR ‘GPRS’ mode. It is not possible to use the modem in both modes.
Version: 1.06 60
Communication Variables dedicated to GPRS
Some communication variables allow manual handling of GPRS and give information on the status.
Digital Communication Variable
COMx.GPRSCon
*
GPRS:
Handles the GPRS connection.
Working in manual connection
, writing ‘1’ forces a connection;
writing ‘0’ forces a disconnection. When working with automatic connection
, if you reset this variable the connection will stop, but after maximum 5 minutes, it will be automatically restarted.
Analog Communication Variable
COMx.GPRSState
-
GPRS:
indicates the status of the GPRS connection. Value=0 : disconnected Value=1 : currently connecting Value=2 : connected Value=3 : currently disconnecting
COMx.IPAddress
-
GPRS:
this register gives the IP address used by TB
OX
MS
during its GPRS connection. The information is available in a DWORD, but in the list of Tags, you can display it as an IP address
: from the list of Tags, right
click the Tag Display as IP address. This information is very important when working with
dynamic IP address. It can be sent for instance by e-mail (see Report Studio), to inform on IP address changing.
Version: 1.06 61
About sending alarms with GPRS
With GPRS, you are able to send e-mail or files using FTP. You create recipient(s) associated to the SMTP or FTP server you have associated to the GSM/GPRS.
Working with a manual connection
, first the RTU establishes the connection and sends the mail and/or files. Then it stops the connection. If the connection was already established, the RTU maintains the connection.
Working with an automatic connection
, the mail and/or files are sent immediately and the
connection is maintained.
GPRS IP settings
GPRS represents a TCP/IP connection using GSM network. It then requires a TCP/IP configuration.
Obtain IP address automatically:
You work with dynamic IP address which is provided by the Operator at the connection.
Use IP address:
You work with fix IP address; it corresponds to the SIM card you use.
Obtain DNS server addresses auto.:
The Operator provides you with DNS.
Use DNS Server addresses:
You want to use specific DNS addresses.
Version: 1.06 62
9.3. Communication Variables
Communication variables are dedicated registers to status of the communication. It is very useful for controlling the connection and the access level authority. Those variables are divided into 2 tabs, the Digital Communication Variables (DCV) and the
Analog Communication Variables (ACV). When you need one, you double click it from the list and declare it as a Tag. It becomes
then available in any feature of TB
OX
MS.
9.3.1. Digital Communication Variable
According to its function a Communication variable is Read/Write or Read only.
In the following table, the column R/W indicates:
- : Read only. 0 : Write ‘0’ only. 1 : Write ‘1’ only. * : Write ‘0’ or ‘1’.
Example with COM6 – GSM modem
Name R/W Description
COMx.NoReply
0
Communication:
SET by TB
OX
MS in case of communication
error. The possible errors are:
- Timeout.
- ModBus: Unknown address, wrong quantity, CRC error.
- TCP/IP: wrong closing of socket.
Must be RESET by the user.
COMx.OffHook
*
Modem:
Reading ‘1’, indicates the modem has picked-up the line and it connecting to another modem. The success of the connection can be checked from the next ‘Connect’ variables. Writing ‘0’ or ‘1’ forces the modem to hang-up.
COMx.Call
-
Modem:
Reading ‘1’ indicates the modems are synchronized with
TB
OX
MS ‘Calling’
COMx.Answer
-
Modem:
Reading ‘1’ indicates the modems are synchronized with
TB
OX
MS ‘Answering’
COMx.NoDial
0
Modem:
Reading ‘1’ indicates that no dial tone has been detected when the modem has picked-up the line. Must be RESET by the user.
COMx.GPRSCon
*
GSM:
Indicates the status of the GPRS connection. Writing ‘1’ forces a connection; writing ‘0’ forces a disconnection (see above for more details).
Version: 1.06 63
COMx.ModBusResp
0
Communication:
Reading ‘1’ indicates the port is transmitting. At
each transmission, TB
OX
MS SET this register.
To check TB
OX
MS is transmitting, you RESET this register and
test whether it is SET again (using Ladder or BASIC)
9.3.2. Analog Communication Variable
According to its function a Communication variable is Read/Write or Read only.
In the following table, the column R/W indicates:
- : Read only. * : Writable.
Example with COM6 – GSM modem
Name R/W Description
COMx.Level
*
Access Control:
access level of the user currently logged (see
chapter 17).
COMx.UserId
*
Access Control:
user Id of the user currently logged (see chapter
17). The user Id and the authority level correspond to those you have defined with the utility ' PASSWORD '. The values returns to 0 when the user has disconnected. Values can be written to those registers.
Example:
when a user is connected you can modify its level access by writing a value in the register COMx.level (level available: 0, 1, 2 or 3).
Those values can be stored in analog chronology for keeping a history on the access.
When a user disconnects (Logout), the
register returns to '0
COMx.Timeout
*
Modem:
global time-out for hanging-up the modem when there is no communication. Correspond to the ‘Inactivity time-out’ in the ‘Advanced properties’ of the modem.
COMx.GPRSState
-
GPRS:
indicates the status of the GPRS connection. Value=0 : disconnected Value=1 : currently connecting Value=2 : connected Value=3 : currently disconnecting (see above for more details)
COMx.IPAddress
-
GPRS:
this register gives the IP address used by TB
OX
MS
during its GPRS connection. The information is available in a DWORD. To be interpreted, you should compute this Tag with mask to read the 4 bytes composing the IP address.
Version: 1.06 64
9.4. System variables
The system variables have pre-defined functions. They are very useful to check or to act on features of TB
OX
MS.
They are divided into ‘Digital’ and ‘Analog’.
9.4.1. Digital System Variables
According to its function a register is Read/Write or Read only. In the following table, the column R/W indicates:
- : Read only. 0 : Write ‘0’ only. 1 : Write ‘1’ only. * : Write ‘0’ or ‘1’.
When the action (SET) is specified, it means that the TB
OX
MS maintains the variable at 1 to
be sure it is detected. With such a variable, you need then to reset it using BASIC or Ladder programming
Index Name R/W Description
0
TikSec
0
Tik Second:
Changes of state every second. Useful for counting time.
1
PrgRun
-
Program run:
At each starting of TB
OX
MS , this register changes to 1
and stays at 1 as long as the BASIC/Ladder program runs. This register is used in BASIC/Ladder to execute operations only at the start of the program, with the help of a positive edge trigger function.
2
NewPro
-
New program:
Start of a program flag. Changes to 1 if TB
OX
MS has
started after having received a new program. Changes to 0 after a reset of the TB
OX
MS.
3
Reboot
1
Reboot:
complete restart of TB
OX
MS. It is equivalent to hardware
reset.
4
RstWat
*
Reset Watchdog:
the watchdog checks the cycle time of BASIC/Ladder
program. In case it is longer than 1 second, it resets TB
OX
MS. This
Watchdog can be reset to reinitialize the 1 second timer in case of cycle time longer.
5
Ala_On
0
Alarm on:
this register indicates that alarm is active (not ack.). Writing 0 in this register causes a global acknowledgment of all alarms. Corresponds to a reset of the Alarms stack
6
Alaerr
0
Alarm in error:
TB
OX
MS SETs this register when an alarm failed to be
sent. This means that after the number of tries, the alarm has been auto-acknowledged. Must be RESET by the user.
7
RstAla
1
Reset Alarm:
Not used. See ‘Ala_On’ here above.
8
EnaDCr
*
Digital Chronology:
General enable of recording in digital chronology.
9
EnaACr
*
Analog Chronology:
General enable of recording in analog chronology.
10
EnaSam
*
Sampling Tables:
General enable of recording in sampling tables.
11
EnaAla
*
Enable Alarm:
General enable of generating alarms.
12
DisCrd
*
Flag digital chronology:
can be associated to any digital chronology configuration to inhibit recording. When at value ‘1’, inhibits recording in Database.
Version: 1.06 65
Index Name R/W Description
13
DisCra
*
Flag analog chronology:
can be associated to any analog chronology configuration to inhibit recording. When at value ‘1’, inhibits recording in Database.
14
DisSam
-
(Not used)
15
DisAla
-
Flag sending alarm:
can be associated to any Alarm condition. When
at value ‘1’, inhibits the sending of alarm.
16
DaySav
-
Time:
1 = summer time (the ASPE ZoneBias = + 3600 seconds).
0 = wintertime.
17
PrgEnb
*
Program Enable:
when reset to ‘0’, allows stopping the execution of BASIC/Ladder program. It can be useful to execute the program manually (see next).
18
PrgOnc
1
Program Once:
when set to ‘1’, executes the cycle of BASIC/Ladder
program once. Useful for debugging the program.
TB
OX
MS resets the variable automatically.
19
TcpIpLog
*
TCP Logging:
Setting this register activates the Debugging of TCP/IP connection. Very useful to trace problems when sending e-mail or FTP. (see chapter 11.5) When this option has been activated, the information is available from TWinSoft main menu: ‘Communication’ ‘Download’ ‘TCP/IP debugging’.
20
ALAovf
*
Alarm Overflow:
overflow in the stack of alarms. The size of the stack of alarms can be adjusted from the ‘Advanced’ properties of the RTU
21
ComErr
0
Communication error:
general communication error flag. It means that one of the communication port (of the CPU or of a communication card) used as ‘Master’ has encounter a communication error. (SET)
22
SmtpEr
0
Smtp Error:
an error occurred while sending an e-mail. (SET)
23
FtpErr
0
Ftp Error:
an error occurred while sending files. (SET)
24
NTPErr
0
NTP Error:
an error occurred while setting time of TB
OX
MS. (SET)
25
GpsVF
-
GPS:
GPS validity. GPS returns a valid signal. Validity of the signal. When changes to one, it indicates the GPS receives sufficient signals to calculate its position (from minimum 3 satellites). When changing from 0 to 1, the time of TB
OX
MS is set to the time
of GPS, with correction in regards to GMT according to the location of TBox. If you want to update the time manually, you reset the variable
26
GPRSErr
0
GPRS Error:
an error occurred during GPRS connection. TB
OX
MS
does not succeed to connect (not supported yet) (SET)
27
ModemLog
*
ModemLog:
authorizes the modem connection to be logged into chronology. The communication port is declared in the ASV.24 [PortIdLog].
The ASV.25 [EventLog] must be tagged also.
The information is available in from the communication Download TraceLog (not supported yet)
28
SystemEr
0
SystemErr:
the RTU detected an error during starting. Typically a
problem with a card (not supported yet) (SET)
Version: 1.06 66
9.4.2. Analog System Variables
According to its function a variable is Read/Write or Read only. In the following table, the column R/W indicates:
- : Read only. * : Writable.
Index Name R/W Description
0
Second
*
Time:
Second in TB
OX
MS.
1
Minute
*
Time:
Minute in TB
OX
MS.
2
Hours
*
Time:
Hour in TB
OX
MS.
3
Date
*
Time:
Day of the month in TB
OX
MS.
4
Month
*
Time:
Month in TB
OX
MS.
5
Year
*
Time:
Year in four digit in TB
OX
MS.
6
DayOfw
*
Time:
Day of the week in TB
OX
MS. (Mo=1; Tu=2; We=3; …)
7
AlaCnt
*
Alarm quantity:
Amount of alarms in the alarms stack. It means the quantity of alarms that have not been generated already. The size of the Alarm stack can be adjusted in the ‘Advanced RTU properties’).
8
AlaID
*
Alarm last index:
Absolute index of the last alarm generated
(number between 0 and 65535).
9
ALACur
*
Alarm current index:
Absolute index of the alarm being currently handled (number between 0 and 65535). Can be used to acknowledge an alarm by writing its index.
10
ALARec
*
Alarm recipient:
gives the index of the recipient of the current alarm. Can be used to acknowledge all alarms of a Recipient by writing its index (see index in the list of Recipient).
11
SamQty
*
Sampling Table:
Quantity of sampling tables defined.
12
UtcTim
-
Time:
Universal Coordinated Time (UTC). It is the number of seconds since 01/01/1970, GMT time. It is used as time-stamp reference for datalogging.
13
ZonBia
*
Time:
Time difference in seconds with GMT.
14
ZonID
*
Time:
ID of the zone where TB
OX
MS has been installed. It uses
Regional Settings of PC, therefore it is important that you configure PC according to the location where TB
OX
MS is
installed.
15
WeYear
*
Time:
week of the year.
16
CycTim
*
Time:
time for one cycle of the program (BASIC and Ladder). This register is refreshed after each cycle. Within the program, you could compute this register to memorize the highest value.
17
AAcond
-
Alarms:
Quantity of alarm conditions, which are still active.
18
LevId
-
Events:
absolute number of the last event (0…65535).
19
AppVer
-
Application version:
according to the ‘version’ indicated in the ‘Info’ of the RTU properties. This register returns a version in a WORD format: 0…65535
20
OsVer
-
Operating System version:
running in TB
OX
MS
Version: 1.06 67
Index Name R/W Description
21
OsBuil
-
Operating System build:
build number of the OS running in
TB
OX
MS
22
LoaVer
-
Loader version:
Loader version running in TB
OX
MS
23
LoaBui
-
Loader build:
build number of the loader running in TB
OX
MS
24
PortIdLog
*
Selection of the port for TCP debugging (see chapter 11.5)
25
EventLog
-
Contains internal codes used for TCP debugging (see chapter 11.5)
26
MilliS
-
TIME: With CPU-16: 10 milliseconds tik With CPU-32: 1 millisecond tik (not available yet)
27
GpsLat
-
GPS:
current latitude given by the MS-GPS.
L
atitude in degrees multiplied by 1000000 (example: 50123456 means 50 degrees + 0.123456 degree). Resolution : 11 cm. Precision 15 meters
28
Gps
Long
*
GPS:
current longitude given by the MS-GPS. Longitude in degrees multiplied by 1000000 (example: 7123456 means 7 degrees + 0.123456 degree). Resolution : 11 cm. Precision 15 meters
29
GpsAlt
-
GPS:
current altitude given by the MS-GPS. Altitude in meters. Resolution, 1 meter. Precision: depends on the quantity of satellites. Poor precision
30
GpsSats
-
GPS:
quantity of satellites detected by the MS-GPS. Must be of minimum 3, or even 4 to expect a good precision.
9.5. Timers & Counters
Timers and Counters are described in the manual BASIC & Ladder for TBox
Version: 1.06 68
10. Tags
A Tag is essential for any programming
An alarm is conditioned from a Tag.
The Datalogging mechanism records values of Tags.
BASIC/Ladder programming executes a process by handling Tags.
Any variable of the
TB
OX
MS
that you want to use in any configuration, you have to
declare it as a Tag.
There are 3 types of variables:
The Physical I/O (DI, DO, AI, AO)
The System Variables (predefined analog and digital functions)
The Internal variables, digital and analog (aka Registers)
The Tags are gathered in the folder Tags of the Project Workspace:
The Tags can be sorted into Groups of Tags.
From the list of Tags, right click. From the Context menu, select ‘New Group’. You can then move/create Tags into the Group.
GROUP of Tags
Version: 1.06 69
10.1. Physical I/O
The physical I/O’s are the signals available on I/O cards. They can be easily accessed from the ‘Resources’ (see chapter 9:
‘The Resources’
)
To create a Tag of a variable from the Resources:
select it into the list and double click it change its name and description click <OK>
If you are connected to a TB
OX
MS when the Tag is created, you
will see ***** appearing in the column ‘Value’. This is because the ModBus address of the Tag needs to be sent to TB
OX
MS (see chapter 10.3: ‘ModBus addresses’)
Once the program has been sent, the value appears.
You can send the program with this icon.
Version: 1.06 70
10.2. Internal Variables (Registers)
An internal variable (also know as Register) is an addressable location of the memory. It is used as flag, as temporary value, to make a calculation, …
There are 2 types of internal variables:
Digital (DIV) Boolean register with possible values: 0 or 1. Analog (AIV) with several formats:
8 bits, Signed or Unsigned 16 bits, Signed or Unsigned 32 bits, Signed or Unsigned Float, IEEE 754
The Internal Variables can be only created from the list of Tags.
10.2.1. Digital Internal Variable
To create a Digital Internal Variable, from the list of Tags, click ‘
Add a Tag’
.
Select
‘Digital’
Version: 1.06 71
The Definition menu pops up:
You type a Tag Name, a Comment and select as Type: ‘Internal Variable’ The initial value is the value the Tag will have at the start up of TB
OX
MS.
If you select
‘None
the value is maintained at start up.
ModBus Address is discussed in chapter 10.3
Version: 1.06 72
10.2.2. Analog Internal Variable
To create an Analog Internal Variable (also known as Register), from the list of Tags, click ‘
Add a Tag’
.
Select
‘Analog’
The Definition menu pops up:
Example with a ’32 bits – Unsigned’ internal variable
Version: 1.06 73
You type a Tag Name, a Comment and select as Type: ‘Internal Register’ For each Analog Register, the formats available are:
o 8 bits (Signed or Unsigned) o 16 bits (Signed or Unsigned) o 32 bits (Signed or Unsigned) o Float (IEEE 754)
The initial value is the value the Tag will have at the start up of TB
OX
MS.
If you leave the field empty, the value is maintained at start up.
ModBus Address is discussed in chapter 10.3
By default, TWinSoft creates Analog Internal Variable in format ‘Float’. Check it fits with the use you intend to have with the variable.
Version: 1.06 74
10.3. ModBus address
The ModBus address is the link to the outside world. When equipment must sample Tags in
TB
OX
MS, it uses its ModBus addresses; like T, SCADA or TWinSoft.
Each Tag has a unique ModBus address. By default TWinSoft proposes a ModBus address. You can change it if you want.
10.3.1. ModBus address of System Variables
With System Variables it is a little bit different; they have two ModBus addresses:
One internal and fixed ModBus address that you don’t know. That explains why
when you are connected to TB
OX
MS, even without sending a program, you still can
see values from the Resources.
One user ModBus address that you are allowed to modify if you want. When you
create a Tag of system variable, you can change its default ModBus address. In case you wish to access the Tag, you declare this user ModBus address.
While being On-line, the value of the Tag can be displayed only when TWinSoft has sent the program to TB
OX
MS.
The Tag is then available for the outside world at the ModBus address
y
ou have declared.
Other Tabs of the Tag configuration refer to menu where the Tag can be declared:
For Alarms, see chapter 12 For Datalogging, see chapter 13 For Remote Tags, see chapter 14 About Presentation-write, see next chapter
Version: 1.06 75
10.4. Tags - Presentation / Write
This tab contains configuration used when the Tag is declared in a Report or in a WebForm.
Report:
file edited with ‘Report Studio’ and used for instance as text body when sending e-mail. (Start ‘Report Studio’ from ‘Windows’ and the group of Programs of Techno Trade or from the ‘Project Workspace’ and the list of ‘Web and Report files’)
WebForm:
file edited with ‘WebForm studio’. Used to display values of Tags in a HTML page. (Start ‘WebForm Studio’ from ‘Windows’ and the group of Programs of Techno Trade or from the ‘Project Workspace’ and the list of ‘Web and Report files’)
Presentation: makes the following information available to ‘Report’ and ‘WebForm’. Description: in a Report, text displayed as ‘Header’ in sampling table or as Tag
information in chronologies when the data is retrieved.
Units: text displayed as ‘Unit’ in datalogging when the data is retrieved. It can
also be displayed when selecting as format ‘Value + unit’ in the report or WebForm.
# decimal: the quantity of decimals of the value displayed Write allowed: if the Tag is declared in a WebForm, allows defining a writing access to the
Tag, within a specific range.
Version: 1.06 76
11. IP Parameters
IP parameters consist in the global configuration for:
connecting to an ISP sending files (FTP) sending e-mail (SMTP) Time synchronization (NTP)
All IP parameters are defined in this Folder, available from the ‘Resources’.
The FTP Host, SMTP Server and NTP configurations correspond to connections to the appropriate servers. It is done for once, and called when creating a recipient of alarms. This makes creating alarm recipients very easy !
Example with alarm for sending e-mail:
The Recipient is an ‘e-mail’ address which refers to a SMTP server. This SMTP server refers to an ISP
In other way round, when TB
OX
MS generates an e-mail, it sequences the configuration like
following:
connection to an ISP connection to a SMTP Server sending to a recipient (e-mail address)
Concerning IP configuration of Ethernet card, refer to
the corresponding card in the ‘Resources’.
Concerning IP configuration for incoming calls
(WebServer), see advanced RTU properties TCP/IP
Version: 1.06 77
11.1. ISP configuration
ISP stands for Internet Service Provider. An ISP represents the entrance to Internet. It is the company you call to access an Internet service, like sending e-mail or files (FTP).
Some among the most well-known: Hotmail, AT&T, Scarlet, … When you want TB
OX
MS to send e-mail or send files to a FTP site, you subscribe an
account to an ISP.
Name: It is the name of the provider. Phone number: It is the phone number of the provider the TB
OX
MS must dial to send an e-
mail or files.
Dial Prefix: The default dial prefix to connect to an ISP (ATDT). It should not be
changed unless the modem needs a particular configuration.
If TB
OX
MS is placed behind a telephone switch, the ‘outside line prefix’ is
defined in the modem properties; it should not be added to the dial prefix (see chapter 9.2.2)
User name: It is the name of your account needed to access Internet (usually it is given
by the ISP).
Password: It is the password of your account needed to access Internet (usually it is
given by the ISP).
Using the button ‘Import…’ gives you access to an existing ISP configuration you have tested successfully on the PC. A good piece of advice
Version: 1.06 78
DNS: A DNS converts names in IP address. It is needed by the TB
OX
MS to
establish the connection with the Mail Provider in case the e-mail Server is indicated in 'text' and not with an IP address.
More and more ISP support dynamic DNS, they provide the DNS addresses
when connecting.
When it is not the case, they provide you with a ‘Preferred’ and ‘Alternate’
DNS address
You can declare several ISP entries!
Then they can be used in redundancy through the sending of e-mails. You are allowed to define several SMTP Servers (see next), associated to different ISP’s. Creating the alarm recipient, you can select the ‘Redundancy’ o
p
tion
Version: 1.06 79
11.2. FTP Host
FTP stands for File Transfer Protocol. When subscribing an account to an ISP, usually you have some Mbytes to your disposal for sending files.
The FTP host represents the target when sending files. The directory where the files are sent is defined in the Recipient (see chapter 11).
First,
TB
OX
MS
connects to Internet (through an ISP connection) and then sends the files.
Host Name: It is a free name, to recall when you create the alarm recipient. Host address: text and IP address are accepted. Connection: You select the ISP you have previously created (see above). Login: Depending on the account you have subscribed, you have a login or work
with ‘Anonymous login’.
This is the basic configuration to connect to the ‘FTP site’. You do not declare a directory in this configuration, but when declaring the ‘Recipient’ (see chapter 12.4. The Recipients). This allows creating any combination:
- several ‘FTP recipients’ to one FTP site
- several ‘FTP recipients’ to different FTP sites.
- …
Version: 1.06 80
11.3. SMTP Server
SMTP stands for Simple Mail Transfer Protocol. It is usually the main reason for subscribing an account to an ISP, for sending and reading e-mail.
The SMTP Server represents the mail server used for sending e-mail (typically the one of the ISP where we have subscribed an account).
First,
TB
OX
MS
connects to Internet (through an ISP connection) and then to the SMTP
Server.
Name: It is a free name, to recall when you create the alarm recipient. Mail Server (SMTP): It is the IP address (or the name) of the outgoing e-mail Server. It
is the unique mail Server needed. The POP3 address, for incoming e-mail, is not needed, as TB
OX
MS cannot receive e-mail.
E-mail address: It is the e-mail address of the TB
OX
MS. You can usually choose it when you
subscribe an account. This address will appear in the 'From:' when receiving the mail.
.
In order to protect the mail server (and you) against spamming, the ISP might to refuse sending e-mail if the address of the originator is not known. Therefore, be careful to indicate here the e-mail address you have received from your ISP.
Concerning e-mail, TB
OX
MS is able to send e-mail
and not to read e-mail. That explains why we speak only of SMTP and not POP3 (used for reading e-mail)
Version: 1.06 81
The Server requires Authentication: Depending on your ISP and on the way you
send e-mail, authentication might be needed to send e-mail. Usually, when you have subscribed the e-mail account at your ISP it is not required. To be sure, if you have created this account on a PC, check its configuration otherwise contact your ISP.
11.3.1. About Redundancy
If you create more than one SMTP Server, they can be used in redundancy in accordance to their order in the list. You decide to work with redundancy when creating the e-mail recipient (see chapter 12.4).
Version: 1.06 82
11.4. NTP Server
NTP stands for Network Time Protocol, an Internet standard protocol (built on top of TCP/IP) that assures accurate synchronization to the millisecond.
The NTP Server represents a server dedicated to time synchronization. First,
TB
OX
MS
connects to Internet (through an ISP connection) and then to the NTP
Server.
Example with a connection to Windows server through Ethernet Examples of Servers:
time.windows.com europe.pool.ntp.org
You will find valuable information, like lists of Servers with open access at:
www.ntp.org
public time server list
The organization pool.ntp.org proposes servers using DNS round robin, which make a random selection from a pool of open access time servers. This is good enough when working with TB
OX
MS.
Round Robin DNS technique is used when the number of access to a server is unpredictable, to balance the use of IP addresses (load balancing technique).
11.4.1. Time accuracy
When setting time, TB
OX
MS takes into account the propagation delay. This is particularly
important when connecting to the server via modem. The precision is of 1 second.
Version: 1.06 83
11.5. TCP/IP Debugging
This feature is very convenient to trace problems when sending e-mails and/or files (with FTP).
It informs on the different steps of the connection: Login to the ISP, obtain of DNS, Smtp communication, …
It is based on 3 ‘System variables’: TcpIpLog, PortIdLog and EventLog
Procedure
1. One System variable must be Tagged: Analog # 25: EventLog Keep the ModBus address as it is (22080). Do not change it.
It is not necessary to Tag the 2 other variables.
2. Make the following lines of Ladder:
Example on debugging through MS-PSTN modem (COM4)
As you can see, we use the system variables without having Tagged them (brown color). You can also Tag them if you want.
3. Once the connection is finished, look at the trace from the ‘Communication menu’
This means that we make debugging on COM4
This lines activates Debugging process
Version: 1.06 84
4. Example of TraceLog when sending e-mail works fine:
A
greement on options supported
A
uthentication (PAP or CHAP)
A
greement on options supported
Obtain DNS from ISP
SMTP (e-mail) dialog
Closing connection
TB
OX
MS uses the ‘Analog Chronologies’ to store
debugging data:
1. Check whether the size is sufficient (from the RTU properties General)
2. If you retrieve data, for instance with T,
y
ou might receive strange data!
Modem connected
Version: 1.06 85
5. Example of TraceLog when sending Files (FTP) works fine:
A
greement on options supported
A
uthentication (PAP or CHAP)
A
greement on options supported
Obtain DNS from ISP
FTP (sending files) dialog
Closing connection
Modem connected
Version: 1.06 86
12. Alarms
12.1. Introduction
Alarm module of TB
OX
MS is the gate to the outside world.
An alarm consists in a communication event, not only for sending warning messages but to establish a connection, like we will see.
Via alarms, you are able to call a SCADA, send SMS or message to Pagers, send e-mail, send files to a FTP site, dial another TB
OX
MS or send a report to a printer.
Alarms can be used also to send historical data on regular base using e-mail or FTP. The historical data is sent as the attached file of a report, developed using
Report Studio
(see
from ‘Windows’ the group of programs of ‘Techno Trade’).
TView
, the supervisory software can then be used to collect data from a mail box or a FTP
site. The initiation of alarms in the TB
OX
MS relies on the variation of digital or analog Tags.
For example, an intrusion contact or a flow level generates a call.
There are two ways of activating an alarm:
By a condition: an edge on a digital Tag or the value of an analog Tag that passes
below a minimum threshold or above a maximum threshold, with adjustable hysteresis.
By the Ladder diagram: a complex Ladder sequence generates an alarm through a
specific function.
The first option affords a simple and quick way to create alarms (a state change of a digital Tag or the variation of an analog Tag value to activate the alarm).
The Ladder diagram allows you to create a complex automated alarm condition by using (for example) priorities or a set of analog or Boolean conditions.
Each new alarm is immediately entered into a 32-alarms queue (adjustable) and processed, according to its severity level. Alarms are generated one by one. The alarm queue represents an internal buffer of alarms: if several alarms happen at the same time or if a communication port is not available when the alarm happens.
The Events stack, gives information about alarms status (Started – Stopped – Acknowledged).
The Events stack is discussed at chapter 12.7
Version: 1.06 87
To access the definition of Conditions, click the folder ‘Alarms’ in the Project workspace and select ‘Conditions’.
According to the Tag you select, you define a digital alarm condition or an analog alarm condition.
12.2. Digital Alarm Condition
Tagname: The Tag selected to generate the alarm. Type: The edge on which the alarm is going to be started (rising, falling or both). Message or Report: text or file associated to the alarm.
Depending on the type recipient associated, you can send a message or a report. It is the SMS message sent to a GSM, the message/report sent as e­mail, the message/report printed, or the file sent by FTP …
It also appears in the table of alarms, to distinguish them (see chapter 12.7). If the alarm condition sends an e-mail, it can be of 2 kinds:
Message:
a text message is sent and it appears in the ‘object’ field of the e-mail
Report:
sending of a report created with
Report Studio
. The report can be created from the Project Workspace and the list of ‘Web & Report files’.
Recipient: Select a Recipient or a group of recipients. The ‘person’ you wish to contact
in case of alarm (see ‘Recipients’ below). In case you select a group of Recipients, TB
OX
MS executes a chain: it calls
the first one in the group; in case the alarm cannot be acknowledged after the number of tries, TB
OX
MS automatically calls the next Recipient in the group.
It is the equivalence to ‘Chain’ with previous generation of RTU, the
A
.
Filter: The time in hour:minute:second during which the condition must stay TRUE,
before the call is generated.
Version: 1.06 88
Handling: The handling option allows blocking each alarm condition, manually or
automatically.
Enabled:
alarm condition always active.
Disabled:
alarm condition always de-activated.
PowerF:
alarm condition disabled when there is a main power failure.
DisAla:
alarm condition de-activated when the system variable ‘DisAla’ is at 1.
Severity: Each alarm can be assigned a level of severity: Low, Normal or High. When
several alarms are still present in the queue and then not processed yet,
TB
OX
MS generates the calls according to the highest severity.
End of Alarm: When the alarm condition is finished, an alarm is automatically sent to the
same recipient with the same message.
Example:
for a ‘positive edge’ alarm, it is when the Tag returns to ‘0’.
It is also useful when the alarm condition is active when TB
OX
MS starts up.
When ‘end of alarm’ is checked, an alarm is automatically generated when the alarm condition disappears (see illustration chapter 12.7:
Alarms table
)
Call all Recipients: In case you select a group of Recipients, TB
OX
MS executes a
link between recipients: it calls all Recipients one after each other.
Version: 1.06 89
12.3. Analog Alarm Condition
Tagname: The Tag selected to generate the alarm. Type: Maximum or Minimum.
The threshold for which the alarm will be started. If the value of the analog Tag passes under (minimum) or over (maximum) this threshold, the alarm is started. If an alarm must be generated for both a maximum and a minimum threshold, 2 conditions must be declared with the same Tag.
Value: The threshold value, depending on the format defined when creating the Tag
(see chapter 10.
The Tags
).
Hysteresis: The amount that the level must fall or rise below or above the Max. or Min.
value before an alarm can be re-started
Recipient: Select a Recipient or a group of recipients. The ‘person’ you wish to contact
in case of alarm (see ‘Recipients’ below). In case you select a ‘group of Recipients’, TB
OX
MS calls the first one in the
group. In case the alarm cannot be acknowledged after the number of tries,
TB
OX
MS automatically calls the next Recipient in the group.
It is the equivalence to ‘Chain’ with previous generation of RTU, the
A
.
Version: 1.06 90
Message or Report: text or file associated to the alarm.
Depending on the recipient associated, it is the SMS sent to a GSM, or the message/report sent as e-mail or the text printed, or the file sent by FTP …
It also appears in the table of alarms, to distinguish them (see chapter 12.7). If the alarm condition sends an e-mail, it can be of 2 kinds:
Message:
a text message is sent and it appears in the ‘object’ field of the e-mail
Report:
sending of a report created with ‘Report Studio’. The report can be
created from the Project Workspace and the list of ‘Web & Report files’.
Filter: The time in hour:minute:second during which the condition must stay TRUE,
before the call is generated.
Handling: The handling option allows blocking each alarm condition, manually or
automatically.
Enabled:
alarm condition always active.
Disabled:
alarm condition always de-activated.
PowerF:
alarm condition disabled when there is a main power failure.
DisAla:
alarm condition de-activated when the system variable ‘DisAla’ is at 1.
Severity: Each alarm can be assigned a level of severity: Low, Normal or High. When
several alarms are still present in the queue and not processed yet, TB
OX
MS
generates the calls according to the highest severity.
End of Alarm: When the alarm condition is finished, an alarm is automatically sent to the
same recipient with the same message.
Example:
for a ‘maximum’ alarm, it is when the value returns below
maximum - hysteresis.
It is also useful when the alarm condition is active when TB
OX
MS starts up.
When ‘end of alarm’ is checked, an alarm is automatically generated when the condition of alarm disappears (see illustration chapter 12.7:
Alarms table
)
Call all Recipients: In case you select a group of Recipients, TB
OX
MS executes a
link between recipients: it calls all Recipients one after each other.
Version: 1.06 91
12.4. Recipients
To access the definition of Recipients, click the folder ‘Alarms’ in the Project workspace and select ‘Recipients’.
The types of recipients supported are: Internal: the alarm is saved in the stack of events and no call is generated.
It can be used to memorize a particular event without generating an alarm or to test an alarm condition.
ModBus: it can be Master or Slave.
It is used to establish a ModBus connection to another ModBus device or a SCADA (for instance T). The difference between Master and Slave concerns the handling of the modem connection and acknowledgement. A ‘Slave’ connection
means that TB
OX
MS dials an equipment and doesn’t do
anything else. The dialed equipment will sample, acknowledge and hang-up. Typically used for instance when dialing T. A ‘Master’ connection
means that TB
OX
MS dials a ModBus equipment and
will also sample this equipment (with Remote Tags).
TB
OX
MS will then be also responsible of acknowledgement (see chapter 9.4:
System variables
) and hanging-up (see ‘Advanced’ properties of the
communication port used)
Pager/SMS: to send SMS to a mobile or message to a Pager.
Select the Service corresponding to the pager or mobile and a Modem. Type the Phone Number of the Pager or Mobile. The default Dial prefix is ATDT. It should not be changed unless the modem needs a particular configuration. If TB
OX
MS is placed behind a telephone switch, the ‘outside line prefix’ is
defined in the modem properties (see chapter 9.2.2)
Version: 1.06 92
Printer: sending of message(s) or report to a local printer. E-mail: If you have subscribed an e-mail account (see chapter 11.3.
SMTP Server
),
the TB
OX
MS is able to send an e-mail. You only have to specify the e-mail
address of the recipient.
FTP: TB
OX
MS is able to send files to a FTP Host (see chapter 11.2.
FTP Host
).
In the recipient configuration you only need to indicate the directory where
you want to send the files.
NTP: TB
OX
MS is able to synchronize its clock with an external NTP server.
In the recipient, you only select a server you have created in the list of NTP Servers (see chapter 11.4.
NTP Server
).
Sending of e-mail supports Redundancy. If you have created several SMTP Servers and you select ‘Redundancy’ instead of a Server, TB
OX
MS will use the
first one in the list (see chapter 11.3. SMTP Servers. If it fails, it will try with the second one and so on…
Version: 1.06 93
12.5. Group of Recipients
A group of recipients is composed of several recipients, which can be of different types (SMS, e-mail, …). You can declare several groups.
Then previous to creating groups of recipients, you have to create the recipients (see above).
You can then associate an Alarm condition to a ‘recipient’ or a ‘group of recipients’. Working with groups of recipients offers 2 possibilities:
1. You select the option ‘Call all recipients’:
the alarm is sent to all recipients, one after
each other ( equivalent to the ‘Link’ with previous generation of RTU, the
A
).
2. You don’t select the option ‘Call all recipients’:
the alarm is sent to the first one in the list then if it fails to the second then if it fails to the third … When it succeeds the sending stops. ( equivalent to the ‘Chain’ with previous generation of RTU, the
A
).
Version: 1.06 94
12.6. Messages
To access the definition of Alarm messages, click the folder 'Alarms' in the Project workspace and select 'Messages'.
Message number : indicates the index of message corresponding to its position in the list
of messages. Type a message of maximum 120 characters. This message is user specific:
- If it is for a Digital Pager, it will consist only of numbers.
- If it is for a Text Pager or for a GSM, it will not contain accent (ü, é, à, ...)
The Following is not available yet
In all cases, a message can contain the value of a Tag. The syntax is the following:
~Xyyyyy ~
~ : The first character indicates that what follows is the value of a ModBus address. The
value sent is the value from the moment of the call.
X : represents the type of the variable:
Type Description
I Integer (-32768.. 32768) W Word (0.. 65535) C Choice (for example edges: POS, NEG or DEL) S Text (comments, TEL number, scaled value of Terminal/.Minitel Tags,…) R Real (only Factor an Offset of Terminal/Minitel Tags) B Byte (0.. 255, represented as 3 ASCII characters) t Time (represented as 2 ASCII characters) j Day of the week m month 0 (zero) Byte represented in binary format f Floating point D Double word
- Character string d Digital state (represented as 0/1) o (small letter) Digital state (represented as ON/OFF) # Digital state (represented as --------/########)
1.. 9, a.. f Digital state (according to the definition of digital states, only valid from 1 to
15)
h Time: hh:mm
Version: 1.06 95
yyyyy: represents the ModBus address of the variable. It can be checked from the list
of Tags (see chapter 10.3.
ModBus address
)
Examples of message Messages sent
ANA0=~B64~too high ANA0=234 too high
Register AIR0=~W20480~ Register AIR0=24563
Motor is ~o32~ Motor is OFF
12.7. Alarms table
The Alarms table displays the Events stack of TB
OX
MS.
The Events stack is the visible part of the handling of alarms in TB
OX
MS.
The internal alarms queue is not accessible. You access the Alarms table from the main menu: Communication Download Alarms
The Alarms table does not only display alarms generated in TB
OX
MS, but also system
events like start-up of the program, Reset of the TB
OX
MS, …
Date/Time of the
start of the
condition
Message
Acknowledg. Status of the
Start
Recipient
Date/Time of the
end of the
condition
Acknowledg.
Status of the
End
Version: 1.06 96
12.7.1. Columns description
Start Timestamp: Date and Time when the alarm condition appears (‘Start’ condition) Message: Message (or name of the file) associate with the alarm.
System events appear between brackets. Start: Acknowledgement status of the ‘Start’ condition.
The possibilities are:
- Not ack.:
the alarm is still in process.
- Ack’ed:
the alarm has been successfully processed.
- Auto ack.:
the alarm has not been processed successfully. In case of ‘system events’, it is always the case as it is not an alarm but an event
Recipient: The name of the Recipient (from the list of Recipient). The name is listed only when the sending of the alarm
succeeded. This allows, when chaining recipients, to know the one who
as been used. In case of ‘system events’, there is no name.
End Timestamp: Date and Time when the alarm condition disappears (‘End’
condition).
End: Acknowledgement status of the ‘End’ condition. When creating an alarm condition, there is an option ‘Notify end of
alarm’. This option will automatically generate an alarm when the
condition generating the alarm disappears.
The possibilities are:
- Not ack.:
there is a ‘Notify end of alarm’ condition and the alarm is
still in process.
- Ack’ed:
the ‘end of alarm’ has been successfully processed.
- Auto ack.:
the ‘end of alarm’ has not been processed successfully. When there is no ‘end of alarm’, it is immediately indicated as ‘Auto ack.’
Version: 1.06 97
13. Datalogging
13.1. Introduction
Datalogging relies on the database inside TB
OX
MS. Datalogging allows memorizing
events of your process, in order to visualize its history.
TB
OX
MS contains 72 Kbytes of memory for recording events; the latter is what we call the
database of TB
OX
MS.
There are two categories of databases:
The Chronologies
Chronologies are 'On event' recordings, by mean of changes in Tags. Each event is recorded with the time, date, Tag and its status or value (see important note about timestamp next page).
Example of ‘digital event’:
The changing of status of the Tag represents the events.
Example of ‘analog events’:
The variation of the Tag represents the events.
TB
OX
MS stores chronologies in 2 tables: one for digital events and one for analog events.
t
0
1
t
20
40
60
80
100
120
140
160
180
Version: 1.06 98
The Sampling Tables.
Sampling tables use ‘Periodical’ recording (minimum period = 1 second). Recording in Sampling tables happens at regular intervals and does not depend on signal variations; it uses the clock of the CPU to determine the recording.
Only the date and time of the last recording are stored, and they therefore require less memory than do chronologies.
Example of ‘periodical recording’:
Each Tag is recorded into a separate table. There is no practical limit in the number of tables, but the size of each table is limited.
The database information recorded in
TB
OX
MS
can be retrieved with the use of SCADA
software such as
T
or other HMI package with ‘TComm.dll’ based driver (please call
your distributor).
tem
p
erature
9 :30 9 :45 10 :00 10 :15 10 :30
10 :45
t
By doing a compilation you can check the space of memory available (see chapter 6.6.2).
Recording into chronologies happens ‘on event’, but the minimum resolution in timestamp is the second. The sampling for Tags used in Ladder/Basic depends on the cycle of the process. For other Tags, sampling is executed every second. In case of recording using Ladder/BASIC, with several records during the same second, the data is sorted with the chronological order (latest at the top) but with the same second.
Version: 1.06 99
13.2. The chronologies
13.2.1. Digital chronologies
Example of an entry in Digital chronology:
Recording of the starting and stopping of a
‘Pump_1’.
Edges: Recording on positive and (or) negative edge.
Handling:
Enabled:
always recorded.
Disabled:
never recorded.
PowerF:
recording disabled in case of main power failure.
DisCRD:
recording disabled when the system variable ‘DisCRD’ is at 1.
13.2.2. Analog chronologies
Example of an entry in Analog chronology:
Recording of a variation of 2.5 bars in
‘Pressure_Pipe1’ input.
Variation: Recording in case of variation (higher or lower) in comparison with the previous
recording. The unit is expressed according to the format selected in the Tag definition (see chapter 10.2.2:
Analog Tags
).
Handling:
Enabled:
always recorded.
Disabled:
never recorded.
PowerF:
recording disabled in case of main power failure.
DisCRA:
recording disabled when the system variable ‘DisCRA’ is at 1.
Version: 1.06 100
13.3. The sampling tables
Type: TB
OX
MS is able to execute calculations on a minimum time-base of 1 second.
The result of the calculation is written in the sampling table after the period selected (see next). This value can be:
- Minimum
: minimum value during the period.
- Maximum :
maximum value during the period.
- Average :
average value calculated during the period. For each period a
new average is calculated.
It is not possible to record average value with 32 bits variables.
- Instantaneous :
value at the moment of the recording.
- Incremental :
TB
OX
MS records the difference between the current value and
the value at the moment of previous recording.
Example of incremental recording:
Value of the Tag 865 878 902 905 965 985
Incremental value
recorded
… 13 24 3 60 20
Period Period Period Period Period Period
Loading...