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.

Trigger Dataintervall Setting


Ponce Dec 13, 2014 11:31 AM

Hi,

I have a programming task that is making me nuts.

I am using a CR1000 together with a RTMC interface. The last works quite well, displaying values and allowing to set flags,...

Problem is the data recording: I am controlling a fan with an SDM module by setting the voltage and thus wind speed in front of the fan. Once a certain wind speed is reached the data collection shall be initiated. That works well too, but does not satisfy me!

Whenever new data is recorded the average of these data is recorded for example like this:

12:10:00
12:11:00
...

Even if my measurement started at 12:10:23, thus missing in the first averaged value some 23 seconds at the beginning. The measurement shall actually look like this, considering that the averaging period started at 12:10:23 and lasts for one minute:

12:10:23
12:11:23
...

My question is: Is there ANY possibility to trigger the start of an averaging period so the averaging period starts really once the desired wind speed is reached?

Thanks in advance!

Ponce

P.S.: Right now in the DataTable() part I am using this type of code:

DataTable(CalibData,WriteData,1000)
DataInterval(0,Averageinterval,sec,1)
DataTime(1)
6 = Timestamp only every Hour

Average(1,v1,IEEE4,False)
...
EndTable

WriteData is just a flag that is used to trigger the start of data recording once the desired wind speed is reached

Averageinterval is set to 60 seconds.

I introduced DataTime(1) as well, hoping that this would change the behavior in the desired way, but it just uses datalogger time...

* Last updated by: Ponce on 12/13/2014 @ 4:32 AM *


Ponce Jan 30, 2015 08:54 PM

Any ideas how to make the averaging happen based on a trigger flag?


Dana Feb 3, 2015 07:25 PM

Hmmm...Take a look at DataEvent and see if that will let you do what you want with some post-processing of the resulting table.

To get a one minute average, I think you would have to store the records on a 1 second interval, pull the values out of that table and average them, and then store into another table.

There may be a much easier solution that I'm just not thinking about at the moment.

Dana

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