10-24-2023 05:13 PM
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.
10-24-2023 05:58 PM
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.
10-24-2023 08:18 PM
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
10-24-2023 08:36 PM
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
10-25-2023 01:21 AM
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…
10-25-2023 05:29 AM
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.
10-25-2023 09:15 AM
Try this and change the timing1 and Timing2 based on your requirement.