12-16-2009 05:49 AM
And as I already told you, you do not need the for loop. The other indicator you have seems silly.
12-16-2009 06:59 AM
Hi Dennis,
I think the for loop is needed as a histogram of the amplitudes is counted here. Your example just scales the amplitude values instead...
Btw. It's kind of silly to use a histogram array capable to hold 100 bins and only use the first 60 bins...
12-16-2009 07:03 AM - edited 12-16-2009 07:08 AM
12-16-2009 07:09 AM
12-16-2009 09:18 AM
At denis...
The VI is for simulating a multichannel analyzer (MCA) in labview. It finds out peaks in a waveform which is being received continuously by interfacing Tektroniks oscilloscope and Signal express. After a peak is found out it is arranged in channels as per it's height. channel count is incremented by 1 when a pulse of the height, designated to it is dected. suppose we have 100 channels and maximum possible height of a pulse is 4 volts. Then we will make our program such that 4 volt pulse will sit in 100th channel, 2 volt will sit in 50th channel and so on. At last we drwa channel vs counts graph. Code inside the for loop does so(arranges pulses in channel).
I have done this project successfully with offline data (you can see the vi attached). when I am trying to do it online (continuously acquring and processing data) problem is coming. I have to continously acquire data from tektronics oscilloscope in signal express and process it. Tektronics sends data in a block of 2500 samples. Peak detector pallet is able to find 7 peaks in this much data points. When next set of 2500 data points come , peak detector instead of accumulating the peaks its overwriting the older values.
Can you help and suggest me how to go about the same project, if I want to make it work online.
12-16-2009 10:15 AM
12-16-2009 11:24 AM
Hi number,
have you read any of our messages?
Have you ever considered to follow our suggestions?
Why should we invest (our precious spare) time to give advice that isn't followed?
Again: Stop using locals this way and first integrate our proposed solution. Then try debugging with highlighting execution. Then spot the problems and ask for specific help. IN THAT ORDER!
12-16-2009 01:57 PM - edited 12-16-2009 01:59 PM
OK, if you want to retain the contents of the shift register between calls of this subVI, you need to use a globally initialized feedback node instead. Also such integer histograms are most easily done using the "in place element" structure.
As others have said, your code is full of race conditions because there is no way to tell in which order the three disconnected code fragments execute.
12-16-2009 10:21 PM
@ GenerdW
Please dont get angry. I am a beginner in Labview. All I am doing is to learn from you experienced people. I had already implemented your suggestions on a different VI (The VI I attached just before is for offline data processing) thats why I marked the thread as SOLVED. your suggestions worked out well if I use a create signal step in signal express. But when I am using Tektroniks oscilloscope its not updating the MCA array (same problem). You can see the VI which I implemented your suggestions on, in attachment.
Thanx a lot for your valuable tips and suggestions sir. I hope these things come with experience only. I will try implementing them and will let you know of the outcome.
12-16-2009 10:27 PM
sorry again..
I should have termed that VI as "VI for GerdW" not VI for "Dennis"