Examples of a simulation file
Example of a notification list
-
The variables 3_1 and 3_2, which are of type bit, are set to 1 and 0.
-
The elements of the variable 4_1 are set to 10, 20 and 30, and then a few lines later to 20, 40 and 60.
-
The parameter 5_1 is set to 1.23 and then to 4.56.
-
Each time 5_1 is specified, the program waits 300 msec until the next run.
-
The simulation is carried out in a loop.
subindex | name | type | value | sec | msec | |
---|---|---|---|---|---|---|
0 | 3_1 | b | 1 | 0 | 0 | |
0 | 3_2 | b | 0 | 0 | 0 | |
1 | 4_1 | i | 10 | 0 | 0 | |
2 | 4_1 | i | 20 | 0 | 0 | |
3 | 4_1 | i | 30 | 0 | 0 | |
0 | 5_1 | f | 1.23 | 0 | 300 | |
0 | 3_1 | b | 0 | 0 | 0 | |
0 | 3_2 | b | 1 | 0 | 0 | |
1 | 4_1 | i | 20 | 0 | 0 | |
2 | 4_1 | i | 40 | 0 | 0 | |
3 | 4_1 | i | 60 | 0 | 0 | |
0 | 5_1 | f | 4.56 | 0 | 300 | |
-2 |
Example of a complete simulation file 1
1 Sim_BIT
4 Sim_signedLONG
# Arrays have the same type like the variable
# consisting of.
4 Sim_signedLONG_array
8 Sim_FLOAT
-99
0 Sim_BIT b 1 1 0
0 Sim_BIT b 0 1 0
1 Sim_signedLONG i -2147000000 1 12
1 Sim_signedLONG i 10 1 12
2 Sim_signedLONG i 20 1 88
3 Sim_signedLONG i 30 1 0
1 Sim_signedLONG i 2147000000 1 12
2 Sim_signedLONG i 0 1 17
3 Sim_signedLONG i 60000 1 0
# Describes Sim_signedLONG[1], Sim_signedLONG[2] and
# Sim_signedLONG[3] by transferring an array. The
# number of transferred elements stands directly
# to the data type.
0 Sim_signedLONG_array i3 23 33 559 0 0
0 Sim_FLOAT f 77 56 1 23
0 Sim_FLOAT f 9 9 1 300
-2
Example of a complete simulation file 2
1 bool
4 int
8 float
-99
0 bool b 1 0 1 +1 "2001.04.05;10.00:00.000"
0 int i 8 0 1 +1 "2001.04.05;10.00:00.000"
0 float f 11,1 5 1 +1 "2001.04.05;10.00:00.000"
0 bool b 0 0 1 -1 "2001.04.05;10.00:00.000"
0 int i 11 0 1 -1 "2001.04.05;10.00:00.000"
0 float f 22,2 5 1 -1 "2001.04.05;10.00:00.000"
-2
Example for a line containing status bit and time stamp
subindex | name | type | value | sec | msec | status bit | time stamp |
---|---|---|---|---|---|---|---|
0 | test | i | 1 | 5 | 0 | G1 | "2000.4.16;15.30:0.000" |
Sends to the address "test", subindex 0 of type integer, the value 1 with the status bits "General query" and "User bit 1", and the source time 16.4.2000, 15:30 , and then waits 5,0 seconds.
Example of a simulation file with alert list
The following simulation file triggers an alert on the element with address "TestAlert" twice (CAME and WENT event) and acknowledges it.
4 TestAlert
-99
-66 TestAlert 1 5 0 C _alert i 1 1 "this is a test" 60 0
# CAME event, alert ID = 1
-66 TestAlert 2 10 0 W 1
# WENT event for alert with ID = 1
-66 TestAlert 3 5 0 C _alert i 3
-66 TestAlert 4 10 0 W 3
-66 TestAlert 1 10 0 A
-66 TestAlert 3 10 0 A
# Alerts with ID 1 resp. 3 are acknowledged
-2