02-04-2008 07:38 PM
I gave up on the new 3.4 release and went back to one of the earlier releases NiScope 2.9 that was on the download site. That may have solved the problem, but caused a different one. The current problem is related to setting a filter into the waveform process. An error is returned when I query for the waveform record size. I probably need to set some parameter before calling this function. The default parameters probably changed.
I reviewed the examples in the load and did not find one on waveform filters. Is there any information available? Is there any specific sequence needed to set a filter? I want to set a bessel bandpass filter where the parameters of the filter are controlled by the user of the software. Optionally, I also allow the user to use a lowpass filter. The current code that worked with an old version of niscope 2.6 worked. The currentl sequence is the following:
1. Call autosetup to discover what signals are present. The vertical range is used from this call. The channels are also enabled based on this call. The application is for radio astronomy. Thus the signal present is broadband noise. In another message, I found an answer to making the revised autosetup work with noise as a signal.
2. Set the horizontal parameters based on user input. First the sample rate and minimum number of samples is established. A call is made to discover the size of the waveform prior to filtering. Memory is allocated to this waveform.
3. One waveform is read from the NI5102 PCI board.
4. The call that is failing is made to find the size of the waveform with the option of the bessell filter. This is used to allocate additional memory for the filter output waveform.
5. The next step (iuntested in release 2.9) is to establish the filter center frequency and bandwidth. The system then goes into the control panel gauges mode where the waveforms are repeatedly generated and level information (% Vp-p/range before and after the filter) is displayed for the user to adjust levels with the hardware feeding the DAQ. The user can also change filter settings, etc. When the user is ready to collect data, the system switches to a collection mode where the data is recorded.
I dont know if step 5 of the process is working with Release 2.9, however it worked with release 3.4 but was extremely slow. The time to obtain a filtered waveform went from 1-2 seconds with release 1.6 to about 20+ seconds with release 3.4.
It might be useful to know some more about the application. The user can select various modes of collection that change the sample rate (up to 20Ms/s), sample size (variable from 8192 to hundreds of thousand samples depending on the available memory) and the changes in filters discussed above. Since FFTs are used on the output data, the sample size is always a power of 2. Thus code is included to check the actual size to be greater than a power of two that the user desires. Normal reaktimee sampling is always done (No RIS). The benchmark collection times quoted above were made with a sample rate of 1 Ms/S, 524288 samples, two channels and a bessell filter with a center frequency at the 1/2 the Nyquist frequeny considering the sample rate and a bandwidth that extends as close to zero as possible. Thus the top end of the filter is almost at the Nyquist highest frequency without distortion.
If you need more specifics of the code, let me know and I will generate a copy from the other computer tomorrow.
Any suggestions?
02-05-2008 09:48 AM
02-06-2008 08:20 PM