Every RunCmd instruction changes the variable IOResult. IOResult does not have to be declared, it is a (string) variable that is part of every Script and contains the result of the last RunCmd instruction.
In the example above a
Get_ADC_1 command is sent to a C-Control I/O interface. The result of the command is stored in the variable IOResult. The value of IOResult is (in this case) the measured value of analog digital converter (ADC) 1 of the C-Control interface. Because the type of IOResult is string, but the value is needed (for comparison) as integer, the line
i = Val(IOResult) converts the string to a numeric. If the measured value is bigger than 25, an air condition is switched on.