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.

Event based table triggered to write at next 5 minute interval

AMK Dec 4, 2017 11:08 AM

Hello Forum,

We have a table on a CR1000 that is used to store values manually entered by a tech via ten key. They will manually measure a temperature, snow depth, use a 0,1 to indicate a sensor cleaning, etc. Currently these values are written to a table every 5 minutes. Most of the time, these values are a NaN. 

Is there a way to filter a datatable to delete rows where certain fields are all NaN or is there a way to set up an event based table so that it writes only at a defined interval?



JDavis Dec 4, 2017 11:24 AM

It could be accomplished with the DataEvent instruction, or the TrigVar parameter of the DataTable instruction.

The TrigVar parameter is the simplest. The DataEvent instruction has more flexibility.

DataTable (Test,PTemp <> NAN,100)
   DataInterval (0,15,Sec,10)
   Minimum (1,Batt_volt,FP2,False,False)
   Sample (1,PTemp,FP2)

When you have some kind of conditional table, it is recommended to not leave the size on autoallocate. Giving it more space than it needs takes space away from other tables.

AMK Dec 4, 2017 11:40 AM


This is almost exactly what I'm looking for.

Is there a way to set up the TrigVar to check for <>NAN on multiple variables - (there's not much on that frunction in the Help docs)? There will always be a value for SiteID, LoggerID, and ProgID.

Sample (1,SiteID,FP2)
Sample (1,LoggerID,FP2)
Sample (1,ProgID,Long)

JDavis Dec 4, 2017 12:19 PM

You can combine multiple logical expressions with operators like OR.

It could be easier to manage by making a boolean variable that turns the table on or off. Then you can set that variable with a logical statement within your scan.

AMK Jan 4, 2018 10:49 AM


The program guidance above works very well. One issue the field crew is having is after they initialize the table by setting a TrigVar, the values are sometimes written to the final storage table (thus public values return to nan) before they finish and they have to go back and enter all the manual values again. Is there a way to stop this from happening?

Thanks again,


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