01-31-2012 10:00 AM
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
01-31-2012 10:40 AM
Attach a sample of your code and ask a specific question about the code and you will have better luck getting an answer.
01-31-2012 10:42 AM
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.
01-31-2012 10:44 AM - last edited on 06-22-2012 02:43 PM by JordanG
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
01-31-2012 10:51 AM - edited 01-31-2012 10:52 AM
Ok what I have is 3 inputs not varables. The 3 inputs are RPM speeds.
01-31-2012 10:52 AM - edited 01-31-2012 10:54 AM
How are you reading these inputs into Labview?
01-31-2012 10:55 AM
I have a cRIO-9075 with a 9421 card for picking up the rpm
01-31-2012 10:57 AM
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.
01-31-2012 11:56 AM
I got the comparison function to work now I just need the switch to be on for 5 seconds the turn back off
01-31-2012 12:41 PM
Hello, you can use the elapsed time express vi in the timing pallette.