04-27-2006
01:23 AM
- last edited on
11-24-2025
08:25 AM
by
Content Cleaner
04-28-2006
09:55 AM
- last edited on
11-24-2025
08:26 AM
by
Content Cleaner
Hi Shawn,
Which Version of the Simulation Interface Toolkit are you using? There is decent tutorial that describes how to interact with the Model DLL as well as creating the User Interface and Model. Check it out at the following link.
SIT User Manual and Tutorial
https://www.ni.com/docs/en-US/bundle/370420b/resource/370420b.pdf
Hope that helps,
Regards,
Steven
04-28-2006
11:22 AM
- last edited on
11-24-2025
08:27 AM
by
Content Cleaner
Hi Steven,
I have read that document. My current SIT is 2.0.3. There are different sets inside the model interface (such as Simple Model Interface and Regular). Currently, I understand how to use the VIs in the simple model interface (the ones with (no server)) but have problems to use the VIs in the regular model interface. The previous URL (http://zone.ni.com/devzone/conceptd.nsf/webmain/57A06F5A11D0852D86256F3900604797) I attached is an example of using the regular model interface.
However, I don't understand one of the VI -"SIT set model parameters", used in this example, which reports the current command (such as Open, Run, Pause and Stop Model).
My first question is, while I execute one of my dll file using that example, I find the output commands always be NO-OP and I have no idea how to change it to the Open Model. That example does not show me how to change it. I wonder if this example is designed for the people with external hardware (such as field-point or PXI DAQ) and the change can be done using external hardware. Since my DAQ card is PCI-6025E and it has to be used with computer, what's the best way to change my Output command to open if I do not have external control? I always thought the control is in User's hand and the output command is based on the user's selection like the example you indicated using the event loop.
Thanks in advance for any suggestion!
Shawn
05-02-2006 02:36 PM
Hi Shawn,
You are correct that the Models are generally used with External hardware buy you can definitely use DAQ boards on your PC. I'm curious if the NO-OP is being generated because there is a conflict with the SIT Server and Simulink and the way the host VI generated by the SIT Connection Manager dialog box operates. The host VI either connects to Simulink and runs the simulation in Simulink, or the host VI downloads a model DLL to an RT target and connects to the model DLL. In both cases the communication between the host VI and simluation model is through the SIT Server.
On the host computer, the SIT Server automatically starts when Simulink launches. On an RT target, when you download and run the model_main.vi or model_main_daq.vi, you automatically launch the SIT Server on the RT target.
If you manually start model_main.vi or model_main_daq.vi in Windows, the model VI launches the SIT Server in Windows. The host VI generated by SIT Connection Manager dialog box then can connect to the model VI. When you run host VI, make sure you specify localhost and do not place a checkmark in the RT? checkbox.
You can not manually start a model VI when Simulink is running because both Simulink and the model VI will try to use the same port for communication.
You might try the following to see if that will fix the error:
Make sure that Simulink is not running. Open and run the model_main.vi or model_main_daq.vi. This will launch the SIT Server. Open and run the user interface VI that you created. Make sure to specify localhost and do not check the RT checkbox.
Regards,
Steven B.