Kinarm | Interactive Robotics Brain Injury Research

  • Products
  • Clinical Applications
  • News
  • Support
  • About Us
  • Contact

Mobile nav

Categories Sample tasks

Reaching sample

Posted on Jun 2, 2020

This is an example of a simple reaching task. This is not the same as the standard task used by Dexterit-E.
Compiled for Dexterit-E 3.8, matlab 2013a

Show target for a single frame on subject display

Posted on Aug 20, 2019

This task is designed to show a target for a single frame on the subject display. The algorithm should work properly for any refresh rate on the subject display. The model is extensively commented with the details of the algorithm.

The task is compiled for MATLAB 2015a SP1 and Dexterit-E 3.7.

Tone player – not real-time

Posted on Mar 12, 2019

We get many requests for how to play sound to a subject. There are lots of options for how to do this:

  • Analog outputs to the NI cards
  • Specialized sound cards that are xPC compatible
  • Playing sounds from the GUI computer

The attached example is a very simple version of the final option: playing sounds from the GUI computer.

For an alternatively method that plays sounds in REAL-TIME though the Robot computer, please see the other sample task entitled Play sound file in real-time

You will need to have Java available in order to run this example. You can obtain the most recent Java from: http://www.java.com. This example requires a small program to run on the GUI computer. Once you unzip the example files you will need to:

  1. Find the folder you have unzipped the files to using the Windows Explorer.
  2. Hold shift and right click on the folder in Windows Explorer
  3. Select “Open command window here”
  4. At the command prompt type: java -jar toneplayer.jar
  5. At this point you should see: “Ready to play tones…”.

When you run the task, if you have speakers plugged into the GUI computer and they are turned on then you will hear 3 tones played, one each trial. As the task runs it will create UDP packets that get passed to the Tone Player program. The Tone Player program interprets the packets and creates an appropriate tone. It must be noted that sound playback in this way is not real-time, but it will be close to real time.

I have provided the Java code that plays the tones, you are free to modify it to your needs. This code could be modified to play *.wav files or possibly even *.mp3. I have not done that. This is purely a proof of concept.

The task was built for Dexterit-E 3.5 and MATLAB 2013a.

Position controller sample

Posted on Mar 1, 2019

This task demonstrates how to move the subject’s arm smoothly while using the Position Controller block. It will move the subject’s arm alternatively between 4 target locations.

Forces/torques will be commanded to the Kinarm as soon as the task starts, and will continue throughout the entire task (i.e. the Position Controller is always on). There is a different sample task “Position controller enable/disable” which demonstrates how to turn the Position Controller on/off smoothly within a trial, for tasks that need to alternate between free movement and positioning the arm.

In the Trajectory subsystem/Create_Trajectory subsystem, a bell-shaped velocity profile is calculated between where the hand was at the start of the trial and the destination target. Using Stateflow, the virtual trajectory is sent point by point to the Position Controller block to create a smooth motion.

This task works on both Endpoint and Exoskeleton Kinarm labs.

Compiled for Dexterit-E 3.7, MATLAB 2013a.

Visualization of Equations of Motion Parameters

Posted on Aug 8, 2018

This is a demo on how to access some of the data about the robots (link lengths, angles, positions of hand, elbow, and shoulder) in real time during a task. The task will draw the data on the subject display in real time to show what the link lengths, angles, positions of hand, elbow, and shoulder are. It is a real time visualization of Fig 7-1 Equations of Motion Parameters from the Dexterit-E 3.7 User Guide.

As well, the task demonstrates the use of moving targets, targets with changing labels, and the path target type, new in Dexterit-E 3.7.

The task is compiled in MATLAB 2013a and Dexterit-E 3.7 and will not work on earlier Dexterit-E versions.

Path vcode demo – Hand trail

Posted on Aug 8, 2018

This is a task that will demonstrate the use of path targets, new in Dexterit-E 3.7. The task will draw a trail that will follow hand movement.

Compiled in MATLAB 2013a and Dexterit-E 3.7 and will not work on earlier Dexterit-E versions.

Coherent dots discrimination task

Posted on Aug 8, 2018

This demonstration task is intended to show the use of the repeat target type, new in Dexterit-E 3.7, and is based on the ideas presented in:

Britten, Kenneth H., Michael N. Shadlen, William T. Newsome, and J. Anthony Movshon. “The analysis of visual motion: a comparison of neuronal and psychophysical performance.” Journal of Neuroscience 12, no. 12 (1992): 4745-4765.

Pilly, Praveen K., and Aaron R. Seitz. “What a difference a parameter makes: A psychophysical comparison of random dot motion algorithms.” Vision research 49, no. 13 (2009): 1599-1612.

This task was compiled in MATLAB 2013a and Dexterit-E 3.7 and will not work on earlier Dexterit-E versions.

Polygon, path, and repeat target examples

Posted on Jul 24, 2018

New in Dexterit-E 3.7, are three target types: polygon, path, and repeat. Polygons are targets that can specify up to 25 vertices. Paths are lines that connect up to 25 vertices. Repeat targets are targets that specify a circle, ellipse, rectangle, triangle, or line and draw it at up to 25 different locations.

In this task, the “Make VCODES” embedded MATLAB function block creates one example Vcode of each of the above target types to show what the new vcodes in Dexterit-E 3.7 can look like. Details on using the new Vcodes can be found in Section 10.7 VCodes – Programming Visual Stimuli of the Creating Task Programs for Dexterit-E™ 3.7 guide.

The task was compiled in Dexterit-E 3.7 and MATLAB 2013a.

Saving data at 2 kHz sampling rate

Posted on Apr 16, 2018

This task will demonstrate how to save data at 2 kHz in a KINARM task (which save data at 1 kHz). The task will generate a 2 kHz signal that counts from 0 and split the task into 2 signals (the unmodified signal and another signal that is delayed by 1/2 ms). By saving both signals, we sample at 2 kHz.

Also included is a MATLAB script read_2kHz.m that will recombine the two separate signals into the original 2 kHz signal generated in the model.

Compiled in MATLAB 2013a and Dexterit-E 3.6.4.

Play Sound File in Real-Time

Posted on May 29, 2017

The purpose of this task is to demonstrate how to produce sounds in real-time using analog outputs as part of KINARM Lab.

For an alternatively method that does NOT play sounds in real-time, but instead works through the Dexterit-E computer, please see the other sample task entitled Tone player – non real-time

This task produces sounds by sending a pre-defined waveform over one analog channel output. If that output is connected to a speaker, then the user will hear the sound.

In order to make sounds in real-time, the following are required:

  • one or more analog outputs connected to the Robot computer (e.g. via a PCI card such as NI-6229 connected to a BNC-2090A panel)
    • You will need one analog channel for each independent speaker
  • speakers with built-in amplifiers (e.g. headphones, or computer speakers)
  • method to connect the analog output(s) to the speaker(s)
    • e.g. if connecting two channels of a BNC-2090A panel to speakers that have a single 3.5 mm stereo jack, the following would work:
      • 2 BNC to RCA/phono jacks – e.g. Newark (54M7978) or Digikey (367-1013-ND)
      • An adapter with 2 RCA/phone plugs to a single 3.5 mm stereo jack – e.g. from Radioshack or the Source
  • vector containing the waveform(s) of the desired sound (e.g. download one from the internet, record one yourself, etc)
  • MATLAB R2015a is recommended, but not necessary: because Task Programs are run at 4 kHz for R2015a and later, vs 2 kHz for R2013a and prior, using R2015a doubles the frequency range of sounds that are reproduceable

How to use this task:

  1. process the desired sound using the attached processWaveformForKINARM.m
    • please read the comments in the code for how to do use this script
    • a sample waveform of a piano keyboard is included
  2. connect your speaker(s) to the analog output(s) and turn the speakers on
    • the sample code in this example uses a single analog output (DAC0OUT) of a PCI-6229 card
    • Note: if you have a different analog output card, you will need to modify the task to use the Simulink block corresponding to your card
  3. build the task and run it
    • during the build process, the sound waveform becomes embedded in the sample code. So if a different waveform is required, the Task Program will have to be re-built.

This task was built using R2015a SP1, and was compiled for Dexterit-E 3.6.2

  • 1
  • 2
  • 3
  • Next Page »

Questions about Kinarm products?

Please feel free to contact us, we’d be happy to help.

Contact Us

Dexterit-E Explorer

View any Dexterit-E exam file. FREE to Download!

Learn More

KST Summary

Our Kinarm Standard Tests enable clinical researchers to perform precise neurological assessment.

Learn More

Products

  • Platform Comparison
  • Kinarm Exoskeleton Lab
  • Kinarm End-Point Lab
  • Kinarm Standard Tests
  • Dexterit-E
  • Dexterit-E Explorer
  • NHP Kinarm Exoskeleton Lab

Clinical Applications

  • Clinical Applications
    • Stroke and TIA
    • Traumatic Brain Injury (TBI)
    • Neurological Disease
    • Pediatric
    • Primarily Non-Neurological
  • Clinical Research Sites
  • Publications

News

  • Kinarm News
  • Events
    • Neuroscience
    • Kinarm Camp
  • Product Notices
  • @KinarmLab Twitter Feed
  • Open Jobs

Support

  • Kinarm Help & Support
  • Installing & Maintaining Your Kinarm Lab
  • User Guides & Documentation
  • Software Downloads
  • Creating Custom Tasks
  • Sample Custom Tasks
  • Training Videos
  • Q&A Forum

About Us

  • About Us
  • Our People
  • Quality
  • Supplier Requirements
  • End-User License Agreement
  • Intellectual Property
  • Privacy & Terms

Contact

  • Contact Kinarm
    • International Sales Agents
  • Request an Account
  • Login
footer-logo

140 Railway St. Kingston, ON K7K 2L9 Canada Toll Free: (888) 533-4393 Phone: (613) 507-4393 info@kinarm.com

© Copyright BKIN Technologies. All Rights Reserved

Quality | Privacy Policy | Web design/development by 1dea Design + Media Inc.