Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change negative numbers from an array to zeros and leave the positive number as is?

Hi there,
 
I am using LabView 7.1
 
I am trying to clear/sort out my reading from a HP power supply.
1. I am taking a set 29 current readings.
2. Once the reading is complete, is see that there are negative mA readings too. Example: -2mA
3. Here is how it is drawn at the moment.
- From the icon of the power supply, (read current), I wired it to a multiply icon. Reading is multipled by 1000 which gives me readings in mA such a 2mA,100mA and 700mA.
- This then gets displayed in an table. But I see negative readings to.
 
How can I change the negative reading such as
-2
5
-3
100
 
to these kind
0
5
0
100
 
Which means I am changing all the negative readings to 0 and leave the rest as is.
 
Thanking you guy in advance.
 
 
 
0 Kudos
Message 1 of 3
(3,259 Views)

It's simple. A comparison function and a Select function in a for loop.

Message Edited by Dennis Knutson on 11-03-2006 01:52 PM

Message 2 of 3
(3,250 Views)
Dennis,
 
Thanks. It worked out great.
 
 
0 Kudos
Message 3 of 3
(3,237 Views)