Probing Signal Values
- Updated2025-10-15
- 5 minute(s) read
Signals in a model serve as probes, or test points, of a model as it executes. Whereas an outport typically connects to other parts of the application and must return data during every time step, applications typically do not need to read signal values at such a high priority. The Model Interface API provides VIs for accessing signal values in the background portion of your code.
The following block diagram shows the use of a Timed Loop that steps the model at a constant rate and a While Loop that reads signal values and displays them on the front panel. Both loops run until an error occurs or the stop front panel control is TRUE.
|
Loads the model from disk and reads the compiled rate of the model in seconds, which is used to calculate the Timed Loop period. |
|
Performs the following tasks to prepare the VI to read signal values:
|
|
Defines the list of signals to probe as the signals in the
Signal Paths array. The Maximum
Probed Data History input also configures the Model
Interface API to store signal values from up to 100 model time steps in
a buffer. More information. Tip To improve performance
in your application, only probe signals whose values you need and
avoid frequently changing the signals to probe. Probing many signals
and frequently changing the signal list can both decrease
performance.
|
|
Steps the model during each iteration of the Timed Loop and reads/writes inports and outports. The Timed Loop iterates until an error occurs or the stop control is TRUE. |
|
Returns the values of signals from a specific model time step. The
format of this output is a flattened 1D array that contains the values
of each signal. Tip This VI contains a
Simulation Time output, which returns the
elapsed time in the model, in seconds, when the model produced the
current signal values. This value is useful for allowing you to
correlate events within the model with the time they occurred.
|
|
When LabVIEW returns probed signal values before the timeout, the False case of the Case structure converts the array of signal values to a cluster and plots them in a waveform chart on the front panel. |
|
Closes the reference to the signal-probe session, unloads the model from memory, and handles any errors. |
Refer to the MIT Signal Probes VI in the labview\examples\Control and Simulation\Model Interface directory for example code that demonstrates these concepts.


The Get Probed Signal Values VI returns signal values in two formats, depending on which instance of the polymorphic VI you use:
- Raw—Returns signal values in a flattened 1D array in
column-major order. This polymorphic instance allows your code to run
with higher performance. Tip If you read probed signal values in raw format, you can format them offline using the Format Raw Signal Values VI.
- Formatted—Returns signal values in a formatted array in which the value for each signal is a separate element, shown as follows:

To change the signals that the Model Interface API is probing while the control loop steps the model, call the Set Signals to Probe VI again with the new list of signals. Note that if any signal values from the previous signal list are still in the signal buffer, meaning the Get Probed Signal Values VI has not returned those values, the Model Interface API discards those values and immediately starts buffering values for the new signal list.Storing Signal Values from Multiple Time Steps
Basic Architecture for Executing Models