09-17-2009 10:17 AM
I have a Simulink model that I am trying to make into an RT executable with a GUI to be run in Windows. The model was made with R2007b+, and I am using SIT 5.0 and Labview 8.6. Through Real Time Workshop I created an NI dll.
I created a VI and ran the SIT connections manager to link the VI to some constant blocks in my model that I wanted to be able to change the values in. This was done selecting the Driver VI on Localhost option. I then built an exe using my interface VI and the driver VI that was generated.
When I run the exe I press play in the model controls box that was generated. When I try this I get an Error 1013 occurred at Driver VI: Possible reason: LabView: Cannot load front panel.
My questions are is what I am trying to do feasible: (as far as making an executable that I can run on a Windows computer in real time with a Labview GUI that allows me to change parameters)?
If this is feasible, am I going about it in the right way? If I am, how do I work around this error?
Thanks.
09-18-2009 02:59 PM
Hi bborland12,
I would make sure you're following the directions here:
Configure the simulation:
http://zone.ni.com/reference/en-XX/help/371504D-01/lvsithowto/sit_h_creating_a_host_vi/
http://zone.ni.com/reference/en-XX/help/371504D-01/lvsithowto/sit_h_specify_dll_and_host/
Controlling the simulation:
http://zone.ni.com/reference/en-XX/help/371504D-01/lvsithowto/sit_h_running_a_simulation/
09-28-2009 02:41 PM
When running the host interface VI as an executable you must start the driver VI manually. The code that starts the driver VI automotically assumes that the LV project is available. However the host interface VI will attempt to connect to a running simulation first. If it fails to connect to the SIT Server, it assumes the driver VI is not running and tries to start it. There fore if you make sure the driver VI is runing before you start the host interface it will work.
There are a number of ways to start the driver VI before the host interface VI. If you have LV available you can open the driver project and open the driver VI and run it. Since your host interface is an executable you presumably don't have LV available, so this is probably not an option. If the driver VI is also running on Windows, you can either build an executable of just the driver VI and run the executable or you can add the driver VI to the host interface VI such that it executes in parallel to the host interfac code. If you are including the driver VI as a subVI of the host interface VI you will want a small delay before the host interface code starts executing to ensure that the driver VI has been able to start the SIT Server. If on the other hand your driver VI is running on an RT target, then you will want to build it into a startup executable on the RT target (see third link in Kyle's post).
Carl L
National Instruments