DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Data-Save Timing

I am writing a routine to (a) reduce the amount of data saving to disk, (b) allow the data to be displayed [RUN] without saving until a [RECORD] button is pressed, and (c) save 15 seconds of this data to disk at a pre-set interval . (d) Each 15-sec block of data will be saved to a new file.

 

In addition, when the data is only being displayed, pressing [RECORD] should start saving data immediately. The data save interval is triggered by a pulse to a combi-trigger. I have attached what I have so far.

 Data is reduced through Combi Trig01 and Data Freq

  • Record pushbutton activates Action01 to control the Save Enable relay
  • Pre-set save interval is set with Combi Trig00 and Action00 to control the Interval
  • Channel 2 of Action00 increments the data file.

The issues I’m having are this:

  • When I run the routine, the first chunk of data does not save immediately; the first pulse is ignored and it and waits for the 2nd interval to save data.
  • The time the data saves is set by a 15-sec Post-Trigger in Combi Trig00, but the actual save time in the data file is 15.8-sec.
  • The data files increment, but by large numbers (_0300.csv, _0441.csv, _0582.csv).

 

Any help would be much appreciated.

Jim

 

Download All
0 Kudos
Message 1 of 12
(6,089 Views)

I am out of the office this week, but I'll try to look at it tomorrow. 

I didn't bring a work computer Smiley Sad

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 2 of 12
(6,081 Views)

Thanks cj. Whenever you have the chance.

Happy Thanksgiving!

0 Kudos
Message 3 of 12
(6,065 Views)

I have changed my worksheet and it is now doing nearly everything I need it to do. Can you help me fix a few details:

 

  • The data filenames still increment by large numbers (20161201_HP_000001.CSV, 20161201_HP_000901.CSV, etc.). Can I force it to increment by 1?
  • Can the List Boxes for Meas. Frequency and Save Interval be locked after "Start Test" so as not to be changed during a test?
  • Is this the most efficient way to achieve this result?

Thanks,

Jim

Download All
0 Kudos
Message 4 of 12
(6,022 Views)

Hi Spieler,

 

Since the DASYLab forum is mostly supported by volunteers with DASYLab knowledge, you may not receive a quick answer on here, so I wanted to also make sure you knew of your other support option, which is to contact Measurement Computing (MCC) technical support directly through their support page here: http://www.mccdaq.com/support.aspx

 

I hope that you are able to find success with your application!

 

Alex W.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 12
(5,994 Views)

I think that you're using the wrong Action event in Action00.... TTL High and TTL Low are evaluated every sample, and will do an action every sample. 

Try Rising Edge and Falling Edge.

 

Also, in the File module, look at the Multifile settings, and activate the "Chain" setting - just for some security.

 

I'm going to test it with the Multifile number of blocks setting at 0. 

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 6 of 12
(5,991 Views)

Try the attached. 

 

Action00 changed to use Rising and Falling Edge, which fixed the problem, and the Write module "chain" setting was activated, with the number of blocks changed to 0. 

Files are now the same size, every two minutes. 

 

Is this the most efficient? Probably not, but it is an effective solution that allows you to change the frequency and interval successfully. I'll continue to think on it, but this works well and cleanly. 

 

Folder contents after running

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 7 of 12
(5,985 Views)

Thanks CJ, that works very well. I tried it with the "chain" setting and different block sizes, with poor results. I did not think to set block size to zero.

0 Kudos
Message 8 of 12
(5,982 Views)

Thanks Alex. I will try there as well.

Jim

0 Kudos
Message 9 of 12
(5,981 Views)

It will just bounce to me. I am paid (not a volunteer) to monitor this site. In addition to everything else, of course. 

cj.butler@ni.com

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 10 of 12
(5,975 Views)