addInstrument
Syntax
Description
addInstrument(
adds an instrument object to the target object. Make sure that you add a signal to the
instrument object before you add the instrument to the target object or no signal is
streamed.target_object
,instrument_object
)
When the addInstrument()
function binds the instrument to a
real-time application, Simulink®
Real-Time™ validates the signal names in the instrument. To reduce the time it takes to
validate an instrument, add the instrument once to the target computer and run the real-time
application as many times as needed. The instrument remains added to the target computer
even after the real-time application stops and is reloaded.
Alternatively, you can add the instrument each time the real-time application runs. If
using this approach, remove the instrument when the real-time application closes. For
example, if adding code to an App Designer app, in the CloseRequestFcn
,
you could add a removeInstrument(hInst)
function.
addInstrument(
adds an instrument object to the target object and updates the target connection, even if
the real-time application is running. Make sure that you add a signal to the instrument
object before you add the instrument to the target object or no signal is streamed.target_object
,instrument_object
,'updateWhileRunning')
Examples
Input Arguments
Version History
Introduced in R2020b