LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulink model to FPGA VI with Simulation Model Converter?

Is it possible to convert a simulink model to a FPGA VI, using the Simulation Model Converter (Control Design and Simulation Module), are there any major problems associated with what I want to do?

I want covert a existing simulink model for motor control into a LabVIEW project that is going to be deployed on the NI sbRIO 9631 board. 

0 Kudos
Message 1 of 6
(6,187 Views)

Hi Magnus,

 

Thanks for the post and I hope your well.

 

You are correct, that the Simulation Interface Toolkit can be used to access Simulink models from LabVIEW. If you wou like to download it to an FPGA it is not straight forward, I am afraid.

 

While this is possible, it is not directly supported by National Instruments and would need to be done using some third party software. There is however a tool called System Generator made by Xilinx that allows users to download Simulink code on a variety of Xilinx FPGAs.

 

Integrating IP Cores into LabVIEW FPGA with the HDL Interface Node:

http://zone.ni.com/devzone/cda/tut/p/id/3516

 

Integrating a Model from Xilinx SystemGenerator for DSP into LabVIEW FPGA

http://zone.ni.com/devzone/cda/tut/p/id/2817

 

I hope this helps,

 

Kind Regards,
James.

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 2 of 6
(6,154 Views)

Hi Magnus,

 

Good Morning and I hope your well today.

 

I was wondering if you were still looking into this issue? - I re-read my post this morning and have found I miss read your question.

 

I beleive you were asking about the Simulation Model Converter which is part of the Control Design and Simulation Module rather than the Simulation Interface Toolkit. Currently the Simulation Model does not FPGA - so the simulation may give you an idea how to write the code but it wont directly port to FPGA.

 

I am very sorry if I confused you in anyway - Just trying to help.

 

A note for anyone who may not understand the different - like me! here is a quick note,

 

Simulation Model Converter (control design and simulation module):

You can use the Simulation Model Converter to convert a .mdl file, developed in The MathWorks, Inc. Simulink® simulation environment, into a LabVIEW VI that consists of a simulation diagram containing LabVIEW functions, wires, and simulation subsystems corresponding to the contents of the .mdl file.

 

Simulation Interface Toolkit (SIT):

The NI LabVIEW Simulation Interface Toolkit gives control system design and test engineers a link between the NI LabVIEW graphical development environment and The MathWorks, Inc. Simulink® software. With the LabVIEW Simulation Interface Toolkit, you can easily build custom LabVIEW user interfaces to view and control your simulation model during run time.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 3 of 6
(6,122 Views)

Thank you Hillman, 

 

For your time and answers!

 

Now I know that I want be able to, as for know at least, convert a simulink model automatically to a LabVIEW FPGA VI.

I guess I could convert the simulink model or parts of it into an ordinary LabVIEW VI and let it run on the PowerPC of the sbRIO-9631 board, but I do not think that is the best solution for this project.

 

I guess, if I want to use the model, I have to convert the model by hand or maybe use the HDL Interface Node.

 

Have a nice day!

 

 

0 Kudos
Message 4 of 6
(6,113 Views)

Hi,

 

I was thinking about this again and realized that I'm not sure whether it's possible or not to covert the simulink model to Real time VI to be deployed on the PowerPC of the sbRIO-9631 board.

So my question; is it possible to convert a simulink model to a Real time VI or is the same case as for the FPGA VI; that the simulink model can't be converted directly but can give me a hint on how to write the code?  

0 Kudos
Message 5 of 6
(5,972 Views)

Hello

 

Concerning your Question, I guess you can convert your SIMULINK model into DLL file using the Reat Time window Target on MATLAB and using the Simulation Interface toolkit (SIT), 

 

Then you can build a code using the SIT to be used for RT modules without depending on the simulink model (as it is a dll file now) and to downloaded to a RT module  (I guess like sbRIO 9632)

 

This is an idea and I'm not sure......it will be helpful if proff. guys can share the correct way

 

thanks

A.Hakim
0 Kudos
Message 6 of 6
(4,439 Views)