Vous êtes sur la page 1sur 137

1

Tip & Trick

Support
The following pages provide valuable information when developing, analyzing
and monitoring TBox features:

LEDs……………………………………………………..12
License .…………………………………………………16
RTU identification……………………………………… 19
Global Reset…………………………………………… 23
Trace Log………………………………………………. 24
GSM: monitoring with communication variables…… 33
GSM: testing communication with PING addon……. 35
Datalogging tools……………………………………….44
Alarms tools……………………………………………. 61
Report: test generation of report…………………….. 67
TCP/IP debugging……………………………………...78
ModBus communication tool…………………………. 89
Ladder tools…………………………………………… 99
BASIC tools……………………………………………107
Pack & Go, Plug & Go………………………………. 120
Monitor32………………………………………………136

2
TBox is a RTU offering a wide range of possibilities in various applications,
only depending on people ’s imagination.
TBox is an open system. It provides all the tools to control a process, locally
as well as remotely, to generate alarms, to carry on multiple communication, to
log data, …
It can be used in any kind of applications: Water, Oil & Gaz, Electricity,
Railways, Buildings, Street Lightning, Tunnels, Irrigation, Power generators,
Refrigerators, … and is the ideal solution to monitor unmanned sites.

3
4
Example:

Power Supply
I/O
CPU Ethernet Switch

Modem 3G

5
6
7
The power of
MS-CPU32
in a single rack

Reference DIO From DIO: AI AI AO


DI (Counter) (4..20mA) (PT 1000) (4..20mA)
> 10 Khz or (0..10V)

LT2-530 16 3 8 - -

LT2-532 16 3 8 - 2

LT2-540 16 3 6 2 -

LT2-542 16 3 6 2 2

LT2-562 24 3 1 - 1

8
All communication power of
Tbox in a single box

9
Years of data without
maintenance

10
To Monitor RM2 module(s)
from a TBox, you use
‘ModBus Transactions’.

Reference DIO From DIO: AI AI AO


DI (Counter) (4..20mA) (PT 1000) (4..20mA)
> 10 Khz or (0..10V)

RM2-530 16 3 8 - -

RM2-532 16 3 8 - 2

RM2-540 16 3 6 2 -

RM2-542 16 3 6 2 2

RM2-562 24 3 1 - 1

11
LED status during start-up sequence with LT2, TG2 and MS-CPU32 - Led: color (freq)
Steps MS-CPU32 -LT2 (-TG2)/MS-CPU32-S2

Starting Boot strap (See below) Run: red 1 flash


Starting UBOOT (See below) Run: red ON +- 3 sec.
Starting LINUX Run: - OFF +- 10 sec. Run: orange ON +- 6 sec.
Starting OS Run: green ON +- 4 sec. Run: green ON +- 4 sec.
After sending, installation of packages,
Ala / Run: alternatively Run: green/red alternatively
updating app. to SD or USB stick (Plug&Go)
Program runs Run: green 2 Hz Run: green 2 Hz

Other Status:
Status MS-CPU32 MS-CPU32-S2 -LT2 (-TG2)

CPU powered On: green On: green -


Program stopped Run: green ½ Hz Run: green ½ Hz Run: green ½ Hz
Factory program (“Failsafe”) Run: green 8 Hz Run: green 8 Hz Run: green 8 Hz
Alarm active Ala: red 8 Hz Run: red 8 Hz Run: red 8 Hz
Error on the BUS Err: red ON Err: red ON -
Loading application from SD -> CPU Err: red Run: red/green alternat. Run: red/green alternat.
LINUX stopped Run: - OFF Run: red ON Run: red ON
OS stopped Run: green ON Run: green ON Run: green ON
Error accessing SD card,
Err: red ON Err: red ON Run: red ON
NO SD card

12
TWinSoft Suite is free !
Upgrades too !

13
14
TWinSoft runs without license,
but it is required to send a
program to the TBox on site.
The license is unlimited in time.

Typical sequence to create a TBox application:

RTU
Properties

Resources

Tags

ModBus
Alarms Datalogging Process
Transactions

WebForm Report

15
RTU indentification:
TBox running in
« Evaluation mode »

To register a software License: Hardware license:

16
17
18
Press <Ctrl+Alt+O> to toggle
communication

19
20
21
To open/close Compilation
‘Results’ window, press
<Alt+2>

Compilation results:

Example of accelerator keys:


<ALT + 2>: open/close the result window
<F9>: compilation
<Ctrl F9>: send program
<Ctrl + T> : TBox properties

… (see more in TWinSoft help ->

22
It is possible to convert a
model of TBox into another
one in the same family
(see TWinSoft  Tools)

Global Reset (TBox-MS32, -LT2): to return to a factory, known configuration.


It does not delete the running program, it stops it. A single reset restarts the running program.
* Maintain Switch to ‘Reset’ position.
* Let LED flash 3 times
* Release Switch
# LED Mode Communication Protocol LED « Run »
flashing

1 Restart As available in the application As available in 2 Hz


program (*) the application

3 Global Reset Serial=9600, N, 8, 1 ModBus-RTU ½ Hz


Program Ethernet=192.168.1.99 ModBus/TCP
stopped Modem GSM/PSTN=available if properly
declared in the application (see LED CS) Firewall stopped
ModBus Station Address= 1

9 OS stopped, NO serial SSH, Ping, TFTP ON


LINUX Ethernet=192.168.1.99
running NO modem

11 U-BOOT Serial RS232=115200, N, 8, 1 Text, TFTP MS32: OFF


NO Ethernet MS32-S2: Red
NO modem LT2: Red

(*) Restarting the program has the following effects:


- Current alarm is stopped and the stack of alarms is erased.
- Data logging is maintained.
- Variables with init. values are reinitialized; other values are maintained.
- Process is restarted.
- Timers are reset (Status and Value).
- Counters are maintained (Status and Value).

23
24
25
TBox handles automatically
day light saving. Current
setting available as a Digital
System Variable.

RTU properties are available from the Tool bar or from the menu bar: ‘File’ -> ‘RTU
properties’.

26
Look at the LED of each
communication port to check
their communication status.

Each add-on is available as a separate Setup.


On-line help available when configuring the add-on (Click “Properties”
after having selected the add-on):

27
28
Look at the LED ‘CS’ to
check the cards have been
detected by the CPU.

Click “Add an I/O Card”

After having inserted a communication card and sent to


TBox, a reset of TBox is required (com. driver at LINUX level)

29
Each card is divided in
Groups

30
To create multiple Internal
Variables automatically
indexed, use Copy/Paste

31
For IP (3G/GPRS, …) configuration, you have to update the “apn” in the init. field:

Example:

SIM Card insertion Example : insetiion in TBox-LT2:


At the back of the module
Format accepted: only Standard (or Mini)

32
33
34
Example: Pinging GOOGLE DNS address

35
Export and Import of Tags
allow manipulating Tags with
external editor (.cvs, .txt)

36
From the list of Tags, right
click a Tag and select its
display format:
decimal, hexa, …

37
38
Any changing in the
program must be sent to the
RTU

Send Program

Modbus Address

39
Digital Chronologies

Analog Chronologies

40
Recording in Chronologies
can be launched from
BASIC/Ladder.
Ideal to debug process.

Handling:
Enabled: always recorded.
Disabled: never recorded.
PowerF: recording disabled in case of main power failure (see RTU
advanced properties)
DisCRD/DisCRA: recording disabled when the system variable
‘DisCRD’ or ‘DisCRA’ is at 1.

 The size of chronologies tables


are defined in RTU properties  General

Digital Analog

41
The Sampling Tables.
Sampling tables use ‘Periodical’ recording (minimum period = 1
second).
Recording in Sampling tables happens at regular intervals and does
not depend on signal variations; it uses the clock of the CPU to
determine the recording.
Only the date and time of the last recording are stored, and therefore,
Sampling Tables require less memory than chronologies do.
Previous time stamps are rebuilt while sending based on the period
and the last time stamp.

42
Type of recording
TBox is able to execute calculations on a minimum time base of 1 second. The
result of the calculation is written in the sampling table after the selected period.
The value can be:
Minimum: minimum value during the period.
Maximum: maximum value during the period.
Average: average value calculated during the period. For each period a new
average is calculated.
Instantaneous: value at the moment of the recording.
Incremental: TBox records the difference between the current value and the
value at the moment of previous recording.

Trigger:
When used, there are 2 options:
- Synchronize each sample on external trigger
Trigger Frequency must fit with an existing period. Downloading and
therefore rebuild of database is carried out based on the period selected.
- No sampling when trigger = 0
Table is reset and recording activated at the rising of the Tag Trigger

TBox records the timestamp of the last record ONLY. When generating
data, upon request it then rebuilds the previous timestamps using the period.

43
MS-CPU16, -LITE

Chronologies +
Stack of Events

Sampling Tables
MS-CPU32, -LT2

44
Export to .csv, .txt

45
46
In TBox we use alarms to carry on sending out of data. According to
the type of recipient it requires a dial-up modem or an IP connection.
Once the connection is established, data transfer is possible: SMS, e-
mail, FTP, ...

Condition:
The ‘alarm condition’ will activate the connection. It is a Tag that can be
the result of a complex Ladder/BASIC process.

Recipient:
Mobile number, e-mail address, FTP directory, SCADA, tel. number, …

Data:
Message or report that may include historical data.

Acknowledgment:
Here we consider if an alarm has successfully been transmitted by
TBox. There is NO relation with the condition that generates the
alarm.

47
48
49
50
51
Modbus-Slave connection:
TBox dials an equipment, and further doesn’t do anything else. The
control over the communication is taken by the Master which will
further handle the modem connection , sample, acknowledge and
finally will hang up communication.
Example: Dialing TView

Modbus-Master connection:
TBox dials another equipment (typically another TBox), and samples
variables (using Remote tags).
The TBox dialing will be responsible for hanging up (automatic or
manual using communication variables) and for acknowledgment
(using system variables).

52
53
54
55
56
When working with a group of recipients
Chain: (‘Call all recipients’ unchecked)
If TBox fails to send the alarm, it dials the following recipient
If not in the ‘time table’ of the recipient, it tries the next one in the list.

Link: (‘Call all recipients’ checked)


When ‘Call all recipients’ is checked, then all recipients in the group
will receive the alarm

57
58
TBox : The
RTU is in
mode AUTO

59
60
61
Start Timestamp : Moment that the alarm condition appears ( it is the trigger + time defined by
the filter)
End Timestamp : Moment that the alarm condition disappears.

Message: The message or report (file name).

 System Events are between brackets.


Recipient: Name of the recipient.

 In case of system event there is no name.


Start: Status of the alarms handling at the moment the alarms table is downloaded.
Not ack: The alarm is still processed ( depends from tries, timeouts, severity,…)
Ack’ed: The alarm has been processed successfully.
Auto Ack: The alarm has not been processed successfully after all tries.

 system events are Aut Ack.


End: Acknowledgement status of the ‘Notify end of alarm’ condition ( See Notify end of alarm)
Not ack: there is a ‘notify end of alarm’ condition and it’s still in process
Ack’ed: the end of alarm notification was successfully processed
Auto ack: the end of alarm notification is NOT successfully processed,
OR, there is NO ‘notify end of alarm’

 When there is no ‘notify end of alarm’ condition selected, ‘auto ack’ is immediately filled.

filter sending Ack. End

End Ack.
condition

62
63
Dynamic objects Attachments, URL

Attachment file(s)

64
Double-
click

65
Advanced properties of the Report:

Advanced Properties of the RTU:

66
Example of testing the generation of
XML report using Firefox:

In the page, right-click and select View Page Source

67
68
69
70
POP3 can be used to ack.
SMS, e-mail or monitor
TBox.

71
72
73
74
75
192.168.1.254

192.168.1.80

192.168.1.99

76
77
78
79
80
81
82
83
Example:
TBOX connected through Ethernet to a SCADA : Slave operation
TBOX connected through RS485 with other TBox(s): Master
operation.

84
Sequence for configuring ModBus transactions:
The configuration is done in the “Master”:
• From the ‘Resources’, add a remote device
You need to know its “Station address”, its configuration settings
• Make sure you have created the Tags you need to exchange data with
the Slave(s):
‒ Tags that will contain data read in the slave(s)
‒ Tags that you want to write to the slave(s)
• You go to the folder “ModBus Transactions” to associate Tags with a
remote device (=slave) and ModBus addresses of the variable of the
slave
• Any communication port can be used to execute Modbus transactions

85
All timing parameters can be
accessed from the Advanced
properties of the com. port

86
To communicate with
different conditions, you
create several Remote
Devices with different
Triggers

Types of operation (--> correspond to ModBus Functions):

There are several Modbus functions according to the operation (read / write / analog /
digital / single / multiple). Check with the Remote device you will communicate with.
About the address:
This is the Modbus address of the variable in the remote device, from which you want to
read, or write to.
A read operation copies the value at the address in the remote device into the Tag
defined in the ModBus transaction.
A write operation copies the value of the Tag defined in the Modbus transaction to the
address of the variable in the remote device.
Those variables in the remote device do have their own Modbus addresses. Do not mix up
with ModBus addresses of the Tags of the TBox; there is no link.
Make sure you associate identical formats: Digital with Digital, Float with Float, …

87
Example:
Four transactions to exchange the following data between “Master” and “Slave”

Read 6 x Time variables of “Slave”

Read
6 x internal “Int” or “Word” 6 x addresses of Time Variables

Read 8 x Digital Inputs of “Slave”

Read
8 x internal “Digital” 8 x addresses of Digital Inputs

Write 8 x Digital Input of “Master” into 8 x Digital Output of “Slave”

Write
8 x Digital Inputs 8 x addresses of Digital Outputs

Read 4 x Analog Inputs of “Slave”

Read
8 x internal “Float” 4 x addresses of Analog Inputs

88
ModBus
telegram

89
Tag Digital
(Internal Variable)

90
91
TWinSoft Login Window

92
93
94
Take a look at examples:
Start -> Programs ->
Semaphore -> Samples

95
Timing sequence in regards to Ladder/BASIC cycle:
- Reading digital and analog inputs and copy to internal variables
- Execution of the code and use of internal variables for digital and analog outputs
- Writing of internal variables to physical outputs

Reading physical inputs

1st cycle of BASIC/Ladder is executed

At the end of the cycle, writing physical outputs


and analog outputs

If new second, handling of sampling tables.


Analysis of ModBus (Master) Transactions.

….

96
Functions

97
Input Contacts and Output Relays

98
99
100
Example with ‘Single Shot’ timer

101
102
103
104
During Basic edition, press
<F7> to open the list of Tags

Statements and 'Line Feed'


The statements can be separated by a 'Line Feed' or by a colon ‘:’
Example with several assignments:
a=50
b=c
Or
a=50 : b=c
The statements must be on the same line.
Example with if .. then:
if a=50 then
b=c
endif

105
Types available Types’ description
BOOL 1 bit – Digital
BYTE 8 bits – Unsigned
INTEGER 16 bits – Signed
WORD 16 bits – Unsigned
LONG 32 bits – Signed
DWORD 32 bits – Unsigned
SINGLE 32 bits - Float IEEE 754

Examples
Dim Temperature as Single
Dim input2 as Bool
Dim table[4] as Word

106
During Basic edition, press
<F8> to open the list of
Functions

Pressing <F8>:

107
108
109
Preset must be a constant, with time expressed in second.ms.
Example: 500 ms. is indicated 0.5

110
timerss (timer0, valid, 2.5)
if triggerpos(timer0_status) then
inc(counts)
endif

The Tag ‘valid’ activates the timer ‘timer0’ during 2.5 seconds.

If a Tag ‘Preset’ is associated to the instance of the Timer (in ‘Resources’), it


has priority on the Preset defined in the function.
Trick to detect a dynamic preset: type ‘0’ or ‘9999’ as Preset in the call of the
Function
timer_Preset = var1
timerss (timer0, valid, 0)
if triggerpos(timer0_status) then
inc(counts)
endif

111
112
To execute the program
one cycle at a time, use
Digital System Variables
[PrgEnb]=0 and [PrgOnc]=1

Language of « Main » can be changed.


Make sure it is empty before changing the language …

113
Global

Local

114
PID function blocks are
available in a library (PID.lib).
See PID documentation in
TWInSoft directory

115
116
117
118
119
120
121
122
123
124
Call your home page ‘index’.
It’ll make access easier as it
is known as default name by
IE.

125
126
To resize a WebForm, do not
maximize it.
Stretch it or use ‘Form
Properties’ Height and Width

Double-
click .twf
file

127
128
Press <Ctrl+E> to toggle
between Edit/ Simulation in
order to test the Script

Right-click: to
access « object
properties »

Open/close script editor


from the status bar

129
130
To resize a WebForm, select
in “.twa” object the properties
Layout
-> “Height” and “Width”

Double-
click .twa
file

131
132
It is not possible to simulate a
script. One has to send the page
into TBox and use the debugger of
your browser. For instance
“Firebug” with Firefox.

Open the
javascript editor

Select the Object

133
134
135
136
137

Vous aimerez peut-être aussi