Home Examples Controlling Hand Feedback
BeginnerHand Feedback

Controlling Hand Feedback

This example demonstrates how visual hand feedback can be controlled during a task (e.g. on for some trials and off for others, or changing on/off part-way through a trial). In order to understand what will actually occur during a task, it is important to realize that hand feedback control in Dexterit-E is multi-tiered. Dexterit-E allows an operator to choose how hand feedback is controlled: on, off or controlled by the Task Program. The settings chosen within Dexterit-E will override those chosen within the Task Program, so the Task Program can only control hand feedback if the operator has chosen Task Program Control for hand feedback within Dexterit-E (see the Dexterit-E User Guide for more information). This example includes a Sample Task  available for download. 

10.11.1      Simulink Code for Controlling Hand Feedback Example

From within the Hand_Feedback block there are various options for choosing hand feedback control. In this example, Task Program control of status only has been chosen, this means that the status, for example the on/off state, of hand feedback can be controlled by the Task Program through the feedback_status input. For more information on the hand feedback control options, click Help for the Hand_Feedback block within Simulink.

Figure 10.17: Simulink Code for Controlling Hand Feedback Example (Note figure does not match code exactly.)

10.11.2      Stateflow Chart for Controlling Hand Feedback Example

The Stateflow Chart for this example is not shown here. The main feature is a new output Hand_Feedback_Status which must be set as desired from within Stateflow. (e.g. Hand_Feedback_Status=1).

Related Tasks

Coding Tips
Persistent Variables
Persistent variables are ones that hold their value between calls to the embedded MATLAB code they are defined in.
Coding Tips
Custom Control of the Trial Protocol Order
Normally, Dexterit-E manages and controls the order in which Trial Protocols (TPs) execute based on what is defined in the block table of the Task Protocol (see the Dexterit-E User Guide for more details).