03-04-2008 10:02 AM
Hello ,
I'm using a 9211A with DAQmx for
temperature measurements... I only use one K type thermocouple. My
question is... How do I set up the 9211A so it only reads and
writes data from each time interval of fifteen minutes to a spreadsheet? I have a DAQmx set to
Analog Wfm 1 Chan NSamp and set some parameters within the Polymorphic vi
selector by selecting/checking the following:
* Analog
* Single Channel
* Multiple Samples
*Waveform
When it writes to the "Write to spreadsheet file.vi"
it only records one reading (The last measurement when the VI stops)...... How
can I write data every fifteen minutes? In other words, after a time interval
of fifteen minutes I want the data from each interval to be recorded on the
spreadsheet. Do you have any Ideas? I've attached the Subvi and collected data to be look at. Thank you so very much in advance for your
time and consideration regarding this matter.
Best regards,
Ludwig.
03-05-2008 06:56 AM
Hello Spiegel,
I think you missed to attach your subVI so if I wel understand what you want to do, I think this little example below will help you to solve your problem. All the data aquired are registered due to the indexation enabled at the output tunnel of the while loop. The subVI makes only the aquisition of one sample.
Regards,
03-05-2008 10:39 AM
03-05-2008 10:58 AM
03-05-2008 11:20 AM
In your subVI, you've stripped all time information from the signal when you convert to a dbl. Keep the waveform data type if you want to record the timestamps. Instead of writing when the main VI finishes, you could simply put an Export Waveforms to Spreadsheet File or Write to Measurement File inside the main loop. If you want to save every 15 minutes, use an elapsed time function and wire the 'time has elapsed' output to a case statement. Put your file write inside the case statement. Use a shift register and a build array and pass this to your write function. After the write is complete, clear the array.
p.s. Your subVI is pretty inefficient because you are starting and stopping the task with each iteration. Start the task before the main while loop begins (outside the while loop) and stop the task when the main loop finishes (again, outside the loop).
03-06-2008 05:08 AM
03-06-2008 08:36 AM
03-06-2008 08:48 AM
03-06-2008 09:43 AM