LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED sequence problem

Hello!

We are engineer students from Mittuniversitetet in Östersund and we have a problem. It concerns a system with binary input, e g lightbeams that are switched on and off if you cross them. We are trying to build the logic using LED:s in LabView, so that we can see what happens in our program. This is one part of a bigger system.

We have 2 LED:s that can be switched on and off in 0,5 sek. We want a signal to be activated when LED1 is switched on. When that signal is activated you cant activate LED2 for 2 seconds (the timing needs to be adjustable). And the signal will only be deactivated when LED2 is activated within 2 seconds (timing needs to be adjustable) before LED1. The signal can only be activated when LED1 is activated before LED2. This signal detection needs to be looped, so that it can be repeated until we want to stop the sequence. How should we proceed?

We hope you guys can understand what we mean. We know that we might make it more complicted than it really is. 🙂

0 Kudos
Message 1 of 5
(1,054 Views)

Hi Erwa,

 

We want a signal to be activated when LED1 is switched on.

When that signal is activated you cant activate LED2 for 2 seconds.

And the signal will only be deactivated when LED2 is activated within 2 seconds before LED1.

The signal can only be activated when LED1 is activated before LED2.

Maybe it would help to draw a sketch with your LEDs and signal over time?

 

When will the signal be activated and deactivated?

- To deactivate you need to switch on "LED2 within 2s before LED1"?

- To activate the signal "LED1 needs to be activated before LED2"

There seems to be some contradiction IMHO…

 

Once you are clear with all those conditions you can draw an algorithm handling these conditions. (On a sheet of paper!)

Then you should start to code in LabVIEW! (I expect you to take the beginner tutorials, offered in the header of the LabVIEW board, first…)

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 2 of 5
(1,046 Views)

Thank you for the prompt reply!

 

We have been drawing different flow charts with pen an paper, and we believe that we have a god Idea of what we want to accomplish (even if we can’t explain it too well :)). We have also studied some of the tutorials, but we’re still stuck on this, probably very basic, problem. And time is running out, we only have 1,5 weeks to accomplish this. That’s why we are reaching out to you wonderful people! Right now we are struggeling with adding time delays for a sensor that is switched on/off really quickly (0,5 sec), but needs to be active for two seconds before it is switched off.

 

If you have any more concrete advice for us, or maybe links to specific tutorials or topics in this discussion forum, we would be more than grateful.

0 Kudos
Message 3 of 5
(1,019 Views)

Hi Erwa,

 

Right now we are struggeling with adding time delays for a sensor that is switched on/off really

quickly (0,5 sec), but needs to be active for two seconds before it is switched off.

I recommend two functions here: Point-By-Point-BooleanCrossing and this ElapsedTime-ExpressVI. You can use them to create (intermediate) signals for these timeouts/delays…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 5
(1,015 Views)

Hi Erwa,

 

a simple example to learn ElapsedTime usage:

check.png

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 5 of 5
(1,004 Views)