Main Content

removeAllInstruments

Remove instrument objects from target object

Since R2020b

Description

example

removeAllInstruments(target_object) removes the connections to instrument objects from the target object.

Examples

collapse all

Create a target object. Build the real-time application. Create the instrument object. Add a signal to the instrument object. Load the real-time application. Add an instrument object to the target object. Start real-time application. Remove instrument objects from target object.

tg = slrealtime('TargetPC1');
slbuild('slrt_ex_pendulum_100Hz');
hInst = slrealtime.Instrument('slrt_ex_pendulum_100Hz.mldatx');
hInst.addSignal('slrt_ex_pendulum_100Hz/cartposition',1)
load(tg,'slrt_ex_pendulum_100Hz');
addInstrument(tg,hInst);
start(tg);
removeAllInstruments(tg);

Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Version History

Introduced in R2020b