LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulation Interface Toolkit

Hello,

 

I'm using the Simulation Interface Toolkit 3.0 because I want to control a Simulink model in LabVIEW 7.1. For instance, I want to generate a sine wave using a constant block. In this manner I can provide to my Simulink model every kind of signal without changes in it.

To perform this task Simulink needs an input value at each integration step.
I would to know if this task is achievable and if someone could tell me something about the communication between LabVIEW and Simulink.

 

Thank you for your help!:smileywink:
0 Kudos
Message 1 of 14
(5,491 Views)
Hi,
I would be more interested in what you are trying to accomplish with your model in LabVIEW. Following you can find a tutorial that explains how you can build a VI Front Panel around a Simulink model using SIT.
 
 
Are you going to be running this model as a .mdl or as a DLL?
Depending on this, the communication architecture is different.
 
0 Kudos
Message 2 of 14
(5,462 Views)

Hi AlessioD,

thanks for your help, now I'm going to describe my task:

I need to drive a Simulink vehicle model from LabVIEW. I want to change model parameters (and this is very simple with SIT!) but also provide input signals to my model (for example the steering wheel angle, the driver reference speed, ecc...). In this way I don't need to generate the time histories inside the model but outside in LabVIEW. Therefore I should transmit this input data from Labview to Simulink every integration step. How can I perform this task? Is there another way to feed inputs of a Simulink model?

Now I'm running a model as .mdl but I think that as soon as possible I will run it as DLL. In fact the next step of my work is to run the vehicle model in real-time on a target PC (Desktop) by means of LabVIEW RT module.

Now my target is to work only on my PC in no real-time conditions. How can I run my model as DLL on my PC?

0 Kudos
Message 3 of 14
(5,451 Views)
 

ok,

Here you will find a nice tutorial on creating a DLL from a simulink model and running it in LabVIEW.

As for passing data into the model from LabVIEW, I will try to come up with an example that shows how to do  it.

AlessioD

 
0 Kudos
Message 4 of 14
(5,449 Views)
Hi, i've a questin about "Simulation Module" and "Simulation Interface Toolkit". I don't understand differences between these two adds-on. I want to realize a VI that communicate with a model created in Simulink. But at the end of my test i want to use only the VI: i'm going to close Matlab and Simulink because i want to use only LabView. In Simulink i'm going to prepare a model of automatic controller and then i'm going to use this controller in a VI that communicate with external peripherals like motor or voltage source. What can i use? Thanks for help!
0 Kudos
Message 5 of 14
(5,382 Views)

Hi Magic,

I believe the best way to clarify your doubts about those 2 products is that you call us so that we can better explain what features are available and what solution would best fit your expectations.

Make sure you contact NI Italy at

02 41309277 (Milan),

06 520871 (Rome)

or by submitting a request via email through

mailto:ni.italy@ni.com

providing all the details necessary for our sales representative to get back to you as quick as possible.

Thanks,
AlessioD

 

0 Kudos
Message 6 of 14
(5,375 Views)

Hi Alessio,

Maybe you have the solution to my problem:

I have a Simulink model that works with a LabVIEW VI using the Simulation Interface Toolkit and the SIT server.

In order to use this model and this VI without Simulink, I created a dll (nidll) of my Simulink model like shown in the following manual:

https://www.ni.com/docs/en-US/bundle/370420b/resource/370420b.pdf

By doing so, LabVIEW automatically created 6 VIs that should work with my model DLL.

My questions are:

- Can I use the VI that I previously made for my Simulink model with the model dll ?

- If yes, How ?

- If no, How can I use my model dll and these new VIs?

Thanks in advance.

 
0 Kudos
Message 7 of 14
(5,318 Views)
 

Hi,

when you have compiled your model into a DLL, the straightforward option is to deploy the DLL onto a Realtime Target and use it through the VIs that got created.

Also, you have the option of using your Windows machine as a Target for the DLL.

HERE you will find the necessary instructions for running the DLL on Windows without the need for Simulink to be installed or running.

Regards,

AlessioD

 
0 Kudos
Message 8 of 14
(5,311 Views)

Thanks a lot Alessio !

I choose to use Windows as a target for the dll so I checked out the document you showed me and I'm happy to say that it finally works!

That's a big relief!

However, when I run the "model_main.vi" (created with dll), the computer's processor works at 100% and that causes trouble when I want to run my own VI.

So, Alessio, if you have another trick in your sleeve that could solve my problem, my work will be kinda done.

Thanks.

 

0 Kudos
Message 9 of 14
(5,304 Views)

Hey,

I am glad it works. Unfortunately, the 100% CPU usage is an expected behaviour, and it is due to the SIT Server running on Windows. The Server was actually meant to be run on RT at low priority and the OS there let it sleep. When it comes to windows, the server is not sleeping even if it is running at low priority. What I would expect is to see a 100% CPU usage that is not hogging the machine. If it is indeed hogging the CPU, I suggest you get in touch with our Technical Support (www.ni.com/ask) to see if they have any other solution to this issue.

Regards,
AlessioD

 
0 Kudos
Message 10 of 14
(5,285 Views)