02-16-2011 12:41 PM
hello everyone, i have this report generation toolkit... and i want to output DAQmx Analog I/P data on to an excel sheet. the DAQmx is programmed to collect
data at 3samples/sec. however, when i see the excel file that Report Generation Toolkit generates, the time stamp is updated every second instead of every 0.33sec.
can anyone please help me? i am using the MS Office Report Express VI.
02-17-2011 10:21 AM
can anyone please help me out on this?
02-17-2011 10:34 AM
CrackJack,
When you look at the excel file, do you see consecutive timestamps with the same exact value? As if they were rounded off?
02-17-2011 10:41 AM
Wayne, please see the attached file for the output.. i am outputting a DBL from the DAQmx Read.vi
i can post the block diagram, only thing its very messy.. but i will do that.
however, more info about the block diagram... what i am doing is indexing the DBL data into an array inside a while loop. after the while loop terminates, this entire indexed DBL array is
passed into the MS office Report Generation.vi
is it because I am producing DBL format data from the DAQmx Read.Vi that i do not have any time information on the excel file?
I am sorry if i sound too messy
02-17-2011 11:34 AM
Post your code.
02-17-2011 11:34 AM
Try using a waveform instance of the DAQmx Read.VI instead of the DBL. The double does not have a timestamp associated with it. The waveform data type contains the dT and the timestamp associated with each sample. So what you were probably seeing with the Excel file is the index of the array followed by the DBL information associated with that array.
02-18-2011 08:34 AM
@All, I got rid of the express VI, decided to work on the custom low level VIs instead. however, i have a new problem now...
I have a case statement wherein, the user selects if he wants to start generating a report. once the program enters tat loop, the program speed reduces!
can anyone please tell me why is it happening? i ahve attached the vi... also another question.. in this VI, i am capturing the unwanted data into the graph as I am indexin the graph input. how can i make a logic
that the graph captures the data only when I am switching the CREATE REPORT button (which is in the while loop). is there a way that I can append the data to the graph without creating a new graph every iteration? please let me know
thanks
02-18-2011 09:20 AM
Try using a producer consumer loop with an event handler. There is a template VI in LabVIEW for a producer consumer loop, have the boolean in the producer loop in the event and then your other code in your consumer loop. The producer creates a queue that will send to the consumer and the consumer will only run when you need it to, instead of every iteration. Hope that helps.
02-18-2011 09:46 AM
ok, vl try that out.. any idea why the WHILE loop slows down when i enter into CASE statement?
02-18-2011 09:58 AM
A case structure can be very processor intensive and you seem to have a lot going on in that case so that would do it. The while loop has to wait for the case to finish to keep going.