Kinarm | Interactive Robotics Brain Injury Research

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

Mobile nav

Unable to use task-wide parameters in Stateflow

Unable to use task-wide parameters in Stateflow

Posted on Jun 14, 2018

DWQA Questions › Category: Custom Task Development › Unable to use task-wide parameters in Stateflow
0 Vote Up Vote Down
Margaret Schrayer asked 3 years ago

Hello,

In order to simplify the process of setting parameters to be used by multiple trial protocols, I have made most of our trial parameters (including start target row, mean target velocity, target X position, etc.) into task-wide parameters. I am currently trying to devise a method for accessing the task wide parameters to use in the Stateflow chart and in other Simulink blocks, using their constant names to index them (the same way we would access Trial Protocol data obtained from the GUI Control block output). I am trying to modify the GUI Control block to output a structure analogous to the Trial Protocol output, with the Task Wide Parameters. Is there a simpler way to access task-wide parameters to use in the task program?

Margaret Schrayer replied 3 years ago

Update: issue resolved. Thanks!

1 Answers
0 Vote Up Vote Down
Koloman Varady Staff answered 3 years ago

Hi Margaret,

The GUI Control block already has set up the Task Wide Parameters as a ‘Tag’. With a From block, you can select Task_Wide_Parameters to access the contents of the Task Wide Parameters and pass that into your Stateflow.

Section 10.9 of the Create Task Programs for Dexterit-E 3.6 user guide has a list of the Tags we have already set up.

Cheers,

Koloman

Margaret Schrayer replied 3 years ago

Thank you for your response! Using that tag directly does not work: If I pass the contents to my Stateflow and try to index using the names of the constants (e.g. Task_Wide_Parameters[MEAN_VELOCITY] or Task_Wide_Parameters[START_TARGET_ROW]), a value of 0 is obtained at every index even if other values have been specified for those parameters. I have been trying to use the data from the tag and convert it to a format which will allow me to read the task wide parameters using those constant names.

Koloman Varady Staff replied 3 years ago

Hm, did you set First index = 1 for the input port?

Outside the Stateflow, you can use a Selector and use the constant names ie. [MEAN_VELOCITY START_TARGET_ROW] but that’s a bit awkward if the point is to use the indexing in Stateflow.

The Tag should work, it is a vector with the contents of the Task Wide Parameters. You could put a scope on it and then just try using numbers instead of constant names to debug. For example, you could see on the scope what the second task wide parameter is and then visually compare it to Task_Wide_Parameters(2) in Stateflow

Margaret Schrayer replied 3 years ago

Thank you for your response! Using that tag directly does not work: If I pass the contents to my Stateflow and try to index using the names of the constants (e.g. Task_Wide_Parameters[MEAN_VELOCITY] or Task_Wide_Parameters[START_TARGET_ROW]), a value of 0 is obtained at every index even if other values have been specified for those parameters. I have been trying to use the data from the tag and convert it to a format which will allow me to read the task wide parameters using those constant names.

Margaret Schrayer replied 3 years ago

Thanks, I will try that!

Support

  • New User Training
  • Install/Maintain Your KINARM Lab
  • User Guides & Documentation
  • Software Downloads
  • Creating Custom Tasks
  • Sample Custom Tasks
  • Training Videos
  • Q&A Forum
  • Publications by Research Area

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.