Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

setting sampling rate

I've been stuck at this problem for some time now. I'm using an oscilloscope to measure voltage and record this measurements to excel. However,the user has to enter a sampling rate to acquire these measurements. So I've used the realign and sample VI found in LB7. Problem is i get an error saying waveforms are not contigous. Does anybody have an idea to this problem? Is there any other way to get the user to specify sampling rate other than the realign and sample VI? It's for my final year thesis.
I appreaciate any kind of help. Thanks.
0 Kudos
Message 1 of 4
Hi gaya,

If I understand your problem correctly, you can't figure out why you are getting the waveforms are not contiguous error. One thing I would suggest is to take a look at this KnowledgeBase which talks about using the Align and Resample Express VI and talks about which acquisition type to use:
Unfortunately I cannot run your VI because I don't have the HP546XXX set of VIs installed. Could you possibly either cut this VI down to not use them by simulating data so that I could test it out?
Another option you might want to try is to have the dt user input earlier on in the VI so that you don't have to use this express VI. I'm not sure if this is possible again since I can't see the exact set of VIs you are using.
The root cause of this might be because of the time delay you have in your loop. The readings aren't contiguous because you are reading ever half second apart. Try removing the delay and see if that gets rid of the error.
I hope some of this helped! Please let me know if none of this did and what you tried and repost the code if possible. Thanks!
0 Kudos
Message 2 of 4
sorry but the way you wired the "Align & resample" does not make any sense to me.
You have a cluster with 3 elements [t0, dt, data].
You wire data to "Signals" and dt to "Signals2" ?!?!?!?!? what do you want to do???
0 Kudos
Message 3 of 4

You're making it way too complicated. You get dt from the Read Waveform function. You can then use the Build Waveform function to create a Waveform datatype that the Write LabVIEW Measurement File can handle. The Align and Resample is not necessary at all.

I put the change in the attached VI. I also cleaned up the upgly wiring.Smiley Wink

0 Kudos
Message 4 of 4