Signal probes enable MxVDev to probe specific Signals in a model for purposes such as recording transitions to and from specific blocks for subsystem testing. Signal probes are supported in Matlab 2011a or better; activating Signal probes in previous versions does not generate any data on the probed ports (however, the models will still continue to run). In addition, Signal probes are not available for referenced models that are not referenced in “normal mode”, as other modes do not provide the information (due to it being potentially compiled out by Simulink).
Setting up Signal Probes
To use Signal probes, the original model and transform must be set up in a specific manner.
First the Signals to be probed must be set up for logging:
For MxVDev to probe a Signal, the Signal MUST have a name, and the Log signal data check box must be selected.
Model Configuration Parameters
The Signal logging check box must be selected (the name of the workspace variable (e.g. “logsout”) is not important, it is read during the run. Set the Signal logging format to “Dataset”, as this is the format that MxVDev is expecting:
Once the appropriate signals are set up for logging the model may be harnessed. Note that whenever the logging parameters change (such as, when new Signals are to be logged), the model must be reharnessed.
First, ensure that the Transform property Harness Signal Probes is set to True. Note that this property affects both Harness and Runtime. At harness time, this property instructs MxVDev to search the model and expose the probes as ports on the Transform. At simulation time, this property tells MxVDev whether to actually probe the ports for data. This allows the user to create the probe ports on the Transform, but at run time not actually probe the port data; having probe ports active slows the model considerably.
The following image shows the model with several probe ports active. The port names are the full path to the subsystem block that is exposing the port, followed by the Signal name specified in the Signal Properties dialog, followed by the word probe. In the following example, in addition to the two ports “HeatCost” and “IndoorTemp” ports that were exposed at the top level, you can see that the thermostat block (shown above) exposes the “thermostat/Heat Probe” port. In addition, there are several sub system references that expose various probes.
•Signal probes are output ports only.
•Harnessing and running with Signal probes slows the simulation considerably, as every time step is required to request into MATLAB to retrieve the probe data.
•Any time the user wishes to add, remove, or modify Signal probes, it must be done on the original model, and the model must be reharnessed.
•Signals MUST be named for MxVDev to probe them. Unnamed Signals (in the properties dialog) will not be harnessed or provide information to MxVDev.
•Signal probes may only be used with fundamental data types. Vector and bus Signals cannot be probed.