From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

if statement

I want to condition my data using signal express.  if x<0 then x=0.  I would like to make the limit (0) a user specified value.  Can I do the in SE, or is there a labview VI that I can use?

 

 

0 Kudos
Message 1 of 5
(5,342 Views)

I do not know anything about SE but in LabVIEW that can be done with the In Range and Coerce function. Set the lower limit to zero and the upper limit to +inf.

 

Lynn

0 Kudos
Message 2 of 5
(5,333 Views)

or create a boolean array b=x>0,  convert to 0,1 and multiply your data  x*b ...

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 3 of 5
(5,197 Views)

Thanks for the input.  As far as I know I can't do any sogical functions such as (>,<, etc) in signal express.  Your comments did however give me an idea that worked.  I used the analog-to-digital function, then the digital-to-analog function and arithmatic to accomplish the same thing.  It is a pretty convoluted method, but is equivalent to what you suggested.  It is awkward.

 

Thanks for your help.     Bob

 

0 Kudos
Message 4 of 5
(5,187 Views)
You really should have posted your question to the se board. It has nothing to do with the NI signal conditioning hardware. There might not be a way to do what you want but at least it will be read by the right people.
0 Kudos
Message 5 of 5
(5,175 Views)