Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: creating data writing epochs
Reply to topic
Author Message
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Nov 14, 2013 9:59 PM    Post subject: creating data writing epochs

Jarek,

Can I use a property setter, advanced properties, signal properties rate, to control how many samples per second the excel file writer writes?

I have a design that will have 80 or more data streams going into the excel writer and I would like the data to be written every second.

I think I could use the rate limiter element for each data stream,but a direct method of setting the excel writer epoch would be really helpful.

If it is not possible now is there a possibility of upgrading the excel writer to have user selected epochs?

Thanks

George

jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Nov 15, 2013 1:02 AM    Post subject:

I added a new option in ExcelFileWriter which will allow that.
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Nov 15, 2013 3:00 AM    Post subject:

Jarek,

Thanks

George
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Nov 15, 2013 10:41 PM    Post subject:

Jarek,

I tried it out this morning and got some confusing results.

I placed the new excel writer into a design and set the epoch[s] to 1. I had it connected to the amplitude, rms, of a bandpass filter. I ran the design for 10 seconds. Instead of the expected 10 data points there was a long string of zeros the about 2500 entries for amplitude values.

I suspect the leading zeros are a result of the excel writer gathering data at start for a short time before data is generated. It looks like I am getting the amplitude data points at the sample rate rather than the epoch I set

I may well be missing something simple here but would appreciate suggestions.


George
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Nov 15, 2013 11:29 PM    Post subject:

I think I misunderstood your request. This new option rounds the amount of written data to the selected epoch (it doesn't postprocess the data or removes data). For example if it is set to 1 second, so it will save 1 second or 2 seconds etc, but not 1.5 seconds. So if the rate is 256 it will save 256 samples, 512 samples and so on.

If you wish it to save 10 entries from 10 seconds (sampled at 256sps) then you need to downsample it before the ExcelFileWriter. The TimeTransform can do this.

I can discuss it further if you send a snippet.

GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Nov 15, 2013 11:41 PM    Post subject:

Jarek,

I was not as clear as I could have been. What I do want is a excel file that has one data sample per second.

I will try your suggestion.

Another related question. Is it possible to get the data from the report generator to export as text?

George
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Nov 15, 2013 11:55 PM    Post subject:

The report generator has 2 displays: graphical chart and table.

Neither of them does any data postprocessing internally (it is done in the design - for example see SessionReport). So I am not sure what could be exported from there.

It should be relatively simple to add ExcelFileWriter and output the same values (as in the Table) to a text file.
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Nov 16, 2013 12:29 AM    Post subject:

Jarek,

Great idea I will give that a try as well.

As for the other part of this discussion,


I tried out the down sampling idea and it worked well. The only issue is that I would be back to using that for each of the 80 inputs to the excel writer.

I had another idea. I set up a synchronizer element. The first input is a down sampled amplitude stream set to one per second. The other inputs are just the unaltered amplitude streams. The synchronizer is set for lowest input rate. The data that resulted was exactly as I had hoped.
jarek



Joined: Oct 22, 2007
Posts: 1073

PostPosted: Nov 16, 2013 12:37 AM    Post subject:

The idea with Synchronized will work. Although the first stream may be downsampled differently (according to the function you selected in TimeTransform) than all other streams (the data is simply dropped in those).
GMartin



Joined: Feb 5, 2010
Posts: 308

PostPosted: Nov 16, 2013 12:44 AM    Post subject:

I can add a dummy down sampled stream of data as the last input to the file writer. It would make no difference how it was down sampled and the other data should all be treated the same.

I have the time transform set to
1 Second
0 synchronizing value
down sample
processing average

The synchronizer is set to output by lowest rate

George
Reply to topic