LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"IF" statements in LabVIEW?

I am using LabVIEW 6.1 and am trying to impliment a form of if statements to control an actuator in the following way:
 
If(x <= 0)  output 5V
If(x >= 1)  output 0V
and if x lies between 0 and 1 it simply keeps the old output.
 
Any ideas on how to do this? 
 
[I only need help with the logic here, the rest I got]
Message 1 of 10
(12,420 Views)

Put more simply:

If (x < 0), output a 1

If (x > 1), output a 0

If neither, output same value as last time

0 Kudos
Message 2 of 10
(12,416 Views)
Use "In Range and Coerce" to determine it the value is between 0 and 1.  If it is, pass the old value through the case statement.  If it isn't, you can compare the value to see if it is less than 0.  Wire this to a "Select" and if it is true, pass a 1, otherwise, pass 0.  I've attached the example in Labview 7.0.

Message Edited by tuned99 on 07-25-2005 11:28 AM

0 Kudos
Message 3 of 10
(12,411 Views)

A case statement with a little proceeding logic. The attached is in version 7.0

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 10
(12,405 Views)
is there something I can download to view labview v7 files with v6?  It won't let me open them.
0 Kudos
Message 5 of 10
(12,388 Views)

I didn't install the ability to save to v6.  Attached is my implemention in picture format.

0 Kudos
Message 6 of 10
(12,383 Views)

Here is a picture of the two implementations in my vi. In the case statement version the unseen cases have the appropriate constant values (0 or 5).

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 7 of 10
(12,365 Views)
how are you guy
 
i will need help on labviwe if you can do it will be so thanks  for ur help 
 
for IF
 
 
 
Riyadh
0 Kudos
Message 8 of 10
(9,704 Views)

@RINO2014 wrote:
how are you guy

Continued here

0 Kudos
Message 9 of 10
(9,676 Views)

Delete message

0 Kudos
Message 10 of 10
(9,668 Views)