Troubleshooting Issues in Models
- Updated2026-05-07
- 2 minute(s) read
Identify and resolve issues in models.
If your model crashes or does not execute as you expect, try to isolate the issue and determine if its source is within the model or due to your LabVIEW code.
Isolating the Issue
To identify the source of an issue, load and execute a simple model. If the simple model executes as expected, the source of the issue is likely within your model. However, if the simple model also experiences issues, the source of the issue might be due to the LabView code.
The following issues can occur when you run a model:
- The model crashes.
- The model does not run at expected rate.
- The performance decreases.
Problem: Model Crashes
Models often crash when an inport receives a value of 0 and the model attempts to divide by the inport value. Depending on your system, the following solutions might address this issue:
- Change the default value for the inport prior to stepping the model.
- Rewrite the model to remove the possibility of dividing by 0.
Problem: Model Runs Too Fast or Too Slow
If your model is unstable because it runs too fast or too slow, ensure the actual model rate matches the rate at which the model was compiled to run. If the rates do not match, adjust the period of the control loop that steps your model.
Problem: Decreased Performance
If you suspect that models cause your application to run slower than you desire, consider the following solutions that might improve performance:
- Only set parameter values in the control loop if you must update them during every time step. Instead, initialize the parameter values prior to running the control loop or set them in lower priority, background code.
- Probe only signals whose values you need. Probing many signals can have a negative impact on performance.
- Avoid changing the list of signals to probe frequently with the Set Signals to Probe VI.
Related Information
- Initializing Inport Values
Create and modify an array of inport values outside the control loop to optimize memory usage and prevent invalid model operations.
- Configuring Model Timing
Configure model timing by setting the execution rate using the Timed Loop.