LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure

I am new to labview got stuck in handling event structure. here is my problem
I have a boolean button for which i want an repeated same event to occur until it is released.
please help me to come out of this.
0 Kudos
Message 1 of 9
(3,381 Views)

Harsha,

First clarify me if you have put your Event Structure inside a while loop ?

If not, read the online help about them & start to code accordingly.

See the attached links below for more on Event Structures.

http://zone.ni.com/devzone/cda/tut/p/id/3331

http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/using_events_in_labview/

Moreover, you might have set the button in Latch mechanical action. So, once it is read by the code, it gets reset, which is its usual behaviour. Rt click on the button -->> Mechanical Action, choose 'Switch Until Released' action. This way the value of the boolean will stay there till the user changes it by clicking again, and in turn, the process will continue to repeat.

Ask here if you have got more doubts.

- Partha ( CLD until Oct 2024 🙂 )
Message 2 of 9
(3,368 Views)
Use value signaling property for boolean button in the time out.

Find the attachement .


-Kumar B
Message 3 of 9
(3,357 Views)
or, why not read the boolean in a while loop like we used to do before the event loop was born ? Smiley Happy
 
/Sture
Download All
Message 4 of 9
(3,324 Views)

i have already put event structure in while loop only.

my problem is once an button(mechanical action:switch until pressed) is clicked, i am doing some action which runs out of the event structure and also i should run in the same event structure executed before, until the button action is released. i already have a different action for "Time out" event case, where i could use value signalling to change the value of the button.

hence the problem.

0 Kudos
Message 5 of 9
(3,282 Views)
Shall you post an example vi in Labview 7.1
 
-Kumar B
0 Kudos
Message 6 of 9
(3,277 Views)

Hi

here is an attached example showing my problem.

after user clicks on any of these (UP,DOWN,LEFT,RIGHT),i am displaying the picture2 with the new position by switching to "showpic" state as in example and again i should execute the same event structure as executed before,if user is still holding the same button i have to show picture2's new position.

0 Kudos
Message 7 of 9
(3,273 Views)
I  am uses labview 7.1 only. I can't have  version 8.0.1
 
Shall u post the example in labview 7.1 as i mentioned in the previous post.
or
post screenshots for all events in the example.
 
 
-Kumar B
0 Kudos
Message 8 of 9
(3,266 Views)
Thank you kumar
I could able to come out of the problem by placing a while loop inside an value change event structure, executed till an user releases the button instead of going for an other state. which is not a cost effective solution for my problem.
but manage to do it and wait for the client to get reply for this.
0 Kudos
Message 9 of 9
(3,258 Views)