LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

led management

hi,
 
i realize an interface thanks to a group of LED (booleen) . I would like to know if it is possible to control a same LED from many structures
 
TheGame
0 Kudos
Message 1 of 13
(3,183 Views)
You're going to have to be more specific...

There are many ways to update the value of a boolean control/indicator from many different structures using shift registers, local/global variables, property nodes...  it depends on the context in which you're trying to do this.

Message Edited by Novatron on 07-27-2005 11:50 AM

0 Kudos
Message 2 of 13
(3,172 Views)

re- hi,

 

my aim is to have an interface (about 400 LEDs ) where  each LED corresponds to a state, and these LEDs are changing of state everytimes , so i must be able to modify the state of the LED everytime.

I think the best method would be to idetify each LEd by a variable which i can modify like in labwindows.

Can you explain me how can i do to do it ?

 
 
TheGame
0 Kudos
Message 3 of 13
(3,168 Views)
I think you would be best to use a cluster of your 400 (named) LEDs, from which you can access individual elements, change their value, then store them back into the cluster.

What do you mean by everytime?  Do you mean every loop iteration?  Every time the program is run...?

If it's in a loop, wire the cluster to the outside of the loop, and use a shift register to pass the cluster between iterations while keeping it up to date. 
0 Kudos
Message 4 of 13
(3,164 Views)
Despite the fact that most people here will tell you to stay away from local variables, here is a method that uses local variables.  I created an array of 4 LEDs for this example.  400 LEDs is quite a large array, but the principle is the same.  The top half of the code shows how you can write to the array local variable from any sequence.  The bottom half shows how to do it with a queue.  Any structure (like the for loop in the example) can write to the queue.  Another structure reads the queue and updates the LED array.  For practicle purposes, you would not use a for loop, you would probably use a while loop to update every so often.  As with any usage of local variables, beware of race conditions, where a read might take place before a write, leading to an incorrect update.  If just updating the LED in the dequeue loop, race conditions are not that important in that the update will be corrected in the next dequeue.  However, if you are taking action depending on the LED statuses, beware that the LED update happens at the proper time, mainly after the enqueue is done.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 13
(3,151 Views)
By any chance, will you be saving these different LED configuration or states? Also, can you post your program?

Molana
0 Kudos
Message 6 of 13
(3,140 Views)
Tbob,
i can't open your vi    (Led_panel), because of my version of Labview (only 7.0).
Can you try to send me it again in order i can open it .
 
thanks a lot
 TheGame
0 Kudos
Message 7 of 13
(3,123 Views)
Another possibility would be to have the LEDs as a array of boolean. You can refer to any individual element, row or column and it (the array) isn't fixed in size, either actual or visually. It also allows you to do boolean math on the rows/columns. Unfortunately you can't change the individual LED attributes (different color from the rest, etc.)  You can control them from different locations by a number of different methods; queues (which allow send variable data as "messages" from anywhere in your program), locals (from within the same vi), "LV2 style globals" (from anywhere in your program, there have been a number of threads on this topic). To control the method shown in the attached would only require sending the desired state (On/OFF) the coordinates and whether it is individual, row or column.
 
P.M.
 
Saved in version 7.0

Message Edited by LV_Pro on 07-28-2005 08:41 AM

Message Edited by LV_Pro on 07-28-2005 08:42 AM

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Download All
0 Kudos
Message 8 of 13
(3,112 Views)

Sorry about the double attachement, thought that when I editted it for the first time that it had deleted the attachment, and so I added it again.

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 9 of 13
(3,103 Views)

hi,

thanks a lot for your vi , but i have an other problem , because, in my loop i don't want to initialize my array , in order to keep the lastest state for each LED

TheGame
0 Kudos
Message 10 of 13
(3,090 Views)