Matrix
Electrónica
–
MTX
‐
Router
‐
Titan
User
Manual
‐
Rel3.00.3.09
Page
82
http://www.mtxm2m.com
Subject
to
changes
without
prior
notice
The Titan routers allow you to input up to 10 different scripts. The 10 possible scripts have the same
structure, each with three text boxes, as shown below:
The first text box (IF) indicates the condition; that is, the Titan device will evaluate the logical
expression contained here. The second text box (action1) is the action to be executed when the IF
condition is true. The third text box (action2) is the action to be carried out when the IF condition is
false.
In pseudocode, this would be:
If what the first text box says is true
Execute the action in the second text box
If what the first text box is not true
Execute the action in the third text box.
Even though we still do not know the commands available, let’s see an example:
This example will be interpreted as follows:
If the sum of [register 10 of the Modbus device with the address 1] and [register 11 of the
Modbus device with address 1] is greater than 100
Write [the value “1” in register 20 of the Modbus device with address 1]
If the sum of [register 10 of the Modbus device with the address 1] and [register 11 of the
Modbus device with address 1] is not greater than 100
Write [the value “0” in register 20 of the Modbus device with address 1]
Commands supported by the “Titan Scripts”
IF
field
ACTION
1
field
ACTION
2
field