LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

accurate current analog input signal

Hello, can anyone help me to build a signal conditioning function. Function of current vi is gather current analog input signal and covert to PSI from first channel. I want create an subvi called filter to accurate in range of signal.

For example: gather sample in every 100ms, cut of highest and lowest data. Get average of sample data. Function quite like Filter express in wave conditioning palette. Please find vi file and picture for more detail.

 

task is created by simulate NI USB 9201, task.png

 

Thank you.

Download All
0 Kudos
Message 1 of 9
(2,728 Views)

please find attached vi file, I got error 20023 meesage when use filter function.

1.png

0 Kudos
Message 2 of 9
(2,702 Views)

Hi jiannan,

 

the error message is pretty clear…

 

What kind of filter result do you expect when you acquire just one sample per DAQmxRead?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 9
(2,691 Views)

thanks, but error message is still here even acquistion mode is continuous samples.

0 Kudos
Message 4 of 9
(2,686 Views)

Hi jiannan,

 

well: you use that ExpressVI - it's your fault…

 

Acquisition mode (continuous) is irrelevant here. It's the number of samples you need to know! You have to select a different DAQmxRead mode: "n chan n samples" - and you need to read more than just one sample per Read!

 

Additionally you need to convert your data to waveform (or read waveforms from DAQmx) to have that Filter-ExpressVI know the sample rate of your data. Then you still have to fulfill the condition mentioned in that error message…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(2,683 Views)

Hi GerdW

 

Thank you for your explain, just follow your steps, but error is still there, any hint?1.png

0 Kudos
Message 6 of 9
(2,673 Views)

Hi jiannan,

 

- from your picture we cannot see your sample rate settings

- setting a dt of 1 (second!) in the waveform is surely wrong…

- why don't you even want to change the dt of your waveforms?

- why don't you request a certain number of samples from DAQmxRead?

 

And:

Why don't you clean up your block diagram? Doing so before posting is kind of respect for the forum participants…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 9
(2,668 Views)

I am sorry for mess block diagram. will clean up next time when post,

 

The code is working fine without filter.but I want get more accurated result. so just like get solution soon.

 

i am not asking you to do my work.  it would be better just to tell me how i could finish it.

 

Regards

 

 

0 Kudos
Message 8 of 9
(2,665 Views)
As mentioned, get rid of that silly Build Waveform function. The waveform data from the DAQmx Read contains the actual dt. You are just making it up by the use of the function.
0 Kudos
Message 9 of 9
(2,656 Views)