LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why event structure can't get variable of case change?

Solved!
Go to solution

Hello:

     I'm still in newcomer process of labview.

how can i get a local varable created from a boolean(output enable) fired a event case, they staied in same while loop as attached.

thanks a lot!

0 Kudos
Message 1 of 4
(2,746 Views)

Hello Johnnny,

 

assuming you want a local variable to trigger an event, you need to use the property node "value(signaling)".

 

BTW: In your program that might not be wise, as it will trigger every second.

Also you have two timings in each loop iteration: 1000 ms from "wait until next ms multiple" and 200 ms from the timeout case. What do you want to achieve there?



Remember Cunningham's Law
0 Kudos
Message 2 of 4
(2,740 Views)

Thanks Peter for your quick response!

I tried with property node, it works, but do i need put a indicator in front pannel all the time?

The 2 delay time are for this test case, 200ms is for event time out location. 1000ms is for output enable interval.

0 Kudos
Message 3 of 4
(2,706 Views)
Solution
Accepted by topic author johnnnywang

Hi Johnnny,

 

if you don't want the Indicator on the front Panel, there are two ways to do that:

 

a) Hide it through: right click >> Hide Indicator. I would not recommend that, because your code becomes a bit intransparent. Also having a hidden indicator just to trigger an event is generally bad design, so why do it, when you can:

b) use User Events. Check out this Example of User Events. While this may look a bit much for a beginner, it is a widely accepted Design Pattern and every developer looking at your block diagram will know what you're trying to do right away as opposed to a), where he would spend some time looking for the indicator...



Remember Cunningham's Law
Message 4 of 4
(2,684 Views)