Setup: Labview and Simulink communicating through Simulation Interface
Problem: If you close and reopen the model in Simulink while Labview is
running Labview crashes.
Is there a command from Matlab to tell Labview to stop/start running? I
would like to be able to stop Labview running, change the model file
and then start Labview again. The model file name and location always
remains the same.
If I understand your situation correctly, you've got a host VI that the SIT Connection Manager generated, and you're using it to communicate with your Simulink model, and you have clicked the Run button on the host VI (the white arrow) to start it running. Then, if you close the Simulink model, LabVIEW shows a dialog that says something like:
Error 14106 occurred at Error using ==> get_param Invalid Simulink object name: sinewave.
If that's what's happening, it just indicates that LabVIEW has noticed that the model was closed while the host VI was still trying to connect to the model. This does not indicate a problem; the reason why it appears is that the host VI communicates with the model so that it can tell if you start running the model from Simulink. If you want to avoid getting this dialog, then stop the host VI (by clicking on the red button with the white X in the Model Controls near the top-left corner of the host VI's front panel) before closing the model.
If this is not what you're seeing, then please provide more details as to exactly the set of steps you've taken and what results you see, including a screenshot if that's appropriate.