From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-02-2012 08:24 PM
Hi there,
I am having difficulty with "export waveform to spreadsheet" function - but it is not clear to me whether the problem originates from the way I am using the export function or if I am incorrectly concatenating two waveforms from different X series modules upstream from the export, or if my queue is wired incorrectly for the producer-consumer loops.
I am using a PXIe-1073 chasses with PXIe-6361 and 4330 modules (voltage and strain). I have tried to modify the "multi-device synch analog input" example for use with a producer-consumer structure (please see attached VI).
The spreadsheet output contains a large chunk of data from the voltage channel, followed by a smaller chunk of strain data (with timestamps), after which the data output alternates between voltage and strain data.
Can anyone suggest where I might be going wrong, or how I might troubleshoot this?
The attachments are not working so I will try to post them in a blank message directly after this post.
Thanks,
Claire.
Solved! Go to Solution.
05-02-2012 08:25 PM
Attachments related to last post.
05-02-2012 08:29 PM
Your export to spreadsheet subVI is missing.
05-02-2012 08:30 PM
The forum would not allow me to attach the spreadsheet file: this is a screenshot of what it looks like, the pattern of small chunks of data continues similarly for the entire file.
05-02-2012 08:32 PM
Sorry, here it is (Attached). I modified it to try and get rid of the extra line it was printing between the data lines (but perhaps caused this problem in the process?)
Thanks for your super quick reply!
05-02-2012 08:50 PM
Put indicators on your waveforms before building them together in a a larger waveform array. Could your waveforms be empty on some iterations?
Why don't you wire up a value for a number of samples to acquire on each of the DAQmx read functions?
05-02-2012 09:15 PM
Hi Ravens Fan,
Yes, you're right, by wiring some indicators, I can see that the data comes through from the two streams intermittently (althought the plots don't look discontinuous). So, something incorrect is happening in the "Read". Could it be a problem with having two DAQmxRead blocks in the one producer loop?
Thanks,
Claire.
05-02-2012 09:24 PM
Oh, and I have wired the NSamples to "-1" now as I want the Read to occur continuously until "stop" is pressed.
Thanks,
Claire.
05-02-2012 09:27 PM - edited 05-02-2012 09:33 PM
That's what I figured.
Wire a number. -1 gives all available samples in the buffer (which could possibly be zero for some reason). A number will wait until that many samples are available. So both reads will wait until they both have the amount of data requested. This way they will also have the same number of samples and be better aligned in the text file.
Your loop will keep running until you press stop or get an error.
05-02-2012 09:58 PM
Thanks! that worked perfectly. I misunderstood what the "number of samples" parameter would do.
Really appreciate your speedy help, and for stepping me through the troubleshooting.
Cheers,
Claire