LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fast and slow flashing LEDs

Greetings to all, I am trying to make an LED that makes up a circuit with a 6009 USB card with digital signal connected to a P00 port and GND flash n times fast and continuously n times less fast, so that the same pattern (n times fast and continuously n times less fast) is fulfilled indefinitely. I am trying to create two loops to determine if they follow the sequence but I am having trouble. thanks for the help.

 

 

Image.png

0 Kudos
Message 1 of 7
(1,062 Views)

Well the most obvious thing to point out would be that despite putting one on the left and one on the right, both of your FOR loops will try to run at the same time.  You need to have a wire connecting them together so that one runs first and then the other one runs after it.  It doesn't even have to be a wire that does anything, it just needs to be an output wire from the loop that us supposed to run first to the outer frame of the one that runs second.  I would suggest wiring the output of the Boolean shift register from one of them to the input of the other (replacing the constant).

 

As for anything else to suggest, you need to provide more details on the "having trouble".  Define what trouble you are having much more exactly.

0 Kudos
Message 2 of 7
(1,044 Views)

First, thank you for attaching your code with a version of LabVIEW a few years back from the "latest version" (which means that with LabVIEW 2019, I was able to open your VI).

 

It was not clear to me whether you wanted two LEDs (both Front Panel LEDs and "real-world" LEDs connected to a DAQ device) running simultaneously or sequentially.  If they are to run simultaneously, do you want one loop to finish first while the other is still flashing?  How are your "real" LEDs wired?  Are they both wired to the same Hardware Port?  What do you expect to happen if one loop says "True" and the other says "False" (if they both have the same output)?

 

Bob Schor

0 Kudos
Message 3 of 7
(1,025 Views)

Thanks for your observations dear friend, I comment that the circuit in the DAQ card has the sequence, port P00- led-resistance-port GND, and the card is connected to the computer, it is very simple, The only thing I expect is that this led blinks a certain short time at a considerable speed (Example: one blink every second for 5 seconds) and after that it blinks another time interval at a lower speed (Example: one blink every 2 seconds for 10 seconds) and that this pattern of two sequential blinks is repeated, that's all!. Thanks for any suggestions

0 Kudos
Message 4 of 7
(1,019 Views)

Hi gustavo,

 


gustavoepn87@gmail.com wrote:

The only thing I expect is that this led blinks a certain short time at a considerable speed (Example: one blink every second for 5 seconds) and after that it blinks another time interval at a lower speed


When you want something to happen "one after the other" then you should use DATAFLOW to order the code execution as required!

 

That "Obey DATAFLOW!" is the basic principle of LabVIEW and is explained in the tutorials (offered at the top of the LabVIEW board) and in the first chapters of the LabVIEW help…

 

Btw. instead of duplicating your code you should call the same code (aka function aka subVI) twice with different parameters…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 7
(1,003 Views)

The phrase "continuously n times" doesn't mean anything.  You can have something flash 'continuously', or you can have it flash 'n times'; but you can't have both.

0 Kudos
Message 6 of 7
(975 Views)

 

Try this and change the timing1 and Timing2 based on your requirement.

PalanivelThiruvenkadam_0-1698243247524.png

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 7
(954 Views)