LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to separate samples I/0 signal?

Hi people, 

I got a signal which is high in ~10ms and low in ~1ms. I'm only interessed in the samples that are in the high state. 

InputSignal.PNG

I tried with the Waveform Get Subset DBL but without any luck. Is there another way or did i just misunderstood the values start sample and duration?

MainVI.png

 

Thanks in advance

0 Kudos
Message 1 of 9
(3,587 Views)

Hi anja,

 

try something like this:

check.png

Using conditional tunnels in more recent LabVIEW versions will simplify this snippet image even more!

Best regards,
GerdW


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

Hi GerdW

Thanks for the fast reply. 

It looks like it would work. I supposed that you look at the values and apply greater than 2. But I have one issue that my signal can vary all the way down to 0.5 V at the high state. (it depends on which surface i place my sensor on). 

So i guess I needed it to be calculate on the time the signal is high? 

0 Kudos
Message 3 of 9
(3,563 Views)

Hi anja,

 

you could change the comparison to compare with "minimum of the measured signal plus a small offset"…

Best regards,
GerdW


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

Yeaah.. but in some case my signal can look like this and I'm not certain of with offset i should use beacuse the varied signal. The one thing im certain about is the time when it high and low, so i would look it to depend on that? Any good ideas? 🙂 InputSignalLowValues.PNG

0 Kudos
Message 5 of 9
(3,537 Views)

Hi anja,

 

your LOW signal seems to stay below 0.05. I still would prefer a simple comparison!

 

Why make things more complicated than they are?

Best regards,
GerdW


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

Yeah, but a third scenarie, agian I can place my sensor different places which gives different input. 
InputSignalMidValues.PNG

Here is my low signal ~1,75. So as you can see the low periode can vary alot. But yes I would like to use a simple comparison, but I dont think it would work en generally if do not depend it on the time? 

0 Kudos
Message 7 of 9
(3,501 Views)

Hi anja,

 

some messages before I wrote "minimum of signal + offset"!

 

So you could get the minimum of the signal (~1.75), add 0.1 as offset to get a comparison level of ~1.85.

To reduce the noise I would adapt a running average over some samples…

Best regards,
GerdW


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

Hi GerdW

Okay, Im getting to see what you mean. Could you show me hoe to implement the small offset to the minimum? 

I would surely do it as simple as I can, but do you have any ideas how to control it by the time? 

//Anja

0 Kudos
Message 9 of 9
(3,482 Views)