# Client Pause button

**URL:** <https://mworks.discourse.group/t/client-pause-button/641>\
**Category:** Support\
**Created:** [June 16, 2011, 10:15am UTC](https://mworks.discourse.group/t/client-pause-button/641 "2011-06-16T10:15:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 16, 2011, 10:15am UTC](https://mworks.discourse.group/t/client-pause-button/641/1 "2011-06-16T10:15:46Z")

</div>

Hi Chris!

Recently I realized that pushing the “stop” button while an experiment runs does, apart from stopping the currently running state machine, stop all IO-Devices and reset all selectable objects.

This is not desirably when I run experiments with lots of different randomized trials and I want to have every combination of trial settings equally distributed.

Is there any way to use the pause-button of the client and to not reset IO-Devices and Selectables? I played a bit with the “interruptible” parameters of Containers and State machines, but that doesn’t seem to have any effect at all.

Thank you!  
Philipp

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 16, 2011, 4:01pm UTC](https://mworks.discourse.group/t/client-pause-button/641/2 "2011-06-16T16:01:59Z")

</div>

Hi Philipp,

Currently, the pause button does absolutely nothing. The MWorks core includes some infrastructure for supporting a “paused” state (as opposed to “running” or “stopped”), but it looks to me like this is a feature that was started but never completed.

Are you looking for a way to suspend execution of the state system (i.e. to temporarily stop executing state transitions), while leaving the rest of the experiment running? It seems like that should be possible, although there may be complications that I can’t foresee right now.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 16, 2011, 5:18pm UTC](https://mworks.discourse.group/t/client-pause-button/641/3 "2011-06-16T17:18:06Z")

</div>

Hi Chris,

yes, exactly. The basic idea was to pause an experiment that has a lot of possible stimulus combinations. Because I want every combination tested at least once (or twice or whatever), it is of importance that selectables don’t get reseted in the middle of an experiment. With monkeys, however, the motivation to work constantly for hours is not always there so I need to pause the execution of the script now and then.

A possible workaround is to define a variable that pauses my state machine when set via the variable editor. What I do is to define a “pause state” that is entered upon a change in this variable and is exited when the variable changes back. This works quite well, although it’s not very handy and requires a bit of scripting.

If the feature of pausing is currently not implemented, then I think it makes no sense to do this just for me (I can imagine that you have more important things to do). What would be great though is to have access to the pause button’s activity. Is there an easy way to write a click to this button into a MWorks variable that I can use in my experiments? Having this would circumvent the hassle of looking for the right variable in the editor and then setting it by hand.

Greetings from rainy Germany,  
Philipp

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [June 16, 2011, 6:26pm UTC](https://mworks.discourse.group/t/client-pause-button/641/4 "2011-06-16T18:26:25Z")

</div>

> If the feature of pausing is currently not implemented, then I think it makes no sense to do this just for me (I can imagine that you have more important things to do). What would be great though is to have access to the pause button’s activity. Is there an easy way to write a click to this button into a MWorks variable that I can use in my experiments?

I think it would be worthwhile to assess how far from completion the pause functionality is. I’ll check with Dave and get his take on how much work remains.

If that path doesn’t seem promising, then your suggestion seems like a good alternative. It should be pretty simple to make the pause button just toggle a variable value.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [January 25, 2012, 10:20am UTC](https://mworks.discourse.group/t/client-pause-button/641/5 "2012-01-25T10:20:49Z")

</div>

> If that path doesn’t seem promising, then your suggestion seems like a good alternative. It should be pretty simple to make the pause button just toggle a variable value.

Hi Chris, I just wanted to check where we stand. Does this request require more work than you thought? Can I help with something?

Greetings,  
Philipp

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [January 30, 2012, 3:13pm UTC](https://mworks.discourse.group/t/client-pause-button/641/6 "2012-01-30T15:13:16Z")

</div>

Hi Philipp,

> Does this request require more work than you thought? Can I help with something?

No, this is just one of many low-priority items that went on the back burner and haven’t come off yet. I’ve created a [ticket](http://mworks.lighthouseapp.com/projects/23612/tickets/22) for this issue and will try to address it for the 0.5 release.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [October 3, 2012, 7:04pm UTC](https://mworks.discourse.group/t/client-pause-button/641/7 "2012-10-03T19:04:55Z")

</div>

Hi Philipp,

Experiment pausing via MWClient’s pause button is now implemented and will be in tonight’s nightly build.

Pausing the experiment suspends execution of the state system indefinitely; to resume execution, press the pause button again. Dynamic stimuli automatically pause/resume with the state system. All other components (including I/O devices) are unaffected by pausing.

If you press the pause button while the experiment is in an uninterruptible state (e.g. in a block or trial with `interruptible="NO"`), then the state system won’t pause until it exits that state.

If you have any questions, please let me know!

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [July 19, 2022, 11:33pm UTC](https://mworks.discourse.group/t/client-pause-button/641/8 "2022-07-19T23:33:14Z")

</div>


