LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with event

i've tried an example from this side. this example shoxs or hide the lines in a chart by changing the line color to transparent. the lines are controled with a button array.
the problem is that i need seperate buttons.
with seperate buttons which are connected with a "build a array" to one array the are without an effect.
0 Kudos
Message 1 of 4
(2,481 Views)
Not entirely sure what example you were looking at.

Attached is simple example using separate buttons to control transparency.

Does this help?

Rupert
0 Kudos
Message 2 of 4
(2,481 Views)
in the attachment file there is an unconnected bool object (array of 10 boolean switches)and 10 boolean switches which are build to an array.

if the boolean object is connected to the for loop the vi works correct.
but is the build array connected the function doesnt work.

i've tried another solution, where i put the objects from my event in the main loop of my vi.but that is not a good solution because the while loop is very slow.
the two solutions work!
what is the problem in the event structure?
0 Kudos
Message 3 of 4
(2,481 Views)
On the second iteration of this loop, the shift register passes -1 to the timeout terminal. The event structure then waits until either another case occurs, or "Array Wertanderungen" occurs (sorry but my German is non-existent - I assume this means value changed!). However if you're using separate buttons, these will only have an effect when you subsequently change the value of the unconnected "Array" - and of course you're not using this!

You need to add 10 events for a change in the value of each separate button - NOT a change in the value of "Array" - to the Timeout case.

Alternatively take a look at the attached code. This checks if the value of any of the separate switches have changed every 10ms, rather than checking for an even
t.

The 10ms wait is pretty much redundant regardless of the approach you use.
0 Kudos
Message 4 of 4
(2,481 Views)