LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview code

Solved!
Go to solution

 am new to lab view. Can someone help me with how to create a small program that lights an LED. The led must be on 10-20seconds and switches off for 60seconds and repeat the process continuously

Message 1 of 17
(3,379 Views)

You might want to look into the online tutorials.

LabVIEW 101


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 17
(3,375 Views)

Thank you so much for the reply and advise. I went through the whole exercise and it was very helpful. My developed program is as attached and I am using Labview 8.6. My problem is to control the time the LEd remains in the switched on position. I can control the on and off switching of the LED. Can I add another loop for this

0 Kudos
Message 3 of 17
(3,323 Views)

The LED is a physical one connected to a DAQ device, right?

I will change your code to a state machine which should fix the problem.

0 Kudos
Message 4 of 17
(3,309 Views)
Solution
Accepted by topic author tgpasi

The code will at least give you an idea of the state machine.  You can play with it and observe the LED on the front panel turn on & off.

You can set the duty cycle (On time / off time).  Just substitute the LED with your DAQ.

0 Kudos
Message 5 of 17
(3,302 Views)

Thank you so much for the new code. That is exactly what I was looking for. The only proplem I am having now is to link the code with my DAQ. When I wire the DAQ assistant to replace the LED out side the loop, several error messages are appearing. See attachment.

0 Kudos
Message 6 of 17
(3,255 Views)

Change your DAQ assistant to so that it is for a line output rather than a port.  A port encompasses multiple lines, and as such, requires a numeric determine the combination of lines to turn on and off.

0 Kudos
Message 7 of 17
(3,238 Views)

Thank you a million times for the response and comments. I am still new labview and you might wondering how I am still asking for your advise . I am stil not sure how to change the DAQ assistant to line output. What I have done is on the DAQ assistant, I have clicked it and changed that from port to line out put and then it initialised the VI. However, there is til some a problem with the wiring which shows and error.

0 Kudos
Message 8 of 17
(3,230 Views)

It looks like one you pick it has port type of output in the early stages of configuring the express VI, it will stay that way.

 

So delete the DAQ assistant and start with a new one picking the line option for the digital output.

 

See the attached file.

0 Kudos
Message 9 of 17
(3,210 Views)

@tgpasi wrote:

I am still new labview and you might wondering how I am still asking for your advise .


 

Don't worry.  After many years programming in LabVIEW, I still ask for advice.

Message 10 of 17
(3,198 Views)