LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn on a switch for a set amount of time then turn off

I have three variables that need to be equale, when they are not I need to power on a switch for 5 seconds the turn it back off.

 

Any help will be very much appreciated as I'm new to programing and LabView.

 

Thanks Jarrod

0 Kudos
Message 1 of 10
(4,232 Views)

Attach a sample of your code and ask a specific question about the code and you will have better luck getting an answer.

0 Kudos
Message 2 of 10
(4,222 Views)

Homework?

 

LabVIEW doesn't have "variables" like text languages.  I assume you mean 3 controls.  What data type are they?  Boolean, text, string, etc.  You'll need a block to compare if the controls are equal, a block to turn on the switch, a block to wait 5s, and a block to turn off the switch.  There are basic functions for all these tasks.

 

We all started at the beginning, best way to learn is by doing, and playing around to see how things work.


--Using LV8.2, 8.6, 2009, 2012--
0 Kudos
Message 3 of 10
(4,215 Views)

Hi Jarrod,

 

This operation can be written very easily in LabVIEW.   

 

Lets get some basic details: What variables are you measuring and how? how are you going to control the switch? 

 

I suggest that as you are new to LabVIEW that you read some tutorials (http://www.ni.com/gettingstarted/labviewbasics/ ) and have a look at the examples which come with LabVIEW.

 

Then have a go at programming a solution to this problem and we can have a look and give you some pointers.

 

As a starting point I suggest you look at the comparison functions and case structures.

 

-CC 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 4 of 10
(4,211 Views)

Ok what I have is 3 inputs not varables. The 3 inputs are RPM speeds.

0 Kudos
Message 5 of 10
(4,206 Views)

How are you reading these inputs into Labview?

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 6 of 10
(4,203 Views)

I have a cRIO-9075 with a 9421 card for picking up the rpm

0 Kudos
Message 7 of 10
(4,197 Views)

Ok so all you need to do is compare these inputs to see if they are equal (comparison functions needed here) and then wire the true/false answer to a case structure to turn on your switch when the inputs are not equal.

 

 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 8 of 10
(4,194 Views)

I got the comparison function to work now I just need the switch to be on for 5 seconds the turn back off

 

0 Kudos
Message 9 of 10
(4,183 Views)

Hello, you can use the elapsed time express vi in the timing pallette.

 

Example_VI.png

=====================
LabVIEW 2012


0 Kudos
Message 10 of 10
(4,173 Views)