How to set sample time properties programmatically for simulink configuration

12 vues (au cours des 30 derniers jours)
Viral Zaveri
Viral Zaveri le 13 Août 2019
I am trying to set sample time properties programmatically for simulink configuration. Below is the code snippet:
% Solver pane
vse_configSet_wrapper.set_param('SampleTimeConstraint', 'Specified'); % Periodic sample time constraint
vse_configSet_wrapper.set_param('SampleTimeProperty', '[[0.01,0,1];]'); % Sample time properties
vse_configSet_wrapper.set_param('Solver', 'FixedStepAuto'); % Solver
vse_configSet_wrapper.set_param('StartTime', '0.0'); % Start time
vse_configSet_wrapper.set_param('StopTime', '12'); % Stop time
However, Configuration Parameters in Simulink shows [object Object] instead of [[0.01, 0, 1];]
SampleTimeProperty.PNG
How do I correctly set the sample time properties?

Réponses (1)

Samatha Aleti
Samatha Aleti le 16 Août 2019
Hi,
To configure the parameter “SampleTimePoperty” from command line, you need to enter the sample time properties as a structure with fields as follows:
  • SampleTime
  • Offset
  • Priority
Refer this documentation link for further details

Catégories

En savoir plus sur Multicore Processor Targets dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by