connectCallback

Adds callback that responds to new data

Description

example

connectCallback(instrument_object,hCallback) adds a callback that responds to new data that is available from the target computer. The eventData for the callback shares all the new data available from the target computer since the last time the callback was executed.

Examples

collapse all

Add a callback that responds to new data available from the target computer and stream data to the real-time instrumentation object. This callback wraps the XLimits of the axes object.

mldatxfile = 'my_xpctank.mldatx';
hInst  = SimulinkRealTime.prototype.Instrumentation(mldatxfile);
% for technical preview in R2019b, function name includes '.prototype'
connectCallback(hInst,@my_callback);

Input Arguments

collapse all

To create the instrumentation object, use the SimulinkRealTime.prototype.Instrumentation function.

Example: hInst

The callback responds to new data becoming available for streaming.

Example: @my_callback

Introduced in R2019b