CONTROL.INI – WEM | SCRIPT ™ CASE STUDIES
Attention! – MINIMUM FIRMWARE REQUIREMENT (2.17+)
During execution there is no complex syntax check. Therefore, we recommend using a code editor, such as VSCode with support for WEM | Script
Only variable conditions can be combined in one line. If you need a combination of several trigger events you have to do this via variables.
To be able to use the !rsvX# command (run show variable X) in the Control.ini you have to update your ProCommander® with the Firmware Version greater or equal 2.17, otherwise the command won’t be executed!
In this example the command !vmc5=2# will be inserted at the end of the first show, !vmc5=3# at the end of the second show, !vmc5=4# at the end of the third show, !vmc5=5# at the end of the fourth show, !vmc5=6# at the end of the fifth show, !vmc5=7# at the end of the sixth show and !vmc5=1# at the end of the seventh show.
The value of the variable is equivalent to the show number!
That means that the command !vmc5=23# will start the show 23, as soon as the variable 5 is triggered by an event (!i, !t, !rc, !v, !d, !k) or a command within a show, with the command !rsv5#!
The content of the Control.ini file looks like this:
Attention!
After each “#“-character a new line should be started again, using the “!” syntax to denote the next command
Before you edit your Control.ini., please update always your WEIGL device first with the latest firmware version. In this way you ensure that your device is able to interpret the latest ASCII commands properly.
!i1c!vcc5=1!rsa1#
!i1c!vcc5=2!rsa2#
!i1c!vcc5=3!rsa3#
!i1c!vcc5=4!rsa4#
!i1c!vcc5=6!rsa6#
!!i1c!vcc5=7!rsa7#
!vcc5=7!vmc5=1#
1st line: If input 1 is closed (!i1c) and the value of variable 5 is equal 1 (!vcc5=1), then the first show (001_SHOW.WM1) will start in the add mode (!rsa1).
2nd line: If input 1 is closed (!i1c) and the value of variable 5 is equal 2 (!vcc5=2), then the second show (002_SHOW.WM1) will start in the add mode (!rsa2).
3rd line: If input 1 is closed (!i1c) and the value of variable 5 is equal 3 (!vcc5=3), then the third show (003_SHOW.WM1) will start in the add mode (!rsa3).
4th line: If input 1 is closed (!i1c) and the value of variable 5 is equal 4 (!vcc5=4), then the fourth show (004_SHOW.WM1) will start in the add mode (!rsa4).
5th line: If input 1 is closed (!i1c) and the value of variable 5 is equal 5 (!vcc5=5), then the fifth show (005_SHOW.WM1) will start in the add mode (!rsa5).
6th line: If input 1 is closed (!i1c) and the value of variable 5 is equal 634 (!vcc5=6), then the show 634 (634_SHOW.WM1) will start in restart mode (!rsa6).
7th line: If input 1 is closed (!i1c) and the value of variable 5 is equal 7 (!vcc5=7), then the seventh show (007_SHOW.WM1) will start in restart mode (!rsa7).
8th line: If the value of variable 5 is equal 7 (!vcc5=7), then the value of variable 5 will attain 1 (!vmc5=1). If the pushbutton is activated again the whole process will start from the beginning.
The content of the Control.ini file looks like this, if you use a Firmware Version greater or equal 2.17:
!!tm00:01!vmc5=1#
!i1c!rsv5#
1st line: After the first second by switching on the device or inserting the card (!tm00:01), the value of variable number 5 will attain 1 (!vmc5=1).
2nd line: If input 1 is closed (!i1c), the show related to the content of variable 5 will start in add mode (!rsv5).
Solution Summary is below as follows.
This process will be started with these two command lines:
In this case study, the first show (001_SHOW.WM1) will be started, after the actuation of the pushbutton, because the variable 5 attains the value one.
The next time the pushbutton is actuated the second show (002_SHOW.WM1) will be started, because of the command !vmc5=2# at the end of the first show.
The next time the pushbutton is actuated the third show (003_SHOW.WM1) will be started, because of the command !vmc5=3# at the end of the second show.
The next time the pushbutton is actuated the fourth show (004_SHOW.WM1) will be started, because of the command !vmc5=4# at the end of the third show.
The next time the pushbutton is actuated the fifth show (005_SHOW.WM1) will be started, because of the command !vmc5=5# at the end of the fourth show.
The next time the pushbutton is actuated the sixth show (006_SHOW.WM1) will be started, because of the command !vmc5=6# at the end of the fifth show.
The next time the pushbutton is actuated the seventh show (007_SHOW.WM1) will be started, because of the command !vmc5=7# at the end of the sixth show.
The next time the pushbutton is actuated the first show (001_SHOW.WM1) will be started, because of the command !vmc5=1# at the end of the seventh show.
Now the whole process starts from the beginning again, if the pushbutton is actuated.
As you can see you can reduce the length of the Control.ini from eight down to two command lines and still get the same result using the RSV command in 2.17 +