Applies to:
PcVue all versions. |
||
|
||
Summary:
This article describes some limitations of the ‘IF’ instruction |
||
|
||
Details:
In SCADA Basic you cannot combine a test of an register variable and bit variable using “||” or “&&”. Example This example uses these variables: A test of the variables as follows: IF ((@PRODUCTA.VALVE.CMD == 1) && (@PRODUCTA.TANK.SETPOINT > 12)) THEN causes an error message to appear in the programming results window: 18/11/05,16:03:24 Program (init) Branch () Line 15 Type mismatch (null) On the other hand, this test using two register variables: IF((@PRODUCTB.TANK.SETPOINT == 54) && (@PRODUCTA.TANK.SETPOINT > 12)) THEN produces a normal result, depending on the values of the variables, as follows: condition OK |
||
|
||
|
Created on: 05 Nov 2010 Last update: 13 May 2024