LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sample read sample acquired

hello
i have been obtaining different signals using E series PCI 6036.
as usual, using daqmx to acquire n read the signal. this is real time measurement so that different signals will be continuously acquired.
the sampling mode is finite sample. different signal may have different length of sample. i tried to use 1000hz and sample to acquire 1000. it is working for the signal which has 2 peaks,which can be seen in the waveform indicator graph. however, if the signals which has 4 peaks (the sample size is roughly 2x the sample size of signal having 2 peaks), it will be shown in graph which has 2 continuous signals with 2 peaks.it is wrong representation of signals. as i need to differentiate which signals have 2 peaks or 4 peaks. do hope u can understand what i am trying to say.

i know it is related to sample to read in buffer. i have use the input buffer attribute vi. but it doesnt work either


thanks

regards

0 Kudos
Message 1 of 8
(3,210 Views)
Hi Heang,

Can you attach the VI?  It would probably be easier to see what is going on that way.

It sounds as if it is taking the same number of samples each time, which if you have it configured like most examples are configured, is expected behavior.

Are these 2 and 4 peak signals coming in on the same line?  If so, you will need to know what you are receiving before you pull the sample so you can programatically change the sample size.  This is especially true if the 2-peak signal looks like half of the 4-peak signal (how would LV know which is which).

When the graph shows you 2 signals, are they on the graph at the same time or one right after another?  Maybe a screen shot of the graph is in order too.

Best of luck,
~milq


0 Kudos
Message 2 of 8
(3,202 Views)
sorry for the late reply
here i attach the vi

it is the simpler version of vi
using the digital line , when the analog signals comes, the digital line is triggered. first digital line is triggered for the presence and 2nd digital line is momentarily triggered once no analog signals are no longer being detected.
the elapsed time is used to choose how many samples to acquired, selected by the selector. perhaps i reckon it has other method to do it.

as what i have posted, i use the same sample number to read n acquired. so it has the problem to differentiate which signals has 4 peaks or 2 peaks

i hope u can understand what i m trying to say.

regards..

0 Kudos
Message 3 of 8
(3,183 Views)
Hello Heang,

You are correct when you change the number of samples from 1500 to 3000 this will double the number of peaks you will see since you are sampling with the same rate.
When you run your program do you not see different graphs when you are using 1500 samples vs 3000 samples?

You want to take a look at the following items:
1) check to see if the x scale on the chart changes. Have you selected x autoscale?
2) monitor that the number of samples and corresponding maximum x scale
3) what is the frequency of the signal you are measuring? Make sure your sampling rate is 10 times greater that signal and the you have adequate number of samples to capture your signal, without aliasing.


Regards,
  Sandra T.

Applications Engineer | National Instruments
0 Kudos
Message 4 of 8
(3,154 Views)
hello
thanks for the reply
yeah i think i have set the sample number in the way as in the attached vi
the chart is set to autoscale, and the sample number is same as what is selected from selector.

however you are saying to put my sampling frequency 10 times greater than frequency of signal. what problem arise is that when i put higher frequency, the DAQ responds faster and acquire signal faster. it makes the signal with 2 peak to be seen as 2 consecutive single peak, while signal with 4 peak become 4 consecutive single peak(one follow another)

software other than LabVIEW do not require user to input sample number. when it is required in LabVIEW, and this problem occurs.

thanks for the reply.

regards

0 Kudos
Message 5 of 8
(3,148 Views)

If you have run other DAQ software that doesn't allow you to select the number of samples, then that other software is brain dead.

I really don't think you understand the relationship between sample rate and number of samples. If you were to set the sample rate at 1000. That means that every msec, you take a voltage sample of the signal. If you specify 1000 samples, then you have 1 second's worth of data at that sample rate. If you specify 2000 samples, then you have 2 seconds worth of data. If you specify a rate of 10000, then a sample is acquired every .1 msec. If you then specify 10000 samples, you would again have 1 second's worth of data and the signal is acquired over the same time period and should look the one at 1000 sample/sec and 1000 samples. The only difference is that the 10000 sample/sec signal will have more resolution in the time domain. You will detect more transients, a signal will look more like it actually is, etc.

0 Kudos
Message 6 of 8
(3,145 Views)
hello

thanks
i knew the sampling theory. setting higher frequency, the signal will look more like it actually is. the problem arises as the signal which suppose have 2 peak will be shown as 2 signal of single peak(one follows another) if it is set higher frequency. no doubt, as can be seen from the graph, it actually looks more like what it actually is. as shown in graph, if i use peak detector vi, i can detect only one peak, which i suppose to get 2 peaks in reality.or perhaps is any other method to append these signal with single peak to become 1 signal with 2 peaks ?

thanks
regards

0 Kudos
Message 7 of 8
(3,137 Views)
I can't opne your VI right now. Do you have it saved with an actual waveform in the graph? If not, run the VI, select Operate>Make Current Values Default, save it, and repost the VI. Without actual data to look at, it's hard to yunderstand what your issue is.
0 Kudos
Message 8 of 8
(3,132 Views)