Create Test Sequence block
blockID = sltest.testsequence.newBlock(blockPath)
blockID = sltest.testsequence.newBlock(blockPath) adds a Test Sequence block specified by blockPath, returning the handle blockID.
blockID
blockPath
collapse all
This example shows how to create a Test Sequence block programmatically, and get properties for the block, which can be used in Name, Value pairs for sltest.testsequence.setProperty.
Name
Value
sltest.testsequence.setProperty
1. Create a model and a Test Sequence block.
new_system('tsb_model'); sltest.testsequence.newBlock('tsb_model/Test Sequence');
2. Get properties of the Test Sequence block.
block_properties = sltest.testsequence.getProperty('tsb_model/Test Sequence')
block_properties = struct with fields: Name: 'Test Sequence' UpdateMethod: 'INHERITED' SampleTime: '-1' Description: '' Document: '' Tag: [] SupportVariableSizing: 1 SaturateOnIntegerOverflow: 1 InputFimath: 'fimath(......' EmlDefaultFimath: 'Same as MATLAB Default' EnableActiveStepData: 0 ActiveStepDataSymbol: '' ScenarioParameter: ''
3. Close the model.
close_system('tsb_model',0)
Path to a Test Sequence block, including the block name, specified as a string or character vector.
Example: 'FanSpeedTestHarness/Test Sequence'
'FanSpeedTestHarness/Test Sequence'
Block handle, returned as a double.
Example: 190.0021
190.0021
sltest.testsequence.find | sltest.testsequence.getProperty | sltest.testsequence.setProperty
sltest.testsequence.find
sltest.testsequence.getProperty
You have a modified version of this example. Do you want to open this example with your edits?