From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino Interfacing to Labview with Condition Statements.

Hi! I'm new to Labview programming, I wanted to create a traffic light simulation using cardboards and stuff, but with a bit of twist. I want to be able to determine which lanes has more volume of cars and then reduce the delay of the time so that it can minimize traffic. I've asked other people for help in my school but they said to use image processing(cascading techniques?) which atm I don't really understand to make it work in a program YET, and it's just a simulation so probably I won't be needing that kind of technique. I'm thinking using some kind of optocouplers/phototransistors could do the trick. And I can tell by it's name that I have to buy a webcam of some sort for that which I can't afford to right now. Anyway, here's the sample of my program. It was one of the activities we had in school but I added something else so that it would serve as a traffic light. Which brings me to my next question, How do I download the program to a microcontroller? I've googled something and it says by interfacing(?). Done a tad of research and I've have downloaded the necessary applications such as LIFA, LINX, VIPM and VISA, and was able to borrow an Arduino Uno too. not sure if I missed something. 

0 Kudos
Message 1 of 3
(2,735 Views)

I was the one who asked about making a traffic light and then interfacing it in an arduino

I managed to make it work but I have a bit of a problem, I can't switch a case structure without leaving an LED lit/writing a digital output. Any ideas how to avoid it from happening?

Attached below are my VI's. The interfaced version and the non interfaced version.


PS: For anyone's asking I made a new thread because no one gave me a hand on the previous one.

Download All
0 Kudos
Message 2 of 3
(2,709 Views)

First, it was only a day ago.  Don't create a new thread.   Just post a little more information to the same thread and that will bump it to the top again.

 

I'm going to merge this thread into that one.  That way no one will waste their time trying to answer that one since you've elected to start with a new one.

 

I don't understand your explanation for what you are trying to do.  What does the switch do?  But I think the problem is with your architecture.  A while loop inside of a case structure inside of a while loop is a little convoluted.  There are many examples of people trying traffic light programs on the forum.  Search for them and study them.  An architecture that would work for a traffic light is a state machine.  Search the forums for that and the New... under the File menu for a template.

0 Kudos
Message 3 of 3
(2,677 Views)