From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

append signal

hello
i was using USB6008. i am also using PCI 6036E to compare with the performance from USB6008.
i think it is not the matter of number of sample.
i think of one solution(Whether it is working or not).But i dont know how to implement it. i may need
ur assistance in guiding me.

the silly idea i think is that if i put sampling rate 5000 Hz and number of sample 2500.
then the actual signal with 2 peak will be seen as 2 continuous signals with one peak. therefore, actual signal with 4 peak  will be seen as 4 continuos signals with one peak.

poor enough, i have tried to use append signal to combine this 4 continuos signals(single peak) as one signal which  has 4 peak. but it doesnt work.
 here attached with simple diagrams

from the diagram, if i set the sample number as half of the sampling frequency, the signal A will appear in graph indicator before signal B.
my idea is to append these signal A and B to become the original signal(which has 4 peaks).is it possible to be done.i have tried to build array, to create shift register.but it didnt work for me.

thanks for the assistance.
regards

Download All
0 Kudos
Message 1 of 13
(3,167 Views)

Why not replace your graph indicator with a chart indicator??

Only thing would be you may have to specify a large enough 'chart history length' to hold more than 5000 samples

Message Edited by devchander on 03-01-2007 06:15 AM

0 Kudos
Message 2 of 13
(3,156 Views)
Hello heang,
I admit, I didn't get it in the whole. But what I think is, at a sampling rate of 5k and # of samples 2.5k you will aquire values at 0.5 seconds. So the timing period between the peaks must be 0.5s that you can split the signals in the way you think of.
But why don't you aquire the signal continuously, then find the peaks with the Waveform Peak Detection.vi and after this you can strip the waveform parts. Then it can be peaks with every timing period.
Greets, Dave
Greets, Dave
0 Kudos
Message 3 of 13
(3,155 Views)
Hi Heang,

It sounds like you want to sample the signal continuously, if your acquistion is a finite one please let me know, because that will change the behavior.  If you want to see the chart just constantly updating with each iteration I would suggest using a chart like devchander recommended.  Make sure the history lenght is adequate for displaying as much of the signal as you need.  You should be able to append the signal, but that would be far more work and would not give you as good of a result, so I would recommend making sure you have a waveform chart of appropriate sample length and see if that gives you the result you need.  Please let me know if you have further issues with this so I can stay on top of it with you.

Have a great weekend,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 4 of 13
(3,136 Views)
hello
thanks

what i have mistaken done is about the signal acquisition.I have come through the some study of 'buffering'. i found that my problem is  more to the acquisition sample number, sampling rate, and buffer size.
as what i did previously, i use DAQ assistant for finite sample acquisition.i have 2 channel for analog voltage. setting the number of sample to be 1000, and sampling rate 1000.( Am i correct to think that the buffer size is automatically set to 2000?), i will have the 'graph' showing that the signal has 2 peak, as it has enough time to read from the buffer.(the signal is having 2 peaks which the distance between the peak is close enough). it has no problem.
however, again if the sample number is 1000, and sampling rate is 1000. the signal with 4 peaks(the 2nd peak and 3 rd peak is far enough), will be read from the graph showing that it is 2 signal with 2 peak.(i reckon it is the problem of setting the sample to read.Am i correct?), which means that the data is not having enough time to read from buffer.

If i set sample number to 3000, sampling rate is 1000, i can notice that the signal(signal with 2 peak) will be merged with the next signal which has 2 peaks, making up of total 4 peaks in the graph. then it will be detected as 4 peaks(it is not correct for my requirement of calculation). In contrary,  it is ideal for the single signal which has 4 peaks. Overall, i can find that the ratio of number sample to sampling rate is determining how long the data is read from the buffer,and this ratio is making other vi in the same while loop getting slower.Am i correct to assume this?if so, how i counter this problem?

when i open the front panel of daq assistant vi, i think of putting the DAQmx configure input buffer.vi before start task DAQmx Read.vi to determine the buffer size. is it working if the buffer size set to 6000?will my problem be settled?also, what about the timeout in DAQmx read?is it related to the buffer size also?

it seems that i maybe confusing u.
i will explain in simpler way if u need me to do so

thanks
regards
0 Kudos
Message 5 of 13
(3,129 Views)
Hi Heang,

I think you are close to solving your problem.  The main problem I think you are having is deciding how to measure your signals.

In a finite acquisition your samples to read is the buffer size you will read to memory.  (Samples to read set to 1000 and rate set to 1000) will result in 1 second of data being recorded.  Samples to read set to 2000 will give you 2 seconds. 

When you say it is making other vi in the while loop getting slower. Do you mean that a VI in the same while loop is working more slowly?  That would make sense as the DAQ assistant will take longer to acquire 2000 samples than 1000 samples, thus the VI in the same while loop will execute still only be executing once every execution of the DAQ assistant so it will slow down.  The best way to avoid the other VI slowing down would be to run them in parallel loops, with proper execution timing setup.  This way the one loop could execute more quickly than the DAQ assistant loop.  If the VI you want to run faster needs access to the data the DAQ Assistant is acquiring, then we could use a producer consumer loop architecture to give you that ability. 

I would advise you not to open the Front panel of the DAQ assistant if you feel like the DAQ assistant is not giving you the access you need I would advise you to go to example finder.  Help»Find Examples

Then browse form Hardware Input and Output » DAQmx » Voltage Measurements.  You can then get examples that lay out the DAQmx VIs for you.
0 Kudos
Message 6 of 13
(3,108 Views)
hello

thanks for the reply
yeah
i m almost getting the solution. however, as what i said, i have 2 channel for analog signal
so, if the sample to acquire is set to 1500samples, sampling frequency 1000Hz, then the sample to read i set to 1500 too, so it means that the time taken to read from buffer is 2s?as the buffer size automatically set to 3000.am i right?

but when i set to 6000 sample number to acquire, n the sample number to read from buffer also 6000, the sampling rate is also 1000Hz. it can be seen from the graph it has lagging effect(the data to be retrieved seems take longer time than the sample number put 1500 n sample to read is set to 1500 too. i do not know why.

i have to mention here that i use digital signal to trigger my analog signal acquisition. i have 2 channel for digital signal too. when i let the digital signal to be acquire, and putting indicator in front panel. with 2 LED indicator , it shows correct lighting sequence.one lights on before  another.

however, putting the acquisition of analog signal, n using OR gate, to trigger the case structure at which the analog signal acquisition contains within it, only the first LED light on. Then the OR gate does not work for me at all.
Is this problem related to the same loop that i put in the digital n analog acquisition?

regards




0 Kudos
Message 7 of 13
(3,084 Views)

Is this problem related to the same loop that i put in the digital n analog acquisition?
Unless you have done a multi function synchronization, this might turn out to be a problem
 
Do post your vi. we could probably take a look at it and suggest better
0 Kudos
Message 8 of 13
(3,080 Views)
hello
sorry for the late reply

it is the vi attached.
i am wondering that the digital signal acquisition is within the same loop as analog signal acquisition

a question to raise, the sample number is set to 1000, then the sample to read is 1000, sampling rate 1000hz. there will b ok
setting the sample number to 6000, sample to read 6000, the sampling rate 1000Hz, it has delay issue. Why ?As i know it may not require the sample number to read in other signal acquisition software


thanks


0 Kudos
Message 9 of 13
(3,062 Views)
hello
sorry for the late reply

it is the vi attached.
i am wondering that the digital signal acquisition is within the same loop as analog signal acquisition

a question to raise, the sample number is set to 1000, then the sample to read is 1000, sampling rate 1000hz. there will b ok
setting the sample number to 6000, sample to read 6000, the sampling rate 1000Hz, it has delay issue. Why ?As i know it may not require the sample number to read in other signal acquisition software


thanks


0 Kudos
Message 10 of 13
(3,063 Views)