LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Landing gear indicator program not working

Hello, I'm a student and I'm new to LabView. I've been given a task of making a VI simulating a cockpit indicator of landing gear state. When gear is down, all LEDs should light up, and when it's up, all LEDs should be off. Now when gear is in the process of releasing and retracting, all LEDs should flash with the same frequency (I set 20Hz for testing), while the front gear should be flashing for 2,5s and main gear for 3,5s. Now, I'm sure there's something wrong in my VI, because it doesn't work, but I've analysed it a couple of times and everything should work in theory. Could someone please tell me what I'm doing wrong?

 

Also, I can't create a topic on the forum from my PC, it gives me a page error, so I'm writing this on mobile, and on mobile I can't attach a file, so I'll give a Google Drive link to my VI

https://drive.google.com/file/d/18U9QQWZlXp1tbFYJpMIicwHr4Hb0JGsz/view?usp=drivesdk

 

 

0 Kudos
Message 1 of 4
(2,103 Views)

I would recommend you go back and go look at the online LabVIEW tutorials tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

You've complete missed the concept of data flow.  You have 3 while loops in your code that will trap the execution of your code because they never end.  They have a False value wired to the stop condition.  Thus the code never gets to outputting any value to the LED indicators.

 

Run your code with Highilight Execution turned on and learn.

0 Kudos
Message 2 of 4
(2,094 Views)

Ravens is right. All you probably need is a single outer while loop that runs at 20Hz and a simple state machine (look it up!) with a single case structure for the various states of the landing gear (retracted, lowered, retracting, lowering, etc.). See how far you get... 😄

0 Kudos
Message 3 of 4
(2,064 Views)

Just in case you don't know what it means to Highlight Execution, this picture shows where you can turn it On (illustrated) or Off.  When you run with it turned On, you'll be able to "see" the data flowing through the wires.

Highlight Execution Tool (On)Highlight Execution Tool (On)

Bob Schor

0 Kudos
Message 4 of 4
(2,062 Views)