Syntax

rtobj.testSetModelInputs(testid,begin_model,begin_model_instance,end_model,end_model_instance,source,sink)

testid,begin_model,begin_model_instance,end_model,end_model_instance,source,sink are required.

Arguments

testid
Name of the test, specified as a string.
begin_model
Name of the source model, specified as a string.
begin_model_instance
Instance number of the source model, specified as an integer.
end_model
Name of the sink model, specified as a string.
end_model_instance
Instance number of the sink model, specified as an integer.
source
Name of the source variable, specified as a string
sink
Name of the sink variable, specified as a string

Description

testSetModelInputs is a method of the simwb.rtobj object. This method connect the output of a Simulink model or a user model to the input of another Simulink model or user model.

Usage:
rtobj.testSetModelInputs(testid,begin_model,begin_model_instance,end_model,end_model_instance,source,sink)
Output: status =

Example:

% Create a new real-time host environment collection object
rthosts = simwb.rthosts
% Get names of real-time host environments present in the collection
rthosts.getRTEnvNames
% Create a new real-time host object and link it to the localhost environment
rtobj1 = simwb.rtobj('localhost')
rtobj1.Project = 'Simulink';
rtobj1.testSetModelInputs('ccur_bus','ccur_bus_test_in',1,'ccur_bus_test_out',1,'SW_bus1.bus1.ramp','SW_bus1.bus1.sine')