Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Simulink models with CompactRIO via SIT

Hi there,

I am looking to use compactRIO for a Rapid Control Prototypig application and am wondering whether Simulink models can be used (via the Simulation Interface Toolkit) and deployed to CompactRIO. (I know that it is possible with PXI). Also, any ideas on ther expected performance?
0 Kudos
Message 1 of 4
(4,581 Views)
Hi, RichM,

Yes, you can use SIT to create and download DLLs that come from Simulink models. Basically, the CompactRIO controller is like another RT controller, so it will be done exactly the same as in PXI. The only thing different in cRIO is that the model VIs that get scripted from SIT to do data acquisition are using Traditional DAQ VIs, so you will have to manually modify those VIs so they interface with the FPGA backplane using the Read/Write Control function. For information on how to modify the VIs, you can probably look at the following tutorial: Using CAN with the LabVIEW Simulation Interface Toolkit. This tutorial is for NI-CAN, but you can just abstract from it and use the same concepts with the Read/Write Control function.
How fast are you planning on executing? Just remember that the cRIO controllers and PXI do not have the same type of processor. Depending on the method you follow to read the information from the FPGA (either polling or by interrupts), you will get different performance. I will still recommend you go with interrupts.

I hope this helps. Let me know!

GValdes
Message 2 of 4
(4,571 Views)
Hi GValdes,

Thanks for the info - I figured that would be the case. The main control loop would probably be in the order of 5ms and I/O would only need to be 20ms or more. The only other issue I was unsure of was DRAM. The 9004 conroller has 64MB, and SIT says that you need AT LEAST 64MB to run - could this prove very limited? Do you (or anyone else) know anyone that has tried running a simulink model using SIT under the cRIO conroller?

Thanks,
Rich
0 Kudos
Message 3 of 4
(4,561 Views)
Rich,

I've run a Simulink model on the cRIO. I only have a single test point, but the single step time of the model was between 20-30 times longer than on a PXI-8176. Initial expectations were 6-10. Your mileage may vary. The 64 MB requirement for SIT is really for running the SIT server on the RT target. Otherwise you can get by with less. I typically run the compiled model standalone to remove the overhead of the server.

Marcus M.
0 Kudos
Message 4 of 4
(4,490 Views)