LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make 4 LED run in circle

Solved!
Go to solution

Hello Guys,

 

I have a situation which uses a Timer (called every 5 sec).  When a timer is called, there are 4 LED's which are in action. I have to make them blick in a circluar for the next 5 sec and then the control passes to another set of LED's which performs the same operation.

 

My question is, how can make the one set of 4 LED's blink and close in a circluar fashion (i.e 1 ON , 2 ON-1 OFF, 3 ON-2 OFF, 4 ON-3 OFF, 1 ON-4 OFF and so on). in such a way that they are visible to the user.

 

Thanks and regards

Raunak

0 Kudos
Message 1 of 3
(3,444 Views)
Solution
Accepted by erraunakgupta

This sounds like a good application for LED control arrays; you can find an example distributed with CVI, called ledctrlarray, or some application examples here or here

 

Your existing timer would trigger, i.e., start a second 'LED timer' running at 5 / 4 = 1.25 s (or faster), so that every 1.25 s one LED is turned on and the preceding LED is turned off. You also will need a counter so that after one (or several) full circles the second timer and thus the blinking is turned off again

Message 2 of 3
(3,435 Views)

Hello Wolfgang,

 

Thank you for your help. I hope u could help me in another situation which I am really finding problems.

 

I am using Labwindows along with NI-DAQmx. I am creating a GUI with which I have to connect the hardware NI-6528. My question is can I create digital channel with 48 lines and using two different devices (Dev0, Dev1) as shown below:

 

DAQmxCreateDIChan(taskHandle,"Dev1/port0/line0:7,Dev1/port1/line0:7,Dev1/port2/line0:7,Dev2/port0/line0:7,Dev2/port1/line0:7","",DAQmx_Val_ChanForAllLines);

 

Thank you in advance!

 

Best Regards

Raunak

 

 

0 Kudos
Message 3 of 3
(3,328 Views)