LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make an array using custom controller

Dear
 
I posted how to realize the multi-states LED controller.
By helping some example code, I wrote the controller using color property node (attachment).
 
My final destination is to make an array using my custom LED controller.
Each element should represent some three states.
Therefore, I have to read and write the color control of each LED in the array.
 
Is it possible to make an array using my custom controller or other method???
 

Attachment : LV Ver 8.0

메시지가 04-13-2007 02:54 AM에 labmaster에 의해 편집되었음

0 Kudos
Message 1 of 3
(2,628 Views)
The reson why I need to use LED indicator is to initialize the array.
Other thing(numeric, string, etc.) is not intuitive in my measurement.
 
0 Kudos
Message 2 of 3
(2,619 Views)
Do you have to use an array as you did? Not really. There's other ways you can do it. You could, for example, use a text ring to store your colors, and just use it to keep track of your current color. Attached is a simple VI I whipped up as an alternative. You can use it as a starting point, but keep in mind you will probably have to tweak it a bit as I did not completely check out its operation.

A few pointers regarding your code:
  • You have to use an event case to respond to the "Stop" button if you use an event structure. Wired the way you have it the VI won't stop until you press the "Stop" button and press the LED. The latter is to cause the event structure to fire. An alternative is to use a timeout on the case, but standard programming practice is to create an event case to handle the "Stop" button.
  • You do not need to use the "RGB to Color" function. There's a color constant in the "Graphics & Sound -> Picture Functions" subpalette that you can plop down on the block diagram and directly select the color you want.
0 Kudos
Message 3 of 3
(2,601 Views)