0% found this document useful (0 votes)
14 views

TBoxLT2 Uk 1.09

The document provides a user's guide for the LT2 series of TBox hardware models, including instructions, specifications, certifications, and safety information. It contains sections on presentation of the hardware models, hardware installation, technical specifications regarding operating systems, communications protocols, environmental considerations, and certifications for safety, EMC and hazardous locations. The guide is intended to ensure proper use of the equipment and compliance with instructions to avoid injury and damage.

Uploaded by

nddbd8jhrs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

TBoxLT2 Uk 1.09

The document provides a user's guide for the LT2 series of TBox hardware models, including instructions, specifications, certifications, and safety information. It contains sections on presentation of the hardware models, hardware installation, technical specifications regarding operating systems, communications protocols, environmental considerations, and certifications for safety, EMC and hazardous locations. The guide is intended to ensure proper use of the equipment and compliance with instructions to avoid injury and damage.

Uploaded by

nddbd8jhrs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 197

LT2

User's Guide
Cabling & Technical Specifications
Version 1.09
Certifications

Hazardous
Area
CE FCC CSA for US C-Tick A-Tick RoHS Class I,
and Canada Division 2

Disclaimer
Every effort has been made to ensure the accuracy of the information in this guide. However, Semaphore assumes no
responsibility for the accuracy of the information.
Product information is subject to change without notice.

Windows 2003, XP, VISTA, 2008, 7, 8, 10 are trademark of Microsoft Corp.


Internet Explorer is a trademark of Microsoft Corp.

Copyright
 2012-2016 by

Drève Richelle, 161 - bâtiment M


B-1410 Waterloo
Edition: August 26, 2016
TWinSoft Version: 11.04
Author: Jean Burton

Version : 1.09 2
Important Safety Instructions
Read and understand all instructions. Save these instructions.
 Read the instruction manual carefully before using the equipment and comply with the instructions that it
contains to avoid mistakes and to prevent any personal injury or damage to property.
 WARNING: It is mandatory that this equipment is earthed by the rack. Connect the crimp terminal ring to the
earth with a stranded wire between 1.5 and 2.5 mm² inclusively. The cable must be crimped consistent with
rules of good practice.
 Installation must be carried out by suitable, competent personnel, according to the steps and stated
specifications described in this manual.
 Use only the approved color-coded wires for connecting to mains. The green/yellow colored wire can be only
used as earth wire.
 This equipment has been designed for use only by qualified and instructed personnel in an industrial
environment. This equipment must be operated in a restricted access location according to IEC60950.
 It is Safety Class III equipment, according to IEC classification; this equipment must be powered by a Safety
Extra Low Voltage (SELV).
 This equipment has been designed to meet IEC60950-1 requirements (safety of information technology
equipment)
 This equipment has been designed for indoor use in a Pollution Degree 2 environment (dry non-conductive
pollution).
 The module must be fastened to the rack using a screw driver, with a recommended minimum torque of 0.5
Nm.
 CAUTION – Never power the module when not fixed on the rack. Switch off and disconnect power before
removing the module from the rack.
 Connection from the equipment to mains must be protected by a circuit breaker of 16 A on both line and
neutral.
 CAUTION – To reduce the risk of fire, use only No. 26 AWG or larger telecommunication line cord.
 Do not use your TBox in a wet environment.
 Using this instrument in a way not specified by these instructions can impair the equipment safety. Do not
operate the instrument outside its rated supply voltage and environmental ranges.
 Do not open power supply unit. There are no user serviceable parts inside.
 Do not connect or disconnect any connector when powered.
 Protect your TBox from environmental hazards such as dirt, dust, food, liquids, excessive temperature, and
sunlight overexposure.
 Keep your TBox away from direct or excessive moisture or rain and extremely hot or cold temperatures to
ensure that the TBox is used within the specified operating range.
 CAUTION – Risk of explosion if battery is replaced by an incorrect type or is incorrectly installed. Be careful to
insert the battery with the right polarity. Dispose of used batteries according to the local regulations.
 This equipment is suitable for use in Class I, Division 2, Groups C-D
 WARNING: Do not open the box in explosive atmosphere

Canada
The TBox LT2 must be mounted in a suitable protective enclosure, which incorporates means to allow for field
wiring connections in accordance with Section 18 of the Canadian Electrical Code (CEC), Part I, where the suitability
of the final combination is to be determined by CSA or the Inspection Authority having jurisdiction.

Version : 1.09 3
Environmental Considerations

Battery Disposal
! CAUTION: There is a danger of a new battery exploding if it is incorrectly installed. Replace the
battery only with the same or equivalent type recommended by the manufacturer. Do not dispose of
the battery along with household waste. Contact your local waste disposal agency for the address of
the nearest battery deposit site.

Your TBox uses a lithium coin cell battery. The lithium coin cell battery is a long-life
battery, and it is very possible that you will never need to replace it. However, should
you need to replace it, see chapter 19.2 for instructions.

General Precautions in Cabling


 To avoid electrostatic discharge, drain off electrostatic charges by touching a know earth
immediately before handling TBox, touching front plate toggle switch, connectors or cables.
 Ethernet cabling must be with Shielded SFTP cable to guarantee class B immunity.
 Cabling of Inputs/Outputs, RS232 connections, GSM antennas cannot exceed 30 m., neither leave
the building without surge protection.
Cabling to DC power, PSTN modem and RS485 can exceed 30 m.
 In case of DC power to a distribution network, it is mandatory to use a surge protection.

Certifications
SAFETY CSA CAN/CSA C22.2 No 60950-1-07
ANSI/UL 60950-1:2005 (2nd edition)
CEBEC IEC 60950-1:2005 + corrigendum 2006 + A1:2009
EMC EN 61000-4-2:1995 + A1:1998 + A2:2001 EN 61000-4-8:1993 + A1:2001
EN 61000-4-3:2002 + A1:2002 + A2:2005 EN 61000-4-11:2004
EN 61000-4-4:1995 + A1:2000 + A2:2001 EN 55011:1998 + A1:1999 + A2:2002
EN61000-4-5:2006 EN 61326-1:2006
EN 61000-4-6:1996 + A1:2000 + A2:2005
FCC CFR47: 2005 (Part15 Sub Part B)
EN55011: 1998 +A1, A2
CE Low Voltage directive: 2006/95/EC
Electromagnetic Compatibility Directive: 2004/108/EC
C-TICK ACMA N3413
A-TICK AS/ACIF S042.1:2006
AS/ACIF S042.3:2005
RoHS
Class I, Division 2 CSA Std C22.2 No 0-M1991 - General Requirements – Canadian Electrical Code Part II
Gr. A, B, C, D - T4 CSA Std C22.2 No 142-M1987 - Process Control Equipment
CSA Std C22.2 No 213-M1987 – Non Incendive Electrical Eqpt for Use in CI, Div 2 Hazardous Loc.
UL 916 (4th Edition) - Energy Management Equipment
ANSI/ISA–12.12.01–2007 – Non incendive Electrical Eqpt. for Use in CI and II, Div 2 and Cl III, Div 1
and 2 Hazardous (Classified) Locations
CAN/CSA C22.2 No. 60950-1-07 - Information Technology Eqpt – Safety – Part 1: General Rqmts
ANSI/UL 60950-1, 2nd Edition - Information Technology Equipment – Safety – Part 1: General Rqmts

Version : 1.09 4
TABLE OF CONTENTS
PRESENTATION...................................................................................................... 11
1. How to use this manual?............................................................................................ 14
1.1. What is in the manual? ............................................................................................... 14
1.2. What is not in the manual? ......................................................................................... 14
2. The Hardware Models................................................................................................ 15
2.1. LT2-530-x ..................................................................................................................... 15
2.2. LT2-532-x ..................................................................................................................... 15
2.3. LT2-540-x ..................................................................................................................... 15
2.4. LT2-542-x ..................................................................................................................... 16
HARDWARE ......................................................................................................... 17
3. Installation of the TBox-LT2 ........................................................................................ 18
3.1. Installation of the Rack on a DIN rail .......................................................................... 18
3.2. Installation on a wall ................................................................................................... 18
3.3. Earthconnection .......................................................................................................... 18
3.4. Cabling ........................................................................................................................ 19
TWINSOFT - GETTING STARTED ................................................................................ 21
4. Installation of TWinSoft ............................................................................................. 22
4.1. System requirements ................................................................................................... 22
4.2. Installation of the CD-ROM ......................................................................................... 23
4.3. Programs of ‘TWinSoft Suite’ ...................................................................................... 25
5. Starting TWinSoft ...................................................................................................... 26
5.1. Wizard ......................................................................................................................... 27
5.2. Communicating with TBOX LT2 .................................................................................... 28
5.3. PC Communication Set up ........................................................................................... 28
5.3.1. Communication possibilities of TWinSoft ...................................................................... 29
5.3.2. IP setting of PC................................................................................................................ 29
5.3.3. IP setting of TWinSoft ..................................................................................................... 31
5.4. Factory IP address - changing IP address .................................................................... 32
5.5. Testing communication ............................................................................................... 33
5.6. Reset of TBox LT2......................................................................................................... 34
5.6.1. Global reset of TBox LT2 ................................................................................................. 34
5.6.2. Working Modes Available with Toggle Switch ................................................................ 34
5.7. Sending ‘Operating System’ ........................................................................................ 35
5.8. LED « RUN » ................................................................................................................ 35
5.9. Saving and Sending a Program ................................................................................... 36
5.9.1. Saving a document – Backup document ........................................................................ 36
5.9.2. Compiling an application ................................................................................................ 36
5.9.3. Sending an application ................................................................................................... 37
TWINSOFT - PROGRAMMING................................................................................... 39
6. Introduction .............................................................................................................. 40
7. RTU properties .......................................................................................................... 41
7.1. General properties ...................................................................................................... 42
7.2. Add-ons ....................................................................................................................... 43
7.3. Protection .................................................................................................................... 43
7.4. IP Security .................................................................................................................... 44
7.4.1. Firewall ........................................................................................................................... 44
7.4.2. HTTPS.............................................................................................................................. 44
7.4.3. SSH .................................................................................................................................. 45
Version : 1.09 5
7.5. Info properties ............................................................................................................. 45
7.6. Advanced ..................................................................................................................... 45
7.6.1. Start/Stop ....................................................................................................................... 45
7.6.2. Alarms............................................................................................................................. 47
7.6.3. Sampling Tables .............................................................................................................. 50
7.6.4. Temperature ................................................................................................................... 50
7.6.5. ModBus Transactions ..................................................................................................... 51
7.6.6. Ports................................................................................................................................ 51
7.6.7. TCP/IP ............................................................................................................................. 52
7.6.8. Environment variables .................................................................................................... 53
7.6.9. Power Fail ....................................................................................................................... 54
7.6.10. Web and Report.............................................................................................................. 54
7.6.11. Plug&Go .......................................................................................................................... 55
8. Resources .................................................................................................................. 56
8.1. The CPU Card............................................................................................................... 56
8.2. Communication Ports .................................................................................................. 56
8.2.1. Communication ports tabs ............................................................................................. 57
8.2.2. Serial ports...................................................................................................................... 57
8.2.3. Ethernet .......................................................................................................................... 58
8.2.4. GSM 3G modem ............................................................................................................. 58
8.2.5. USB ................................................................................................................................. 63
8.3. Communication Variables ........................................................................................... 64
8.3.1. Digital Communication Variable ..................................................................................... 64
8.3.2. Analog Communication Variable .................................................................................... 65
8.4. Groups of I/Os ............................................................................................................. 67
8.5. System variables.......................................................................................................... 68
8.5.1. Digital System Variables.................................................................................................. 68
8.5.2. Analog System Variables................................................................................................. 70
8.6. Timers & Counters ....................................................................................................... 74
9. Tags & Variables ........................................................................................................ 75
9.1. Physical I/O.................................................................................................................. 76
9.1.1. Analog I/O....................................................................................................................... 77
9.2. Internal Variables (Registers) ...................................................................................... 78
9.2.1. Digital Internal Variable .................................................................................................. 78
9.2.2. Analog Internal Variable ................................................................................................. 79
9.2.3. Text Internal Variable ...................................................................................................... 80
9.3. ModBus address .......................................................................................................... 81
9.3.1. ModBus address of System Variables ............................................................................. 81
9.4. Tags - Presentation / Write ......................................................................................... 82
9.5. Run Time Parameters .................................................................................................. 83
9.5.1. Modbus Device ............................................................................................................... 83
9.5.2. Alarm Parameters ........................................................................................................... 83
9.5.3. Datalogging Parameters ................................................................................................. 84
9.5.4. IP Parameters.................................................................................................................. 84
9.5.5. GSM/GPRS Parameters ................................................................................................... 85
9.5.6. RTU Properties................................................................................................................ 86
10. IP Parameters ......................................................................................................... 87
10.1. ISP configuration ..................................................................................................... 88
10.2. FTP(S) Server ............................................................................................................ 89
10.3. SFTP Server .............................................................................................................. 90
10.4. SMTP(S) Server ........................................................................................................ 91
10.4.1. About SMTP Redundancy ............................................................................................... 92

Version : 1.09 6
10.5. POP3 Server ............................................................................................................. 92
10.5.1. Alarm Acknowledgment through POP3.......................................................................... 93
10.6. NTP Server ............................................................................................................... 94
10.6.1. Time accuracy ................................................................................................................. 94
10.7. DynDNS .................................................................................................................... 95
10.7.1. How to configure DynDNS in TBox ................................................................................. 95
10.8. Virtual Server ........................................................................................................... 97
10.9. IP Bridge .................................................................................................................. 98
10.9.1. Introduction .................................................................................................................... 98
10.9.2. Configuration .................................................................................................................. 98
10.9.3. Example with MS-CPU32X. ............................................................................................. 99
10.9.4. Sending Configuration through a Bridge ...................................................................... 100
10.11. Trace Log ............................................................................................................... 101
11. IP Security ............................................................................................................ 102
11.1. VPN ........................................................................................................................ 102
11.1.1. Introduction .................................................................................................................. 102
11.1.2. How does OpenVPN work ? ......................................................................................... 102
11.2. Firewall .................................................................................................................. 105
11.2.1. Firewall “Input” ............................................................................................................ 105
11.2.2. Firewall “Forward” ....................................................................................................... 107
12. Alarms ................................................................................................................. 109
12.1. Introduction ........................................................................................................... 109
12.2. Digital Alarm Condition ......................................................................................... 110
12.3. Analog Alarm Condition ........................................................................................ 112
12.4. Recipients .............................................................................................................. 114
12.5. Group of Recipients ............................................................................................... 117
12.6. Messages ............................................................................................................... 117
12.6.1. SMS coding ................................................................................................................... 118
12.6.2. Value of Tag in a message ............................................................................................. 118
12.7. Alarm Timetables .................................................................................................. 119
12.7.1. Time Slices .................................................................................................................... 119
12.7.2. Holidays ........................................................................................................................ 119
12.7.3. Timetables .................................................................................................................... 120
12.8. Alarms Table .......................................................................................................... 121
12.8.1. Columns description ..................................................................................................... 121
13. ReadSMS/POP3 embedded .................................................................................. 122
13.1. Introduction ........................................................................................................... 122
13.2. Acknowledgment of an alarm by sending data to the RTU................................... 123
13.2.1. Message sent by TBox .................................................................................................. 124
13.2.2. Acknowledgment by sending a SMS............................................................................. 124
13.2.3. Acknowledgement by sending an e-mail ..................................................................... 124
13.3. Controlling the RTU using SMS message or POP3 ................................................. 125
13.3.1. Using pre-defined messages(-)................................................................................... 125
13.3.2. Writing Tag with Direct addressing ( W ) ..................................................................... 126
13.3.3. Writing Tag with Indirect addressing – analog ( N ) ..................................................... 126
13.3.4. Writing Tag with Indirect addressing - digital ( D ) ...................................................... 126
13.3.5. Access Protection ( P ) ................................................................................................. 127
13.3.6. Acknowledgment ( A ) ................................................................................................. 127
13.3.7. SET a digital Tag ( S ) .................................................................................................... 128
13.3.8. RESET a digital Tag ( R ) ................................................................................................ 128
13.3.9. Writing minutes since midnight into a register ( h ) .................................................... 128
13.4. Automatic Update of a Recipient’s tel. number .................................................... 129
Version : 1.09 7
13.5. ReadSMS status ..................................................................................................... 129
13.6. Get Message in Text Tag ........................................................................................ 130
14. Datalogging .......................................................................................................... 131
14.1. Introduction ........................................................................................................... 131
14.2. The chronologies ................................................................................................... 133
14.2.1. Digital chronologies ...................................................................................................... 133
14.2.2. Analog chronologies ..................................................................................................... 133
14.3. The sampling tables............................................................................................... 134
15. ModBus Transactions ........................................................................................... 136
Introduction.......................................................................................................................... 136
15.1. Creating a Remote Device ..................................................................................... 136
15.2. Creating a ModBus Transaction ............................................................................ 137
15.3. ModBus Transactions through modem ................................................................. 139
15.4. Timing configuration of ModBus Transactions ..................................................... 139
16. Periodic Events ..................................................................................................... 140
17. Protection (Access security) .................................................................................. 142
17.1. Access Protection on Communication Ports .......................................................... 142
17.1.1. ModBus Protection ....................................................................................................... 142
17.1.2. Monitoring Access Level ............................................................................................... 144
17.1.3. ReadSMS protection ..................................................................................................... 144
17.1.4. HTTP Protection............................................................................................................ 145
17.1.5. ModBus TCP protection on socket ............................................................................... 146
17.1.6. FTP Protection .............................................................................................................. 147
17.1.7. Advanced IP Configuration ........................................................................................... 147
17.2. Document protection............................................................................................. 147
17.2.1. TWinSoft Document Protected .................................................................................... 147
17.3. Password utility ..................................................................................................... 148
17.4. Login/Logout ......................................................................................................... 149
17.4.1. With TWinSoft .............................................................................................................. 149
17.4.2. With Browser ................................................................................................................ 150
17.5. Deactivating protection ......................................................................................... 150
17.6. Deactivating protection of TWinSoft document.................................................... 150
TECHNICAL SPECIFICATIONS - CABLING ...................................................................... 151
18. Front panels ......................................................................................................... 152
18.1. LT2-530-xx.............................................................................................................. 152
18.2. LT2-532-xx.............................................................................................................. 153
18.3. LT2-540-xx.............................................................................................................. 154
18.4. LT2-542-xx.............................................................................................................. 155
19. Technical specifications ........................................................................................ 156
19.1. Common to all models ........................................................................................... 156
19.2. Lithium Battery Implementation ........................................................................... 158
19.3. Micro SD Card Implementation ............................................................................. 159
19.4. Toggle Switch (Working modes) ............................................................................ 159
19.5. GSM-3G (optional)................................................................................................. 160
19.5.1. SIM card insertion ........................................................................................................ 160
19.5.2. Antennas....................................................................................................................... 161
19.5.3. Antenna Surge Arrestor ................................................................................................ 162
19.6. RS232 (optional) .................................................................................................... 162
19.7. I/O .......................................................................................................................... 163
20. Cabling ................................................................................................................. 166

Version : 1.09 8
20.1. Power Supply ......................................................................................................... 166
20.2. RS232 (standard) ................................................................................................... 166
20.3. RS232 (optional) .................................................................................................... 167
20.4. RS485 ..................................................................................................................... 168
20.5. Ethernet ................................................................................................................. 169
20.6. Digital Inputs - Counter inputs............................................................................... 170
20.7. Digital Outputs ...................................................................................................... 171
20.8. Analog Inputs – Current/Voltage........................................................................... 172
20.9. Analog Inputs – Temperature (Pt 1000) ................................................................ 173
20.10. Analog outputs – Current ...................................................................................... 174
APPENDIXES....................................................................................................... 175
Appendix A. Licenses ..................................................................................................... 176
A.1. The Evaluation mode .................................................................................................... 176
A.2. The Dongle .................................................................................................................... 176
A.3. The Code (License) ........................................................................................................ 176
A.4. The TWinSoft LITE ......................................................................................................... 176
Appendix B. Time in RTU ............................................................................................... 177
B.1. Time in TBox LITE .......................................................................................................... 177
The RTC (Real Time Clock) ............................................................................................................ 177
UTC Time ...................................................................................................................................... 177
TBox LITE Time setting .................................................................................................................. 177
Day Light Saving (Winter/Summer time) ...................................................................................... 178
B.2. Data logging.................................................................................................................. 178
Chronologies ................................................................................................................................. 178
Sampling tables ............................................................................................................................ 178
Periodic events ............................................................................................................................. 178
B.3. System variables associated ......................................................................................... 179
B.4. Summary ....................................................................................................................... 179
Appendix C. Plug & Go ................................................................................................... 180
Appendix D. Pack & Go .................................................................................................. 183
D.1. Presentation .................................................................................................................. 183
D.2. Pack ............................................................................................................................... 183
D.3. Unpack .......................................................................................................................... 184
Appendix E. ModBus Rerouting...................................................................................... 186
E.1. Presentation .................................................................................................................. 186
E.2. Routing using TWinSoft ................................................................................................. 186
E.3. Possibilities of Routing .................................................................................................. 188
Appendix F. IP forwarding, NAT, Virtual Server ............................................................... 189
Appendix G. Terminal mode ........................................................................................... 191
Appendix H. Precautions In Cabling................................................................................ 193
H.1. Cabling to Spring-Cage Terminal Blocks ....................................................................... 193
H.2. Cabling Analog Inputs ................................................................................................... 193
INDEX............................................................................................................... 195

Version : 1.09 9
Version : 1.09 10
Version : 1.09 11
The ‘all-in-one’ concept of TBOX LT2

WEB SERVER
Control and Monitoring
using PC, Smart phone,
tablet, …
IP INTERFACE
SMTP, HTTP, FTP, …
ALARMS
Router, Gateway, SMS, e-mail, FTP,
Firewall, SSL, … Pictures, …

COMMUNICATION DATALOGGING
Ethernet, GSM, RS485 … Chronologies (SoE)
ModBus, SNMP, … Sampling Tables
IEC-60870, DNP3, …

PLC
Ladder (IEC 1131-3) BASIC

Version : 1.09 12
Overview of TBOX LT2 possibilities

Consulting Programming
process locally or
through HTML remotely

Sending of
Alarms

Communication
to a remote site

Retrieving data and


consulting the
process remotely

Retrieving data
locally

Version : 1.09 13
1. How to use this manual?
1.1. What is in the manual?
This manual constitutes the essential of TBOX LT2 documentation.

It first introduces to the hardware concept


 Different models of TBOX LT2 chapter 2
 Quick overview on installing and powering chapter 3

Then it brings you to the programming of TBOX LT2 using TWinSoft. All features are explained using plenty
of snapshots for an easy understanding 
 Starting TWinSoft chapter 5
 Properties of TBOX LT2 chapter 7
 Resources chapter 8
 Tags chapter 9
 IP Services Configuration chapter 10
 IP Security Services chapter 11
 Alarms chapter 12
 ReadSMS chapter 13
 Datalogging chapter 14
 ModBus Transactions chapter 15
 Periodic events chapter 16
 Security chapter 17

All technical specifications of the different models of TBOX LT2 and cablings are presented at the end of
this manual.

Information related to Licenses is available in Appendix A.

All along this manual, I warn you:


“Read the manual!”

All along this manual, I inform you with Notes and Remarks:
“What a nice manual!”

1.2. What is not in the manual?


One major topic you will not find in this manual concerns the Logic Programming. TBOX LT2 supports
BASIC and Ladder languages for developing any advanced process.
These 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 TBOX LT2 as web server.
This matter is explained in details in another manual: WEBFORM STUDIO 2.0 – 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.

Version : 1.09 14
2. The Hardware Models
TBOX LT2 is a All-in-one RTU, including a fix number of I/Os and of communication ports.
It is not possible to add local I/O or communication ports but a connection to ‘Remote device’ is always
possible.

TBOX LT2 is available in different models, offering several combinations of I/O and different
communication ports:

2.1. LT2-530-x
I/O Communication ports
16 x DI/O On all models of LT2-530
Each channel can be used as input or output RS232
3 first DI can be used as fast counter (>10 Khz) RS485
Ethernet
8 x AI (0..10V and 4..20mA) USB
Individual selection of signal per channel -x Options
With validity bit working with 4..20mA signal -3: GSM 3G

2.2. LT2-532-x
I/O Communication ports
16 x DI/O On all models of LT2-532
Each channel can be used as input or output RS232
3 first DI can be used as fast counter (>10 Khz) RS485
Ethernet
8 x AI (0..10V and 4..20mA) USB
Individual selection of signal per channel -x Options
With validity bit working with 4..20mA signal -3: GSM 3G
2 x AO (4..20mA)

2.3. LT2-540-x
I/O Communication ports
16 x DI/O On all models of LT2-532
Each channel can be used as input or output RS232
3 first DI can be used as fast counter (>10 Khz) RS485
Ethernet
6 x AI (0..10V and 4..20mA) USB
Individual selection of signal per channel -x Options
With validity bit working with 4..20mA signal -3: GSM 3G
2 x Pt1000

Version : 1.09 15
2.4. LT2-542-x
I/O Communication ports
16 x DI/O On all models of LT2-532
Each channel can be used as input or output RS232
3 first DI can be used as fast counter (>10 Khz) RS485
Ethernet
6 x AI (0..10V and 4..20mA) USB
Individual selection of signal per channel -x Options
With validity bit working with 4..20mA signal -3: GSM 3G
2 x Pt1000

2 x AO (4..20mA)

Version : 1.09 16
Version : 1.09 17
3. Installation of the TBox-LT2
3.1. Installation of the Rack on a DIN rail
TBOX LT2 is mounted on a mini rack equipped with one spring for DIN rail fixing.

To fix it on a DIN rail:

1. Make sure the TBOX LT2 is with its upper side on top
2. Place the spring of the Rack under the bottom side of the DIN rail and pull-up the TBOX LT2
3. Push the TBOX LT2 against the DIN rail

3.2. Installation on a wall


The rack can be ordered with perpendicular brackets for wall fixing. The accessory ACC-WALLKIT can be
ordered for an existing rack.

3.3. Earthconnection

Each Rack is equipped with a “Safety Earth Ground”


PIDG ring tongue terminal. It is marked with the
famous upside-down Christmas tree in a circle.

You have to crimp this ring tongue to a cable and screw this ring to the rack as indicated. On the other
side, you must connect the cable to the ground.
The cable must be a 2.5mm², coloured green/yellow (ratio ±70% / 30%).
Be sure all connections and joints are reliably made and that Safety Earth Ground connections have no
other function that connection to ground.

1. Be aware that RS485 of TBox is not isolated. If connecting several devices together, be
sure they use the same ground connection; otherwise, you have to use ACC-RS485
(contact your local TBox distributor)
2. If the environment is very noisy, like for instance with the presence of a frequency
variator, make sure :
- the connection to earth stake is as short as possible
- to separate the connection of TBox to ground from other devices
- not to mix AC cabling with low voltage DC cabling

Version : 1.09 18
3.4. Cabling
TBOX LT2 is equipped with compact spring-cage terminal blocks.
This connector allows a high density of connections.
Press the orange plastic with a screwdriver for inserting and removing the cable.

Connection capacity
Without ferrule Solid cable: 0.2 .. 1.5 mm² (24..16 AWG)
With ferrule without plastic sleeve Solid or Stranded cable: 0.2 .. 1.5 mm²
With ferrule with plastic sleeve Solid or Stranded cable: 0.2 .. 0.75 mm²

Ferrule specification for 0.75mm² cable


B: minimum 10 mm
Reference:
C: 1.5 mm
Weidmüller 9021050000
D: 3.5 mm

Example:
LT2-532-3

Ethernet

External 12 V Backup battery


+8 ..+30 VDC
0V
RS232
RS485

USB

To GSM antenna

Digital Inputs/Outputs

Analog Outputs

Analog Inputs

You will find more info


about cabling and Tech.
Spec. at the end of this
manual

Version : 1.09 19
Version : 1.09 20
Version : 1.09 21
4. Installation of TWinSoft

4.1. System requirements


 Hardware: PC running Windows.
32bits or 64 bits

 Memory: 32 MB minimum.

 Hard Disk: 350 MB required plus the application files.

 Display: VGA, SVGA with a minimum resolution of 1024 x 768.

 Mouse: any Windows compatible mouse.

 USB port: required in case of license with dongle for ‘USB’ port and/or to communicate
with TBOX LT2 through USB.

 Serial port: required for a local connection to TBOX LT2. If no serial port available, you can
use USB or Ethernet on PC.

 Ethernet port: 10/100 Mbps required for a connection to TBOX LT2 through a LAN.

 Modem: to access TBox through dial-up connection from any modem properly configured
in Windows.

 Operating system: Windows 2003, XP, VISTA, 2008, 7, 8, 10


32bits or 64 bits

To Browse TBOX LT2

Working with WebForm 2.0, any browser or smart phone supporting SVG and Ajax can be used. Note that
a minimum version of browser and smart phone is required (see “help” in WebForm Studio 2.0).

Version : 1.09 22
4.2. Installation of the CD-ROM
From the USB stick of TWinSoft Suite, when running the
Setup, the following software’s are available

 TWinSoft 11.xx
TWinSoft is a Suite of software required for developing an application for any model of TBox RTU.
The basis for configuring TBox RTU application is explained in this manual.
Installation of TWinSoft includes:
 WebForm Studio 2.0: HTML editor producing HTML pages based on SVG, JAVA and JSON.
 WebForm Studio 1.0: HTML editor for legacy HTML pages based on ActiveX.
 Report studio: Report editor dedicated to TBox.
 WebForm Viewer: ActiveX if working with legacy HTML page, supporting ActiveX only.
This has been replaced by WebForm 2.0 and AJAX technology

Version : 1.09 23
 WebForm Viewer
This setup contains the “ActiveX” used with legacy HTML page used to display dynamic objects
dedicated to TBox. It must be installed on the PC used by operators using IE to display legacy HTML
pages. In such case, TWinSoft Suite is not required; only the ActiveX needs to be installed.
With TBOX LT2 you will preferably use WebForms 2.0.

 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 TView (call your local distributor).
(Administrator rights is required during installation)

 RM Configurator
RM’s consist in a family of Remote Modules, based on TBOX –LITE architecture.
They are programmed though an interface running TWinSoft in background.
This entry installs this interface.

 Acrobat Reader
Software needed to read our documentation.

 Explore this CD-ROM


You will find on the USB stick many information related to TBOX LT2 and accessories: datasheets,
manuals, …

Administrator rights is required during installation

Version : 1.09 24
4.3. Programs of ‘TWinSoft Suite’
During installation of TWinSoft, a group of programs is created where TWinSoft can be started from.

Other programs and menus (Found on Semaphore folder):

 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.

 Report Studio: to create reports dedicated to TBOX LT2. It can also be started directly from
TwinSoft and the list of “Web and Reports”.

 TWinSoft: to start TWinSoft.

 WebForm Studio: to start the legacy HTML editor, based on ActiveX.

 WebFormStudio 2.0: HTML editor based on SVG, JAVA and XML. It is advised to start it directly from
TwinSoft and the folder of “Web and Reports files”.

Version : 1.09 25
5. 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 LT2 is protected.
For more info about Licenses go to Appendix A. at the end of this manual.

Version : 1.09 26
5.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”, settings can be modified latter from the “RTU properties”.

Free name of the RTU


Station address (1..254)
Sub address (0..255)

I/O combination

Optional com. port

I/O combination and optional com port, corresponds to the model of TBOX LT2 you are
configuring. Check the front sticker:

Example: LT2-542-3

IP configuration of Ethernet

Version : 1.09 27
5.2. Communicating with TBOX LT2
Once you have opened a document, either created a new one with the Wizard or opened an existing one,
you can establish the connection with your TBOX LT2.
The possible communications are serial, Ethernet, USB or modem, according to the media used to connect
to TBOX LT2. See details in chapter 8.2. RTU Communication Ports.
 Serial: check the Baudrate you have given to the serial port in your application
(by default 9600, N).
 Ethernet: check the IP address you have given to your TBOX LT2 and that it is in the same subnet of
the PC or accessible to the PC.
 USB: Communication happens in TCP/IP. TBOX LT2 acts as a DHCP server and provides to the PC
an IP in the range 10.8.10.xxx. TBOX LT2 itself uses the IP address 10.8.10.1.
 Modem: check the tel. Number of TBOX LT2.

5.3. PC Communication Set up


To communicate with the TBOX LT2, you need to select a communication media on the PC.
From the main menu of TWinSoft:  Communication  PC Setup:

Example:
Communication through Ethernet

Version : 1.09 28
5.3.1. Communication possibilities of TWinSoft
 Offline: this option avoid sampling TBOX LT2
 Local: you select a serial port of the PC (typically RS232). The Baudrate must fit with the port of
TBOX LT2 you are connected to.

 TCP/IP: to establish a communication in TCP/IP, typically through the Ethernet port of TBOX LT2.
TWinSoft will establish a connection with the IP address specified in the ‘Ethernet’ port
settings (see chapter 8.1: ‘CPU resources’).
It is also possible to specify another IP address, for instance if communicating to the TBOX
LT2 through GPRS. (See details chapter 5.3.3 below)

 USB: You intend to access TBOX LT2 through a USB port of your PC.
When you connect TBOX LT2 to the PC, the driver should be installed automatically by
Windows. Would you find some problems, it can be installed manually. The driver is
available in TWinSoft directory, name TBoxUSBDriver.inf.
IP address of TBox is 10.8.10.1.
 Modem: to establish a remote connection to the TBOX LT2. 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 TBOX LT2.

You can develop your TWinSoft document without connection to the TBOX LT2, but it
will be mandatory to send it to have the RTU running!
The program can be sent through RS232, RS485, Ethernet, USB or modem

5.3.2. IP setting of PC
When communicating to TBOX LT2 through Ethernet, you have to make sure your PC is configured with
fix IP. Go to “Network” -> “Local Area connection” -> “IPv4 properties”:

Version : 1.09 29
In IPv4 properties, type IP setting in the same subnet as TBox:

Example of subnet:

172.25.110.xxx
255.255.255.0

In case you intend to change IP address of TBOX LT2, you can define several IP addresses in Windows.
In IPv4 properties, click “Advanced...”, then “Add...” to add an IP address in the subnet corresponding to
the current IP address of TBox, or to the one you want to change TBOX LT2 to:

Version : 1.09 30
5.3.3. IP setting of TWinSoft
You may encounter three different situations requiring specific IP setting.

1. You program your TBOX LT2 through Ethernet


and you want to keep its IP address.

You select in the drop list of IP addresses the one


corresponding to the TBOX LT2 you are connected
to.

2. You program your TBOX LT2 through Ethernet


and you want to change its IP address.

You check out the option “Always use IP address of


the RTU” and you type the current IP address of
the TBOX LT2 you are connected to.

When TWinSoft has finished sending the program,


it adapts itself automatically to communicate
with the new IP address.

Make sure you have declared both


subnets in Windows (see chapter 5.3.2.
above)

Version : 1.09 31
3. You don’t program your TBOX LT2 through a
direct Ethernet connection and you don’t want
TWinSoft to adapt to the Ethernet IP address

Example: you access your TBOX LT2 through ADSL


or GPRS.

You check the option “Don’t change IP address


after sending…” and you type the current IP
address of the port of RTU you are connected to,
for instance the GPRS IP address.

When TWinSoft has finished sending the program,


it does not adapt itself to IP address of Ethernet
of the RTU.

This mechanism is mandatory when


sending a program through GPRS

You check “Don’t change TCP port…” when sending a program using a TCP port which is
not the one declared in the application. For instance when sending a program through a
router which does PAT (Port Address Translation)

5.4. Factory IP address - changing IP address


When you receive your TBOX LT2 from the factory, its IP setting is:
IP address: 192.168.1.99
subnet MASK: 255.255.255.0

To communicate using Ethernet, you have to make sure your PC is configured in the same subnet as TBOX
LT2 (see chapter 5.3.2. above).

If you wish to change the IP address of TBOX LT2 to another subnet, you have to use the settings as
described point 2. above.

In case you have not declared the 2 subnets in your PC (as described in 5.3.2. above), to restore the
communication do the following:
 Send program to TBOX LT2. At the end of sending the RTU restarts with its new IP address.
TWinSoft will lose communication and will not be able to start TBOX LT2.
 Change the IP settings of your PC to the same subnet as TBOX LT2.
 Go to TWinSoft “Communication” -> “PC Setup” and check the IP address selected is the new one.
 Click “OK” and check in the status bar you are connected.
 Go to TWinSoft “Communication” -> “Running mode” -> “Start/Stop Program”.

When you don’t know the IP address of TBOX LT2, you can set its communication setting to the factory
configuration (see chapter 5.6 below).

Version : 1.09 32
5.5. 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
- Sub-address of the Station
- Access level of the current user
-
- Date/Time in the RTU
- IP configuration of the Ethernet

- General information about the program

- Process cycle time

- Unique ID of the RTU

- MMC (SD card) information

The Status bar of TWinSoft displays the status of the connection:

The communication media used by the PC is indicated as well as the access level of your connection (see
chapter 17: ‘Security’).

If a connection cannot be established with TBOX LT2, 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 TBOX LT2 to a default configuration, you do a global reset (see next).

Version : 1.09 33
5.6. Reset of TBox LT2
Pushing toggle switch to “Reset” position restarts the program:
 stack of alarms and events are erased
 datalogging is maintained
 Tags with initial value are set to their initial value; others are maintained
 Local Tags and timers are reset (status and value=0)
 Counters are maintained

5.6.1. Global reset of TBox LT2


The Global Reset is used to set TBOX LT2 to a default, well-known configuration, in case it does not
communicate anymore. The program running in the CPU is stopped and TBOX LT2 runs on the Operating
System.
This is very useful when you take a CPU from the shell and you have no idea how the port you want to
communicate with is configured.
The global reset is achieved using the toggle switch on the front side of TBOX LT2.

Procedure:
 Push and maintain the toggle switch to “Reset” side
 The LED turns red for about ½ second
 Let the LED flash “green” 3 times
 Release the toggle switch

Global reset configuration:

The global reset mode is indicated by the LED flashing green at 0.5 Hz (instead of 2 Hz in RUN mode). In
this mode, TBOX LT2 is configured like as following:
Port Protocol Station address IP address
COM1 (RS232) ModBus 1 -
COM2 (RS485) ModBus 1 -
COM3 (Ethernet) - 1 192.168.1.99
COM4 (modem) ModBus maintained

The Global Reset does not erase the current program. Doing a single Reset will restart
the program

5.6.2. Working Modes Available with Toggle Switch


Pressing and maintaining the toggle switch to “Reset” position, the LED Run will flash. According to the
number of flashes, you can set TBOX LT2 to different working modes:
Flash # Mode Communication Protocol LED “Run”
1 Restart application As in application As in application 2 Hz
3 Program stopped Serial: 9600, N, 8, 1 ModBus-RTU ½ Hz
Ethernet: 192.168.1.99 ModBus/TCP
Modem: available Firewall stopped
9 OS stopped, Serial: 9600, N, 8, 1 SSH, PING, TFTP ON - Green
LINUX running Ethernet: 192.168.1.99
No Modem
11 U-BOOT Serial: 9600, N, 8, 1 Text, TFTP ON - Red
No Ethernet
No Modem

Version : 1.09 34
5.7. Sending ‘Operating System’
Operating System is the heart of your TBOX LT2. It contains all features of TBOX LT2.

In some cases you might have to change this operating system, when new features are available or a bug
fix released.

From the main menu, “Communication”,


select “Send to TBox”.

Select the highest version in the list to take


advantage of latest features and corrections.

5.8. LED « RUN »


This LED, next to the “Reset” toggle switch indicates the status of the CPU.
LED sequence at TBOX LT2 startup:
Red one flash Boot Strap starting
Red ON (1 sec.) UBOOT starting
Orange ON (4 sec.) KERNEL starting
Green ON (4 sec.) OS starting
Red ON Package installation after sending, Plug&Go on SD Card or USB stick
(up to OS 1.31.336)
Red/Green flashing (1Hz) Package installation after sending Plug&Go on SD Card or USB stick
(as of OS 1.33.346)
Green flashing at 2 Hz Application runs

Other status:
Green flashing (1/2 Hz) Program Stopped
Green ON OS Stopped
Red ON LINUX stopped
Red flashing at 8 Hz Alarm(s) active
Green flashing at 8 Hz Running “Failsafe” program

Version : 1.09 35
5.9. Saving and Sending a Program
Like any Windows program, TWinSoft creates “Documents”.
A document corresponds to a TBOX LT2 application. Each of them must be saved using the Windows
standard.

5.9.1. Saving a document – Backup 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>

Saving a document creates a file with the extension ‘.tws’ which is your TWinSoft application.
But each time a TWinSoft project ‘.tws’ is opened successfully; it is saved in a back up file ‘.tbk’. If you
encounter some problem retrieving your ‘.tws’ file, you can just replace the ‘.tbk’ extension by ‘.tws’ and
use the back up.

During development of the application, it can be sent at any time to TBOX LT2, for testing purpose.
When sending an application to TBOX LT2, it is first compiled and then sent, in the same sequence.

5.9.2. Compiling an application


Compilation converts the document into microprocessor code. To compile, you can:
 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 window automatically pops up when
there is a compilation error 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

Version : 1.09 36
Test of memory
Detail on memory “used” and “free” is also available during compilation.
See details chapter 20.1: Technical Specifications.

5.9.3. Sending an application


In order to have TBOX LT2 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 compilation, the sequence is stopped and the “Results” window pops-up (see
above)

TBOX LT2 keeps running during sending. At the end of sending, there is a
de-installation/re-installation controlled by TWinSoft. In case communication is lost
during this period, TBOX LT2 will still be available with its IP address of the application.

DO NOT RESET TBOX DURING INSTALLATION AND START PROCEDURE

Version : 1.09 37
Version : 1.09 38
Version : 1.09 39
6. 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 TBOX LT2 application will be done in different steps:

 Configuring the RTU properties


 Configuring the communication ports and I/O's (from the ‘Resources’)
 Creating Tags
 Creating Programs using automation language Ladder and/or BASIC
 Creating Alarms
 Creating Datalogging
 Creating Remote Device and associated ModBus Transactions to exchange data as Modbus
“Master”.

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 these configurations are explained in the following chapters.

Version : 1.09 40
7. RTU properties

Setting the properties of TBOX LT2 has never been so easy thanks to a set of comprehensive dialog
boxes, available from the main tool bar.

RTU properties can be accessed


easily by clicking this icon.

The RTU properties are divided into:

 General the type of the RTU, station ModBus address, RTU location, size of the chronologies, …

 Add-ons configuration of external software modules written in ‘C’, typically to communicate


with advanced protocols like DNP.3 and IEC-60870, or to execute specific task like
AGA calculations.

 Protection to activate protection on TWinSoft document, communication port, protocols, ...

 IP Security to activate Firewall, HTTPS and change SSH password.

 Info to type any info about your program, its different versions, …

 Advanced for some features, advanced parameters are available: during start-up, when sending
alarms, about sampling tables, TCP/IP, …

 Runtime Parameters to declare some properties as Tag, to change them dynamically

Communication ports are configured from the ‘Resources’.


Configuration of TCP/IP services is done from the ‘Workspace’ and folder IP parameters.

Version : 1.09 41
7.1. General properties

RTU Type: The type of RTU you have selected with the Wizard.
It cannot be changed!

Name: type a free name for TBOX LT2. It will be displayed when doing a ‘RTU
identification’ and used by the data aggregator software, TView.
Maximum 11 characters.

Don’t use space.


As far as TView is concerned, don’t start the name with a number

ModBus address: with ModBus protocol, each device must have a Station number. It is its ModBus
address.
Enter a number between 1 and 254 (default=1).

Version : 1.09 42
Sub address: if more than 254 x TBOX 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, TView,… please call your distributor for further
information).
Enter a number between 0 and 255 (default=0).

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 TBOX LT2.

Sizes: Number of records of Digital and Analog chronologies. Chronologies represent


the “on event” method of recording data in TBOX LT2, also known as “Sequence
on Event” recording (see chapter 14: Data logging).
Digital Chronology: max. 32 000 (Default=100).
Analog Chronology: max. 32 000 (Default=100).

Check memory available. See chapter 5.10.2: Compiling an application

Time zone: The Time Zone where TBOX LT2 is installed.


Timestamped data are recorded internally in TBOX LT2 with universal UTC time
(Universal Coordinated Time). When data is generated from TBOX LT2 the latter
uses this setting to convert UTC time into local time.
See Appendix B : Time in the RTU for more information.

Summer/Winter: Allows automatic management of day light saving. This selection has to be made
according to the location where TBOX LT2 is installed.
See Appendix B : Time in the RTU

7.2. Add-ons
An add-on is a module written in ‘C’ that executes a dedicated task not embedded in Operating System.
Typically, it is communication to SCADA, like DNP.3 or IEC protocols or communication to PLC like AB (DF1),
OMRON, ...
It can be also specific tasks, like AGA calculation.
Check add-ons availability at http://helpdesk.servelec-technologies.com

7.3. Protection
Access security is discussed at chapter 17.

Version : 1.09 43
7.4. IP Security

7.4.1. Firewall
TBOX LT2 embeds a Firewall.
Once activated it gives access to exception rules in folder "Resources"  "IP Security"  "Firewall" (see
chapter 11.2).

Once Firewall has been activated, make sure to define rules! In case you activate Firewall
without declaring any rules, all IP access to TBOX LT2 will be blocked.

 Doing a global reset, the rules are deactivated while TBox is in stop mode and access restored.
 Doing a stop from TWinSoft, the rules stay active, also when sending a program.

7.4.2. HTTPS
HTTPS, with "S" for "secured", is an alternative to HTTP but protected with the use of SSL and TLS
protocols. It provides protection on data when accessing TBox as Web Server.

Certificate and key can be generated using OpenSSL.exe (see chapter 11.1. OpenVPN)

Certificate
When the browser connects to TBOX LT2 using HTTPS, it has to identify the server using a certificate.
Either you don’t have a certificate then you can generate one from TWinSoft. Click “Generate”.
Or you have a certificate, public or private. A public certificate is authenticated by Certified Authorities
like Thawte, Verisign, DigiCert, …
Either you have authenticated a certificate to a Certified Authority and you connect directly to TBOX LT2
or you have created your own certificate and then during the first connection the browser will prompt
you to trust the site. You indicate here the content of the “Server” certificate: <server>.crt
Key
The key is used to encrypt data. You indicate here the content of the “Server” key: <server>.key
Generate
In case you don't have your own certificate and key, type the button "Generate":

Fill the fields corresponding to your company.

Disable HTTP
To extend protection, HTTP can be disabled; meaning only secure connection will be allowed.

Version : 1.09 44
7.4.3. SSH
SSH stands for "Secure Shell". It is a secured protocol you can use to access TBox in Console mode.
SSH requires a login.
As of OS 1.35, SSH login name can be changed in TBOX LT2 . You cannot use the name "root", which has
highest privileges and a full system access. This is not allowed.
With older Operating System, the fixed name used previously is still used, even when it appears differently
in TWinSoft.

Accessing TBox using console software, like PuTTY, make sure you start it "As Administrator".
Depending on the Windows version, login might be rejected if not running as administrator.

7.5. 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 TBOX LT2.

7.6. Advanced

7.6.1. Start/Stop

By Start-up we mean:
 - Reset of RTU (HW or SW).
 - Sending of Program

See also chapter 5.6 above

Under these conditions two mechanisms of the RTU can be customized:

Version : 1.09 45
START
Reset all physical outputs: when active, at start-up the RTU reinitializes the outputs to ‘0’. After
that the outputs are monitored according to the process.
When not active, at start-up the outputs are maintained to their last status. After
that, outputs are monitored according to the process (default).

Wait start of condition: this feature relates to alarm condition.


The mechanism of generating alarm is based on transition: the changing of a digital
Tags or the overstepping of an analog threshold.

This option allows changing this rule at start-up:

With ‘Wait start of condition’ active:

Alarm Alarm time


Start-up

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.
internal
Alarm

Alarm Alarm Alarm time


Start-up

Activate Plug & Go: Plug & Go feature allows storing the complete TWinSoft project into a SD card.
See chapter 19.3. Micro SD card implementation.
To use the feature, check this option.

Cycle Time: The frequency at which the process cycle is executed can be adjusted from here.
The choices are:
- Full Speed (default). By default it is executed as fast as possible, with no delay
between the cycles.
- 20, 50, 100, 250, 500 ms.
The current time of one cycle can be checked in the RTU identification window.

STOP
Reset All physical outputs at program stop: when this option is active, the RTU reinitializes the
outputs to '0' at stop. This is particularly useful if you want to reset the outputs when
sending a new program, and you want to be sure they stay at '0' during the sending
and restarting sequence.
After that, outputs are monitored according to the process.

Version : 1.09 46
Disconnect ModBus address at program stop: all variables will have their ModBus address
disconnected, which means that external equipment accessing the RTU will receive
communication error.
This feature has been implemented to allow a SCADA detecting immediately a TBox is
stopped: as the ModBus addresses are not available, the RTU stays in communication
but returns an 'Exception' error.

Stop program with toggle switch stop: when this feature is active, you have to select the Tag
corresponding to the toggle switch 'Stop' in front of the CPU (See in the Resources 
CPU  Group 1).
Pressing the toggle switch will stop the program (Process, Alarms, Datalogging, ModBus
Transactions, ...)
NO other digital input than 'Stop' toggle switch can be used, but any internal digital
register can.

7.6.2. Alarms

Event stack: is a public stack, accessible by users, where alarms are available with date, time,
recipient, message, status, ….
The Event stack can be displayed from the main menu: ‘Communication’  ‘Retrieve
from TBox’  ‘Alarms’.

Version : 1.09 47
The object ‘Alarms’ used in a WebForm displays the Event stack. It corresponds also to
the list of Alarms sent to TView.

Alarm stack: is an internal stack used to buffer alarms when there are several to handle at the same
time or when the communication port is not available or when retries are required.

SMTP From: when receiving an e-mail from TBOX LT2, 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%>

SMTP subject: when receiving e-mail from TBOX LT2, the field 'Subject' can be dynamized like
following:
When sending a message, the field ‘Subject’ contains the message.
In addition, it accepts any fix text and the following dynamic data:
%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% :
When sending a report, the subject field contains the Title of the report (see Report
Studio); title that can contain the parameter %station% (see above)

GSM & Printer message: when TBOX LT2 sends 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 SMS (or printing) was generated
%condition% : It will result in an exclamation mark (!) in the message if the condition
of the alarm is still active when the alarm is sent.

End of Alarm prefix : allows specifying a text that will be sent in front of the message, when
the alarm condition ends, to indicate it corresponds to the End of the alarm
Example: END:
Message sent when the condition ends: .
END: Level too HIGH

Check the total length of SMS message according to the coding used (TEXT or UCS-2) as
explained chapter 12.6.1. SMS coding.

Process alarm even when com. port not available:


An alarm corresponds always to a communication (at the exception of "Internal"
alarms). When an alarm condition is activated, by default, it waits the availability of the
com. port to be handled (Ethernet cable connected, GSM present, PSTN line detected,
...) This can lead to problems in handling escalation: if a media is not present, the alarm
process will be stopped.
This option allows carrying on alarms, even when the port is not available.

Version : 1.09 48
Alarm filter on both transitions: this option allows computing the filter of alarm condition during
both transitions: when the Tag value goes to alarm condition AND when it leaves
alarm condition.
This option will be applied to all alarm conditions.
This is particularly useful to filter interferences on inputs.

Delay alarm processing when recipient's time table not available


This feature is associated to the "Scheduling" and time table attached to the recipient.
If the time table is not active when the alarm is initiated, this feature provides 2
options:
- the alarm is auto-acknowledged (by default)
- the alarm is maintained in the alarms stack until the time table becomes active. The
"Start" timestamp is the one at the moment the alarm condition was generated.
Example: the alarm condition happens at 2:35 AM, but it is not an urgent alarm. It is
an SMS meant to inform the technician. The "recipient" is configured with a time table
starting at 8:00 AM (corresponding to the technician work shift). Therefore, the
technician will receive the message at 8:00 AM, but with a timestamp of 2:35,
informing him when the event happened

Display alarm calls in alarm table: This feature is associated to the alarm condition sent to a group
of recipients.
When this feature is active, the alarms table displays the event having initiated the alarm
and all the calls generated (see below).
Event stack displaying also alarm calls:
Working with group of recipients, it is also possible to display each call with its acknowledgment
status:

Message: message preceded by (*) means that it corresponds to a call


Start: always Ack’ed
Recipient: name of each recipient of the group
End timestamp: timestamp corresponding to the end of the call
End: acknowledgment status of the call: Not Ack; Ack'ed or Auto ack.

Display logon/logoff events in alarm table: Logon/Logoff are events logged when a user logs in on a
communication port which is protected.
These events can be removed from the list, to avoid events not being real alarms.

Check Alarm Inhibition after filter time: For each alarm condition, one can declare a filter before the
alarm will be computed. For each condition, an option "handling" allows inhibiting the
alarm according to external circumstances: flag Disala or power failure.
This option allows checking the inhibition condition after the filter has elapsed. This is
particularly useful working with “Power Failure” detection; the latter might be
detected after the sensors have been in error which will then generate an alarm. In

Version : 1.09 49
such case, you declare a filter of some seconds on the alarm condition and check this
option; the alarm on the sensor will be inhibited properly in case of power failure.

7.6.3. Sampling Tables


This menu gives access to the parameters for long period recording in Sampling tables. (See chapter
14.3: ‘Sampling tables’)

These 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.

Sampling tables on SD: In case a micro SD has been plugged into TBOX LT2 (see chapter 19.3. Micro
SD Implementation) this option allows storing sampling tables on micro SD card and
therefore increase the number of tables stored.

7.6.4. Temperature
For Temperature analog input (Pt1000), you can define a unit: Celsius, Fahrenheit or Kelvin.

The unit is the same for all inputs

Version : 1.09 50
7.6.5. ModBus Transactions
Reset the device Trigger only if success When communicating as ‘Master’ using ‘ModBus
Transactions’, a Trigger is switching communication to the remote device (see chapter
15. ModBus Transactions).
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 ModBus Transactions
associated to the device have been executed, with or without error.

Remote device inactivity delay: this option allows defining a quarantine delay when a
Remote device is in communication error.

Keep socket open: working with OS >= 1.35.374


When carrying on Modbus Transactions in Modbus/TCP, TBOX LT2 will use one TCP
context per remote device. Checkink this option, the socket for each device will be kept
opened, preventing overhead communication.
Working with OS < 1.35.374.
Only ONE is available socket available. Therefore, this socket is opened/closed at each
execution of a list of Modbus Transactions. When there is only ONE remote device, this
option allows keeping the socket opened and therefore improving the communication.

7.6.6. Ports

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 with 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 TBOX LT2, in
some cases, you might want to
change this port number.

Version : 1.09 51
HTTP(S): port used to access TBOX LT2 as WebServer. (by default= 80 & 443)
ModBus/TCP-Slave: port used by a ‘Master’ to access TBOX LT2 as ‘Slave’. (by default=502)

Changing of TCP port is automatically applied to 'WebForms 1.0' as it uses ModBus for data
communication.
ModBus/TCP-Master: port used when TBOX LT2 is ‘Master’ to access a remote device (by default=502)
ModBus over TCP: port used by ModBus RTU encapsulated into TCP (by default= 7701)
ModBus over UDP: port used by ModBus RTU encapsulated into UD (by default= 49152)
FTP(S): port used by TBOX LT2 to send Files (by default=21).
SMTP(S): port used by TBOX LT2 to send e-mails (by default=25 & 587).
POP3(S): port used by TBOX LT2 to collect subject of e-mail (by default=110 & 995).
Modbus over TCP: ModBus over TCP is a ModBus RTU frame encapsulated into a TCP frame.
Compared to ModBus/TCP, in which there is no station address neither CRC.
TCP port used by TBox MS to communicate in ModBus over TCP (default=7701)
Modbus over UDP: ModBus over UDP is a ModBus RTU frame encapsulated into a UDP frame.
Compared to TCP, it is faster than TCP because it does not require any acknowledgement.
With UDP, packets are just pushed without verification.
TCP port used by TBox MS to communicate in ModBus over UDP (default=49152)
SSH: used to carry on a secure connection, for instance to access LINUX in console mode. (default= 22)

7.6.7. TCP/IP

TCP/IP addresses for incoming calls


Range of addresses used during
incoming calls. When TBOX LT2 is
dialed in by a modem.
TBOX LT2 uses the first address of
the range and applies the following
to the remote equipment.

Typically, this information is needed


when TBOX LT2 is used as a Web
Server, dialed from a browser.

Avoid using addresses in the same range as the IP address defined for the LAN card of
the PC used as Browser.

Version : 1.09 52
TCP/IP miscellaneous

To access these features you have to enable advanced IP configuration (see chapter 17.1.7)
See also the sequence of configuration Appendix F.

Gives access to TCP/IP redirection:


- IP Forwarding
- NAT
- Virtual Server (configurable in IP Parameters as described chapter 12.8)

Once checking one of the above features, a login corresponding to the code typed when enabling
advanced IP configuration is required.
It corresponds to the login as described chapter 17.3.

7.6.8. Environment variables


The environment variables are used when particular configuration might be needed in external software.
Available only when sending historical data through .tma file.

Variable Value Description


TViewPath \path The path in which the station will be created when
importing data in TView.
The path is the relative path from the Project workspace of
TView.

Example: with the Value: \Lines\10

Result in TView:

Longname Type any long name The name typed here will be used in TView, instead of the
one declared in the ‘General’ properties, which is limited to
8 characters

Version : 1.09 53
7.6.9. Power Fail
Working with an external 12 V backup battery, the RTU informs you when the main voltage is out of order
and the RTU is powered from the 12 V backup battery. An internal DI variable informs that the main power
broke down.

Example from the LT2-542-3:

From the list of DI available with the card, you Tag the one indicating the Power Failure (DI.0.1.0)

From the RTU properties: 


Advanced  tab “Power Fail”
you select the Tag
corresponding to the Power
Failure (see above)

This power fail information will then condition the execution of alarm and chronology condition where
you have specified a handling associated to “Power Failure”: in case of power failure, alarm and chronology
conditions will not be executed (see chapters related to Alarm and Chronology conditions further in the
manual).

In addition, the above Tag (in this example “PowerFail”) can be used to send an alarm and can be recorded
into chronologies (datalogging).

7.6.10. Web and Report


Check user's WebFormViewer version: This option concerns WebForm 1.0 only. (this service is not
supported anymore)

Unique Report file name format: When sending a report by FTP, you have the choice of sending the report
with ‘Unique file name’ (see Report Studio  report properties  Advanced). In this case,
the RTU includes supplementary parameters in head of the name of the report.

Version : 1.09 54
Accepted parameters are:
%station%: name of the RTU %email%:
e-mail of the RTU
%time%: complete date & time
%condition%: ! (if alarm active)

%YY%: year in 2 digits


%YYYY%: year in 4 digits
%M%: month in 1 digit (if possible)
%MM%: month in 2 digits
%MONTH%: month in letters
%D%: day in 1 digit (if possible)
%DD%: day in 2 digits
%h%: Eur. hour in 1 digit (if possib.)
%hh%: Eur. hour in 2 digits
%H%: US hour in 1 digit (if possible)
%HH%: US hour in 2 digits
%mm%: minute in 2 digits
%ss%: second in 2 digits Any supplementary text can be added
%file%: name of the report
%ampm%: US time am/pm
~mytag~: value of Tag

7.6.11. Plug&Go
Activate Plug&Go: Plug & Go is associated to the SD card. When Plug & Go is activated, the complete
project including webforms, reports, OS, ... is backed up on the SD card and loading upon
CPU powering. Program is restored when the program on SD card is different from the
one running in the CPU.
This allows easy deployment and maintenance when CPU must be changed on field.

Global Tags Backup: To backup on SD card "Global Tags" periodically (see below), or using digital system
variable [55 - RuntimeBackup].
Tags are restored when the program on SD card is different from the one running in the
CPU.

DB Backup: To backup on SD card "Sampling Tables and Chronologies" periodically (see below), or
using digital system variable [55 - RuntimeBackup]
DB are restored when the program on SD card is different from the one running in the
CPU.

Backup and restore of Tags and DB are not applicable when doing a stop/start of the TBox or
when sending a new application. Only when putting SD card into a new CPU, it will restart
with the image of data backed up.

Period: Period for automatic backup of Global Tags and DB (see above) on a hour base period.

Version : 1.09 55
8. Resources

The resources represent the list of the hardware that your TBOX LT2 has to its disposal.

The TBOX LT2 being an all-in-one RTU has a fixed hardware all built within one module:
 A Power Supply
 A CPU
 Communication ports
 Groups of I/O
 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 15: ‘ModBus
Transactions’)
 The Resources also contain 2 lists with System variables. Systems variables have pre-defined
function (see chapter 8.5 ‘System variables’)

8.1. The CPU Card


When starting a new document, TWinSoft creates automatically the CPU card corresponding to the
selection in the wizard (see chapter 5.).

The communication ports of the CPU with their associated configuration and the I/O of the CPU are part
from the resources of the CPU:

The CPU card is divided in several groups:


 Group 0 : communication ports
 Group 1, 2, 3, … : different groups of I/O corresponding to the model of TBOX LT2. (See chapter
20.7. for more details about I/O).

8.2. Communication Ports

By selecting the Group 0


Communication ports in the
workspace, you access each
port separately.

Version : 1.09 56
8.2.1. Communication ports tabs
According to 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 8.3)

ACV: Analog Communication Variables. Special variables with a pre-defined function (time-
out, user ID, …). (see chapter 8.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. .

To enter the configuration of the communication port, double click the port in ‘Group 0’.

8.2.2. Serial ports

Baudrate: 200…115200 bps

Data bits: 7 or 8

Parity: None, Odd, Even, Space,


Mark

Stop bits: 0, 1 or 2

Protocol:
ModBus (RTU/ASCII),
Printer, NMEA, PPP, SLIP
Example with COM1 – RS232

Version : 1.09 57
8.2.3. Ethernet
Obtain IP address:
TBOX LT2 is connected to a DHCP
server providing its IP settings.

Use IP address:
IP address the IP address of the Ethernet of
TBOX LT2 (given by the network
administrator).

Subnet mask the subnet mask defined by the


subnet the TBOX LT2 will be included in
(given by the network administrator).

Gateway the IP address of the equipment


on the LAN that TBOX LT2 uses to access
an IP address outside its subnet.

DNS DNS Server is used to resolve 'Names' in


'IP address' (given by the network
administrator).

DNS can be set manually or acquired from a


Server when available.

8.2.4. GSM 3G modem


When TBOX LT2 reference has the suffix 3, it means it is equipped with a GSM-3G modem.
Technical specifications are available at the end of the manual.
The GSM 3G modem can be used in 2 modes:

 as a “dial-up” modem, also known as GSM data (CSD)modem


 in IP communication: GPRS/EDGE/3G/HSDPA, according to availability of the network

GSM 3G modem is available as


COM4.

The main option ‘GPRS’ determine


the working mode of the card:

GSM data (CSD)


OR
IP (GPRS, 3G…)

Version : 1.09 58
GSM-data (CSD) 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”
including the quotes
If the SIM card you have does not require a PIN code, you can leave the field as it is or
erase it completely.

If you type the wrong PIN code, or you type a PIN code when the SIM card does not
require one, there is a risk of blocking the SIM card.
It must then be restored with the PUK code using a mobile.

Auto Answer: number of RINGS before the modem picks-up the line.

Dialing 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 TBOX LT2, you have to be sure that data service has been activated and you dial the DATA
number (please call your GSM operator).

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)

About sending out e-mail or Files through a GSM-data connection


Some ISP requires specific telephone number for connecting through GSM (please check with your
ISP).

Version : 1.09 59
IP Communication (GPRS/EDGE/3G/HSDPA) settings
The GSM 3G supports third generation communication standard, including, from slowest to fastest:
GPRS (2G), EDGE (2.5G), UMTS (3G) and HSPDA (3.5G).
There is no configuration to select one or the other network; the GSM 3G will select the fastest available.

You have to choose either ‘GSM-Data’ mode OR ‘GPRS’ mode. It is not possible to use the
modem in both modes at the same time, but it is possible to combine GPRS mode and
sending of SMS (see below).

When selecting IP (GPRS, 3G, …),


TWinSoft automatically adapts
Initialization and Operator Phone number
fields (see next).

If the connection requires a login, select


the option ‘The server requires
authentication’.

You may receive a fix, dynamic, public of


private IP address, it depends on your
subscription; You don’t have to declare
the IP address anywhere.

Initialization: You have to update the initialization string with the APN (ask you GSM operator).
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”,
including the quotes.
If the SIM card you have does not require a PIN code, you can leave the field as it is or
erase it completely.

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) TBOX LT2 handles the
modem to keep the connection permanently.
When this option is removed, TBOX LT2 handles the connection according to
communication variables: GPRSCon (see below)

Version : 1.09 60
Communication Variables dedicated to GPRS, 3G,… IP Communication
Some communication variables allow manual handling of GPRS and give information on the status.

Digital Communication Variable


COMx.GPRSCon Handles the GPRS/3G 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.
USE A TRIGGER INPUT CONTACT TO ACTIVATE THE VARIABLE

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 TBOX LT2 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), or displayed in a webform, to
inform on IP address changing.

About sending alarms through GPRS/3G


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.

For sending e-mail, you need to use the SMTP server specific to the GPRS connection. Ask
your GSM operator.
Example: gprsmail.myoperator.com

Version : 1.09 61
Sending of SMS with GSM configured in GPRS/3G
While connected in GPRS and a SMS has to be sent through the classical SMS-Center, TBOX LT2 will
automatically disconnect, send the SMS and reconnect.

GPRS IP settings
GPRS represents a TCP/IP connection using GSM network. It then requires a TCP/IP configuration.

Obtain IP address
automatically:
The IP address is provided by
the Operator at the connection.

Use IP address:
Don’t use it with GPRS
connection.

Obtain DNS server addresses


auto.:
The Operator provides you with
DNS.

Use DNS Server addresses:


Don’t use it with GPRS
connection.

Even when working with fix IP address, it does need to be declared. IP address is always
provided by the operator during connection.

Using TWinSoft to communicate to an RTU in GPRS/3G


Typically, TWinSoft will access TBOX LT2 from a LAN, using an Ethernet connection (in case your LAN
has a Gateway connection to Internet).
In order to have a reliable communication, you have to increase some timing parameters in TWinSoft:
menu ‘Communication’  ‘PC Setup’; select ‘Ethernet’ and click ‘Advanced...’.

Change ‘Comm. Timeout’ to 5000 ms. or higher

Change ‘Inter-Frame Gap’ to 10 ms.

Before sending a program through GPRS, check the PC setup settings of TCP/IP, like
explains chapter 5.3.3. IP address settings, point 3.

Version : 1.09 62
8.2.5. USB
TBOX LT2 is equipped with 1 x USB port. It can be used as "Device" as well as "Host".

Equipment supported:
 PC
 USB Memory Stick

USB as Device
When the USB port runs as "Device", it waits for a "Host", like a PC.
TBOX LT2 can be connected to a PC to be programmed by TWinSoft.

Connection
You need a USB A/A male cable (host to host). The USB driver (TBoxUSBDriver.inf) is installed on PC
during TWinSoft setup.

Communication
Communication is carried out in TCP/IP. TBOX LT2 acts as a DHCP server and provides to the PC an IP in
the range 10.8.10.xxx. TBOX LT2 itself uses the IP address 10.8.10.1.
In PC Setup, you select "USB".

USB as Host
When the USB port runs as "Host", it expects to communicate with a "Device", like a USB memory stick.
With a USB memory stick there are 2 features supported:

1. Programming TBox
This feature can be compared to Plug & Go. The procedure is:
- You create a "repository" directory on the USB stick, using Plug&Go.
- You insert the USB memory stick in TBOX LT2.
- You press the button to the Reset position and let the LED flashing green 6 times (it must turn off
after the sixth one)
- After the LED starting sequence, it flash at 1/2 Hz during copy and then starts with the new
program

2. Alarm Recipient
The USB memory stick can be configured as an alarm recipient.
In the recipient, you chose "external memory" and select USB Mass Storage.

Demounting the USB Memory stick


When used for programming, the USB memory stick can be removed when TBOX LT2 has started with
the new program.
When used as Alarm Recipient, you should check TBOX LT2 is not in alarm anymore (Ala_on=0) and then
demount the USB Memory stick using the Digital System Variable 53 [USBStorage]

Version : 1.09 63
8.3. Communication Variables
Communication variables are dedicated registers providing different status of the communication.
It is very useful for monitoring and controlling the connection.

Those variables are divided into 2 tabs, Digital Communication Variables (DCV) and Analog Communication
Variable (ACV).

When you need one, double click it from the list and click <OK>! It becomes a Tag and then available in
any feature of TBOX LT2.

8.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 TBOX LT2 in case of error during ModBus “Master”
communication. Possible errors:
- Timeout.
- ModBus: Unknown address, wrong quantity, CRC error.
- TCP/IP: wrong closing of socket.
Must be RESET by the user.
COMx.HookLink * Modem:
Reading '1': indicates the modem is on-line
- dial-up modem: connected to another mode
- GPRS/3G: connected to the APN.
Writing '0' : forces a hardware reset of the modem.
Writing '1' : forces the modem to hang up and a GPRS/3G disconnection.
Ethernet:
Reading '1' : indicates the Ethernet is connected to a device (Switch, PC, ...)
Writing '0' or '1': forces a reset of the Ethernet chip. Ethernet communication is not
interrupted.
VPN:
Reading '1' : indicates the VPN is connected

USE A TRIGGER INPUT CONTACT TO ACCESS THE VARIABLE


COMx.Call - Modem: with GSM acting as “dial-up” modem, reading ‘1’ indicates the modems are
synchronized with TBOX LT2 ‘dialing out’
COMx.Answer - Modem: with GSM acting as “dial-up” modem, reading ‘1’ indicates the modems are
synchronized with TBOX LT2 ‘Answering’ incoming call

Version : 1.09 64
Name R/W Description
COMx.NoDial 0 Modem: with PSTN modem, reading ‘1’ indicates that no dial tone has been
detected when the modem has picked-up the line. (not available with TBOX LT2)
Must be RESET by the user.
COMx.GPRSCon * GPRS/3G: Writing 1: demand of connection. (Automatic when selecting
“Connection at start-up”)
USE A TRIGGER INPUT CONTACT TO ACCESS THE VARIABLE
COMx.ModBusResp 0 Communication: indicates the port is transmitting answering. At each
transmission, TBOX LT2 SET this register.
To check TBOX LT2 is transmitting in “slave” mode. You RESET this register and
test whether it is SET again (using Ladder or BASIC).
COMx.ModemError 0 Communication: modem initialization failed.
Modem has answered with an ERROR to one of the parameters of the init. String
(see modem properties). A reason could be, working with GSM, because it is not
registered yet.
When you RESET this register, OS executes a warm start of the modem (sending
init. string)
COMx.ModemPower * LowPower: used only with Low Power RTU.
COMx.ModemAlarm * LowPower: used only with Low Power RTU.
COMx.VPNCon OpenVPN:
On VPN "Client" side:
VPN.VPNcon=0 -> exit OpenVPN process
VPN.VPNcon=1 -> restart OpenVPN process
On VPN "Server" side, it has no function..

8.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.
0 : Write ‘0’ only.
1 : Write ‘1’ only.
* : Write ‘0’ or ‘1’.

Example with COM2 – 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 value returns to 0 when the user has disconnected.
Values can be written to those registers.

Version : 1.09 65
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/3G: indicates the status of the GPRS connection.
Value=0 : disconnected
Value=1 : currently connecting
Value=2 : connected
Value=3 : currently disconnecting
COMx.IPAddress - GPRS/3G: this register gives the IP address received by TBOX LT2 during its
connection to the operator. The information is available in a DWORD. It can be
displayed from the list of Tag as ‘Ip Address’.
COMx.SigLevel - GSM: when available, quality of the GSM signal. The range of the value is 1 to 31. A
value of 18 is considered as a good signal level.
PSTN: when available, voltage on the line (+/- 20%)
COMx.SmsState - GSM: associated to the GSM, can be used to check the status of ReadSMS.
COMx.AutoAnswer * MODEM:
Read: indicates the number of RING before the off hook
Write “0”: no off hook
Write “1”: force off hook at the next RING
COMx.ModemState - MODEM: gives current status of the modem. Possible values are:
1: PIN code sent (GSM only when PIN code activated)
4: Init string accepted
7: Idle mode (PSTN/CSD modem)
9: outgoing call. Waiting CONNECT
10: incoming call. RING arriving
12: Idle mode (GPRS/3G)
… more values in TWinSoft Help.
The last value is maintained, until the next status changing.
COMx.CallerID * MODEM: variable which indicates the caller ID of the current incoming modem
connection, 32 bits format, giving the 9 last digits of the calling number. It can be
used in the program to trace and control who is calling
Init string of GSM modem: Caller ID identification must be activated. ^AT+CLIP=1
COMx.ModemPoT * LowPower: used only with Low Power RTU.
COMx.StationAdd - General: Station address of the RTU (see general RTU properties).
LOW BYTE: ModBus station address.
HIGH BYTE: Sub address.
Doing ModBus Transactions through modem, useful to detect the calling “Slave“
station, by doing a request to station “0” and read this variable. From there, the
“Master” can activate the proper Trigger.
COMx.CurNetwork - GSM-3G: Indicates the network the GSM is connected to
0 : GPRS ou EDGE
1 : 3G
COMx.UsbState - USB: Gives current status of the USB port:
0 = does not do anything (never visible)
10 = USB port in mode "device", waiting for a Host (PC)
11 = Something is connected in mode "device"
20 = USB port in mode "host" waiting for a device (USB stick)
21 = Something is connected to TBOX LT2
WARNING: this could be a device not recognized by TBOX LT2 like a mouse, a
keyboard, ...
Without anything connected to the USB, the variable toggles 10, 20, 10, 20, ….

Version : 1.09 66
Name R/W Description
COMx.ByteCount - GSM/3G: returns all bytes (sent and received) during a IP communication. It is
reset at each start/stop of the program, then to sum the bytes up you should use
the following BASIC code:

8.4. Groups of I/Os


The Hardware is represented in TWinSoft with a hierarchy of 3 levels:

 CARD : with TBOX LT2, it is all-in-one CPU card


 GROUP : the communication ports form a group as well as each type of I/O:
group of DI, group of DO, group of AI, …
 CHANNEL : each physical connection, within a Group, corresponds to a channel.

CHANNEL

CARD

GROUP

When connected to TBOX LT2 the


column ‘Value’ displays the current
value, when the channel has been
declared as a Tag and the program
sent to the RTU.
(see chapter 9 : ‘Tags’)

Version : 1.09 67
8.5. System variables
The system variables have pre-defined functions.
They are very useful to check or to act on features of TBOX LT2.

They are divided into ‘Digital’ and ‘Analog’.

8.5.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 TBOX LT2 maintains the variable at 1 to be sure it is
detected. Such a variable needs to be reset using Ladder/BASIC logic.

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 TBOX LT2, 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 TBOX LT2 has started after
having received a new program. Changes to 0 after a reset of the TBOX LT2
3 Reboot 1 Reboot: complete restart of TBOX LT2. It is equivalent to hardware reset.
4 RstWat 1 Reset Watchdog: the watchdog checks the cycle time of BASIC/Ladder program. In
case it is longer than 1 second, it resets TBOX LT2. 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 acknowledged). Writing 0
in this register causes a global acknowledgment of all alarms.
It corresponds to a reset of the alarm stack.
6 Alaerr 0 Alarm in error: TBOX LT2 SET this register 1 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 User.
7 RstAla - 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 (not available).
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.
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 - Alarm: flag that can be associated to any Alarm condition. When at value ‘1’,
inhibits the sending of alarm.
16 DaySav - Time: 1 = summer time (the ASV “ZoneBia” increments or decrements with.
0 = wintertime. the number of seconds according to the time zone)

Version : 1.09 68
Index Name R/W Description
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.
TBOX LT2 resets the variable automatically.
19 TcpIpLog * TCP Logging: Not needed with TBOX LT2. All logs available from TWinSoft main
menu: ‘Communication’  ‘Retrieve from TBox’  ‘Trace Log’.
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 ports (of the CPU or of a communication card) used as
‘Master’ has encountered 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 TBOX LT2. (SET)
25 GpsVF - GPS: GPS validity (connected on COM1). GPS returns a valid signal.
Validity of the signal. When changes to ‘1’, it indicates the GPS receives
sufficient signals to calculate its position (from minimum 3 satellites).
When changing from 0 to 1, the time of TBOX LT2 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. TBOX LT2 does not
succeed to connect (not supported yet) (SET)
27 ModemLog * ModemLog: Not needed with TBOX LT2. All logs available from TWinSoft main
menu: ‘Communication’  ‘Retrieve from TBox’  ‘Trace Log’.
28 SystemEr 0 SystemErr: the RTU detected an error during starting. Typically a problem with
a card (not supported yet) or a discordance between cards detected in
program and cards installed (SET)
29 MmcToRTU - SD card: indicates whether the program has been loaded from the micro SD.
1 = the program of the micro SD is different from the one of the RTU and has
been loaded from the micro SD.
0 = there is no micro SD; the micro SD is empty; the program of the micro SD is
identical to the one of the RTU (see also appendix C. Plug&Go)
30 DigChrOv - Chronologies: Indicates that the amount of records in the digital chronology
has reached the maximum selected
30 DigChrOv - Chronologies: Indicates that the amount of records in the digital chronology
has reached the maximum selected
31 AnaChrOv - Chronologies: Indicates that the amount of records in the analog chronology
has reached the maximum selected
32 RsDigChr - Chronologies: Allows emptying the digital chronology using a SET.
Automatically reset by OS
33 RsAnaChr - Chronologies: Allows emptying the analog chronology using a SET.
Automatically reset by OS
34 BusError - Not used
35 MasterAnsw * ModBus Transaction: when set to 1, allows handling of ModBus Transactions
on incoming call. It concerns then only ModBus Transactions through
modem
36 DynDnsEr 0 TCPIP: error during a connection to DynDNS server. (SET)
37... 44 Tsl_Xa - Alarm: there are 8 time slices that can be used to build Time Tables.
Those 8 variables indicate the activity of each of them
45 DisAla2 * Alarm: flag #2 that can be associated to any Alarm condition. When at value ‘1’,
inhibits the sending of alarm

Version : 1.09 69
Index Name R/W Description
46 DisAla3 * Alarm: flag #3 that can be associated to any Alarm condition. When at value ‘1’,
inhibits the sending of alarm.
47 DisAla4 * Alarm: flag #4 that can be associated to any Alarm condition. When at value ‘1’,
inhibits the sending of alarm.
48 Pop3Err * Alarm: an error occurred while accessing POP3 server. (SET)
49 PgmCnt 1 Low Power: used only with Low Power RTU
50 CntErr 0 Low Power: used only with Low Power RTU
51 SftpErr 0 Ftp Error: an error occurred while sending files through Secure FTP. (SET)
52 CycErr 0 Cycle Error: working with a periodical process cycle time, indicates the cycle –
has been bigger than the period selected (see advanced RTU properties ->
Start/Stop. (SET)
53 UsbStorage 0 USB
Reading 1 = USB device has been detected.
Writing 0 = demounting the USB device. Required after data transfer is done,
before removing the dongle.
54 HttpErr 0 HTTP Error: an error occurred while sending HTTP Post to a server. (SET)
55 Runtime 1 Plug&Go: to activate backup of global Tags and DB, as configured in Plug&Go
Backup configuration (see chapter 7.6.11).
56 SdPresent - SD Card: =1 means a SD card is detected in TBOX LT2.
57 SdFull - SD Card: =1 means the SD card is full at 90%.

8.5.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 TBOX LT2.
1 Minute * Time: Minute in TBOX LT2.
2 Hours * Time: Hour in TBOX LT2.
3 Day * Time: Day of the month in TBOX LT2.
4 Month * Time: Month in TBOX LT2.
5 Year * Time: Year in four digit in TBOX LT2.
6 DayOfw * Time: Day of the week in TBOX LT2. (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 yet.
The size of the Alarm stack can be adjusted in the ‘Advanced RTU properties’).
8 AlaID * Alarm last index: Absolute index of the last alarms generated (number between 0
and 65535).
Can be used to acknowledge an alarm by writing its index.
9 ALACur * Alarm current index: Absolute index of the alarm being currently handled (number
between 0 and 65535).
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 Recipients).
11 SamQty * Sampling Table: Quantity of sampling tables defined.

Version : 1.09 70
Index Name R/W Description
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 TBOX LT2 has been installed. It uses by default
Regional Settings of PC. It can be changed from RTU properties.
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 TBOX LT2.
21 OsBuil - Operating System: build number of the OS running in TBOX LT2.
22 LoaVer - Loader version: Not available with TBOX LT2.
23 LoaBui - Loader build: Not available with TBOX LT2.
24 PortIdLog * TCP Log: Not needed with TBOX LT2. All logs available from TWinSoft main menu:
‘Communication’  ‘Retrieve from TBox’  ‘Trace Log’.
25 EventLog - TCP Log: Not needed (see above)
26 MilliS - TIME:
With CPU-16: 10 milliseconds tik
With CPU-32 and –LT2: 1 millisecond tik
27 GpsLat - GPS: current latitude given by the external GPS (ACC-GPS on COM1).
Latitude in degrees multiplied by 1000000 (example: 50123456 means 50
degrees + 0.123456 degree). Resolution : 11 cm. Precision 15 meters
28 GpsLong * GPS: current longitude given by the external GPS (ACC-GPS on COM1).
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 external GPS (ACC-GPS on COM1).
Altitude in meters. Resolution, 1 meter. Precision: depends on the quantity of
satellites. Poor precision
30 GpsSats - GPS: quantity of satellites detected by the external GPS (ACC-GPS on COM1). Must
be of minimum 3, or even 4 to expect a good precision.
31 Rerout * Modbus: variable 16 bits, each representing a COM Port from 1 to 16. The bits
corresponding to the Ports in Rerouting are at 1, others at 0. Can be use to set
the mask.
32 MasterErr * Communication: indicates the last station ID (ModBus station) in communication
error. Once an error has been detected, the value is maintained until next error.
Usually, communication errors can be solved by modifying the time-out available
in the ‘Advanced’ tab of the communication used (End of Fame Detection, IFG, Rx
Time-out). To trace an error, we advise you to reset the variable and check it when
it is different from 0.
When this happens, you can handle it in your process and reset the variable, that it
is ready for the next error
33 CardErr * System: this variable indicates card(s) in error. For TBox-MS only
34 CPUusage - Low Power: Not available with TBOX LT2. Used with Low Power RTU only.
35 SerialNb - Hardware: indicates the S/N. of the CPU (see sticker on the side of the card).
36 CPUmode - Redundancy: for TBOX MS32 only
37 OpenSoc TCP/IP: number of sockets opened. Not available with TBOX LT2

Version : 1.09 71
Index Name R/W Description
38 GpsSpeed - GPS: with a GPS connected to TBox, current speed of TBox, expressed in km/h
39 GpsRoute - GPS: with a GPS connected to TBox, current direction of TBox, expressed in
degree (0 .. 359.9 degree)
40 AlaPop3 - Alarm: it indicates the number of alarm needing to be acknowledged by POP3
connection
41 EvenCur * Alarm: it indicates the current Event ID
42 HardRev - HW: it indicates the hardware revision of the CPU
43 Pop3State * Alarm: indicates the state of POP3 connection. Particularly useful when
monitoring the RTU with POP3 connections. The last value is maintained:
1 Accepted message received
2 Acknowledgment received
10 Invalid message
11 Unknown command
20 Incorrect password
21 Incorrect password or not supplied for a com. Port protected
30 Message received does not match a pre-defined message
44 CntID * Low Power: used only with Low Power RTU
45 CntValue * Low Power: used only with Low Power RTU
46 CntTime * Low Power: used only with Low Power RTU
47 CrdIndex - Datalogging: current position in the table of digital chrono. (circular counter)
48 CrdSize - Datalogging: size of the table for digital chrono.(see RTU properties → General)
49 CraIndex - Datalogging: current position in the table of analog chrono.(circular counter)
50 CraSize - Datalogging: size of the table for analog chrono.(see RTU properties → General)
51 CreIndex - Datalogging: current position in the table of events (circular counter)
52 CreSize - Datalogging: size of the table of events (see Advanced RTU properties → Alarms)
53 InstState - System: during sending of a new application, current state of installation
1 Initializing installation
2 Uninstall package XXX
3 Create RTU Infos
4 Flushing I/O buffers
100 Operation is finished
101 ERROR during TEST
102 ERROR during UNINSTALL
103 ERROR during INSTALL
104 ERROR during PLUG & GO
105 ERROR during MD5 verification
106 ERROR application MISSING
107 ERROR BAD INSTALLATION
200 Check package <xx>
300 Install package <xx>
400 Copy to Plug&Go <xx>
500 Checking MD5 <xx>
54 BatUsage - System: number of seconds the TBOX LT2 has been out of power and SRAM
backed up with lithium battery
The life time of the battery is estimated to 4 years (=126 144 000 seconds)
55 FreeMem - System: Displays the kBytes of SDRAM memory still available.
The SDRAM is 64 MBytes memory.
It shows the memory used by LINUX, like when establishing a 3G connection, or
when opening a socket for instance. In no case it shows memory used by the
application (datalogging, backup of Tag values, ...) or Operating System.
One should check it never goes below 32 MBytes (=32 000 kBytes), reserved for
..\tmp directory. When sending a new application, it is first sent to ..\tmp
directory before it is flashed

Version : 1.09 72
Index Name R/W Description
56 XmlTag * Backup allows backup/restore of Tags.
Writing 1 in the variable forces the backup of value of Tags into the SD card. When
the operation has succeeded, the Tag returns automatically to zero (see also
return codes below).
A file tags.xml is created in directory ../public/xml of the SD card with the value
of internal variables
Writing 2 in the variable forces the restore of the value of Tags saved in file
tags.xml (see above).
Writing 2 in the variable, carries out a copy of the file into the directory
../public/dropbox which then updates current value of Tags.
On can also remotely update value of internal variables. You send a file <file>.xml
to the directory ../public/dropbox of the SD card. It can be of any file name; only
the extension is important.
TBOX LT2 checks the presence of the file each 10 seconds. When a new file is
detected, it is computed and value of Tags is updated
Return codes :
0 Idle (or operation succeeded)
10: importing from FTP directory ../dropbox
11: import error from FTP directory ../dropbox
100: exporting to FTP directory ../xml
101: exporting error to FTP directory ../xml (see logs details)
200: restoring tags.xml
201: restoring failed
57 LogLevel System: allows filtering recording of logs according to a level of log:
- 0 : Debug
- 1 : Verbose (default)
- 2 : Info
- 3 : Warning
- 4 : Error
- 5 : Fatal error
- 6 : None (log are disabled)
58 LogClass * System: 32 bit Tag allowing filtering recording of logs according to a Class of log.
Each bit corresponds to a class:
- SYSTEM: bit 0
- SERVICES: bit 1
- LOADXML: bit 2
- PROPERTIES: bit 3
- TAGS : bit 4
- SYSTEM TAGS: bit 5
- RESOURCES: bit 6
- COMMUNICATION: bit 7
- ALARMS: bit 8
- DATABASES: bit 9
- REMOTE TAGS (ModBus Transactions): bit 10
- HIGH SPEED TAGS: bit 11
- PERIODIC EVENTS: bit 12
- PROGRAMS: bit 13
- REPORTS: bit 14
- ADDONS: bit 15
- MODBUS: bit 16
- AT MODEM: bit 17
- PAGERS: bit 18
- NMEA: bit 19
- TCPIP: bit 20
- PPP: bit 21
- HTTP: bit 22
- SMTP: bit 23

Version : 1.09 73
- FTP: bit 24
- NTP: bit 25
- PRINTER: bit 26
- PLUG AND GO: bit 27
- POP: bit 28
- SFTP: bit 29
- USB: bit 30
- VPN: bit 31
Example: there is a lot of Modbus transactions that fill the log and you wish to
debug the GPRS or 3G connection. You need to log AT MODEM and PPP. You will
set the system variable LogClass = 131 072 + 2 097 152 = 2 228 224
Check with the Tag displayed in "binary" format the correspond bits are set to 1.

The value of these two "Log" variables is maintained in case of all different
start-ups of TBox LT2 (new program, reset, ...)

59 Http HTTP: Indicates the number of users that have logged in HTTP to TBox.
Session This requires HTTP protection to be activated as well as HTTP session
Authentication (See RTU properties Protection and IP Security)

(*) System variable 15. ‘Week of the year’ :


This system variable indicates the week of the year according to the date in the RTU.
The rules are the following:
- the changing of week happens on Monday, 00:00 AM
- the changing of week happens at January 1, whatever day it is
- if January 1 is a Friday, Saturday or Sunday, there will be two ‘Week 1’

Examples:
Month Mon Tue Wed Thu Fri Sat Sun Week
dec 21 22 23 24 25 26 27 51
dec / jan 28 29 30 31 1 2 3 52 / 1
jan 4 5 6 7 8 9 10 1
jan 11 12 .. .. .. 2

Month Mon Tue Wed Thu Fri Sat Sun Week


dec 22 23 24 25 26 27 28 51
dec / jan 29 30 31 1 2 3 4 52 / 1
jan 5 6 7 8 9 10 11 2
jan 12 13 .. .. .. 3

8.6. Timers & Counters

Timers and Counters are described in the manual BASIC & Ladder for TBox

Version : 1.09 74
9. Tags & Variables

A Tag is essential for any programming

 An alarm is conditioned from a Tag.


 The Datalogging mechanism records values of Tags.
 BASIC/Ladder logic executes a process by handling Tags.
 …

Any variable of the TBOX LT2 that you want to use in any configuration has to be available
as a Tag.

There are 4 types of variables:


 The Physical I/O DI, DO, AI, AO (See chapter 9.1)
 The Internal Variables digital, analog and text (aka Registers) (See chapter 9.2)
 The System Variables predefined analog and digital functions (See chapter 8.5)
 The Communication Variables digital and analog (See chapter 8.3)

The Tags are gathered in the folder Tags of the Project Workspace:

GROUPS OF TAGS

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.

Version : 1.09 75
9.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 8: ‘The Resources’).

Details about the different I/O are available chapter 20.

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 TBOX LT2 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 TBOX LT2 (see
chapter 9.3: ‘ModBus addresses’)
Once the program has been sent, the value appears.

You can send the program


clicking this icon.

Version : 1.09 76
Examples of Physical Inputs:

Digital Input Analog Input

9.1.1. Analog I/O

Concerning Analog I/O, some


settings are available:

Type: depending on the model of TBOX LT2 there may have different types of signal available (1..5V;
4..20mA; 0..10V, ...)

By default, Analog Inputs are configured as 0..10V inputs, to prevent damaging the
hardware if it is cabled before it is programmed.
4..20mA input stage is not protected against over voltage.

Scaling: the I/O can be scaled to real value by defining a MIN (corresponding to the smallest signal)
and a MAX (corresponding to the highest signal). The resolution defines the number of steps
of the scale (MAX – MIN / RESOLUTION).

Version : 1.09 77
9.2. Internal Variables (Registers)
An internal variable (also known as Register) is an addressable location of the memory. It is used as flag,
as temporary value, to make a calculation, …

There are 3 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
 32 bits Float, IEEE 754

 TEXT (AIV) analog register associated to a string of characters

The internal variables can only be created from the list of Tags.

9.2.1. Digital Internal Variable


To create a Digital Internal Variable, from the list of Tags, click ‘Add a Tag’.
Select ‘Digital’:

The Definition menu pops up:

You type a Tag Name, a Comment and select as Type: ‘Internal Variable’

Version : 1.09 78
The initial value is the value the Tag will have at the start-up of TBOX LT2.
If you select ‘None’ the value is maintained at start-up.

ModBus Address is discussed in chapter 9.3.

9.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:

Internal “Float” variable

You type a Tag Name, a Comment and select as Type: ‘Internal Register’

Version : 1.09 79
For each Analog Register, the formats available are:
 8 bits (Signed or Unsigned)
 16 bits (Signed or Unsigned)
 32 bits (Signed or Unsigned)
 Float (32 bits, IEEE 754)

By default, TWinSoft creates Analog Internal Variable in format ‘Float’.


Check whether it fits with the use you intend to have of the variable.

The initial value is the value the Tag will have at the start-up of TBOX LT2.
If you leave the field empty, the value is maintained at start-up.

ModBus Address is discussed in chapter 9.3.

9.2.3. Text Internal Variable


The Tag TEXT uses ASCII character encoding ISO/CEI 8859-1 of the Latin alphabet.
To create a Tag TEXT (string of characters), from the list of Tags, click ‘Add a Tag’ .

Select ‘Text’

The Definition menu pops up:

Version : 1.09 80
9.3. ModBus address
The ModBus address is the link to the outside world. When equipment must sample Tags in TBOX LT2,
it uses its ModBus addresses; like TView, SCADA or TWinSoft.

Each Tag has a unique ModBus address. By default TWinSoft proposes a ModBus address.
You can change it if you want.

While being On-line, the value of the Tag can be displayed only when TWinSoft has sent
the program to TBOX LT2.
The Tag is then available for the outside world at the ModBus address you have declared

9.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. It explains why when you are connected to
TBOX LT2, even without sending a program, you still can see values from the Resources.
The address of these variables is 65280 + ID of the variable.
Example: [AlaRec] = 65280+10=65290
 One user definable ModBus address that you modify as 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.

Other Tabs of the Tag configuration refer to menu where the Tag can be declared:
For Alarms, see chapter 12
For Datalogging, see chapter 14
For ModBus Transactions, see chapter 15
About Presentation-write, see next chapter

Version : 1.09 81
9.4. Tags - Presentation / Write
This tab contains configuration used when the Tag is declared in a Report or in a WebForm. The
Description is also used in TView.
Presentation settings can also be used when the value of the Tag is included into message (SMS or e-
mail).

 Report: file edited with ‘Report Studio’ and used for instance as text body when sending e-mail.
To start Report Studio open the list of ‘Web and Report files’ from ‘Project Workspace’, double-
click an existing report or "Add a new Report…"

 WebForm: file edited with ‘WebForm studio’. Used to display values of Tags in a HTML page.
(To start WebForm Studio, open the list of ‘Web and Report files’ from ‘Project Workspace’,
double-click an existing webform or "Add a new WebForm…"

 Message: with Digital Tags, the ‘states’ defined in Presentation will be used and with Float Tags,
the number of decimals.
(See also chapter 12.6.1. Value of Tag in message)

Presentation: makes the following information available to ‘Report’, ‘WebForm’, 'Message' and
TView .

Description: in a Report, text displayed as ‘Header’ in sampling table or as Tag information in


chronologies when the data is retrieved.

Units: (with analog Tags) 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.

# dec.: (with analog Tags) the quantity of decimals of the value displayed

State On/Off (with digital Tags) Text appearing when value = 1 / 0

Write allowed: if the Tag is declared in a WebForm, allows defining a writing access to the Tag,
within a specific range.

Version : 1.09 82
9.5. Run Time Parameters
Run time parameters feature allows accessing some TBOX LT2 configurations through Tags, in order to
modify them "on line".
For instance, to change a tel. number of a SMS recipient, the e-mail address of a recipient, the address of
SMTP server, the handling of alarm condition, …
When a configuration provides access to run time parameters, a tab is attached to the configuration.

Example with Alarm Recipient:

You associate a Tag to the run time parameter you


The Tag, and therefore its associated parameter,
want to add
can then be modified from TWinSoft, a WebForm,
a SCADA, ...
The format of the Tag depends on the parameter (Bool, Byte, Word, Float, Text)

Changing of parameters is maintained in case of power cycle, reset, reboot and watchdog.
Original configuration is restored in case of sending new program or OS and doing stop/start from
TWinSoft.

9.5.1. Modbus Device


Parameter Tag Format

Station Address Byte


URL Text
Port TCP Word

9.5.2. Alarm Parameters


Alarm Condition

Parameter Choice Tag Format

Handling 0 = enabled Byte


1 = disabled
2 = power fail
3 = DisAla
4 = DisAla2
5 = DisAla3
6 = DisAla4

Threshold (analog) Byte or Word or DWord or Float

Hysteresis (analog) Byte or Word or DWord or Float

Version : 1.09 83
Alarm Recipient

Parameter Recipient Type Tag Format

Phone Number ModBus, SMS, Printer, RAS, Custom Text (20)


E-mail To Email Text (120)
E-mail Cc Email Text (120)

Alarm Time Slices Alarm Holidays

Parameter Tag Format Parameter Tag Format

From Hour Byte Day Byte


From Min Byte Month Byte
To Hour Byte Year Word
To Min Byte

9.5.3. Datalogging Parameters


Chronologies Condition

Parameter Choice Tag Format

Handling 0 = enabled Byte


1 = disabled
2 = power fail
3 = DisCra/DisCrd

Variation (analog) Byte or Word or DWord or Float

9.5.4. IP Parameters
ISP FTP

Parameter Tag Format Parameter Tag Format

Phone Number Text (20) Host Text (120)


User Name Text (30) TCP Port Word
Password Text (30) User Name Text (30)
Password Text (30)

SMTP POP3

Parameter Tag Format Parameter Tag Format

Server Text (120) Server Text (120)


TCP Port Word TCP Port Word
E-mail From Text (50) Authentication Bool
Authentication Bool Login Text (40)
Login Text (40) Password Text (40)
Password Text (40)

Version : 1.09 84
NTP DynDNS

Parameter Tag Format Parameter Tag Format

Server Text (120) URL Text (120)


Authentication Bool
User Name Text (30)
Password Text (30)

HTTP

Parameter Tag Format (max.)

Server Text(120)
TCP Port Word
Authentication Bool
Login Text(30)
Password Text(30)

9.5.5. GSM/GPRS Parameters


GPRS Authentication

Parameter Tag Format (max. length)

(3G,GPRS) Authentication Bool


(3G,GPRS) Login Text (40)
(3G,GPRS) Password Text (40)
(3G,GPRS) ModemInit String (see below) Text (120)
(Ethernet) IP DWord
(Ethernet) Subnet DWord
(Ethernet) Gateway DWord
(Ethernet) DNS1 DWord
(Ethernet) DNS2 DWord
(Serial) Baudrate DWord
(Serial) Parity Byte
(Serial) StopBits Byte
(Serial) DataBits Byte
(Serial) FlowControl
MasterTimeOut Word
PacketReceptionDelay Word
SlaveIFG Word

Declaring APN as Runtime Parameter


The APN is part of the modem init string. In case APN must be declared dynamically, for instance
through a WebForm, the modem init string must be built manually. It must be composed from:
ModemInit = a prefix + APN + a suffix.

Example:
List of Tags:

Version : 1.09 85
BASIC:

9.5.6. RTU Properties


Parameter Tag Format (max. length)

StationName Text (11)


POP3AckTimeout Word
SMSTimeout Word
HTTPServerPort Word
FTPServerPort Word
ModbusOverTCPPort Word
ModbusOverUDPPort Word
HTTPServerPort Word
ModBusTCPSlavePort Word
ModBusAddress Byte

Version : 1.09 86
10. IP Parameters
IP parameters consist in the global configuration for TCP/IP services:

 connecting to an ISP (dial-up connection)


 sending files: FTP(S), SFTP
 sending e-mail: SMTP(S)
 reading e-mail subject: POP3
 time synchronization: NTP
 DynDNS: handling of public, dynamic IP addresses
 configuring Virtual Server rules
 Configuring IP Bridges

Concerning IP configuration of Ethernet port, refer to Group 0 from ‘Resources’ ’I/O’ 


LT2-xxx-x.
Concerning IP configuration for incoming dial-up calls (Web Server), see advanced RTU
properties  TCP/IP

All TCP/IP services are


defined in a Folder,
available from the
‘Resources’.

The FTP Server, SMTP Server, POP3 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 sending e-mail through a 3G connection:


The Recipient is of type ‘e-mail’ with the recipient's e-mail address and it refers to a SMTP server.
This SMTP server uses the 3G modem connection.

In other way round, when TBOX LT2 sends an e-mail, it sequences the tasks like following:

connection to a the 3G network (APN)  connection to a SMTP Server  sending to a recipient


(e-mail address)

Version : 1.09 87
10.1. ISP configuration
ISP stands for Internet Service Provider. An ISP represents the entrance to Internet.
It is required to access Internet with a dial-up connection: PSTN, GSM-DATA (CSD).

It represents the connection to the company you call to access an Internet service, like sending e-mail or
files (FTP).
Some among the most well-known: AT&T, Scarlet, Tiscali, …

When you want TBOX LT2 to send e-mail or send files to a FTP site through a dial-up connection, you
subscribe an account to an ISP.

Using the button ‘Import…’


you access an existing ISP
configuration you have tested
successfully on the PC.

Name: It is the name of the provider.

Modem: a connection to an ISP is always


carried out through modem. Select the
modem.

Phone number: It is the phone number of the


provider TBOX LT2 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 TBOX LT2 is placed behind a telephone
switch, the ‘outside line prefix’ is defined in
the modem properties (see chapter 8.2.2);
it should not be added to the dial prefix.

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).

DNS: A DNS converts names in IP address. It is needed in case the Server (SMTP, FTP, NTP,
POP3) is indicated in 'text' and not with an IP address.
Most ISPs support dynamic DNS, they provide the DNS addresses when connecting.
If this 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 to access internet services (FTP, e-mail, NTP).
You are also allowed to define several SMTP Servers (see next), associated to different
ISPs. Creating the alarm recipient, you can select the ‘Redundancy’ option.

Version : 1.09 88
10.2. FTP(S) Server
FTP stands for File Transfer Protocol. When subscribing an account to an ISP, usually you have some
Mbytes to your disposal for sending files. It supports secure, encrypted communication.

The FTP server represents the target when sending files. The directory where the files are sent is defined
in the Recipient (see chapter 12.4).

The sending is generated through an alarm recipient “FTP”. TBOX LT2 connects to Internet (through a
connection: ISP, Ethernet or GPRS/3G) and then connects to the FTP server.
Name: It is a free name, to recall when you
create the alarm recipient
Address: text and IP address are accepted.
Connection: You select the way to connect to
the Server (ISP, GPRS/3G, Ethernet).
TCP port: Each TCP/IP service has its own
unique TCP port. It provides a logical
location for the delivery of TCP data.
TCP port used by TBOX LT2 to establish FTP
connection (default=21).
Mode: A FTP connection uses 2 sockets: one
CONTROL and one DATA connection. The
mode determines which party takes the
initiative of the DATA transfer
Passive:
- During the CONTROL connection, TBOX LT2
sends a request PASV. The server returns a
TCP port to use during data connection
- TBox LT2 initiates the DATA connection to
destination TCP port given by the Server
during the CONTROL connection
Active:
- During the CONTROL connection, TBOX LT2
sends a request with IP address and the
Active port (to access the IP address).
- The Server initiates the DATA connection to
destination TCP port given by TBOX LT2
during the CONTROL connection.

FTPS: If required by the server, TBOX LT2 supports FTPS, for secure encrypted connection. It uses
SSL as cryptographic protocol.

Login: Depending on the account you have subscribed, you have a login or work with ‘Anonymous
login’.

Account: Some Servers require an account name. If it is not the case, leave this field empty.

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.09 89
10.3. SFTP Server
SFTP provides secure in transferring files, using SSH protocol.
It is also called Secure File Transfer Protocol.

The SFTP server represents the target when sending files. The directory where the files are sent is
defined in the Recipient (see chapter 12.4).

The sending is generated through an alarm recipient “SFTP”. TBOX LT2 connects to Internet (through a
connection: ISP, Ethernet or GPRS/3G) and then connects to the SFTP server

Server name: It is a free name, to


recall when you create the alarm
recipient.

Server address: Address of the site.


It can be in IP format or in 'text'
format. In this last case, the DNS
must be specified for the
communication port used to
send the file(s).

Connection: Connecting through


dial-up modem, you select the
ISP you have previously created.
Connecting through Ethernet or
GPRS/3G, select directly the
corresponding COM port.

TCP port: Each TCP/IP service has its


own unique TCP port. TCP port
used by TBOX LT2 to establish
SFTP connection (default=22).

Login: Depending on the account you have subscribed, type the name and password.

Version : 1.09 90
10.4. SMTP(S) Server
SMTP stands for Simple Mail Transfer Protocol. It is usually the main reason for subscribing an account
to an ISP, for sending e-mail. It supports secure, encrypted communication

Concerning e-mail, TBOX LT2 is able to send e-mail (through SMTP server) and to read e-
mail (through POP3 server)

The SMTP Server represents the mail server used for sending e-mail (typically the one of the ISP where
we have subscribed and account).

The sending is generated through an alarm recipient “SMTP”. TBOX LT2 connects to Internet (through a
connection: ISP, Ethernet or GPRS/3G) and then connects 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 to
send e-mails.

E-mail address: It is the e-mail address of


the TBOX LT2. You can usually choose it
when you subscribe an account. This
address will appear in the 'From:' when
receiving the e-mail.

Connection: You select the way to connect


to the Server (ISP, GPRS/3G, Ethernet).

SMTPS: If required by the server, TBOX LT2


supports SMTPS, for secure encrypted
connection. It uses SSL as cryptographic
protocol.
.

In order to protect the mail sever (and you) against spamming, the ISP risks 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.

TCP port: Each TCP/IP service has its own unique TCP port. It provides a logical location for the
delivery of TCP data.
TCP port used by TBOX LT2 to establish SMTP connection (default=25).

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 to a PC, check its configuration otherwise
contact your ISP.

TBOX LT2 supports two SMTP authentication protocols: PLAIN and LOGIN Authentication.
Check with your ISP.

Version : 1.09 91
10.4.1. About SMTP Redundancy
If you create more than one SMTP Server, they can be used in redundancy according to their order in the
list.
You decide to work with redundancy when creating the e-mail recipient (see chapter 12.4).

10.5. POP3 Server


POP3 stands for Post Office Protocol 3. It is used to check and collect e-mails in a mail box.

The POP3 Server represents the mail server used to read mails previously sent to the attention of
TBOX LT2.

The use of POP3 is not to retrieve e-mail, but to read the field "Subject" and take some actions.
Two actions can be taken by sending e-mail to TBox:
Alarm acknowledgment sent through e-mail (see next page)
RTU monitoring with predefine message (see chapter 13. ReadSMS/POP3)

The checking of e-mail is generated through an alarm recipient “POP3”. TBOX LT2 connects to Internet
(through a connection: ISP, Ethernet or GPRS/3G) and then connects to the POP3 server.

Name: It is a free name, to recall when you create the alarm recipient.

POP3 Server: It is the IP address (or the name) of the POP3 Server to which TBOX LT2 connects to
read e-mails.

Connection: You select the way to connect to the Server (ISP, GPRS/3G, Ethernet).

TCP port: Each TCP/IP service has its own unique TCP port. It provides a logical location for the
delivery of TCP data.
TCP port used by TBOX LT2 to establish POP3 connection (default=110).

The Server requires Authentication: If authentication is required to collect e-mail: Login and
Password. TBOX LT2 does not support SSL for POP3 connection.

Version : 1.09 92
10.5.1. Alarm Acknowledgment through POP3
Introduction
With TBOX LT2 sending a SMS through a GSM, it is possible to acknowledge the alarm by sending back a
SMS to TBOX LT2
In some countries, SMS can only be sent through email. A POP3 connection can then be used to
acknowledge the alarm.

Sequence of connections
1. TBOX LT2 sends an e-mail. The alarm condition has been configured with the option "POP3 Ack".
It is important you have a dedicated e-mail account for your RTU. The data sent by e-mail can be a
report or a message.
2. The recipient retrieves its e-mail. The field "Subject" of the e-mail is preceded with internal data:
RTU Id (I)
Alarm index (A)
Example of message: #I460000020107,A00004# MyTBox: PUMP stopped
3. The user sends back the e-mail. Typically, he will make a "Reply" and sends back the e-mail to the
address as specified in point 1. above, in the SMTP server
4. TBOX LT2 generates a POP3 connection (through alarm condition) and checks the presence of e-
mail with specific data in field "Subject". With this data, TBOX LT2 knows which alarm for which
RTU it can acknowledge.
The POP3 connections have to be handled into your process and can be checked from System
Variables (see below)

Illustration with a TBox MS

Version : 1.09 93
Supplementary information
1. The time between phases 1 and 4 can be determined in RTU properties --> Advanced Alarms
properties
2. System Analog Variable: #40 [AlaPop3] indicates the quantity of alarms needing to be
acknowledged by POP3 connection and #43 [Pop3State] indicates the state of connection.
3. If escalation is required, Group of recipients can be associated to the alarm condition
4. Like other alarms, failure in sending SMTP alarms can be checked using System Digital Variable:
#06 [AlaErr] and System Analog Variable: #10 [AlaRec]
5. Error in POP3 connection can be detected also using System Digital Variable: #48 [POP3Err]

10.6. NTP Server


NTP stands for Network Time Protocol, an Internet standard protocol (built on top of TCP/IP) that assures
accurate synchronization of the clock of TBOX LT2.

The NTP Server represents a server dedicated to time synchronization.

The time synchronization is generated through an alarm recipient “NTP”. TBOX LT2 connects to Internet
(through a connection: ISP, Ethernet or GPRS/3G) and then connects 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 TBOX LT2.
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).

10.6.1. Time accuracy


When setting time, TBOX LT2 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.09 94
10.7. DynDNS
DynDNS stands for Dynamic Domain Name System.
It is a service, provided by companies like www.DynDNS.org or www.noip.com, offering the handling of
dynamic IP addresses.
When working with GPRS connection, using public dynamic IP addresses, it is not possible to access the
RTU directly, as you don't know its IP address.
The DynDNS service solves this problem: each time the RTU detects a changing of its IP address, it
informs the DynDNS server.
You then connect to the DynDNS Server that will redirect you to the RTU.

Example of topology : connecting with Internet Explorer to a RTU having a GPRS dynamic IP address.

Sequence:
1. Detecting a changing in its IP address, the RTU informs the DynDNS Server.
2. Internet Explorer connects to the DynDNS Server
(example: http://waterloo.dyndns.org). The DynDNS Server resolves the name and sends back
the corresponding IP address.
3. Internet Explorer connects to the IP address it has received.

10.7.1. How to configure DynDNS in TBox


1. Subscribe a DynDNS account:
 Go to www.dyndns.org or www.no-ip.com (examples of DynDNS services)
 Create an Account
 Create a Host

Version : 1.09 95
2. Create in TWinSoft IP Parameters the connection to DynDNS:

Name
Type any name

Server
DynDNS Server to which TBOX LT2 will connect
when it detects a changing in its IP address. It
should not be changed.

Path
Location in the server of the table of
correspondences between IP address --> name.
It should not be changed.

Url
You type the host address you have creating
when subscribing the DynDNS account.
Example: waterloo.dyndns.org

Server requires authentication


Select the option to type the login
corresponding to the account you have created
at DynDNS organization.

User name
Type the login name of your account.

Password
Type the login password of your account.

3. Associate the DynDNS connection to the modem (see communication port: TCP/IP Advanced...)

Version : 1.09 96
10.8. Virtual Server

To access Virtual Server configuration, you have to activate “RTU properties” -> “Protection”
-> “Enable Advanced IP Configuration” (see chapter 17.1.5) and “RTU properties” ->
“Advanced” -> “TCP/IP”, check Virtual Server (see chapter 7.6.6)

Virtual Server Parameters allow defining specific routes (in <--> out) based on IP protocol and TCP port

Virtual Server Parameters example:

Accessing a Camera with IP address 192.168.1.100 connected to Ethernet, through a 3G connection using
TCP port=81

Any request arriving with TCP port =81 will be redirected to IP address 192.168.1.100.
Example: http://78.25.56.126:81/jpg/image.jpg

Incoming Protocol: The incoming protocol that has to be routed.

Incoming Port: The incoming IP Port that has to be routed.

Destination IP address: The IP address to which data coming with above settings has to be routed.

Destination Port: The IP port used for data sent to the destination IP address.

Activate: Allows activating/deactivating a Virtual Server rule.

Version : 1.09 97
10.9. IP Bridge

10.9.1. Introduction
What is a Bridge ?
A Bridge is a device that connects two or more networks as a seamless single network. It supports any
protocol as it operates on MAC-layer addresses, and then protocol independent. The bridge passes
packets according to the destination and its internal table of addresses.

Why do we need a Bridge with TBox ?


This will be mostly required with MS-CPU32-X.
This allows carrying a seamless connection between SHDSL network and Ethernet; it connects through
SHDSL network, two Ethernet LANs of 2 distant MS-CPU32-X.

How do we configure a Bridge with TBox ?


From the IP Parameters folder, go to "IP Bridges" you create a Bridge and define an IP address.
Then you attach this Bridge configuration to the communication ports you want to bridge (see TCP/IP
configuration).
The IP address of the bridge has then priority on the one originally defined for the communication port.

10.9.2. Configuration

You define the IP setting of


the Bridge.

This IP will be attached to


each port that needs to be
bridged.

(See IP settings chapter


8.2.3)

Version : 1.09 98
In IP ports you want to bridge, select the bridge you have configured as above.
The IP of the bridge will be applied to each port.
Example with MS-CPU32X

10.9.3. Example with MS-CPU32X.


In example below, one wants to access remote camera connected to TBox Ethernet.

By default in TBox, each IP port in TBox is separated from each other. The bridge represents a virtual
connection between the ports.

When you need to access devices through different connections, you bridge the ports.
The bridges are represented with the dot lines.

The easiest is to draw the connections needed to access the devices and then you visualize which ports
to bridge together.

Version : 1.09 99
10.9.4. Sending Configuration through a Bridge
With example above, imagine TWinSoft is connected to COM3 of CPU#1 (192.168.1.11) and you wish to
update the application of CPU#4.

In menu “PC setup”:

Uncheck “Always use IP address of the


RTU”

Type the IP address of destination


TBox (192.168.1.51 in this case)

Check “Don't change IP address after


sending program”

Version : 1.09 100


10.11. Trace Log
The Trace Log feature is a powerful tool to debug the TBOX LT2, like modem connection or TCP/IP
connection.
When you are online with your TBOX LT2, it can be accessed from the menu 'Communication' 
'Retrieve from TBox'  'Trace Log'.
Many events, related to many tasks are stored in the log. To adjust the analyses, TWinSoft provides 2
filters:

Level: The level allows you selecting the kind of messages (verbose, warning, info, ...). You can
also select 'All' to display all levels of messages.

Class: The Class allows you selecting the feature for which you want to display message
(modem connection, sending e-mail, ...).

Example with all levels and all classes:

You can also select 'All' to display all classes.

Time Range: You can select a “relative” or “absolute” time range.

TBOX LT2 can store 64 kbytes of data for Trace Log. When this amount is reached, newer
data replaces older data.

Version : 1.09 101


11. IP Security
IP security services are:
 VPN
 Firewall (must be activated from the RTU properties -> IP security)

11.1. VPN

11.1.1. Introduction
This feature provides secure connections using OpenVPN.
OpenVPN version used: 2.3.0-1.
TBOX LT2 can be configured as "Client" or "Server" in mode routing.

Any physical media can be used (Ethernet, 3G). The VPN connection represents a new communication
port, including its communication variables.
As we have “COM3-Ethernet" or COM4-3G", we have new com. port(s) "VPN".

It supports site-to-site type of VPN.

11.1.2. How does OpenVPN work ?


Asymmetric authentication
Asymmetric authentication uses a pair of keys:
- the public key
- the private key, not known by anybody.
When "Client" connects to the server, they exchange their certificate, which are checked using the CA
certificate.
Each party receives the other one certificate, it checks whether the certificate is signed by the master
root certificate as specified in its CA certificate.
If the verification succeeds, the symmetric key (DH key) is exchanged between parties.
This asymmetric mechanism allows keeping this symmetric key secret.

Each partner is now able to encrypt data and the VPN tunnel is up.

Symmetric encryption
Once parties have authenticated each other, meaning the VPN is up and secured, each client uses the
symmetric key (DH key) to encrypt and decrypt data.
Symmetric encryption highly improves time performance of communication.

Version : 1.09 102


Name: Type a name, without SPACE.
This name will be the reference to your
VPN entry, like in the list of
communication ports to protect, or as
default prefix to the communication
variables, ...

Type: Select what TBOX LT2 will be:


"Server" or "Client".
Note that other parties need to support
OpenVPN.
It can be a PC or a TBox.

Connection:
When TBOX LT2 is "Client": you indicate
which communication port is used to
connect to the server.
Select an IP port available.

Server Address :
When TBOX LT2 is "Client": you indicate
the IP address of the server.
In case you access the Server through
Internet, you indicate the public IP
address (or name if accessing through
dyndns for instance).

When TBOX LT2 is "Server": The Server acts as DHCP server, therefore, when VPN tunnel is
built, it attributes an IP address to the “Client” in the range of VPN subnet (see below).
This address is available in the ACV [OpenVPN.IPaddress].
Regarding DNS address, to access sites using names through the VPN connection, TBox
LT2 receives it from the server

Auto Connect: By default, TBox connects automatically.


If you uncheck this option, you have to use the digital communication variable
<VPN.VPNcon> to connect/disconnect:
 VPN.VPNcon=0 -> exit OpenVPN process
 VPN.VPNcon=1 -> restart OpenVPN process

Digital Communication Variable [VPN.HookLink=1] indicates the VPN is up. Writing


[VPN.HookLink=0] disconnects properly VPN connection.

VPN Subnet: When TBOX LT2 is "Server": you have to indicate the IP subnet of VPN tunnel.
TBOX LT2 "Server" acts as DHCP server: the client(s) connecting to TBOX LT2 will
receive an IP address in the range of the subnet.
TBOX LT2 "Server" uses the first address of the subnet.

Protocol: Two transport protocols can be encrypted to build VPN tunnels: UDP or TCP.
Select the one used in the tunnel.

Port: Select the port used by OpenVPN.


Default: 1194

Version : 1.09 103


Certificates and keys can be created using OpenSSL.exe.

CA Certificate: The certificate signed from a Certification Authority. It is used to check the
authenticity of the partner certificate.
Working in an internal network, you have to create your own self-signed CA.
After having generated certificates using OpenSSL, copy the content of CA.crt here
(file generated with build-ca.bat)

Certificate: Partner certificate.


Working in an internal network, you have to create your own certificate.
Client: After having generated certificates using OpenSSL, copy the content of <client>.crt here
(file generated with build-key.bat)
Server: After having generated certificates using OpenSSL, copy the content of <server>.crt here
(file generated with build-key-server.bat)

Key: It is the private key required for Authentication, associate to the certificate.
Client: After having generated certificates using OpenSSL, copy the content of <client>.key here
(file generated with build-key.bat)
Server: After having generated certificates using OpenSSL, copy the content of <server>.key
here (file generated with build-key-server.bat)

DH Key: To declare on the Server only. It is used to encrypt and decrypt data transferred in the
tunnel.
After having generated certificates using OpenSSL, copy the content of dh1024.pem here
(file generated with build-dh.bat)

Advanced Parameters: the default parameters are:


persist-key
persist-tun
comp-lzo
keepalive 10 120

More information at: http://openvpn.net/index.php/open-source/documentation/manuals.html

Version : 1.09 104


11.2. Firewall

To access Firewall rules, make sure you have activated Firewall from the “RTU properties” ->
“IP security” (see chapter 7.4)

Two kinds of rules can be applied:


 Input: to prevent incoming access
 Forward: to prevent access when TBox configured in IP forwarding

11.2.1. Firewall “Input”


When Firewall has been activated from the RTU properties, all incoming accesses to TBox are blocked.
Outgoing connections, like sending mail or files are not affected.
By defining rules, you will control access for displaying HTM files, for access with TWinSoft, with SSH
console, ....

A rule defines an exception:


it gives access to TBOX MS
based on:

 Service
 Protocol
 TCP Port
 IP address(es)
 Communication Port
 Mac address

Services: Any: all IP services have access to TBox. You filter access based on source IP only (see
below).
Custom: you select the protocol and the TCP port yourself (see below).
ModBus, FTP, HTTP, HTTPS: server services available in TBox. Protocol is set by default to
"TCP" and the port as defined in "RTU properties" -> "Advanced TCP /IP".

Version : 1.09 105


Protocol: If you have selected "Custom" as service (see above):
Any: all protocols (UDP, TCP, ICMP) have access to TBox. You can filter access based on TCP
port and/or source IP (see below).
UDP, TCP, ICMP: you select the protocol yourself.

PING protocol is supported by TBOX LT2. It works on ICMP protocol for which there is no
TCP port

Port: When selecting a "Custom" service, you can type a TCP port.
When selecting a specific service, the TCP port is automatically set as defined in "RTU
properties" -> "Advanced TCP /IP".

Source: Any: Any source IP address can access TBox.


Single: you type a unique IP address.
Subnet: you type an IP address and a subnet mask, to filter on a group or IP addresses.
Examples:
IP: 172.25.110.0 Subnet: 255.255.255.0 ALL IP addr. in the range 172.25.110.xxx
IP: 172.25.110.80 Subnet: 255.255.255.224 ALL IP addr. in the range 172.25.110.64...96

Connected Ports: Select in the IP ports available in the TBOX LT2 the port you want to

Activate: Uncheck the box in case you don't want the rule to be applied but don't want to delete the
rule neither.

Example of Rules
Once created, the rules appear in the list.
The order has no importance.

Access authorized:
1. ModBus-TCP on COM3 from IP 172.25.110.80 only
2. HTTP on COM3 from any IP in the range 172.25.110.xxx
3. SSH on COM3 from 172.25.110.80 only
4. FTP Server on COM3 from any IP
5. PING on COM3 from any IP
6. HTTPS only on COM4 (3G) from any IP

Version : 1.09 106


11.2.2. Firewall “Forward”
When Firewall has been activated from the RTU properties, IP forwarding, NAT and Virtual Servers
rules are blocked.
By defining forward rules, you will control data communication between ports.

A rule defines an exception: the control of interconnection between ports is based on:
 2 x IP communication ports (IN -> OUT)
 Protocol
 TCP Port
 Source IP address
 Destination IP address

The Forward entries provide automatically Firewall rules to the outgoing port.
Concerning the incoming port, make sure you have defined input rules.

Communication Ports: Select both ports concerned by data forwarding (From .. To).

Services: Any: all IP services are forwarded. Protection can be based on IP only (see below).
Custom: you select the protocol and the TCP port yourself (see below).
ModBus, FTP, HTTP, HTTPS: server services available in TBox. Protocol is set by default to
"TCP" and the port as defined in "RTU properties" -> "Advanced TCP /IP".

Protocol: If you have selected "Custom" as service (see above):


Any: all protocols (UDP, TCP, ICMP) are forwarded. Protection can be based on TCP port
and/or IP (see below).
UDP, TCP, ICMP: you select the protocol yourself.

Version : 1.09 107


PING protocol is supported by TBOX LT2. It works on ICMP protocol for which there is no
TCP port

Port: When selecting a "Custom" service, you can type a TCP port.
When selecting a specific service, the TCP port is automatically set as defined in "RTU
properties" -> "Advanced TCP /IP".

Source: Any: Any source IP address can access TBox.


Single: you type a unique source IP address.
Subnet: you type a source IP address and a subnet mask, to filter on a group or IP
addresses.
Examples:
IP: 172.25.110.0 Subnet: 255.255.255.0 ALL IP addr. in the range 172.25.110.xxx
IP: 172.25.110.80 Subnet: 255.255.255.224 ALL IP addr. in the range 172.25.110.64...96

Destination: Any: Any destination IP address TBox is communicating with.


Single: you type a unique destination IP address TBox is communicating with.
Subnet: you type a destination IP address and a subnet mask, to filter on a group or IP
addresses.

Activate: Uncheck the box in case you don't want the rule to be applied but don't want to delete the
rule neither.

Example of Rules
Once created, the rules appear in the list.
The order has no importance.

Forwarding authorized:
1. ModBus-TCP forwarded through COM4-COM3, from any IP address (on COM4) to any IP address
(on COM3)
2. HTTP forwarded through COM4-COM3, from any IP address arriving on COM4 to 192.168.1.98
connected to COM3. For instance a camera with IP address 192.168.1.98 connected to COM3 of
TBox

Version : 1.09 108


12. Alarms

12.1. Introduction
Alarm module of TBOX LT2 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 send SMS message to Mobile phone, send e-mail, send files to a FTP site, to
dial another TBOX or a SCADA, …

Alarms can be used also to send historical data (datalogging) on regular base using e-mail or FTP. The
historical data is sent as the attached file of a report, developed using Report Studio.
TView, the data aggregator software can then be used to collect data from a mail box or a FTP site.

The initiation of alarms in the TBOX LT2 relies on the variation of digital or analog Tags.
For example, an intrusion contact or a flow level generates a call.

The three main items to create an alarm:

 The condition: a changing in a Tag.

 The recipient: to whom the data is sent.

 The message (or report): information to send to the recipient.

The Alarm stack


Each new alarm is immediately entered into a 32-alarms internal queue (adjustable) and processed,
according to the availability of communication ports required and its severity level. Alarms are generated
one by one.
The alarm queue represents the alarms stack: if several alarms happen at the same time or if a
communication port is not available when the alarm happens.

The Event stack (or Alarms table)


The Events stack, gives information about alarms status (Recipient - Started – Stopped – Acknowledged).

The Events stack (also called Alarms table) is discussed in chapter 12.8

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.

Version : 1.09 109


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 of recipient associated, you can send a message or a report. It
can be a message sent to a GSM, a message or report sent as e-mail, to a printer or the
file sent by FTP …

It always appears in the table of alarms, to distinguish them (see chapter 12.8).

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 must 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’ see next.

Call all Recipients: can be used when selecting a Group of Recipients.


When the option is cleared: TBOX LT2 calls the first one in the group. In case the alarm
cannot be acknowledged after the number of tries, TBOX LT2 automatically calls
the next recipient in the group and so on until it succeeds. Then it stops. (Also
known as ‘Chain’)
When the option is checked: TBOX LT2 sends the alarm to all recipients of the group.
(Also known as ‘Link’)

Version : 1.09 110


Filter: The time in hour:minute:second during which the condition must stay TRUE, before the
call is generated.

Filter can be tested either during both transitions or only during the transition selected
(see chapter 7.5.2)

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’ = 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, TBOX LT2
generates the calls according to the highest severity.

Notify End of Alarm: When the alarm condition is finished, the alarm is automatically re-sent to the
same recipient with the same message preceded with a prefix (see chapter 7.5.2).
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 TBOX LT2 starts up. When ‘end
of alarm’ is checked, an alarm is automatically generated when the alarm condition
disappears (see illustration chapter 12.8: Alarms table)

SMS acknowledge: See chapter 13.2.

POP3 acknowledge: See chapter 10.5.1

Version : 1.09 111


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, according to the format and scaling of the Tag (see chapter 9. 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

Relation between Value and Hysteresis

With “MAXIMUM” threshold Value > threshold = Alarm TRUE


Value < (threshold – hysteresis) = Alarm FALSE

With “MINIMUM” threshold Value < threshold = Alarm TRUE


Value < (threshold + hysteresis) = Alarm FALSE

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’ see next.

Version : 1.09 112


Call all Recipients: To be used when selecting a Group of Recipients.
When the option is cleared: TBOX LT2 calls the first one in the group. In case the
alarm cannot be acknowledged after the number of tries, TBOX LT2
automatically calls the next recipient in the group and so on until it succeeds.
Then it stops. (Also known as ‘Chain’)
When the option is checked: TBOX LT2 sends the alarm to all recipients of the
group. (Also known as ‘Link’)

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.9).

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 must 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.

Filter can be tested either during both transitions or only during the transition selected
(see chapter 7.6.2)

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’ = 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, TBOX LT2 generates the calls
according to the highest severity.

Notify End of Alarm: When the alarm condition is finished, an alarm is automatically sent to the same
recipient with the same message preceded with a prefix (see chapter 7.6.2).
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 TBOX LT2 starts up. When ‘end
of alarm’ is checked, an alarm is automatically generated when the condition of alarm
disappears (see illustration chapter 12.8: Alarms table)

SMS acknowledge: See chapter 13.2.

POP3 acknowledge: See chapter 10.5.1

Version : 1.09 113


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 dial-up ModBus connection to another ModBus device or a
SCADA accepting unsolicited ModBus communication (for instance TView).
The difference between Master and Slave concerns the handling of the modem
connection and acknowledgement.
A ‘Slave’ connection means that TBOX LT2 dials equipment and doesn’t do anything
else. The dialed equipment will sample, acknowledge and hang-up. Typically used for
instance when dialing TView.
A ‘Master’ connection means that TBOX LT2 dials ModBus equipment and will also
sample this equipment (with Modbus Transactions).
TBOX LT2 will then be also responsible for acknowledgment (see chapter 8.5.2 System
Variables [8] AlaID or [10] AlaRec) and hanging-up (see ‘Advanced’ properties of the
communication port used to send the alarm).

A modem parameter: “Hang up


timeout” is used by ‘ModBus-Master’
alarm to define the maximum
connection time. The maximum value
is 600 seconds.

Value=0 means it will


never hang up!

Version : 1.09 114


Pager/SMS:to send SMS to a mobile
or message to a Pager.
Select the Service corresponding
to the SIM card in TBox 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.

Printer: sending of message(s) or report to a local printer.

E-mail: If you have subscribed an e-


mail account (see chapter 10.4.
SMTP Server), TBOX LT2 is able to
send an e-mail. You only have to
specify the e-mail address of the
recipient.

Sending of e-mail supports Redundancy.


If you have created several SMTP Servers and you select ‘Redundancy’ instead of a Server,
TBOX LT2 will use the first one in the list (see chapter 10.4. SMTP Server). In case it fails, it
will try with the second one and so on…

Version : 1.09 115


FTP: TBOX LT2 is able to send files to a FTP Host (see chapter 10.2. FTP Server).
In the recipient configuration you only need to indicate the directory where you want to
send the files.

SFTP: TBOX LT2 is able to send files to a through Secure FTP (see chapter 10.3. SFTP Server).
In the recipient configuration you only need to indicate the directory where you want to
send the files.

NTP: TBOX LT2 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 10.5. NTP Server).

RAS: This type of recipient can be


used to establish a ‘Client’
modem connection to a ‘Server’.
The Server is considered by
TBOX LT2 as an ISP: it requires a
telephone number and a login to
establish the connection. You
associate an ISP (previously
created in the IP parameters of
TWinSoft), and when connection
is established, the ‘Server’ has to
communicate in protocol
ModBus-TCP

It can be assimilated to a
‘Modbus-Slave’ connection using
ModBus/TCP protocol. The Server
is responsible of acknowledgment
and hanging-up.

Custom: in case a 'C' driver allows sending alarms

POP3: allows reading e-mail to acknowledge e-mail or to operate TBox with a message (see
details in chapter 10.5.1)

Version : 1.09 116


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 first the recipients (see above).

You can then associate an Alarm condition to a ‘recipient’ or a ‘group of recipients’.


See chapters 12.2. and 12.3. Alarm Conditions.

12.6. Messages
To access the definition of Alarm messages, click the folder 'Alarms' in the Project workspace and
select 'Messages'.

Message number : ID of the message from 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 meant to a mobile or e-mail, type a text.

Version : 1.09 117


12.6.1. SMS coding
By default, SMs message are coded according to GSM 03.38 table (7 bits character). It provides a total
length of message of 160 characters:

Hex 0 10 20 30 40 50 60 70
0 @ Δ space 0 ¡ P ¿ p
1 £ _ ! 1 A Q a q
2 $ Φ “ 2 B R b r
3 ¥ Γ # 3 C S c s
4 è Λ ¤ 4 D T d t
5 é Ω % 5 E U e u
6 ù Π & 6 F V f v
7 ì Ψ ' 7 G W g w
8 ò Σ ( 8 H X h x
9 Ç Θ ) 9 I Y i y
A LF Ξ * : J Z j z
B Ø ESC + ; K Ä k ä
C ø Æ , < L Ö l ö
D CR æ - = M Ñ m ñ
E Å ß . > N Ü n ü
F å É / ? O § o à

When characters in a message are not in the table, with an accent or from another alphabet than Latin,
like Hebrew, Greek, Cyrillic, … TWinSoft encodes the message in UCS-2 format. This format uses 2 bytes
of 8 bits per character, which limits the total length of SMS message to 70 characters.

12.6.2. Value of Tag in a message


Two kinds of value are available:
The value at the moment the alarm is sent
The value will be the value of the Tag at the moment the alarm is accessed: the SMS is sent, the alarm list
is displayed in a WebForm, the alarms retrieved from TView, ...
The syntax is: ~TAG~ (with TAG=the name of the Tag).

The value at the moment the alarm appeared


The value will be frozen to the one at the moment the alarm is stored in the stack of events.
The syntax is: $TAG$ (with TAG=the name of the Tag).

Remarks:
1. With MS-CPU16 and TBox-LITE: ONE $Tag$ can be inserted in a message. No limit with ~Tag~
2. With MS-CPU32 and TBox-LT2: TWO $Tag$ (digital or analog) can be inserted in a message. No limit
with ~Tag~
3. Tag TEXT with MS-CPU32 and TBox-LT2: ONE $Tag$ of maximum 80 characters

Version : 1.09 118


With a Digital Tag for which you have defined ‘States’ in the ‘Presentation’ menu, those
states will be used; otherwise, 0 and 1.
With a Float Tag for which you have defined a number of decimals in the ‘Presentation’
menu, this number will be used; otherwise, fixed to 3 decimals.

12.7. Alarm Timetables


Alarm timetables allow specifying an activity period associated to a recipient, in other words, periods of
time during the day, the week, the year, when a recipient can receive an alarm.
The time tables are based on the specification of ‘Time Slices’ (time periods of the day) and on ‘Days’ (days
of the week and holidays).

12.7.1. Time Slices


The time slices are used to trunk the day in different slices. Further, you select these time slices when
creating timetables.

To declare the time slice,


just select the start time
and the end time of the
slice.

A time slice can’t be part


of 2 different days: no
time slice can include
midnight! (e.g. 18h30 to
08h30)

12.7.2. Holidays
The holidays offer to flag specific days of the year; these days constitute a group that can be checked in
the timetables (all at once, not days separately) like if it was a specific day of the week (see Time Tables
next).

You can choose to keep


each selected day as
holiday for ‘every year’
(by default).

Version : 1.09 119


12.7.3. Timetables
Based on the ‘Time Slices’, days of the week and ‘Holidays’ you create different ‘Timetables’ according to
activity periods in your company (day shift, night shift, holidays, week-end, …). A time table can then be
associated to a recipient. You select for each day of the week which time slice will be part of the timetable
(Holidays being treated like a unique ‘day’).

Following, in the
recipients’ setting, you can
choose to have the
recipient ‘always active’
which means that he will
receive his alarms any time
of the day, or you can also
choose to have the
recipient associated to a
time table (e.g. Day shift
without week-end and
holidays)

If an alarm occurs when time table is active, the alarm will be sent.
Otherwise, the alarm will be handled according to “RTU properties” ”Advanced alarms” settings:

If the option is checked, the alarm will be maintained in the queue and generated when the time table
turns active, otherwise it is auto-ack.

Version : 1.09 120


12.8. Alarms Table
The Alarms table of TWinSoft displays the Event stack of TBOX LT2. The Events stack is the visible part of
the handling of some system events and alarms in TBOX LT2.The internal queue of alarms is not accessible.
You access the Alarms table from the main menu: Communication  Retrieve from TBox  Alarms:

Date/Time of the Message Acknowledg. Recipient Date/Time of the Acknowledg.


start of the Report Name Status of the start of the Status of the
condition Start condition End

The Alarms table does not only display alarms generated in TBOX LT2, but also system events like start-
up of the program, Reset of the TBOX LT2, …

12.8.1. Columns description


Start Timestamp: Date and Time when the alarm condition appears (‘Start’ condition)

Message: Message (or name of the file) associated with the alarm.
System events appear between brackets.

Start: acknowledgment status of the ‘Start’ condition.


The possibilities are:
- Not ack.: the alarm is still in process.
- Ack’ed: the alarm has been processed successfully.
- 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 Recipients).


The name is listed only if the alarm was sent successfully. With chained alarms, this
allows to show the one that was used. In case of ‘system events’, there is no name.

End Timestamp: Date and Time when the alarm condition disappears (‘End’ condition).

End: acknowledgment 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 processed successfully.
- 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.09 121


13. ReadSMS/POP3 embedded
13.1. Introduction
ReadSMS/POP3 is the ability to TBOX LT2 to receive and interpret incoming SMS messages, and to read
“subject” field of e-mail in order to execute tasks.
Receiving an SMS requires a GSM on TBOX LT2.!

ReadSMS/POP3 features allow two uses:


1. Acknowledgment of an alarm by sending back a SMS to the RTU
2. Controlling the RTU by sending SMS message(s) or sending e-mail(s)

An advanced menu is available in


the RTU properties:

For any incoming connection, either for acknowledgement or for controlling, the caller ID
(phone number of the caller for the last call received) is available in the communication
variable “ComX.Caller ID” (see chapter 8.3.2)

Version : 1.09 122


13.2. Acknowledgment of an alarm by sending data to the RTU
Two types of recipient may require an acknowledgment by SMS:
 Pager/SMS: sending a message through a SMS-C (standard way)
 E-mail: sending a message through a SMTP server, which can be forwarded as SMS through
a dedicated service

Alarm conditions
associated to a recipient of
type “Pager/SMS” or “E-
mail” provide the options:
SMS acknowledge and
POP3 acknowledge (with
e-mail recipient only)

Acknowledgment is carried out in 2 steps. Example with sending of a SMS:


1. Sending of the message by TBOX LT2 (to the SMS-C or to the e-mail provider) will be first
performed. Retries and time-out defined in the recipient will be used to determine the success or
failure of sending.
2. Then a second time-out, defined in the advanced ‘Alarms’ properties, will check whether incoming
SMS required to acknowledge the alarm, arrives on time.

Version : 1.09 123


The incoming SMS must arrive within this time-out for the alarm to be acknowledged. If not, a
retry will be executed according to the definition in the Recipient. After the end of retries, the
alarm will be considered as in error: “auto-ack” and the system variable ‘AlaErr=1’.

Working with ‘Group of Recipients’:


- with option ‘Call all recipients’: all recipients have to acknowledge the alarm.
- without option ‘Call all recipients’: any recipient can acknowledge the alarm.

Don’t set a time-out too short; to give time to the SMS Center to send the SMS back to the CPU,
in case the service is busy. Also, if the CPU is sending a SMS while an acknowledgment SMS is
coming back, it may miss the warning received from the GSM. The SMS will be stored in the SIM
card and will be treated at next auto-check from the CPU (max. 5 minutes).

13.2.1. Message sent by TBox


If the option “SMS acknowledge” or “POP3 acknowledge” has been selected, the RTU will send a header
with the message including an identification number.

Example: #A00056# Level too HIGH


Header:
# prefix (fixed).
A precedes the absolute identification number of the alarm.
00056 absolute identification number of the alarm.
# suffix (fixed).
Message:
Level too High message associated to the alarm condition.

13.2.2. Acknowledgment by sending a SMS


By sending a SMS back including the same header to the RTU, you will acknowledge this specific alarm.
Typically, this can be done using the option ‘Reply’ of the mobile. Verify that your mobile also sends the
original message.

The text sent back to the RTU does not matter, as long as the syntax #Axxxxx# is sent.

Some Tags can be very useful to monitor the acknowledgment of the alarms by SMS:
AlaErr, SmsState, CallerID (see chapters 8.3.2 and 8.5.1)

13.2.3. Acknowledgement by sending an e-mail


When SMS service is not supported, acknowledgement can be sent through e-mail. TBOX LT2 uses then
POP3 to read the e-mail (see chapter 10.5.1)

Version : 1.09 124


13.3. Controlling the RTU using SMS message or POP3
ReadSMS/POP3 provides the possibility to control the RTU by sending a SMS to TBOX LT2 or by reading
e-mail using POP3 service.

A message can combine several data: Password, acknowledgment ID, writing values directly to ModBus
addresses,... It must always start and end with the character #
A specific character indicates the type of data sent to the RTU.
Examples: - : pre-defined message
W : writing a value to a Modbus address
S : setting of a Digital Tag

Details of the different types of data that can be included in a message sent to TBOX LT2 :

13.3.1. Using pre-defined messages(-)


- From the ReadSMS properties menu, you select a
‘Message index Tag’ (analog Tag - 16 bits format),
that will contain a value associated to the message
sent to the RTU
- You add the message(s) you intend to send to the
RTU

When the RTU receives the message, it will put the


corresponding value to the ‘Message index Tag’

The maximum number of pre-defined messages


supported is 20. In case you need to monitor more
process, you can use the direct/indirect addressing
(see next).

- SMS/POP3 message is not case sensitive


- This method of monitoring using
message, is the only method supported
by POP3.

Make sure the message sent is preceded


by the character “-“

Message sent by a Mobile


Examples:
#-START PUMP#
#P1568,A00056,-START PUMP,W20480=123#

Message sent by e-mail


A message must include the RTU Id of TBOX LT2, preceded by the letter I and a pre-defined message. It
may also include an acknowledgment ID.

Examples:
#I460000020107,-START PUMP#
#I460000020107,A00002,-START PUMP#

Version : 1.09 125


13.3.2. Writing Tag with Direct addressing ( W )
You write a value or a text directly to a ModBus address.

Syntax: #Wmodbus address=value#


#Wmodbus address=”text”#

Examples:
#W20480=123#
This message sent to the RTU will write value 123 to the analog Tag with ModBus address 20480

#W1500=”[email protected]”#
This message sent to the RTU will the text “[email protected]” to the Text Tag with ModBus address 1500.
This can be useful for changing online runtime parameters (see chapter 9.5. “Runtime Parameters”)

Notes:
1. You can combine several adresses, separated by a comma. For instance:
#W20480=123,W20481=456#
2. ReadSMS checks access protection level of the port before writing (see chapter 13.3.5. below)

13.3.3. Writing Tag with Indirect addressing – analog ( N )


You write a value directly to a ModBus address representing a pointer.

Syntax: #Nmodbus address=value#


The value at ‘modbus address’ corresponds to the ModBus address to write in.

Example:
#N20480=123#
If ModBus address 20480 contains the value 1000, the value 123 will be written to the ModBus address
1000.

We make a distinction between Target address corresponding to an analog Tag and a digital
Tag (see next).
With indirect addressing, ReadSMS does no check the access protection level of the GSM
port

13.3.4. Writing Tag with Indirect addressing - digital ( D )


You write a value directly to a ModBus address representing a pointer.

Syntax: #Dmodbus address=value#


The value at ‘modbus address’ corresponds to the ModBus address to write in.

Example:
#D20481=1#
If ModBus address 20481 contains the value 512, the value 1 will be written to the ModBus address 512.

Version : 1.09 126


13.3.5. Access Protection ( P )
ReadSMS/POP3 access protection is independent from the GSM port it is associated to. In other words,
even if the communication port is protected, ReadSMS feature will not specially be protected.

ReadSMS/POP3 has its


own independent access
protection configuration,
that can be activated
from:
RTU properties
 Security.

If ReadSMS protection is activated, a login is required in the incoming the SMS message or POP3 message.
The login is composed of the last 8 digits of telephone number of the mobile used to send the SMS and a
password.

To obtain the Password, the utility 'Password Generator' is needed (Start  Programs  Techno Trade 
Accessories  Password generator).

From the Password utility, you define:


- the global code used in the RTU
- as NAME: the last 8 numbers of the telephone number of the mobile which will be used
to send the SMS.
- as Access Level: Engineer (Level 3).

The resulting 'PASSWORD' must be used to login.

Syntax: #Ppassword#

Example:
#P1568#

If needed, the Password must be declared first.


Acknowledgment (with code A) does not require password

13.3.6. Acknowledgment ( A )
See chapter 13.2 above

Version : 1.09 127


13.3.7. SET a digital Tag ( S )
You write 1 to a digital Tag using its ModBus address.

Syntax: #Smodbus address#

Example:
#S32#
The digital Tag at ModBus address 32 will be set to 1.

Note: ReadSMS checks access protection level of the port before writing (see chapter 13.3.5. above)

13.3.8. RESET a digital Tag ( R )


You write 0 to a digital Tag using its ModBus address.

Syntax: #Rmodbus address#

Example:
#R32#
The digital Tag at ModBus address 32 will be reset to 0.

Note: ReadSMS checks access protection level of the port before writing (see chapter 13.3.5. above)

13.3.9. Writing minutes since midnight into a register ( h )


To write in an analog register, the current number of minutes since midnight at the moment the message
is received.

Syntax: #Wmodbus address=h#

Example:
#W20482=h#
If the message is received at 15:23, the value 923 will be written at ModBus address 20482

Note: ReadSMS checks the access protection level of the port before writing (see chapter 13.3.5. above)
and also the 'Write' configuration of the 'Presentation' of the Tag (see chapter 9.4)

Version : 1.09 128


13.4. Automatic Update of a Recipient’s tel. number
An existing recipient of type ‘Pager/SMS’ can be updated with the mobile number of the originator.

The idea is to check the incoming


message, for instance using ReadSMS
status (see next) and to send back a
message to the originator.

ReadSMS uses the caller ID of the


originator to update the recipient you
select in this menu; it uses the runtime
parameter associated to the recipient
(see chapter 9.5.2)

From the Process, you can then decide to


send back an SMS, to confirm the
command, to indicate the incoming
message was invalid, that password was
incorrect, …

If this option is activated, the selected


recipient will be automatically updated
with the telephone number of any
incoming call (if caller ID of originator has
been activated!).

13.5. ReadSMS status

A communication variable,
associated to the GSM can
be used to check the status
of ReadSMS.
From the GSM Com port,
go to the tab ‘ACV’ and
make a Tag of ‘SmsState’

Value Description
1 Accepted message received
2 acknowledgment received
10 Invalid message
11 Unknown command
12 Equality character (=) not found or incorrect
20 Incorrect password
21 Incorrect password or not supplied for a com. Port protected
30 Message received does not match a predefined message
31 Writing to an unknown address
32 Writing to an unknown address, using indirect addr. (address contained in the Tag not known)
33 Changing the telephone number of an unknown recipient

Version : 1.09 129


13.6. Get Message in Text Tag
This feature allows receiving the complete message (SMS or POP3) into a TEXT Tag. At the exception of
the caller ID, which is available is a dedicated Communication Variable.
The message will then be parsed using BASIC functions.

When this feature is active, ReadSMS/POP3 pre-defined message feature (see chapter
13.3.1) is not available anymore. OS is not parsing message anymore as it is done in the
application.

Tag Text: It will contain the date, time and the message. Make sure you define this text Tag with
a minimum of 160 characters.

Example:
11/03/25,10:29:14+04 Hello to TBox!

- The date and time are the one given by the SMS-C (not from TBox, not from sender)
- The +04 indicates the differences to GMT in quarters of an hour.

Tag Stack: This is a digital Tag. When changing to 1, it indicates message(s) is(are) on the stack. By
writing "0", you bring up a message from the stack to the Text Tag (see above). When it
switches back to "1", it means there is at least one more message in the stack.
MS-CPU32, -LT2: stack of 50 messages. Circular buffer.
MS-CPU16, -LITE, -WM, -LP: no stack. Message with a maximum length of 89 characters.

Version : 1.09 130


14. Datalogging

14.1. Introduction
Datalogging allows memorizing values of your process, in order to visualize its history.

TBOX LT2 contains memory for recording historical values of Tags and events (see technical
specifications); the latter is what we call the database of TBOX LT2.

There are two categories of databases:

The Chronologies
hronologies are 'On event' recordings, by means of changes in Tags (also known as “Sequence of Events”).
Each event is recorded with time, date, Tag and its status or value.
The minimum resolution is 1 ms.

Example of ‘digital events’:

t
0

The changes of status of the Tag represent the events.

Example of ‘analog events’:

200
180
160
140
120
100
80
60
40
20
t

The variations of the Tag represent the events.

TBOX LT2 stores chronologies in 2 tables: one for digital data and one for analog data.
The size of the tables is defined in the General RTU properties, as described chapter 7.1.

Version : 1.09 131


The Sampling Tables.
Sampling tables use ‘Periodical’ recording, with a minimum period of 1 second.
Recording in sampling tables happens at fixed intervals and does not depend on signal variations; it uses
the clock of the CPU to determine the recording.

Date and time of only the last record is stored. This mechanism requires less memory than chronology
does. Timestamps are re-built when data is generated (by report or by polling)

Example of ‘periodic recording’:


temperature

t
9 :30 9 :45 10 :00 10 :15 10 :30 10 :45

Each Tag is recorded into a separate table. The maximum number of tables is 2000 and the size of each
table is of maximum 65535 records. To increase quantity of data recorded, recording on micro SD card can
be considered (see Chapter 7.6.3. RTU properties -> Sampling Tables)

The database information recorded in TBOX LT2 can be displayed directly on WebForm or retrieved with
the use of SCADA software such as TView or other HMI package running ‘TComm.dll’ based driver (please
call your distributor).

By doing a compilation you can check the space of memory available (see chapter 5.10.2).

Version : 1.09 132


14.2. The chronologies
14.2.1. Digital chronologies
Example of an entry in Digital chronology: Recording the starting and stopping of ‘VALVE1’.

Edges: Recording on positive and (or) negative edge.

Handling:
 Enabled: always recorded.
 Disabled: never recorded.
 PowerF: recording disabled in case of ‘mains’ power failure.
 DisCRD: recording disabled when the system variable ‘DisCRD’ is at 1.

14.2.2. Analog chronologies


Example of an entry in Analog chronology: Recording of a variation of 10 mbar of ‘PRESSURE’.

Variation: Recording in case of variation (higher or lower) in comparison with the previous recording.
The weight of the value corresponds to the scaling defined in the Tag definition (see
chapter 9.1.1: Analog I/Os).

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.09 133


14.3. The sampling tables

Type: TBOX LT2 records data internaly on a minimum time-base of 1 second. After the period
selected (see next) the selected type of data (min., max., ..)is recorded.
This value can be:
- Minimum : minimum value during the period.
- Maximum : maximum value during the period.
- Average : arithmetic average value calculated during the period. For each period a
new average is calculated.
Tag format Limitation in recording
8 bits All periods accepted
16 bits Period limited to 12 hours
32 bits Not available
Float All periods accepted
- Instantaneous : value at the moment of the recording.
- Incremental : TBOX LT2 records the difference between the current value and previously
recorded value.

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

Period: Period between 2 recordings. You may choose between:


1sec; 2sec; 4sec; 5sec; 10sec; 15sec; 30sec; 1min; 2min; 4min; 5min; 10min; 15min; 30min; 1h; 2h;
4h; 6h; 12h; 24h; 48h; daily; weekly; monthly.

The recording happens at ‘birthday’ time of the period selected.

Example: if you select as period 5 minutes, the recording will be done at:
9:25:00; 9:30:00; 9:35:00; 9:40:00 ...

Version : 1.09 134


In case you wish to make recording every day, or even with a longer period, the options are:
 daily: recording once a day
 weekly: recording once a week
 monthly: recording once per month.

The hour of the day, the day of the week and/or the month are defined once for all sampling
tables in the RTU Advanced properties (see chapter 7.6.3)

Size: The size can be expressed on two ways:


Size: the number of records of the table.
The recording works on the FIFO principle. According to the size, the duration is
updated automatically (see next).
The size can be of maximum 65535 records, with a total of 1 Mbytes in SRAM and 8
Gbytes on micro SD card (optional).
Duration : you may prefer to enter a number of days and hours, in this case the size is
automatically updated.

To adjust the sizes check the available memory with the compile option. See chapter
5.10.2: Compiling a program.

Trigger:
Synchronize each sample on external clock: recording of the value is executed on the positive edge of
the Tag selected, and not with the clock of the CPU.

The period between 2 pulses of the Trigger must correspond to the period selected
between 2 recordings (see above). The period selected with the timestamp of the last
record to rebuild the table.

Example of use of external Trigger: quarter - hour management.


In some industries, every 15 minutes (may vary slightly), your electric company sends a pulse
which is used to calculate the consumption, based on average consumption during 15 minutes.
You will be charged based on the highest consumption.
In order to analyze your consumption and prevent from peaks, you can use this pulse as Trigger.
Recording will be done each time the pulse arrives, but when retrieving data, the calculation of
timestamp will be computed from the time stamp of the last recording and the period.
This means it can only be used if the period between pulses corresponds to a period between 2
recordings (see above).

No sampling if trigger = 0: the CPU clock is used to record data (see period above), but recording is
only possible when the Tag Trigger is in “high state”. When it is negative, recording stops. On
the positive edge of the Tag, the table is erased and a new recording starts.

Reset Tag after sampling: if this option is checked, the RTU automatically resets the register that has
been recorded.

This option works only with registers, NOT I/O !

Version : 1.09 135


15. ModBus Transactions

Introduction
ModBus Transactions feature allow exchanging data between two or more ModBus stations via any
communication ports.
One often speaks of 'Master Network' because it is a ModBus Master communication: the Master
(TBOX LT2) executes reading and writing in slave(s) through any media (RS485, Ethernet, modem...).

The protocol will be ModBus-RTU or ModBus/TCP according to the media used.

Each ModBus Transaction corresponds to one transaction (reading or writing) with 1 slave.

When there are several stations, TBOX LT2 executes the different transactions of one station at a time,
then transactions of the following station, and so on …

When a dial-up modem is used to execute ModBus Transactions, TBOX LT2 needs first to establish the
connection using an Alarm of type ‘ModBus’ (see chapter 12.4. Recipients)

Before creating a ModBus Transaction you have to create the equipment you are going to communicate
with.

15.1. Creating a Remote Device

From the Project Workspace,


select ‘Resources’  ‘I/O’. Click
‘I/O’ and in the list of I/O, click
‘Add an I/O Card’.

Select ModBus Device.

Name: You type any name. It will be


available in a list of available
equipment when creating ‘ModBus
Transactions’ (see next).

Address: It is the station address of the Remote


equipment. It must be different from
the TBOX LT2 and possible other
equipment on the same network.
When communicating through
TCP/IP port, you have to indicate the
IP address of the remote device

RTU Port: The communication port used by


TBOX LT2 to communicate with the
remote equipment.

Version : 1.09 136


Trigger: Select a digital Tag that will trigger the communication, according to a ‘Condition’ (see
next). Working with several equipment, you declare different Tags and then control
differently the communication to each equipment.
The Trigger must be a digital variable (DIV).

Condition: Condition of Tag ‘Trigger’ to start communication. Typically, you will work with a
permanent connection (Trigger in High or Low state). Or you can decide to execute one-
shot communication, on edge changing of the Tag Trigger.
The changing of state of the Tag can be controlled by BASIC, Ladder, or Periodic events.

15.2. Creating a ModBus Transaction

Example: reading of 8 ‘floating’ variables in Slave22 starting at address 168

Tag: Select an existing Tag by clicking the button. Be sure you select a Tag of the same type
than the one you want to access in the ‘Slave’ (Byte, Word, DWord or Float).
If the Tag does not exist, you can create it after having clicked the button. It is the Tag of
the Master; it contains the value you want to write in a Slave or it is a register that contains
the value that Master reads in a Slave.
In case of block communication (with a quantity > 1), this Tag is the one of first ModBus
address.

Operation :
Operations MASTER (Tag) SLAVE (Address)
READ Data
WRITE Data

Read: the Master reads data from the Slave.


Write: the Master writes data to the Slave.

Quantity : Quantity of variables of successive addresses that are read (or written) in the Slave. It depends
on the external source, the types of variable and the ModBus function used (see tables
below).

ModBus protocol handles only words (16 bits). When working with 32 bits, TWinSoft
adapts the quantity to double the number of words. 32 bits variables are handled with:
<Hi word1><Lo word1><Hi word2><Lo word2>… It can be adapted from the “Advanced…”
properties of the remote device.

Version : 1.09 137


External Source. All the following parameters concern the Slave station:

Device: select an existing external device from the ‘Resources’. You can create one clicking the
button

Type: select the type of the external variable. The choices are:

With external source ‘ModBus device’ (any TBOX MS, TBOX LT,, any ModBus device)

Types Connection in remote device ModBus Function


Digital input Only digital input(s) 2
Coil Digital output(s) or register(s) 1, 5 or 15
Analog input Only analog input(s) 4
Holding register Analog output(s) or register(s) 3, 6 or 16

Operations Types ModBus Functions Max. Quantity (*)


Read Digital Digital Input 2 1600 (see Warning below)
Read Digital Coil 1 1600 (see Warning below)
Read Analog Analog Input 4 125 (16 bits) - 62 (32 bits)
Read Analog Holding Register 3 125 (16 bits) - 62 (32 bits)
Write Single Digital Coil 5 1
Write Single Analog Holding Register 6 1 (word)
Write Multiple Digital Coil 15 800 (see Warning below)
Write Multiple Analog Holding Register 16 100 (16 bits) - 50 (32 bits)

(*): Maximum quantities for TBOX LT2, TBOX LITE, TBOX MS. You also have to check the maximum quantities of the
‘Remote device’-they could be less.

With External source ‘Remote TBox’ (TBOX CPU-3)

Description Operations Tag types Max. Quantity


Digital I/O Read/Write IOD, T4m 16
Analog I/O Read/Write IOW, I4M 8
Digital registers Read/Write DIR, STD 1600 (see Warning below)
Analog registers (8 bits) Read/Write STB 8
Analog registers (16 bits) Read/Write AIR, STO 100
Analog registers (32 bits) Read/Write TOT 8
Analog registers (32 bits) Read/Write FLT 8
Timers Read/Write ATP, ATV, DTI 16
Counters Read/Write ACP, ACV, DCN 16
Special Registers Read/Write DSPE, ASPE 16
Register ‘Sampling Table’ Read/Write ECH 16

(*): with quantity > 16, ModBus addresses and quantities must be multiple of 8

When accessing digital variables (DIV, DIR, …) into TBOX CPU-3, make sure you use
multiples of 8 for: quantity and address of Variable in External Source

Address : The ModBus address must be typed according to the indication of the user’s guide of the
Remote device. Communicating to a TBOX, you have to refer to the TWinSoft application
and its configuration of Tags.

Version : 1.09 138


15.3. ModBus Transactions through modem
With a remote device accessed by a dial-up modem, the connection must be first established using an
Alarm “ModBus”.

The sequence is the following:


 Create a Remote Device, associated to the communication port of the modem and to a Trigger – DIV
(digital register) always active.
 Create the ModBus Transactions associated to this device.
 Create an Alarm Recipient of type ‘ModBus - Master’, with the telephone number of the remote device.
 Create an Alarm Condition, associated to the event requiring communication with the Remote TBox and
to the Recipient created above.
 When TBox needs to communicate, generate the alarm condition.
 When modems are connected (can be checked using the communication variable DCV – Comx.Call)
and Trigger is active (see above) ModBus Transactions associated to this station will be executed.
 Acknowledge the alarm, for instance using the special analog variable ‘AlaRec’. You write into ‘AlaRec’
the ID of the “ModBus-Master” recipient.
 Stop connection by writing ‘0’ to the Communication Variable ‘COMx.HookLink’, alternatively,
communication will be automatically stopped after 1 minute (see hangup timeout below).

15.4. Timing configuration of ModBus Transactions


Several timings can be adjusted when communicating through ModBus Transactions. Their value mostly
depends on the media and the baudrate (see on line help for more info).
They are available from the tab ‘Advanced’ of the properties of the communication port.

Packet reception delay: maximum time for


receiving a valid frame.

ModBus Master Properties


timeout: maximum time to receive an answer
before sending the next query

Number of Tries: in case of error, number of times


a query is sent

Interframe gap: after having received a valid


answer, time before sending the next query.

Hang up timeout: doing a ModBus Master define


the maximum connection time. The maximum
value is 600 seconds.

Value=0 means it will never hang up!

ModBus Slave Properties


Interframe gap: after having received a valid
Example with RS485 of the CPU request, time before sending the answer.

Version : 1.09 139


16. Periodic Events

When tasks have to be executed periodically, periodical events


constitute an easy way of creating events to launch the tasks, like
ModBus Transactions, sending of test alarm, datalogging, a piece of Ladder/BASIC logic, etc...,
and this, independently from any other condition.

A periodic event could be compared to an automatic timer.

A digital Tag is Triggered periodically: it is automatically SET when the period has elapsed. All tasks
associated to a positive edge on this Tag will be launched, then the Tag will be automatically RESET, ready
for the next period.

Several tasks can be associated to the Tag triggered. This implies for the OS to RESET the Tag when all tasks
have been launched.

In the project workspace of TWinSoft, a folder is available to declare the Periodic Events:

Version : 1.09 140


Example of a ‘daily event’:

The Tag ‘Half_Hour’ (a DIV) will be automatically SET each 30 minutes, at each xx:15:00 and xx:45:00.
The task(s) associated to Tag ‘Half_Hour’ will be executed each 30 minutes, for instance a
communication to a Remote Device, the Tag would be the Trigger of the Remote Device.

Examples of a ‘weekly event’:

Sending a SMS each Wednesday at 12:00 AM Sending a daily report at 6:00 AM

With the above examples, the digital Tags (DIV) “SMS” and “SendData” are associated to alarm
condition.

Version : 1.09 141


17. Protection (Access security)

This (optional) access control on TBOX LT2 prevents


non-authorized persons from accessing the RTU and from
opening the TWinSoft document.

Several protocols can be protected: ModBus, HTTP, FTP (server), ReadSMS.


More protection can be implemented, like Firewall (chapter 11.2), OpenVPN (chapter 11.1) or IEE802-1X
though an add-on (see chapter 7.2. Add-ons).

Once you activate the “Access security” option, the TWinSoft document will also be protected, even if no
port has been selected!

There are three methods of activating access security. You select one:
 Global Code: You define a 4 digits hexadecimal code.
 Enhanced Global Code: The same as above but with maximum 8 of any characters.
 User list: You define your own list of Users/Password.

17.1. Access Protection on Communication Ports


The configuration of access security of TBOX LT2 is available from the ‘RTU properties’:
 The protection must be activated by one of the three methods (see below).
 Then “ModBus” protection can be assigned individually to each port.
 Protection on other services (HTTP, ReadSMS, …) can then be assigned too.

17.1.1. ModBus Protection


The ModBus protection provides a protection against writing values (from TWinSoft, from a WebForm)
and sending a new application. Each port individually can be protected.
TWinSoft populates ports according to the model of TBOX LT2 you are configuring; you check the port(s)
you want to protect.

Three access levels are available to access protected port(s):

 Level 1: Surveillance mode or VISUALIZATION MODE. The operator can view all TBOX LT2 values
(local or remote), but cannot execute any command.
 Level 2: COMMAND MODE, the operator can view all the values and execute commands (locally or
remotely). Also known as READ/WRITE MODE.
 Level 3: ENGINEER MODE, the operator can view all the values, execute commands and send new
application (locally or remotely).

When a port is protected it cannot be written through ModBus Transactions.

Version : 1.09 142


TWinSoft presents all the communication ports according to your hardware configuration:

From the RTU properties  tab


‘Protection’, you activate the
general access security feature.

Global code: type in the 4


character hexadecimal code that
you have used to generate the
Access Codes with the utility
Password Generator (see chapter
17.3 following).
Type it a second time to confirm.

Enhanced Global code: type in a


code with maximum 8 of any
characters corresponding to the
one you have used to generate
the Access Codes with the utility
Password Generator (see chapter
16.3 following).
Type it a second time to confirm.

Version : 1.09 143


User list: You add users with for
each an access level.

17.1.2. Monitoring Access Level


Current access level on serial and modem ports can be checked using the Communication Variables (see
chapter 8.3.2).

17.1.3. ReadSMS protection


ReadSMS feature allows controlling TBox using SMS or e-mail. It can be protected as explained chapter
13.3.5.

Version : 1.09 144


17.1.4. HTTP Protection
HTTP protection assures protection at HTTP level, to prevent accessing files stored in TBOX LT2 using
HTTP protocol. Typically when displaying HTM files with a browser.
Once HTTP security is activated, each file building the web site must be assigned an access level.
In folder "Web and Reports files", right click each file:

ALL files (.twa, .htm, .twf, .gif, ...) composing a view must be given an access level:
 Level 0: the file is always visible and does not require a login. Typically a home page.
 Level 1: the file is visible by user “Read only”, “Read/Write” and “Engineer”.
 Level 2: the file is visible by user “Read/Write” and “Engineer”.
 Level 3: the file is visible by user “Engineer”.

Once HTTP protection has been activated (and sent to the RTU), when connecting to TBOX LT2 using a
browser you are prompted to login to open a file with access level 1, 2 or 3.

To create the Login, see chapter 17.3. below.


When several PC’s connect to TBOX LT2, a login is required for each PC.
Different sessions of the same browser on one PC use the same login.
Version : 1.09 145
Protection on Objects Inside Webform 2.0

Each object composing a webform


can be assigned “visibility” and
“write” levels of authorization

Example with WebForm 2.0

Ease of use recommendations


1. Common files
Files that everybody can see and files part of the template (icon, images, ...) should be assigned an
access level= 0. It means they are displayed with any level of user. A home page with access level=0 will
be displayed without requiring a login.

2. Protecting "IP" ports


Typically, Ethernet or GPRS communication port.
In case you need protection against writing to Tags or sending a program.
If the port is also protected, two login will be required: HTTP and ModBus/TCP.

3. Reminder about writing to Tags


If the communication port is protected and the presentation of the Tag is set "write enable" (see tab
"Presentation" of the concerned Tags) user requires access level = 2 (Read/Write) to change value.
A user with access level = 3 can always change Tag value.

A login at ModBus level will be also required if the port has been protected (see above).

17.1.5. ModBus TCP protection on socket


A TCP communication is based on “Sockets”. They allow multiple, simultaneous communication:

ONE socket = ONE communication context

TBOX LT2 supports 64 communication contexts.

Without the option checked: the protection is based on the com. port only:
When someone logs in to a communication port as “Engineer”, all users connecting after him will be
automatically logged as “Engineer” too …

With the option checked: the protection is based on sockets:


Each user connecting to a protected communication port has to log in, individually

Version : 1.09 146


17.1.6. FTP Protection
TBOX LT2 can act as a “FTP Server”. It opens access to the micro SD and files sent using alarm recipient
“micro SD”.
By default, FTP server is accessed in "anonymous" mode. To protect access by a login, check this option.
The login is created as explained chapter 17.3 below.

Activating protection is mandatory to delete files on the SD, using a FTP Client.

17.1.7. Advanced IP Configuration


Activating this option gives access to different TCP/IP redirection features like IP forwarding and Virtual
Server (see more info in Appendix F: IP Forwarding, NAT, Virtual Server).
Type a 4 digits hexadecimal code.

17.2. Document protection


It provides a protection against opening the, independent from the Global code mechanism.
Type a password of minimum 6 characters.

In case you have activated Access Security (see chapter 17.1. Access Security), this protection
replaces TWinSoft document protection through access security login.

17.2.1. TWinSoft Document Protected


Once a document has been protected (see
above), when opening it with TWinSoft, you are
prompted to type the password:

Click OK

- There is no distinction between access levels when opening a document. Any acceptable
login will be supported.
- By clicking ‘Cancel’, TWinSoft indicates the document is protected and opens a new one

Version : 1.09 147


17.3. Password utility
The utility program Password generates access codes based on global codes

When installing TWinSoft Suite a password-creation program named Password Generator is installed in
the same directory as TWinSoft. It can be started from the 'Start' button of Windows and is located in the
group of programs “Techno Trade”  “Accessories” created while installing TWinSoft.

This program generates passwords needed to Login to TBOX LT2 when access security has been
activated (see above).

A password is composed of 4 or 8 hexadecimal characters in response to information related to the user.


It is based on a complex algorithm using the global code (=key), the user’s name and the access level. A
5-digit number (User Id) allows identifying the user accessing TBOX LT2. This User Id can be used to trace
users for example by inserting this number into datalogging (chronologies), with the help of Analog
Communication Variables (see chapter 8.3.2.).

Global code This hexadecimal code of 4 or 8 characters is the basis for password generation. It
is typed in the ‘RTU Properties’ (see above) of TWinSoft and sent to TBOX LT2.
When a user logs in, TBOX LT2 checks whether NAME and PASSWORD fit with the
global code. This means that if different users with different access levels must
communicate with TBOX LT2, the global code used to generate passwords must
be the same.

User name The NAME you use as login.

Access level Three access levels are available:


 Level 1: Surveillance mode or VISUALIZATION MODE. The operator can view all TBOX LT2
values (local or remote), but cannot execute any command.
 Level 2: COMMAND MODE, the operator can view all the values and execute commands
(locally or remotely).
 Level 3: ENGINEER MODE, the operator can view all the values and execute commands
and alter or send new TWinSoft documents (locally or remotely).

When this information has been entered, click on the button "Get password".

Version : 1.09 148


Two codes have been created:
 The PASSWORD: this PASSWORD must be used together with the NAME when logging in.
 The USER ID: this number is available in an Analog Communication Variable when a user is
connected to a protected communication port of TBOX LT2.

17.4. Login/Logout
17.4.1. With TWinSoft
The Login feature of TWinSoft allows connecting to a protected communication port of the TBOX LT2
according to an access level. If a port is not protected, access level is automatically 3= Engineer.

The Login/Logout is executed from the main menu


bar  'Tools'.

Login
If connected to a port of TBOX LT2 that is
protected, you need to Login to get an access
level.

You type the Name you used in the ‘Password’ utility and the Password that was created (see previous).
According to those, you access in:
 Read only
 Read/write
 Engineer
The access level is displayed in the Status bar.

If 'Save password' is checked and TWinSoft is connected to a protected port: when TWinSoft starts,
it uses the access level corresponding to the password saved (see the status line).
If it is not checked and TWinSoft is connected to a protected port: TWinSoft starts in 'Read only'
mode. You need to do a Login to get your access level.

Logout
If the TWinSoft is connected to a protected port, the Logout sets TWinSoft in 'Read only' mode.

Version : 1.09 149


17.4.2. With Browser
If you have developed HTML pages based on webforms 2.0, you can access TBOX LT2 using a broser. TBOX
LT2 acts as a Web Server. Any browser on multiple platforms can access webform 2.0 pages in TBOX LT2.

The utility software TConnect is the perfect candidate to establish this kind of connection (see
http://helpdesk.servelec-technologies.com). In case of dial-up connection, you will have to indicate the
NAME and PASSWORD to login.

Even if TBOX LT2 is not protected, type a NAME and PASSWORD.


Depending on Windows and IE versions, they may not allow a connection without login.

17.5. Deactivating protection


There are two methods of deactivating TBOX LT2 access protection:

Global reset (see chapter 5.6.)


The first method is by performing a global reset, which must be carried out on site. When the program
has been stopped, the local port is no longer protected.

If the ‘modem’ has been declared protected, it will still be protected even after a global
reset. To deactivate the protection, an unprotected TWinSoft document must be sent to
TBOX LT2 (see below).

Sending an unprotected TWinSoft document


The second method involves modifying the TWinSoft document and deactivating the access Security
option. The document is sent to TBOX LT2 after having logged in as 'Engineer'.

17.6. Deactivating protection of TWinSoft document


You have to open the document and de-activate ‘Access security’ and ‘Document password’ in tab
‘Security’ (RTU properties).

If you have forgotten your access security login, but still remember the Global Code, you can generate a
new login (see chapter 17.3. above).

If you have forgotten your Global Code and or the document password, you have to contact your local
distributor and send him the application, the <application>.tws file.

Version : 1.09 150


Version : 1.09 151
18. Front panels

References:
18.1. LT2-530-xx LT2-530
LT2-530-3
LT2-530-S

 Communication (standard)
 Ethernet
 RS232
 RS485
 USB

 Communication (optional)
 -3: GSM modem (3G)
 -S: Full RS232 port

 16 x Digital Input/Output
 3 x Fast Digital Inputs
 3 x Counter Inputs

 8 x Analog Input
 4..20mA
 0..10V

 Backup battery charger (for 12 V Lead Acid battery)

Version : 1.09 152


References:
18.2. LT2-532-xx LT2-532
LT2-532-3
LT2-532-S

 Communication (standard)
 Ethernet
 RS232
 RS485
 USB

 Communication (optional)
 -3: GSM modem (3G)
 -S: Full RS232 port

 16 x Digital Input/Output
 3 x Fast Digital Inputs
 3 x Counter Inputs

 8 x Analog Input
 4..20mA
 0..10V

 2 x Analog Output
 4..20mA

 Backup battery charger (for 12 V Lead Acid battery)

Version : 1.09 153


References:
18.3. LT2-540-xx LT2-540
LT2-540-3
LT2-540-S

 Communication (standard)
 Ethernet
 RS232
 RS485
 USB

 Communication (optional)
 -3: GSM modem (3G)
 -S: Full RS232 port

 16 x Digital Input/Output
 3 x Fast Digital Inputs
 3 x Counter Inputs

 6 x Analog Input
 4..20mA
 0..10V

 2 x Analog Input
 Pt1000

 Backup battery charger (for 12 V Lead Acid battery)

Version : 1.09 154


References:
18.4. LT2-542-xx LT2-542
LT2-542-3
LT2-542-S

 Communication (standard)
 Ethernet
 RS232
 RS485
 USB

 Communication (optional)
 -3: GSM modem (3G)
 -S: Full RS232 port

 16 x Digital Input/Output
 3 x Fast Digital Inputs
 3 x Counter Inputs

 6 x Analog Input
 4..20mA
 0..10V

 2 x Analog Input
 Pt1000

 2 x Analog Output
 4..20mA

 Backup battery charger (for 12 V Lead Acid battery)

Version : 1.09 155


19. Technical specifications

19.1. Common to all models

General
Processor 32 bits, ARM based, 400 Mhz
Clock Realtime Clock
Clock Drift Typical: 1.7 s / day @ 25°C
Watchdog Watchdog circuitry included
Maximum process cycle time = 1 sec.
Toggle Switch STOP - RUN - RESET (see chapter 5.6)
LED Green 2 Hz Normal operation
Green 0.5/Hz Application stopped
Green ON OS stopped
Red 8 Hz Presence of Alarm(s)

Power Supply - VOLTAGE Different ranges according to functionalities:


Functionalities Voltage on Vin required Voltage on Vbat
- CPU, Communications, Analog Inputs 8  30 VDC 10  16 VDC
- Analog Outputs 9  30 VDC 10  16 VDC
- Charger for backup battery (12 V Lead Acid) 20  30 VDC -

Power Supply – CURRENT (Typical)


All models of –LT2 Current with: Vin=24V Current with: Vin/Vbat=12V
- Main board, I/O, Com (RS, Eth., USB), 3G (idle) 50 mA 90 mA
- 3G (in com) + 50 mA + 90 mA
- USB to power external device + 130 mA + 260 mA
- Analog output + 22 mA (per output) + 22 (per output)
- Charger + 210 (in charge) -

12 V Battery charger
- Power supply Vin required 20 -> 30 VDC
- Battery model 12 V Lead Acid. Typical 7 A/h
- Charge Mode Constant current. Limited voltage
- Voltage Temperature compensated: 13.8V @ 25°C – 18 mV / °C
- Current Maximum: 250 mA fixed
- In Charge Stops when temperature > 55 °C
- In Discharge External 12 V backup battery automatically disconnected if voltage < 10 V
Current max.: 2A
3 V Internal Battery
Voltage 3V
Model Lithium CR-2450
Use Backup of Clock and SRAM (datalogging) when TBOX LT2 is out of power
Lifetime Battery consuming only when TBOX LT2 is out of power and plastic strip has been
removed.
Typical: 4 years @ 25 °C.
Mechanical: 10 years

We advise to consider replacing the 3V lithium battery when it has


been used during 2 years. See procedure chapter 19.2.

Version : 1.09 156


Protection
Power Supply (Vin) Reverse polarity protection
FUSE external 12 V battery Soldered Fuse of 3 A. Not replaceable by user.
Memory
Flash 32 MB (Uboot, LINUX, OS, Application, Web & Reports, Sources)
SDRAM 64 MB (Running part of LINUX, OS, Application)
SRAM 1 MB, backed up with Lithium battery (datalogging, log, backup value of Tags)
MicroSD (optional) Max. 8 GB
RS 232
Connector Spring-cage terminal block
Cabling (see schema next) 2 Wires: TxD, RxD
Protocols ModBus-RTU ‘Slave’, ‘Master’ (supplementary protocol with addons)
RS 485
Connector Spring-cage terminal block
Cabling (see schema next) 2 Wires: A, B
Number of slaves 256 (if RS485 technology of slaves allows it too)
Protocols ModBus-RTU ‘Master’, ‘Slave’ (supplementary protocol with addons)
Isolation No isolation between signals A - B and Power Supply
Termination Terminations of 120Ω (between A-B at both ends) are in most cases not
necessary, but they increase the quality of the signals for long distance
connections.
Failsafe bias resistors included: pullup and pulldown resistors which assures a
logical level TRUE when A and B are opened or in short-circuit.
Ethernet
Model 100 BASE-TX (4 wires)
Full Duplex / Auto-negotiation
Connector RJ-45
Cabling Straight pinned CAT5 shielded cable or Crossover CAT5 shielded cable
Speed 10/100 Mbits
Protocols ModBus/TCP ‘Master’ and ‘Slave’, SMTP, FTP, HTTP, Ping, ...
TCP/IP Connections - “Client” for ModBus Transactions: 1 socket – 1 context
- “Client” for Alarm: 2 sockets (required for FTP) – 1 context
- “Server” ModBus: 64 sockets – 64 contexts
- “Server” HTTP: 64 sockets – 64 contexts
LEDs 100: ON when connected at 100 MHz – OFF when connected at 10 MHz
Lk: ON when linked – FLASH when communicating
USB
Model USB 2.0
Connector USB type A female (socket)
Cabling USB A/A male cable (host to host)
Speed High Speed (480Mbits / sec.)
Current Max 500mA at ambient temperature
Temperature / Altitude
Storage -40°C…+85°C
Working -40°C...+70°C
Hygrometry 0 to 95 % without condensation
Altitude Maximum 4000 m

Dimensions
Without connector Height x Depth x Width: 150x83x29 mm (5.906x3.27x1.142 inches)
With rack, without connector Height x Depth x Width: 152x115x40 mm(5.984x4.428x1.575 inches)
Weight 300 gr

Version : 1.09 157


19.2. Lithium Battery Implementation
TBOX LT2 is equipped with a Lithium battery (3 V).
This battery is used to maintain the clock and datalogging when the RTU is out of power (neither Vin not
V bat).

The time the battery has been used can be checked from the analog system variable “BatUsage”. It
returns the number of second the TBOX LT2 has been out of power and the Lithium battery has
delivered current to the SRAM.

We advise to consider replacing the battery when the value reaches 63 072 000 seconds
(=2 years)

In case the battery must be changed, unscrew TBOX LT2 from its rack to access the back of the PCB.
To replace the battery:
1. Cut the 2 plastic spacers
2. Pull out the battery. Be careful not to short-circuit the battery
3. Push the new battery. CHECK POLARITY (see picture)

When you receive your TBOX LT2 the battery is placed but not connected.
Be sure to remove the plastic strip before installation.
After battery replacement or after having removed the plastic strip, the system variable
“BatUsage” should be automatically reset. Check the value = 0.

Version : 1.09 158


19.3. Micro SD Card Implementation
The micro SD card is an option of TBOX LT2 that provides several features:
1. To store all files running the TBOX LT2, including LINUX kernel, Operating System, application,
Web and reports, ... This feature is called “Plug&Go” (See Appendix C).
2. To store sampling tables in case large amount of data is required
3. As alarm recipient to store files (report, image, datalogging, ...)
4. To initialize IP settings of ethernet port using the file system.xml (see Appendix C).

To insert the micro SD card, unscrew TBOX LT2 from its rack. The micro SD card slot is accessible at the
back of the PCB.

19.4. Toggle Switch (Working modes)


On the front side of TBOX LT2, a toggle switch allows changing
the working mode of the CPU: STOP - RUN - RESET

RUN In middle position: all features of TBOX LT2 run


RESET Temporary switch: pressing Reset, restart the program, erase the alarms and
the datalogging, reset the timers
STOP On left side: Allows stopping the program (see TWinSoft User’s guide, Advanced
RTU properties, Start/Stop)

See also chapters 5.6 about Reset

Version : 1.09 159


19.5. GSM-3G (optional)

LED
At the front side:
ON Indicates the modem in ‘On line’ (= connected in DATA or GPRS)
T/R Transmit or Received = ON
Modem GSM-3G
Frequencies Model “Europe” WCDMA 900/1900/2100 & GSM850, EGSM900, DCS1800, PCS1900
Model “US” WCDMA 850/1900/2100 & GSM850, EGSM900, DCS1800, PCS1900
GPRS Multi slot Class 12, SMG 31bis, Class B Terminal, PBCCH support
3 PDP contexts, Coding Schemes CS1 to CS4
EDGE Multi slot Class 12
UMTS/HSDPA Class E2, 4 logical channel
HSDPA Cat 5/6
Emitting power CLASS 4 (2W) for GSM850 and EGSM900
CLASS 1 (1W) for DCS1800 and PCS1900
CLASS E2 EDGE 900 / 1800
CLASS 3 for UMTS 900/1900/2100
SIM card 1.8 V or 3 V SIM card accepted
Antenna connector Screw connector, type FME Plug (male on TBOX LT2)
See models of antenna below

19.5.1. SIM card insertion


To insert the SD card, unscrew TBOX LT2 from its rack. The SIM card slot is accessible at the back of the
PCB.

1. Press the extractor button


2. Pull the SIM tray

Version : 1.09 160


19.5.2. Antennas
There are five models of antenna, all 5 bands (850/900/1800/1900/2100 Mhz):
1. The magnetic car antenna - (ref: ACC-GSM-CARANT)
2. The right angle antenna - (ref: ACC-GSM-ANTANGLE). It should be used for demo purpose only
because it may interfere with analog measurement.
3. The industrial antenna “+3 dB” - (ref: ACC-GSM-ANT) and the 5 meters cable (ref: ACC-GSM-EXT5).
Optional arrestor is compatible with this antenna (see next).
4. The flat antenna - (ref: ACC-GSM-ANT-FLAT).
5. The “+6dB” antenna - (ref: ACC-GSM-ANT6).
Arrestor cannot be used with this antenna (see next).
1. 2.

3.

5.

4.

Version : 1.09 161


19.5.3. Antenna Surge Arrestor

Connection to the arrestor:

1) Use the N-M>>N-M connector from the arrestor to connect it to the antenna (remove N-
M>>FME-M from antenna if mounted).
2) Connect N-M>>FME-M adapter supplied with the antenna to the arrestor.
3) Connect the antenna cable.

1 2 3

19.6. RS232 (optional)

Communication
Signals TxD, RxD, RTS, CTS, GND, DTR, DCD, RI
Connector RJ45 (see cabling next)
Protocols ModBus-RTU Master / Slave
LED
CD Indicates the modem is ‘On line’ (after synchronization)
TxD Data Transmit = ON . Data Receive = OFF

Version : 1.09 162


19.7. I/O

Group 1 – Internal I/O


DI: Power Failure Digital Input returning a failure of Power at Vin, when TBOX LT2 is equipped
with an external 12V Backup battery.
AI: Power Supply Voltage Voltage at Vin connection
AI: External 12 V Backup Bat. V. Voltage at Vbat connection
AI: Internal Temperature Temperature inside the TBOX LT2
DI: STOP Button Input corresponding to the toggle switch in STOP position. To use STOP action,
go to the TWinSoft application, RTU properties -> Advanced -> Start/Stop

Group 2 - Digital Inputs


Group 6 - Counter
V+ V+ MUST BE POWERED
External voltage to V+ accepted With cabling only to DI: 8 → 30 VDC
With cabling to DI and DO: 11 → 30 VDC
Voltage at input
Typical 12 VDC
Maximum for a LOW level 2.0 VDC
Minimum for a HIGH level 7.4 VDC
Maximum 30 VDC
Resistance at input
Resistance > 39 kΩ
Sampling
Minimum period LOW – HIGH 15 msec – 15 msec.
Frequency (software) At each cycle of BASIC / Ladder
Protection
RC filter TBD
Voltage inversion No protection
Protection EMC RC
Isolation
Between inputs No isolation
To the power supply No isolation

Counter inputs
Input channels DI 0, DI 1, DI 2
Maximum frequency 10 kHz with duty cycle 45 .. 55 %

In all cases, V+ MUST be connected to prevent permanent damage; even when using the
channels as input.

Version : 1.09 163


Group 3 - Digital Outputs
V+ V+ MUST BE POWERED
External voltage to V+ accepted 11  30 VDC
Output
Type Current Sourcing
Voltage per output Maximum: 30 VDC (depending on V+)
Current for 16 outputs at a time Maximum: 3.2 A, protected by a fuse (SMD)
Current per output Maximum: 625 mA up to 60°C (with a total for all output of 3.2 A)
Maximum: 200 mA between 60°C .. 70°C
Short-Circuit current at 1 output Typical: 1.4 A
Maximum: 1.9 A
Protection
Protection diode Protection against inverted voltage when working with inductive load
WARNING: when the output is connected to a DC relay driving an AC relay,
the AC relay must be protected with a RC circuit
Over load Maximum: 35 VDC
Short-Circuit + Overload Thermal protection
Isolation
Between outputs No isolation
To the power supply No isolation

Version : 1.09 164


Group 4 - Analog Inputs
Group 7 - Validity
4..20mA
Resolution 16 bits
Mode Unipolar
Model Passive input: sensor must be powered by an ext. power supply
Precision 0.1% full scale @ 25°C
0.2% full scale over the temperature range
Input Impedance Typical: 249 
DI: Validity input associated to Returns ‘0’ when signal < 2.4mA and > 21.6mA
each analog input 4..20mA Returns ‘1’ when the signal is valid.
0..10V
Resolution 16 bits
Mode Unipolar
Model Passive input: sensor must be powered by an ext. power supply
Precision 0.1% full scale @ 25°C
0.2% full scale over the temperature range
Input Impedance Typical: 60 k
Pt1000
Mode 2 wires
Resolution 16 bits
Range Typical: -40°C .. +85°C
Precision ± 0.5 °C
Protection
4..20mA Max : 28 mA /7 V
0..10V Max : 13.6V w/o influence on other AI.
Absolute Max : 30 VDC
Pt1000 Max input voltage : 10 V
Isolation
Between inputs No isolation
To the power supply No isolation

Group 5 - Analog Outputs


4..20mA
Resolution 16 bits
Mode Unipolar
Model Active output
Precision 0.1% full scale @ 25°C
0.2% full scale over the temperature range
Voltage at Output Input power supply (Vin or Vbat) - 5 V
Current at Output Maximum: 22mA
Outside Impedance limit Vin -5V
≤ 22mA
Protection
Short-circuit protection
Isolation
Between outputs No isolation
To the power supply No isolation

Version : 1.09 165


20. Cabling

20.1. Power Supply

Connector: Spring Cage Terminal block


PS & RS Connector (see chapter 3.4)

Bat Vin +8.. +30 VDC


Gnd Gnd 0 VDC

Backup
Battery

A power supply of minimum 20 VDC is required to charge the external 12 V backup battery.
When the voltage at Vin disappears, the 12 V backup battery powers TBOX LT2 down to 10 V.
Below 10 V, the external backup battery is automatically disconnected and TBOX LT2 will
restart when applying voltage at Vin.
The Gnd connection should be used only for power supply. DON'T USE IT TO CABLE Analog
Inputs (see Appendix H)

20.2. RS232 (standard)


Connector: Spring Cage Terminal block
(see chapter 3.4)

DB9 Female
to PC

CTS - 8
RTS - 7

Gnd - 5 Gnd

Tx - 3 Rx

Rx - 2 Tx

As an alternative, you can use a standard serial cable, cut one of the ends and cable directly to
the TBOX LT2 connector.

Version : 1.09 166


20.3. RS232 (optional)

Description: Connector: Pinout:


communication RS232 RJ 45

1. RI white/orange
2. DCD orange
3. DTR white/green
4. Gnd blue
5. RxD (input) white/blue
6. TxD (output) green
7. CTS (input) white/brown
8. RTS (output) brown

Exemple of CAT cabling

Cabling

RJ 45 DB-9 Description
to the PC
2 1 DCD (Data Carrier Detect)
6 2 RxD (Receive Data)
5 3 TxD (Transmit Data)
3 4 DTR (Data Terminal Ready)
4 5 GND (Ground)
6 DSR (Data Set Ready)
8 7 RTS (Request To Send)
7 8 CTS (Clear To Send)
1 9 RI (Ring indicator)

Reference of cable RJ45 to DB9 = ACC-CABL-PROG45

Version : 1.09 167


20.4. RS485

Connector: Spring Cage Terminal block


PS & RS Connector (see Appendix H)

Gnd

A+

B-
Example:
Cabling TBOX LT2
to TBOX MS16

1 A+
Gnd
2

B-
3

About RS485 cabling:


Use a twisted pair for signal A and B.
RS 485 is not isolated. If cabling equipment in different buildings (different Earth), you have to
use ACC-RS485 (ask your local distributor)
Maximum length depends on quality of cable, speed and quantity of stations (max. 256 x
TBox stations). In good condition, guaranteed to 1.2 km (max. 256 x TBox stations @
9600 Bps) In practice, longer distance can be reached with lower Baudrate and fewer
stations.
Cable:
- Twisted pair (2 pairs: one pair for A and B; one pair for Gnd)
- cross-section: minimum 0.5mm²
- screening: pair and global screening
- reference: Li2YCY-PiMF

Version : 1.09 168


20.5. Ethernet

Description: Connector: Pin out:


Ethernet communication RJ 45

1. Tx+
2. Tx-
3. Rx+
4. not used
5. not used
6. Rx-
7. not used
8. not used

One can use straight or cross-over cable. It must be a Shielded SFPT cable.

It connects to a hub, a switch, a router or directly to a PC.

Version : 1.09 169


20.6. Digital Inputs - Counter inputs

Connector: Spring Cage Terminal block


(see Appendix H)

DIO Connector

14 15

12 13

10 11

8 9

6 7

4 5

2 3

0 1

Gnd V+

+8 .. +30 VDC

0V

DO NOT MANIPULATE CONNECTORS UNDER VOLTAGE.


V+ MUST be connected to prevent permanent damage.

Cabling to NPN transistor Cabling to PNP transistor (or OPTO)

+ VDC + VDC
R: 1 k (12 VDC)
10 k (24 VDC)
R
Input x
Input x

0V Gnd
0V Gnd

Inverted logic: output=1 → input=0

Version : 1.09 170


20.7. Digital Outputs

Connector: Spring Cage Terminal block


(see Appendix H)

DIO Connector

Load 14 15 Load

Load 12 13 Load

Load 10 11 Load

Load 8 9 Load

Load 6 7 Load

Load 4 5 Load

Load 2 3 Load

Load 0 1 Load

Gnd V+

0V
+11 .. +30 VDC

Version : 1.09 171


20.8. Analog Inputs – Current/Voltage

Connector: Spring Cage Terminal block


(see Appendix H)

Analog Input Connector Analog Input Pinout

In 6 (+) 6 7 In 7 (+)

In 4 (+) 4 5 In 5 (+)
In 2 (+) 2 3 In 3 (+)
In 0 (+) 0 1 In 1 (+)
Inputs (-) Gnd Gnd Inputs (-)

Read important information about precautions in cabling in Appendix H

Cabling to 2-wire sensor

- IN x Measure
+ SENSOR

R in

Gnd

Cabling to 4-wire sensor

IN x Measure

+
SENSOR R in
-
Gnd

Version : 1.09 172


Pin out - ‘Current’ inputs

Models Quantity of AI Input index (see front panel)


LT2-530-x 8 inputs:
each input 4..20mA or 0..10V Inputs 0, 1, 2, 3, 4, 5, 6, 7
LT2-532-x 8 inputs:
each input 4..20mA or 0..10V Inputs 0, 1, 2, 3, 4, 5, 6, 7
LT2-540-x 6 inputs:
each input 4..20mA or 0..10V Inputs 0, 1, 2, 3, 4, 5
LT2-542-x 6 inputs:
each input 4..20mA or 0..10V Inputs 0, 1, 2, 3, 4, 5

20.9. Analog Inputs – Temperature (Pt 1000)

Connector: Spring Cage Terminal block


(see Appendix H)

Analog Input Connector Pt1000 Inputs Pinout

0 1

Pt1000

Gnd Gnd

Read important information about precautions in cabling in Appendix H

Pin out - ‘Temperature’ input

Models Quantity of Pt1000 inputs Input index (see front panel)


LT2-530-x - -
LT2-532-x - -
LT2-540-x 2 x Pt 1000 0, 1
LT2-542-x 2 x Pt 1000 0, 1

Version : 1.09 173


20.10. Analog outputs – Current

Connector: Spring Cage Terminal block


(see Appendix H)

Analog Output Connector Analog Outputs Pinout

Out 0 (+) 0 1 Out 1 (+)

Gnd Gnd

Cabling to an actuator

Vin

Bat
feedback

- + Out x
Actuator

Gnd

Version : 1.09 174


Version : 1.09 175
Appendix A. Licenses

TWinSoft software itself is not protected and can be installed freely


on any PC to develop TWinSoft document (online or offline)
and to monitor TBOX LT2.

The only operation protected is the sending of an application to TBOX LT2.

In order to find the best way for you we offer different possibilities:

A.1. The Evaluation mode

You don’t have any license. You are able to develop a complete TBOX LT2 project without any restriction,
but when you send the application to TBOX LT2, it will stop after 2 hours. This is a good solution for testing
programs or creating a demo.

A.2. The Dongle

It is a hardware license. A dongle is placed on your PC. The dongle consists in a USB key. TWinSoft regularly
checks the presence of the dongle. It allows you to send applications to as many TBOX LT2 as you want,
with any PC.
You need to install a driver to run the dongle. It is available in our website:
http://helpdesk.servelec-technologies.com -> Download ->TBox -> Utilities

A.3. The Code (License)

Available from the menu ‘Help’  ‘License Register.’


Using information of the PC (the Company name, the User name, a Serial Number), you receive a code
that you enter in the field “License”. Once entered, you can send any application as if you had a dongle
(see previous).
The only restriction is that it must always be on the same PC.
If you wish to use another PC, you have the possibility to remove registration on the first PC and register
back on the second.

A.4. The TWinSoft LITE

Available from the menu ‘Help’  ‘TWinSoft Lite configuration.’


This protection mode is ideal for users having one or two TBOX LT2 units. The dongle or a license might
be too expensive.
TWinSoft LITE code is linked to one and only one TBOX LT2; it allows you sending an application to the
TBOX LT2 for which you have the code.
This license can be introduced in as many PCs as you want.

Version : 1.09 176


Appendix B. Time in RTU
One of the biggest issues in Telemetry and data logging equipment is the handling of time.
In order to have a universal solution wherever TBOX LT2 is used, TWinSoft, OS of the RTU and sotware’s
collecting data, share the same mechanism of time management.

Time in the RTU is based on UTC time.

B.1. Time in TBox LITE

The RTC (Real Time Clock)


TBOX LT2 is equipped with a RTC chip (Real Time Clock). The RTC is used to manage timestamps internally.

Functions of the RTC:


 it is a calendar Y2000 compatible.
 it updates the UTC time (see next).
 it communicates with OS to handle the UTC time, used for data logging.

The RTC time is used at start-up of TBOX LT2 to update the UTC.

UTC Time
UTC time is based on the number of seconds since 1/1/1970 at Greenwich latitude. It is used as internal
timestamp to each event (alarm, chronology, …)
UTC time is converted into Analog System Variables to give access to time information: second, minute,
hour, day, month, year, week.
Changing UTC time automatically updates the RTC.
When time information needs to be sent (in a report, as header of an e-mail, in the Analog System
Variable), it is always computed from UTC time to a local time according to TBox configuration Time Zone
and Daylight Saving option as specified in the “General” RTU properties.

TBox LITE Time setting


In order to set TBOX LT2 to PC time, an option is available in the menu “Communication” from the main
menu bar; option available when connected (locally or remotely) to the RTU.

When sending an application to


TBOX LT2, TWinSoft updates
automatically the RTU time to the PC
time.
This feature can be deactivated from the
“Send application” menu.

RTU time can be checked anytime doing a RTU Identification, from the main menu -> “Communication”

Version : 1.09 177


Day Light Saving (Winter/Summer time)
When installed in regions using daylight saving, TBOX LT2 handles the changing automatically.
It means that RTC and Analog System Variable [hour] are automatically updated when the time changes.

Standard changing date and time in Europe:


- last Sunday of October: 3:00  2:00
- last Sunday of March: 2:00  3:00

B.2. Data logging

Chronologies
In chronologies, timestamp is recorded for each log of data. The timestamp recorded is the UTC time.
When generating data, TBOX LT2 converts UTC timestamps into local timestamps according to its Time
Zone.
When retrieving data from a PC, the latter reads UTC timestamps and converts them according to the local
time of the PC, depending on the time settings of the PC.
When a daylight saving change occurs, TBOX LT2 is informed and automatically adapts all coming
timestamps to the new time.

Sampling tables
In sampling tables, TBOX LT2 records the timestamp of the last record only. The previous timestamps are
built up when retrieving the data, based on the last timestamp and the period of recording.
Conversion into local time is done as above with chronologies.
A choice had to be made concerning periods > 1 hour: either having always the same period of recording
or having always the same “hour” of recording. The latter case has been chosen. When daylight saving
change occurs, the target time is automatically updated for sampling tables having a period > 1 hour.
Example:
If recording a value once a day at 6.00 in the morning, the recording will always happen at 6.00, but when
changing from winter to summer (in Europe), the sampling period will be 23 hours and when changing
from summer to winter the period will be 25 hours.

Periodic events
When a periodic event is defined with a period > 1 hour, its target time is automatically adjusted when a
changing winter/summer happens.

Version : 1.09 178


B.3. System variables associated

Some System Variables of TBOX LT2 are associated to the Time. They can be used in BASIC/Ladder
programming to execute specific operations:

Type Variable Comment


Analog Second, 6 Registers giving the time in hour, minute, second, day, month and
Minutes, … year.
Analog UtcTim Time in UTC format (number of seconds since 1/1/1970 at Greenwich
latitude)
Analog ZonBia Time difference in seconds between local time and UTC time
Analog ZonID ID of the zone where RTU is installed. It uses regional settings of the PC

B.4. Summary
Summary of time handling in the different cases:

1. System variables in the RTU They display the local time where the RTU is installed, according to the
Regional settings declared in the “General” RTU properties
2. Identification from TWinSoft The UTC time is computed according to Regional settings of the PC
3. List of alarms in a report The time is computed according to RTU local time (see 1. above)
4. List of alarms in TWinSoft See point 2. above
5. Object ‘Time’ in WebForm 1 See point 2. above
6. System variables in WebForm 1 Displays the value of the variables, as explained point 1. above

Version : 1.09 179


Appendix C. Plug & Go

Plug & Go allows storing the complete TWinSoft project into the micro SD card of TBOX LT2.

When required, micro SD card must be inserted at the back TBOX LT2 (see chapter 19.3).
Micro SD of max. 8 GBytes, formatted in FAT32.

As TWinSoft project, we mean all files, including TWinSoft compiled document with Web and Report files,
OS and even LINUX kernel; all ready to run in the RTU.

There are 4 ways Plug & Go can be used:

1. TWinSoft sends a project to TBOX LT2.


When TWinSoft sends a program to the RTU, all the files are sent and stored in the micro SD card.
This corresponds to a complete backup of the project on the SD card.
The advantage is that if you have to replace a CPU, you don’t need to send the program; you insert
the MMC in the new CPU and it will start with its program.

2. You insert an empty micro SD card in TBOX LT2 .


The running application of TBOX LT2 is not copied to the micro SD card. Only when TWinSoft sends
an application to TBOX LT2 it will be copied into the SD card (see above).

3. You insert a micro SD card including a project in a CPU.


In case of differences between the content of the micro SD card and memory of TBOX LT2, SD card
has always priority.
Both programs are compared (dates are compared). When dates of creation of the program are
different, the project (including Webform, reports, OS, LINUX, ...) is copied from the SD card to the
CPU. It may up to 1 minute. DO NO RESET The CPU !
During the loading the LED “Run” flash at ½ Hz, indicating the program is stopped.

4. You program the micro SD card directly from TWinSoft.


A menu in TWinSoft allows storing the project to the SD card.
From the main menu “File” -> Plug & Go menu, TWinSoft compiles the complete project into a
directory called repository. You then copy this directory to the SD card using a Card Reader on your
PC.
The advantage is that you don’t need TWinSoft to program the RTU. You can distribute the SD card
to the field technicians.

Version : 1.09 180


Menu of TWinSoft:

Plug…: Click this button to create the Plug & Go directory repository.
The name is unique. It means if you want to create Plug & Go files for several RTU's,
you have to save each file in separate directories.

Once the Project is compressed, the window displays File Info (see example above)

Plug Info…: Click this button and select the parent directory of repository directory to display its Info

Extract sources…: once a repository has been selected (see Plug Info… above), allows extracting its
content

System variable
A digital system variable indicates the presence of micro SD card:

29 MmcToRTU - MMC: indicates whether the program has been loaded from the SD card:
1 = the program of SD card is different from the one of the RTU and has
been loaded from SD card
0 = there is no SD card; the SD card is empty; the program of the SD card
is identical to the one of the RTU

Version : 1.09 181


RTU identification

Data relative to MMC is available in RTU


identification window:

C1. File System.xml


IP address initialization is carried out using a file called ‘System.xml’, placed in the root of the SD Card.

When an IP configuration is defined in System.xml, it has priority on the one declared for
the Ethernet ports of the CPU as well as in a possible ‘Plug&Go’ file.

Example of System.xml

<?xml version="1.0"?>
<System>
<ComPort>
<PortName>COM3</PortName>
<IPconfig>
<IP>192.168.1.75</IP>
<Subnet>255.255.255.0</Subnet>
<Gateway>192.168.1.1</Gateway>
<PrimaryDNS>192.168.1.1</PrimaryDNS>
</IPconfig>
</ComPort>
</System>

<PortName> Communication port of TBOX LT2 (COM3 = Ethernet)


<IP> IP address of the port selected
<Subnet> IP address of the Subnet mask of the port selected
<Gateway> IP address of the equipment used as Gateway on the Network
<PrimaryDNS> IP address of the DNS Server (only primary DNS is handled)

Version : 1.09 182


Appendix D. Pack & Go
D.1. Presentation
Pack & Go is a tool that builds up one file with your complete project, including TWinSoft document,
WebForms, Reports, OS,...

The goal is to backup or to transfer a complete project without missing files or to update an RTU with the
complete project without requiring advanced knowledge of TWinSoft.

All files are compressed and packed into one file with the extension .tpg (TWinSoft Pack & Go).
Once a project is packed, it can be unpacked and/or updated to the RTU from a double click on the .tpg
file.

TWinSoft needs to be installed on the machine used to update the RTU with .tpg file, but the TWinSoft
license is not required.

A license is required to pack (see appendix A.).

D.2. Pack

To access Pack & Go menu, select from the main menu ‘File’
 ‘Pack & Go…’

Select the button Pack …

IF YOU ARE OFF LINE while compiling, TWinSoft uses the OS indicated as ‘Off line OS’ in
the ‘General RTU properties’. This OS, and only this OS, will be sent to the RTU.

Version : 1.09 183


All Files of the project, TwinSoft
document, WebForm, html pages,
OS, … are packed in one file, with
the extension .tpg

Check the user running the .tpg file runs a version of TWinSoft equal or higher than the
one used to pack the files.

D.3. Unpack

To open the Unpack window, double click a file with the extension .tpg.

Unpack menu offers 2 features:

1. Restore a project

Extract a project into a directory of


your PC. This option is very
convenient for backing up a project
being sure you don't miss any file.

Option available from the main


menu: ‘Tools’  Unpack.

2. Update an RTU

Update an RTU with a complete


project, including the application,
OS, WebForms, report, ...from a
unique file.

The button ‘PC Setup…’ gives you


access to the configuration of the
PC, to communicate with the RTU.

Version : 1.09 184


The button ‘Update RTU’ sends the
project and OS to the RTU.

If packed OS is different from OS in the RTU, Pack & Go updates the RTU with the OS.

Languages supported are English, French and German.


It cannot be selected from “Unpack” menu but changed from TWinSoft main menu: “Tools” 
“Language”.

Version : 1.09 185


Appendix E. ModBus Rerouting

E.1. Presentation
One of the nice communication features offered by TBOX LT2 is the ability to act as a ModBus router.
That means that you can use a TBOX LT2 to make a connection between 2 x ModBus devices that are
not on the same communication channel.

Routing can then be used to access a ModBus device through a TBOX LT2.

ModBus Protocols
This feature creates a route between communication ports configured in ModBus protocol(s):
- ModBus-RTU <--> ModBus-RTU
- ModBus-RTU <--> ModBus/TCP

Concerning TCP/IP protocols, other redirections are possible using IP forwarding, NAT and
Virtual Server (see Appendix F.).

Routing 2 communication ports in ModBus/TCP, is called IP forwarding (see next chapter).

Communication principle
The idea is that TBOX LT2 receiving frames, analyzes the Station address: if it is for its own use, it keeps
the frames; otherwise they are pushed to the “routed” communication port.

E.2. Routing using TWinSoft


ModBus rerouting allows associating two ‘ModBus-RTU’ communication ports, in order to access a
remote RTU with TWinSoft from your computer by rerouting through a ‘Master’ RTU.

The typical application is dialing an RTU to access a remote RTU connected to the RS485 network.

You access routing from the main menu of


TWinSoft : Communication  Routing

Version : 1.09 186


Address : Address of the RTU you are
physically connected (the ‘Master’)

Timeout : Rx timeout used to communicate


with the Remote device

Route from : incoming communication port


(the port of the ‘Master’ TWinSoft is
connected to)
to : outgoing communication port (the
port of the ‘Master’ connected to the remote
device)

Sequence to access a Remote TBOX in rerouting:

1. Open in TWinSoft the document corresponding to the “Master” (TBOX LT2)


2. Fill in the Routing request menu as explained above.
3. Open in TWinSoft the document corresponding to the “Remote” RTU (if you were using modem
communication, you will have to redial the “Master”).

You are in communication with the Remote TBOX.

This sequence is only possible when Master and Remote are of the same model of RTU. If not,
you have to pre-configure the Analog system variable (see next chapter)

Analog System variable ‘Rerout’


An analog system variable ‘Rerout’ can also be used in your Ladder/BASIC logic to force a rerouting.
This 16 bits variable represents 16 communication ports, with the lsb corresponding to COM1.
Example: A rerouting between COM4(…001000) and COM2 (…000010) corresponds
to the decimal value =10 (…001010)

Rerouting is only possible with local communication ports configured in ModBus

Sending a program using Rerouting


For instance, you can send a program by dialing a “Master”, and accessing “Slaves” on RS485 network.

Doing a ‘local’ rerouting, for instance from a RS232 port to a RS485, we recommend to use the
same Baudrate all ports.
If you have ‘ModBus Transactions’ running between ‘Master’ and ‘Slave’, we recommend
stopping them during rerouting, to avoid communication errors.

Version : 1.09 187


E.3. Possibilities of Routing
The table below shows all possible connections between 2 ports:

IN: port in which requests are coming


OUT: ports to which requests have to be sent if it does not concern the “local” RTU (different ModBus
address).

OUT
RS232 RS485 GSM (CSD) GPRS/3G Ethernet
IN
RS232 - Routing Routing (*) Not avail. Not avail.
RS485 Routing - Routing (*) Not avail. Not avail.
GSM (CSD) Routing Routing - Not avail. Not avail.
GPRS/3G Routing Routing Routing (*) - IP Forward (*)
Ethernet Routing Routing Routing (*) IP Forward (*) -

(*) : increase Time out (see above) to at least 2 seconds, and with GPRS/3G at least 10 seconds.

Version : 1.09 188


Appendix F. IP forwarding, NAT, Virtual Server

IP forwarding, NAT and Virtual Server allows redirecting IP requests:


- IP modem connection (for instance incoming connection from TConnect)
- Ethernet ports

The typical use is a remote access to an IP camera connected to the Ethernet port of the RTU: you dial the
RTU with TConnect and display a HTML page containing a link to the IP address of the camera.

This redirection feature requires enabling Advanced IP Configuration. As a matter of fact, if an Ethernet
port of the RTU is connected to a LAN, and the IP forwarding is activated, anyone can access the LAN from
a modem connection!

We provide several security levels, to enable these features:

1. From RTU properties, ‘Protection’ tab,


the general access security of the
document must be activated with a
HEXADECIMAL code of 4 characters

To generate login and password


corresponding to the code you have to
use « Password generator » (see chapter
17.3).

To improve protection, we advise against using the same codes forGlobal code and
Advanced IP configuration

Version : 1.09 189


2. From ‘RTU properties’ -> ‘Advanced’ -
> ‘TCP/IP’ you can activate the
required service.

Quand vous cliquez OK vous devez


entrer le nom et mot de passe
correspond au code choisi ci-dessus à
l’étape 1.

To deactivate these features, you are also prompted to type the Advanced IP activation code.
Virtual Server rules can be configured as explained chapter 10.8.

Version : 1.09 190


Appendix G. Terminal mode

The ‘Terminal’ mode allows accessing a modem in ‘AT command’.

Before starting:
TWinSoft must be connected to TBOX LT2 through RS232 at 57600 Bps (corresponding to the internal
Baudrate of the modem).
It is not possible to use Terminal mode through Ethernet connection.

It is available from the menu ‘Communication’  ‘Terminal’:

Example with LT2-xxx-3

Version : 1.09 191


Examples of commands to check the availability of a GSM:

To activate the echo in the


window, type
ATE1 <ENTER>
(you don’t see what you type, it is
normal)

The modem answers with


OK

From now on you will see


what you type

To check if the SIM card is


ready, type
AT+CPIN? <ENTER>

The modem answers


CPIN: READY

To check the GSM operator


has been found, type
AT+COPS? <ENTER>

The modem answers with a


code or the name of the
operator

To check the quality of the


signal, type
AT+CSQ <ENTER>

The modem answers


+CSQ:xx,99

xx: must be between 20


and 31

To quit the Terminal mode, click button “Stop”

Version : 1.09 192


Appendix H. Precautions In Cabling

H.1. Cabling to Spring-Cage Terminal Blocks

TBOX LT2 is equipped with compact spring-cage terminal blocks.


This connector allows a high density of connections.
Press the orange plastic with a screwdriver for inserting
and removing the cable.

It is recommended to use either solid cable or stranded cable with ferrule.

Connection capacity
Without ferrule Solid cable: 0.2 .. 1.5 mm² (24..16 AWG)
With ferrule without plastic sleeve Solid or Stranded cable: 0.2 .. 1.5 mm²
With ferrule with plastic sleeve Solid or Stranded cable: 0.2 .. 0.75 mm²

Ferrule specification for 0.75mm² cable

B: minimum 10 mm
C: 1.5 mm D: 3.5 mm

H.2. Cabling Analog Inputs


One must be particularly careful when cabling temperature probes (Pt1000) and more precisely when
combining temperature probes and 4..20mA sensors.

 It is mandatory to cable temperature probes to one of the GND from the AI stage, and to reserve it
uniquely to the probes.

 If you mix temperature probes and 4..20mA sensors, use a separate GND for each type of signal.

0 1

4 5 4..20mA

Pt1000 2 3 4..20mA

0 1 4..20mA +

Gnd Gnd -

Example with LT2-542-x

Version : 1.09 193


Example of cabling analog inputs of –LT2 through Terminal Blocks:

0 1

4 5

2 3

0 1
GOOD Gnd Gnd

Using separate GND cables.

To measure temperature with PT1000,


a current of 0.1 mA is sent to the probe.

A variation of 1 °C corresponds to a variation


of the resistor of 3.8 Ω
With a current of 0.1 mA it gives
0.38 mV per °C

Pt1000

- +

0 1

4 5

BAD 2 3

0 1

Gnd Gnd
Using one GND cable.

The GND cable represents a little resistor,


common to temperature probes and sensors.

One meter of 0.5 mm² represents a resistance


of 0.034 Ω
Imagine a 4..20mA sensor returning 20mA.
20mA in a resistor of 0.034 Ω gives a voltage of
0.68 mV.
With a voltage of 0.38 mV per °C it constitutes
an error of almost 2°C on temperature inputs.

Pt1000

- +

Version : 1.09 194


Chronologies .................................................................. 131
analog ....................................................................... 133
A digital ........................................................................ 133
Access level .................................................................... 148 Communication
Access Security ............................................................... 142 CPU ports .................................................................... 56
deactivating ............................................................... 150 PC Setup ...................................................................... 28
TWinSoft document .................................................. 150 status........................................................................... 33
Add-ons ............................................................................ 43 testing with TWinSoft.................................................. 33
Alarms ............................................................................ 109 to other RTU.............................................................. 136
advanced parameters .................................................. 47 variables ...................................................................... 64
analog condition ........................................................ 112 Compiling an application ................................................. 36
chain .................................................................. 110, 113 Counters........................................................................... 74
digital condition ......................................................... 110
e-mail......................................................................... 115 D
end of alarm ................................................................ 48
events stack ............................................................... 121 Datalogging .................................................................... 131
FTP ............................................................................. 116 chronologies.............................................................. 133
group of recipients .................................................... 117 sampling tables ......................................................... 134
internal ...................................................................... 114 Debugging ...................................................................... 101
link ..................................................................... 110, 113 Document
Message .................................................................... 117 backup ......................................................................... 36
ModBus ..................................................................... 114 Dongle ............................................................................ 176
NTP ............................................................................ 116 DynDNS ............................................................................ 95
printer........................................................................ 115
recipients ................................................................... 114
SFTP ........................................................................... 116
E
SMS............................................................................ 115 Earth Grounding ............................................................... 18
time tables ................................................................. 119 EDGE ................................................................................ 59
Alarms stack ............................................................. 48, 109 e-mail ........................................................ 82, 110, 113, 115
Alarms table ..................................................... 48, 109, 121 SMTP from .................................................................. 48
Antenna GSM ................................................................. 161 SMTP subject............................................................... 48
arrester ...................................................................... 162 Ethernet
on PC ........................................................................... 29
B on RTU......................................................................... 58
Events stack....................................................... 48, 109, 121
Battery
3V Lithium battery ..................................................... 158
external 12 V backup battery cabling ........................ 166
F
external 12 V backup battery charger........................ 156 Factory IP address ............................................................ 32
Bridge ............................................................................... 98 Firewall................................................................ 41, 44, 105
FTP ............................................................................89, 116
C
Cabling
G
analog input............................................................... 172 Global code .................................................................... 148
analog output ............................................................ 174 Global Reset ..................................................................... 34
connectors ................................................................... 19 GPRS................................................................................. 59
digital input ............................................................... 170 communicating with TWinSoft .................................... 32
digital output ............................................................. 171 communication variables ............................................ 61
Ethernet ..................................................................... 169 IP settings .................................................................... 62
power supply ............................................................. 166 with SMS ..................................................................... 62
precautions ................................................................ 193 GPS ................................................................................... 71
RS232 (optional) ........................................................ 167 Ground ............................................................................. 18
RS485 ......................................................................... 168 Group of Tags ................................................................... 75
temperature input ..................................................... 173 GSM message
Caller ID ............................................................................ 66 header ......................................................................... 48
Certifications ...................................................................... 4

Version : 1.09 195


ModBus Transactions ..................................................... 136
GSM-3G ............................................................................ 58 creating ..................................................................... 137
CSD (data) settings....................................................... 59 ModBus device .......................................................... 136
IP settings .................................................................... 60 through dial-up modem ............................................ 139
signal level ................................................................... 66 timing ........................................................................ 139
technical specifications .............................................. 160 trigger ....................................................................... 137
Models
front panels ............................................................... 152
H Modem
Hardware caller ID ....................................................................... 66
concept ........................................................................ 15 on PC ........................................................................... 29
installation ................................................................... 18 states ........................................................................... 66
Historical data ................................................................ 109
HSDPA ............................................................................... 59 N
HTTP protection ............................................................. 145
HTTPS ......................................................................... 41, 44 NAT............................................................................53, 189
NTP ...........................................................................94, 116
I
O
I/O .................................................................................... 76
analog .......................................................................... 77 OpenVPN ....................................................................... 102
technical specifications .............................................. 163 Operating System ............................................................. 35
IP Forwarding ........................................................... 53, 189 Overview .......................................................................... 13
IP Parameters ................................................................... 87
IP Security....................................................................... 102
IP setting
P
RTU factory setting ...................................................... 32 Pack & Go ....................................................................... 183
TWinSoft PC Setup....................................................... 31 Password
USB .............................................................................. 28 SSH .........................................................................41, 45
Windows...................................................................... 29 TWinSoft document .................................................. 147
ISP..................................................................................... 88 Password utility .............................................................. 148
PC
L system requirement .................................................... 22
PC Setup
LED IP setting ..................................................................... 31
Ethernet ..................................................................... 157 Periodic events ............................................................... 140
GSM ........................................................................... 160 Plug & Go ....................................................................... 180
Serial .......................................................................... 162 Plug&Go ........................................................................... 55
LED ‘Run’ .......................................................................... 35 POP3 .........................................................................92, 122
License ............................................................................ 176 controlling RTU .......................................................... 125
code ........................................................................... 176 Power Fail......................................................................... 54
dongle ........................................................................ 176 Precautions ........................................................................ 4
evaluation .................................................................. 176 Precautions in cabling .................................................... 193
TWinSoft LITE ............................................................ 176 Protection
Lithium Battery ............................................................... 158 FTP ............................................................................ 147
Login/Logout .................................................................. 149 HTTP .......................................................................... 145
LT2-530 ..................................................................... 15, 152 IP socket .................................................................... 146
LT2-532 ..................................................................... 15, 153 Modbus ..................................................................... 142
LT2-540 ..................................................................... 15, 154 ReadSMS ................................................................... 144
LT2-542 ..................................................................... 16, 155 TWinSoft document .................................................. 142

M R
Memory .................................................................... 37, 157 RAS ................................................................................. 116
SD card............................................................... 157, 159 ReadSMS ........................................................................ 122
ModBus Recipients....................................................................... 114
address of station ........................................................ 42 Registers........................................................................... 78
communication as 'Master' ....................................... 136 Remote Tags ................................. See ModBus Transactions
default station address ................................................ 34 Report ....................................................... 82, 109, 110, 113
rerouting .................................................................... 186 Reset ................................................................................ 34
ModBus device ............................................................... 136 Resources ......................................................................... 56
CPU ............................................................................. 56
I/Os ............................................................................. 67

Version : 1.09 196


RS232 (optional) Tags (next)
technical specifications .............................................. 162 write ............................................................................ 82
RTC ................................................................................. 177 TBox Mail ......................................................................... 24
RTU Properties ................................................................. 41 TCP/IP
advanced ..................................................................... 45 GPRS settings .............................................................. 62
general ......................................................................... 42 TCP/IP address
ModBus Transactions .................................................. 51 incoming call ............................................................... 52
name of the station ..................................................... 42 of the CPU ................................................................... 57
Ports ............................................................................ 51 Technical Specifications
report name ................................................................ 54 all models .................................................................. 156
summer/winter ........................................................... 43 Temperature units ............................................................ 50
TCP/IP .......................................................................... 52 Terminal ......................................................................... 191
Tel. number.................................................................. 43 Time ............................................................................... 177
time zone ..................................................................... 43 system variables ........................................................ 179
RTU startup ...................................................................... 45 week of the year ......................................................... 74
RTU Type .................................................................... 27, 42 winter/summer ......................................................... 178
Run Time Parameters ....................................................... 83 Timers .............................................................................. 74
Toggle Switch ............................................................34, 159
Trace Log ........................................................................ 101
S TView ............................................................................. 109
Safety Earth Ground ......................................................... 18 TWinSoft
Sampling Tables ...................................................... 132, 134 starting ........................................................................ 26
advanced properties .................................................... 50 TWinSoft Suite
Saving a document ........................................................... 36 installation .................................................................. 23
SD card ........................................................... 157, 159, 180 programs ..................................................................... 25
Security........................................................................... 142 system requirement .................................................... 22
Sending an application ..................................................... 37
Serial U
on PC ........................................................................... 29
on RTU ......................................................................... 57 UMTS ............................................................................... 59
SFTP .......................................................................... 90, 116 USB
SMS IP setting to PC ............................................................ 28
acknowledgment with incoming SMS ....................... 123 on RTU......................................................................... 63
coding ........................................................................ 118 PC driver ...................................................................... 29
controlling RTU .......................................................... 125 UTC time ........................................................................ 177
header ......................................................................... 48
Tag value in a message .............................................. 118
SMTP ................................................................................ 91
V
SSH password ............................................................. 41, 45 Variables .......................................................................... 75
Switch ............................................................................... 34 I/O ............................................................................... 76
System Variables internal variables......................................................... 78
analog .......................................................................... 70 system ......................................................................... 68
digital ........................................................................... 68 Virtual Server ...................................................... 53, 97, 189
GPS .............................................................................. 71 VPN ................................................................ See OpenVPN
system.xml...................................................................... 182

W
T
WebForm ......................................................................... 82
Tags................................................................................... 75 WebForm Viewer ............................................................. 24
analog variable ............................................................ 79 Week of the year .............................................................. 74
digital variable ............................................................. 78 Windows IP setting .......................................................... 29
group ........................................................................... 75 Wizard .............................................................................. 27
I/O ............................................................................... 76 Working Modes ................................................................ 34
initial value .................................................................. 80
internal variables ......................................................... 78
ModBus address .......................................................... 81 X
presentation ................................................................ 82
text variable ................................................................. 80 XmlTag.............................................................................. 73

Version : 1.09 197

You might also like