Hi CSI crew,
I'm wondering what is the best way to call table after many conditional test?
I'm currently collect every second, the concentration of multiple gas from analysers and all the data come in a unique Datatable with 30min average. So the datalogger would use 1800 data to calcultate the average.
Sometimes, the analysers give a bad data in one of the 10 output gases and I want to discard it from the the halfhourly average.
I tested with disable var but I got a NaN when the condition is true (bad data).
I tried multiple conditionnal statments like : If Gas 1>100ppm AND Gaz1<300ppm OR Gas 2>400 ppb AND Gas2<600ppb OR .... but It does not work too (only NAN values).
I'm trying now multiple If statment like :
If Gas 1>100ppm AND Gaz1<300ppm Then
If Gas 2>400 ppb AND Gas2<600ppb Then
CallTable Datatable
EndIf
EndIf
It works but it discard the entire line from average calculation since each If statment are nested in the precedent one.
An idea to handle this correctly ?
Best,
I suggest making a variable to use in the DisableVar parameter. Use logic to set that variable true or false. True means to not include the value in the average.
Have CallTable outside of any If statement, and after the disable variable is set. If the disable variable is true the entire 30 minutes, average will be NAN.