Home Questions Task control buttons

Task control buttons

Duncan McLean Staff asked 8 years ago
From yl82: Is there a way that the task can pause automatically after a certain number of blocks, and display a sentence on the screen asking the subject to switch hand? And after that, the experimenter can hit unpause on Dexterit-E to continue the task.
1 Answers
Duncan McLean Staff answered 8 years ago
There is no way to interact with the pause button directly. However, what you are attempting is a perfect candidate for a task control button (or buttons). Within The Parameter Table Defn' block you can define task control buttons that will appear in the Dex GUI when your task is loaded. You can specify events that will turn the buttons on and off as well. There is a GoTo tag in simulink that can be used to monitor when the buttons are pushed by the user. So you general flow would be something like: Perform task with one arm Send out a "half way done" event (this could turn on the button in the GUI) Enable a "show target with text" block to show your "switching arms" message Have stateflow wait until the button click from the GUI is registered Have the task continue as normal. You can find more information about task control buttons and how to use them in section 7.2 of the Creating Task Programs Guide.