LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real time low pass filtering

Solved!
Go to solution

Okay,  Now you have shown something that shows the waveform/Array wiring error.  One problem was that you described you couldn't connect it to a Queue.  But you don't have a queue.  You have what is a new LabVIEW feature called a Channel.  It does a lot of what a Queue does, but is a completely different thing.  I know one person on the forums loves them.  I've never used them, so I have no idea how to set it up.  If I were you, you can try deleting those channel nodes and re-insert them.  Perhaps that will get it working with waveforms.  If this was my project for me, I'd ditch the channel and put an actual queue.

 

Having it only run for 8 minutes is strange.  It is a long time.  But looking at your code, it isn't obvious to me why it wouldn't run forever.  Do you get an error message on your error wire?  Particularly for any wires coming out of DAQmx?  If so, tell us what the message is.

 

I see a problem in your VI called Real-Time signal filtering. I"m going to just attach a picture with notes.

 

Also, Index Array is expandable!  Rather than dropping down 5 of them and wiring up constants to each 0, 1, 2, ....   Drop down one.  Drag the bottom down until you have as many outputs you need.  You don't need to wire up any constants because it default to 0, 1, 2, 3, 4  automatically.

Real-time%20signal%20filtering_2-3_BD

Message 31 of 33
(723 Views)

Respected Mr. RavensFan,

I think this problem will take time to solve. I got the error message. I have attached the picture.  I already faced error 200273 and discussed with Mr. GerdW. By the way, One of my questions is not answered yet. Maybe you missed. Would you please explain why the data varies between DAQassist and DAQmx? 

Download All
0 Kudos
Message 32 of 33
(716 Views)

Error -200273  is

 

Sample clock rate and the sample clock divisor values are inconsistent with one another.

Consider settting either the sample clock rate or the sample clock divisor, but not both. This allows the driver to automatically select an appropriate value for the other property.

Alternatively, make sure the sample clock rate and sample clock divisor satisfy the following constraint:

rate = timebase / divisor

 

You'll have to look at your specs for your DAQ device.  I don't recall if you mentioned which model of DAQ device you are using.  It sounds like you are trying to set a particular sample rate, but the device only allows specific sample rates that are an integer factor of the master clock.  So if you had a 200 kHz clock, but it only allows ratios of let's say 1, 2, 4.  You would not be able to set a sample rate of 150 KHz, because it is a factor of 1.333 to the master clock.  You could do 50, 100, 200.  Read the devices's specs.  Check where the error occurs.  Change your sample rate to something else.

 

But your picture shows error -200279.  That is a buffer overrun meaning you aren't reading the DAQ buffer as fast as samples are being put in.  Actually, that error number makes for sense of something that runs okay for a while then fails.  I don't know which version of your various VI's is giving you that.  I'd assume the version where you do the acquisition and math in the same loop.  That loop is acquiring 100 samples from a 100 Hz rate.  So you need to be able to read that DAQ buffer every second.  Put some timing functions on your loop and see how long each iteration takes.  If the filtering and processing takes long than a second you'll eventually overflow the buffer because you are taking out only 1 second's worth of data in a loop that is generating more than a second's worth every iteration.

 

Your Data variation.jpg.  What is the variation your are talking about?  Waveform shape?  Are you highlighting the values of the Y axis?    I can't comment on that because I don't see what VI is using the DAQ Assistant.  If I had to guess, one is using a DAQmx scale, and the other isn't.

0 Kudos
Message 33 of 33
(706 Views)