Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Multi conditional state before CallTable instruction


Otemohu Oct 20, 2025 12:02 PM

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,


JDavis Oct 20, 2025 05:18 PM

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.

Log in or register to post/reply in the forum.