LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure with value changes

Solved!
Go to solution

NO I know how to define inputs in the event structures, but when I connected my subVI to my main VI, nothing happened in my data mainstream like in the subVI. I think it's because of some event structure properties. I read the "recommendations" for using an event structure but I couldn't the reason related to my case.

0 Kudos
Message 61 of 92
(1,257 Views)

So just to get something cleared.

What do you think the nature of the Event Structure is?

How does it work ?

 

After that, try to explain what your subvi is doing.

0 Kudos
Message 62 of 92
(1,247 Views)

Event structure is the structure used for creating a program which waits till the defined event happens, then the program inside the loop will run.

 

My subVI is waiting for the change of unit (value change), then the corresponding values will change.

0 Kudos
Message 63 of 92
(1,245 Views)

@Bombbooo wrote:

Event structure is the structure used for creating a program which waits till the defined event happens, then the program inside the loop will run.

 

My subVI is waiting for the change of unit (value change), then the corresponding values will change.


then the code inside the event structure which corresponds to the event trigger will execute once for each time there is a trigger. 

Depending on where you placed your sub-vi, it may not even be called.

 

Can you post both the main VI and the sub-vi?

0 Kudos
Message 64 of 92
(1,234 Views)
0 Kudos
Message 65 of 92
(1,230 Views)

So how do you think a value change event should happen when you call your vi as a subvi ?

Will the user be able to change a value on the front panel ?

0 Kudos
Message 66 of 92
(1,227 Views)

yes the user can change the unit and value.

 

When I turned on the highlight excecution button, the data flow got stuck at this subVI. Then I thought this sub vi was waiting till the unit has changed, it will continue. But it didn't work like that

0 Kudos
Message 67 of 92
(1,221 Views)

And what made you think that ?

When does the subvi finish ?

When does the while loop in the subvi finish ?

 

How does a subvi send output to the calling vi ?

0 Kudos
Message 68 of 92
(1,217 Views)

How do you think you are generating a "Values change" event ?

 

Why have you add a Dynamic Event registration for 3 controls you already have events for ?

0 Kudos
Message 69 of 92
(1,215 Views)

I think like that because of the function of event structure as I have understood. It waits till the value changes, then the operation will begin.

 

It finishes when the stop button is pressed.

 

I think the stop button in the subvi need to be pressed before it sends the data to other blocks.

 

(PS: you are very patient to help me all the way here. Thank you for that. You can be my labview tutor.)

0 Kudos
Message 70 of 92
(1,214 Views)