LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1074126846

I'm trying to filter a scope aquisistion and I've patterned my VI after the NI Example niScope EX Digital Filter.

The problem I'm having is getting the VI to filter 2 channels. See the attached VI. If I leave the second niScope Add Waveform Processing VI out of the program (or set the channel to 0, like the other one), then I get one filtered waveform (ch 0) and one unfiltered waevform (cha 1).

If I try to get both channels filtered, I get:

"Error -1074126846 occurred at Error occurred at:  niScope Actual Meas Wfm Size.vi:7

Possible reason(s):
Driver Status:  (Hex 0xBFFA2002)
Unable to perform desired measurement operation.

The filter cutoff values are illegal. Highpass & lowpass require fSample/2 > fCutoff > 0. Bandpass & bandstop require fSample/2 > fCenter+width/2 & fCenter-width/2 > 0."

I'm thinking it has something to do with theproperty node, but I can leave the active channel constant at "0,1" and not get the error, just an unfiltered waveform by omitting the second Processing VI)

Any help would be appreciated.



~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 1 of 12
(4,744 Views)
This configuration doesn't work either. See attached.

Reading the help file on the Add Waveform Processing VI, it seems as if this is a separate filter to the property node method.
~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 12
(4,734 Views)
OK, this one really sums up the problem. I've removed the property node filtering (it wasn't doing much I liked anyway) and kept just the VI based processing.

This reduced VI works if I set the second Procesing VI channel to 0 (a duplicate essentially of the first one). But if I set it to Ch 1, I get the error:

"Error -1074126846 occurred at Error occurred at:  niScope Actual Meas Wfm Size.vi:10

Possible reason(s):
Driver Status:  (Hex 0xBFFA2002)
Unable to perform desired measurement operation.

The filter cutoff values are illegal. Highpass & lowpass require fSample/2 > fCutoff > 0. Bandpass & bandstop require fSample/2 > fCenter+width/2 & fCenter-width/2 > 0."


~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 12
(4,733 Views)
Hello Paul,

I have taken a look at the last piece of code you posted, and I was able to run it without any errors with NI-Scope 3.2 (found here).  I have seen the same error you reported in previous driver versions when I tried to filter more than 1 channel. 

Previously I had to use other LabIVEW filter VIs to filter.  However, I was able to filter both channels using the newest driver.  Could you please download the newest driver version and see if it works for you?

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 4 of 12
(4,705 Views)
Thanks Jesse,

I"m downloading it now. The driver is dated 8/14, about the same time I received the scope cards :). Must have just missed it.

I'm really new to filtering VI's and I have to admit the phone help I received was not much assistance. Like I say, I'm a newbie to filtering, so that doens't help. I understand now that the Add Wave Form Processing VI is a hardware filter. Can it be used stand alone as we have just done? Its kind of confusing when they couple it to the property node in the example. I can't get that one to work at all. I can set the frequesncies to zero and still get the same old unfiltered wave forms. See attached. I get no error with this VI, I also get no filtering.

While I've been poking around for a 2 channel solution, I was able to impliment a software filter (Bessel). What are the pros and cons of hardware versus software filtering?

Also, the software filter has way to eliminate the zero offset in the data record, which I require if I'm going to compate the signals for phase alignment. Does the hardware filter have this option? I found the offset questin in an FAQ here: http://www.ni.com/support/labview/toolkits/analysis/analy4.htm, but I think it applies only to the software filter.




~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 12
(4,701 Views)
Hello Paul,

I'm not sure who you spoke with when you called, however I hope I am able to answer your questions. 

When you use the add waveform processing VI, you are still performing digital/software filtering.  The hardware does have a couple filters noise and anti aliasing filters, however they have discrete cutoffs.  You can find the cutoff frequencies in the specification document for your board.  The code you have mentioned/posted is using a digital filter.

There is a great example that demonstrates how to use the property node with the add waveform processing VI to create a digital filter.  Please see the example called niScope\niScope EX Digital Filtering.vi located under your Start >> Programs >> National Instruments >> NI-Scope >> Examples >> LabVIEW.  I have tested this VI out, and I do not receive any errors.  If you received errors before, can you try it again after installing the latest version of NI Scope?  I can run the example simply by opening up the VI, selecting my scope in the resource name control and pressing the run button.

Finally, I can you explain a little more about your last point.  I have taken a look at the link you provided but I do not find any reference to offset filtering.

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 6 of 12
(4,679 Views)
Hello Jesse,

Yes I can run the example you mentioned and in fact, I patterned my VI's from this one. However, that VI only filtered one channel. I am now able to filter 2 channels since intallatrion of niScope 3.2.

I've been on the phone some more and a my support enggineer did find out that it is indeed a digital filter. So, now we are all on the same page. The reference in the FAQ link I posted is :

I get a delay at the beginning of my signal after filtering. How do I get rid of that?

This usually arises when the filter order is high. The solution is to set the init/cont input of the filter to TRUE. Setting init/cont to TRUE means that you want to use continuous filtering, which only makes sense if you feed multiple portions of a continuous signal to subsequent filtering operations (simulating real-time filtering).
I noted this delay and didn't like it. It causes problems in my downstream algorythms.  I'm not sure if the add waveform processing VI affords the same functionality. Nor am I sure that revising the setting as advised will take care of the problem for all instances (data frequency, sample rate, etc.)

Perhaps this filter glitch is a normal anomaly based on the fact that history is needed to make the algorthyms correctly filter a given point. No history = unpredictable first few data points. So, it seems if I'm going to use filtering, and I may have to delete some number of the initial points in the filtered array. I think as long as I do that to the same degree in the simulataneously aquired waveforms, the new arays should still be synchronized. I'm not sure about that though. (???)



So what is the basic lesson here?
  1. Do I have to use the property node in conjunction with the add waveform processing VI?
  2. Is it OK to use the add waveform processing VI by itself?
  3. Why can't I get any waveform filtering using only the property nodes without the add waveform processing VI?
  4. What's the advantage of property node + add waveform processing VI over the standard Bessel Filter VI? The samples all use the property node and add processing waveform VI, are these better / newer / faster?
  5. What method would you recommend to ensure aligment of two simultaneously aquired waveforms post filter?
I know these are a lot of questions. Is there a resource I can use to search for the answers? Thanks so much for your time.


Paul Johnson
Process Engineering Manager
Renco Encoders



~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 12
(4,675 Views)

Hello Paul,

When performing filtering you will always have a couple samples at the beginning of your data that are not valid.  For example with FIR filters, the higher the number of Taps (or filter order) the more initial points you have that are invalid.  There is no way to fix this, it is just part of the math involved in filtering.

Now, by selecting continuous mode, you have simulated a continuous stream of data and you do not have these incorrect samples every time you run the VI.

To answer your last questions, you need to use both the property node and add waveform processing VI to get the scope driver to filter your data.  If you just use the add waveform processing VI (with no property node), you will filter but you use the default values of the filter.  If you just use a property node (no add waveform processing VI), you do not add filtering to list of processing events and no filtering takes place.

Finally, if the data going into a filter is synchronized the data coming out will be synchronized as long as you filter both channels with the same digital filter properties.

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 8 of 12
(4,653 Views)
Thanks Jesse,

What about question #4. Why use the Property Node + Add Waveform Processing VI versus the standalone Bessel Filter. Is it just a matter of functionality and being able to selectably control the filter type?
~~~~~~~~~~~~~~~~~~~~
Paul Johnson
Renco Encoders, Inc
Goleta, CA
~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 12
(4,651 Views)

Hello Paul,

I'm not sure I exactly understand you question.  If you look at the digital filter example I mentioned before you have the option of selecting an FIR filter, Chebyshev IIR, Bessel IIR etc.  Each of these filters will have properties.  If you look at the code, you configure the property node then you filter.  The property node is configured then you specify what filter type you want.

Each of these filter types have their advantages and disadvantages.  For example a FIR filter will have a linear phase response; however you would require a large filter order for the roll off typically found with an IIR filter.

I hope this answers your questions.  If not can you please explain a little more about what you are looking for?

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 10 of 12
(4,644 Views)