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. 🙂
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…)
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.
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…
a simple example to learn ElapsedTime usage: