Problems with using variables in Simulink's 'External mode control panel'

Hi Everybody, I have a problem that I was hoping someone could help me out with solving.
I have a couple of Simulink models running on a Quarc target in order to control and take measurements from an experiment.
Normally it is possible for me to use variables created in the base matlab workspace and use them as parameters in the Simulink model, but for the 'Signal & Triggering' in the 'External mode control panel' this does not seem to work?
I would like to be able to set the 'duration' parameter from a script, because I have a model that I call at will, which runs and measures for x seconds and then terminates, unfortunately the 'duration'-parameter fixes the number of points that I record and can save. I would like to have this as a variable that I can change before starting the model. When I try to set a variable i get the error: 'Undefined function or variable 'variablename'' although I have declared it in the workspace.
As far as I can see changing this parameter does not constitute a structural change of the model, and does not require the real time code to be rebuild..
Any help would be greatly appreciated, as I'm really stuck because of this..
Thank you very much on beforehand

Respuestas (0)

Categorías

Más información sobre Simulink Coder en Centro de ayuda y File Exchange.

Preguntada:

el 1 de Nov. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by