Jump to content
Sign in to follow this  
Dormidont

How do I Pause Event Handling

Recommended Posts

There is an easy sample: two buttons Start and Pause, and String Box.

Event Structure has case Value Change for Start button.

If Start button is pressed value in String Box increases each second (I used Loop Structure).

After you have pressed Pause button loop execution pauses and waits until you press Pause button the second time.

The problem is: event for Pause button is not handled until event handling for Start button has been finished

Share this post


Link to post
Share on other sites

If I read your mail correct, the "increasing loop" is inside the start event case. If so you have two possiblities:

Either move your "increasing loop" outside the event-loop and communicate with notifiers or queues.

Or, set the timeout of your event-structure to -1, Start-case sets it to e.g. 1000ms and pause/stop-case sets it back to -1. In the timeout-case increase your value by +1. (see example)

Didier

Download File:post-253-1146231692.vi

Share this post


Link to post
Share on other sites
If I read your mail correct, the "increasing loop" is inside the start event case. If so you have two possiblities:

Either move your "increasing loop" outside the event-loop and communicate with notifiers or queues.

Didier

Could you please describe th way of using notifiers or queues in detail

Share this post


Link to post
Share on other sites
Could you please describe th way of using notifiers or queues in detail

First of all, this is definitely a wrong forum to post such questions :nono:

Well, OK

Nu vot tak, naprimer. :D

Here is a simple event-driven state machine example. Of course, there exist simpler and more advanced patterns.

Using car analogy the state machine pattern NI pushes as THE state machine will be a Ford Escort (that's for for US readers, Zaporozhets - for former Soviet Union residents). The attached one is then a Chevrolet Malibu maybe. For the Rolls-Royce of state machines see labhsm.com :yes:

First of all, this is definitely a wrong forum to post such questions :nono:

Well, OK

Nu vot tak, naprimer. :D

Here is a simple event-driven state machine example. Of course, there exist simpler and more advanced patterns.

Using car analogy the state machine pattern NI pushes as THE state machine will be a Ford Escort (that's for for US readers, Zaporozhets - for former Soviet Union residents). The attached one is then a Chevrolet Malibu maybe. For the Rolls-Royce of state machines see labhsm.com :yes:

Sorry, can't upload anything from my computer for some reason right now. Not even to my web site with Frontpage. Gotta talk to the ISP :(

OK here it is:

http://labhsm.com/Simple_event_driven_SM.zip

Share this post


Link to post
Share on other sites
The problem is: event for Pause button is not handled until event handling for Start button has been finished

Yes well just put a condition to stop the execution of the start event activities while they are executing. That is inside the start event activities be sure you also check for some sort of exit or termination condition (in this case not event triggered but checking a flag of some kind).

Share this post


Link to post
Share on other sites
Here, let LAVA have all this traffic, not my site. :)

If you don't want the traffic, you might want to edit your original post and remove the link there.

Share this post


Link to post
Share on other sites
If you don't want the traffic, you might want to edit your original post and remove the link there.

Nah, it's not a big deal.

However, editing previous posts - that's interesting! I can see the Edit button for my latest post, so, apparently I can edit it, but how can I edit my earlier posts?

OK, here: this sentence was added after posting the above had been done: at that moment my 2 last posts had Edit button, but not the one where I posted the link!

Share this post


Link to post
Share on other sites
I can see the Edit button for my latest post, so, apparently I can edit it, but how can I edit my earlier posts?
You need to be a premium member.

Just follow the link in Chris's signature.

Share this post


Link to post
Share on other sites
Just follow the link in Chris's signature.

Well put! :)

Share this post


Link to post
Share on other sites
Ok , I will consider that as soon as find a job.
Looks like you should post to this thread to show that being a CLA does not automatically mean you get a job. ;)

Share this post


Link to post
Share on other sites
Looks like you should post to this thread to show that being a CLA does not automatically mean you get a job. ;)

I think that that thread already makes the point pretty clearly.

Share this post


Link to post
Share on other sites
I think that that thread already makes the point pretty clearly.

Agree. The certification helped me to find previous gigs. The main (negative) factor in my personal job search is not the posession/lack of certification but the xenophobic, cruel, exploitive, unfair and simply totally screwed up US immigration system, in which I and hundreds of thousands of other people are trapped now. (See immigrationvoice.org, for example, for shocking details that are unknown to the majority of Americans.) So, as Chris knows, I am on the world wide job search now and hope my CLA will help me.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.