Table Component Value Intervals


Recommended Posts

Here's some background.

 

I'm new to DAQFactory and have been doing some testing with it to see if we could utilize the software.  Right now, I am logging and trending data every second, which is what I want.  However, I also want to create a table that displays channel and time values every minute.  I tried several different things, but maybe I missed something, so I've started from scratch and came here for guidance.  Now I am back to just using my three input channels and gettime(value) for one of the channels.

 

Are there simple expressions I can use to return the channel values every minute without having to change my initial poll rate?  I also still want to be able to scroll back through the table in case a time and value were missed.

Link to comment
Share on other sites

There are a number of ways to do this.  You could, for example, use one of the boxcar functions to boxcar your values into one minute blocks.  But if you just want a snapshot every minute, just create a couple Test channels (timing = 0), and write a simple sequence.  So, if your data is coming in once a second on a channel called "Raw1" and "Raw2", and you wanted to capture it into channels "Min1" and "Min2" which are both Test Channels with timing = 0, then the sequence would simply be:

 

while(1)

   delay(60)

   min1.addValue(raw1[0])

   min2.addValue(raw2[0])

endwhile

 

Then just let that sequence run in the background.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.