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?
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
Similar Messages
-
I am using two models with diffrent diffrent jcos for that. Is there any pr
Hi,
I am using two models with diffrent diffrent jcos for that. Is there any problem in that ?
Regards,
Gurprit BhatiaHi,
JCOs are made per system (R3).
If your two models are calling two different R3 system then it is fine. But if both of your models are pointing to the same R3 system then you should have only one JCO.
This will improve the performance as JCO connections are pooled in the application server and re-used. -
Compile Errors occured when simulink models including 'cmex' by SIT
I am trying to compile a simulink model to DLL with following softwares and hardwares.
Software:
LabVIEW 8.0.1
LabVIEW Realtime 8.0.1
Simulation Interface Toolkit 3.0
MATLAB R13
Visual C++ 6.0 Service Pack 4
Target Hardware:
PXI-1042RTPXI-8196
PXI-6289
When I tried to compile a model including 'cmex' function on Simulink to DLL, compile error about Visual C++ occured. Does SIT support the model including 'cmex' functions?
When I removed the function 'cmex', compiling is working correctly.
To import original model which is written by C or other language, I strongly want to use 'cmex' functions. To avoid the compile error, if you have any ideas, please let me know.
Thanks,
TsugoHello Tsugo,
I believe that it is possible to compile a DLL for SIT from a model that contains a cmex function.
To tell whether the issue is caused by SIT or not, you can try changing the RTW target file from nidll.tlc to grt.tlc (in the model's Simulation Parameters dialog, look in the Real-Time Workshop tab), and see whether the compile error still happens. If the compiler error occurs with grt.tlc, then please refer to the documentation provided by The MathWorks Inc. on how to get your cmex functions to work in Real-Time Workshop®.
If the compiler error does not occur with grt.tlc, then please post the whole text of the compiler error.
Thanks!
Andrew -
Using Quota templates with Self Service Site Creation
I am having an issue with quota templates not getting assigned to site collections created with Self Service Site Creation.
I set up a quota template in 'Specify Quota Templates' and give it the name 'test'. I then go to self service site creation management and select the name 'test' from the 'Quota template to apply' dropdown. I then create a site using self service
site creation and when completed no template is applied to the new site collection. I am wondering if anybody has seen this or if not am I incorrect in what I am expecting, that is that all site created in that web application should have the quota template
applied that I selected in self-service site creation management
Steven Albrecht
University of Colorado Denver
Steven AlbrechtHi Steven,
Please create a quota template named "Personal site" and apply in self service site creation page, then check again.
http://blogs.msdn.com/b/jimmiet/archive/2012/07/22/10332361.aspx
http://danmyhre.wordpress.com/2010/03/16/my-sites-do-not-have-a-quota-when-they-are-created/
Thanks
Daniel Yang
TechNet Community Support -
Create a custom web template using VS 2012 with web features,site features sections applied
hi,
Want to create a custom web template using VS 2012 in my SP 2013 environment. i know "Vesku" has posted a great artice on this [ based on prev. version of SP].
here -
http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx
i am looking for a code based article which has step by step process which provides how to add the site features, web features and attach the eventreceivers etc etc on sitecollection creation when i apply this template from central admin.
can anyone provide me any links / any source how to create a custom web template with one / two custom features - site features element and web features element , / master page etc ....
I am stuck with this. as part of my reqmnt, i need to create a webtemplate with all the customlistinstances, custompagelayouts, custom masterpages, custom appln pages, custom web parts.
help is appreciated !
DasThe problem is that Web Templates are deployed to a gallery in a site collection and aren't available in Central Admin when creating a new site collection. YOu have to create the site collection without choosing a template and then choose your web
template when you first access the root site in the site collection. Here's an article that discusses that process here:
http://sharepointchick.com/archive/2011/02/10/using-web-templates-to-create-site-collections.aspx
Other than that Vesa's article is still the best one and works essentially the same in 2013 as it does in 2010.
Paul Stork SharePoint Server MVP
Principal Architect: Blue Chip Consulting Group
Blog: http://dontpapanic.com/blog
Twitter: Follow @pstork
Please remember to mark your question as "answered" if this solves your problem. -
How to use content presenter with a multilanguage site
I would you like to know if it's possible to manage a content presenter with multi language ? Normally, if i would show a content with a template view , i choose a UCM content to the parameter interface of the content presenter. Anybody has found a solution to found automatically the right content when i choose a another language. For example, i create a content presenter associated to a English content on UCM , is it possible when the user changes his language to spanish for example to have the related content in spanish or not ?
There are a few options to do this but it requires quite a lot of customizations. Unfortunatly there is no out of the box solutoins to tackle this issue.
First of all you have to make sure the content in UCM is related to each other so when you have a document in english, you can easily find the same document in another language. This can be based upon additional meta fields or by using the related content component.
You probably also want to setup a workflow so when an english (or any language) document is checked in, the workflow kicks in and notify some other users so they know they have to translate that document.
In Webcenter you have to make sure that the content presenter can show content based upon language. Normaly you can't realy build dynamic queries in the content presenter and when you select all the content from a folder, there is no way to add filters based upon language.
In order to solve this issue, you can use the personalization server. By creating a scenario that takes the language as an input parameter (or by just querying the profile) you can build a dynamic CMIS query that can be used to power the content presenter. When you have configured the personalization server and create a scenario, you will be able to select that scenrio in the content presenter instead of selecting items or folder.
It's quite a bit of work to make it multilingual but currently this is the only solution i have found... -
Hi,
I am facing a problem with the Boolean instruments when working with SIT.
On my VI I have some boolean instruments (On/Off Switch). These are connected to the Simulink model Constant blocks. SIT works fine (creates diagram etc). I am also able to run the VI and establish connection with the model. But, when I change value of either of the switch the VI 'stops'.
Instead of Boolean instrument, if I use a normal numeric instrument, then everything works just fine.
Any ideas to work around the problem?
Regards,
AmitHi Ricardo,
Thanks for your help. The issue has been resolved. One of your representatives was here with us this afternoon.
Apparently, there is a different workaround. The one you suggested will not work. We had tried out at our end. But your suggestion is inline with logic. There is something with the way the SIT makes connections.
Anyways, bottom line is the issue is resolved. I am attaching the solution that we came up with. This also might help some other users. Thanks for the help again.
Regards,
Amit
Attachments:
ModifiedBooleanAcceptor.vi 271 KB -
Using Google Analytics with iWeb site
Is it possible to use Google Analytics with an iWeb site? They have code they want me to put before the </body> tag.... and I can't find that tag. How do I get the code to show in iWeb? Can I insert this with an HTML snippet?
Thanks!Hello ruralart,
After saving the automator workflow as a Finder Plugin,
mount you iDisk in the finder (ex. click on the iDisk icon in the left pane of a Finder window),
goto the folder iDisk / Web / Sites , select this folder "sites",
control-click on the folder to run the “Add Google Analytics” workflow.
Note : when you have iDisk Sync = ON, you'll see that the folder "web" is an alias so Automator will not work in this situation. You'll have to turn iDisk Sync OFF.
Kind regards,
Leo -
Can i use Handle C with the LABVIEW FPGA module?
Hi,
Can i use Handle C with the LABVIEW FPGA module? I am working with CompactRIO right now so, i want to know weather i can use Handle C with CompactRIO.Can i access FPGA in compactRIO independant of LABVIEW means can i program it without using LABVIEW?
regards,
Vishnu.Hi Vishnu,
Although we don't support Handel-C directly, it is possible to design your algorithms using 3rd party tools or system integrators and consume them from a top-level LabVIEW VI. The webcast at http://zone.ni.com/wv/app/doc/p/id/wv-268 shows an example of how you can use IP from C-based tools provided by Celoxica in the LabVIEW FPGA environment. -
Redirect HTTP to HTTPS with Host Name Site Collections
By using Alternate Access Mapping, its possible to redirect HTTP to HTTPS.
as explained in this thread
http://social.msdn.microsoft.com/Forums/en-US/eaab487a-bc94-4f06-981b-c62711764367/redirect-http-to-https-for-sharepoint-2013
However what if I am using Host name site collections? My understanding is that the AAM will not work then... so how can I sure that
http://intranet.contoso.com is automatically redirected to https://intranet.contoso.com ?
val it: unit=()This is not correct. You can't use URL rewrite with Host Named Site Collections in SharePoint. For URL rewrite to work you need to set bindings on web application which overrides Host Named Site Collection bindings in SharePoint (you have to chose either
web application bindings or let SharePoint handle that).
If you want to use URL Rewrite you need to create new Site in IIS7 which will listen on port 80 and rewrite URLs to port 443. This will create small overhead but you can save on resources by leveraging HNSC and have minimal number of web applications on
the server.
----Edit on 1/16/2014-----
I stand corrected. Above statement is NOT CORRECT. You can indeed perform HTTP to HTTPS URL rewrite with Host Named Site Collections (HNSC) quite elegantly. You do not need any additional web applications. In essence you can
build you whole farm with single web app on IIS (well two, since second one would be used for SharePoint services). Below is the example where I created single URL rewrite rule which handles any new host name provided they use same domain name (i.e. xxxxx.domain.com).
I have 20+ HNSCs in single web application and all of them are using URL rewrite.
<rewrite>
<rules>
<rule name="Redirect to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{SERVER_PORT}" pattern="443" negate="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}.domain.com/{R:1}" />
</rule>
</rules>
</rewrite>
You need to install URL rewrite plugin and configure binding the following way on your web app in IIS. This will allow rewrite to work and SharePoint will be able to handle hoast header bindings internally. -
I am trying to integrate simulink model (.mdl) file with SIT of Labview for RCP and HIL purpose. I am using Labview 8.6, Simulink 6.6 with RTW 6.6 and RTW embedded coder 4.6 ,Visual C Express 2008 and Visual C++ Express 2008. I have selected system target file as nidll.tlc,make command as make_rtw and template nidll_vs.tmf. When I try to generate .dll file I get the following error.
Attachments:
SITProblem.JPG 101 KBHi,
No . I could not solve the issue. Presently we are using microautobox (from Dspace)for doing the RCP.
Himadri -
Using SIT connection manager with large simulink models is extremely slow
Hello,
I'm trying to use a large simulink model in LabVIEW but once the DLL is correctly generated and the SIT connection manager is invoked to explore the model sinks, sources and parameters, it takes hours to generate the model connections tree. Afterwards, when the connections tree is completed, it is impossible to handle it because every operation performed takes a lot of time and memory (i.e. to expand a block to see which parameters are inside).
The version of SIT I'm using is 2.0.3 with LabVIEW 7.1.
Is there anybody experienced with large simulink models and SIT?
Thanks and regards.
Ignacio Sánchez Peral
SENER Ingeniería y Sistemas S.A.
Control Systems Section
Aerospace Division
C/ Severo Ochoa, 4 (PTM).
28760 Tres Cantos (Madrid) Spain.
[email protected]
Tel + 34 91 807 74 34
Fax + 34 91 807 72 08
http://www.sener.esThe VI in the Driver VI called SIT Initialize Model.vi has an input called time step (sec) (-1: use model time step) which does what you want it to. It doesn't actually affect the time step of the solver used in the built model DLL, just the rate at which the main base rate loop actually runs in real time. In fact, base rate loop period would be a better name for this control. If you set it, you won't alter your model, but you will be able to adjust the rate of the base rate loop.
Simply create a control from this input terminal on your driver VI and fill in an appropriate period in seconds. Make sure to set this value as default in the control so that the Driver VI remembers it.
You will have to take into account that your model will still think it's running at the time step it was compiled at. So your model simulation time and the actual wall clock time won't match up.
Jarrod S.
National Instruments -
Now I have developed a vehile controller model with LabVIEW so as to run on VxWorks operating system. ( compactRIO cRIO-9024)
And I converted a controller model of labview into *.lvmodel in order to use it as I did with simulink models.
However, converted *.lvmodel was not supported for VxWorks operating system. so after searching for this, I found out that I have to use a custom device.
I am now studying the custom device, but it looks diffcult because I dont have much experience in real-time system.
Here are my questions.
1. Simulation model in VeriStand
Should I convert a labview controller model into *.lvmodel even if I use the custom device in order to run on VxWorks operating system?
If not, what should I do after building a controller model with labview?
2. Operating system
It is silly question. anyway, as long as I run a controller model on compactRIO cRIO-9024, the operating system always has to be set to VxWorks. Is it right?
3. Custom device
This is the most difficult thing. I dont know even what to do. What functions should be inside a custom device template tool? The controller model send output signals to a vehicle model, and receive input signals from a vehicle model.
Thank you in advance.
HognjunHi,
You should post this on the Veristand Forum.
http://forums.ni.com/t5/NI-VeriStand/bd-p/440
Ravi -
Invalid Mapping with SIT for an outport inside a subsystem in a the simulink model.
Hello everybody,
I am trying to use SIT to target simulink models on a PXI target.
The simulink model contains a subsystem with an outport. I have created
a mapping between the signal coming out of that outport to a waveform
chart on the host VI. The mapping works fine when I run the model on
the local host but becomes invalid when I target the dll to a pxi
target.
I have been able to create a very simple simulink model and host VI
that is mimicking this problem. This model does
not do anything useful and is made to only demonstrate just this problem. I am attaching the model and the userinterface here.
Note:
I have already taken care of the fact that I can not use signal storate
reuse, block reduction and also cant use linked or linked+masked
subsystems. A testimony to this is the fact that I am able to create
mapping with other signals in the subsystem. Also outport is a virtual
block in simulink so I have created a testpoint on the signal going
into the outport to be able to probe it.
Any kind of suggestions would be appreciated.
Thanks and Regards,
Vicku.
Attachments:
files.zip 77 KBYou have two options to be able to probe this signal in the subsystem that should work fine for this small example you posted. Let me know if they also apply to your actual model.
You have the outport itself set as a test point currently in your subsystem block. Try setting the wire coming out of the subsystem outport as a test point and then rebuilding your dll. That should make the outport signal probable.
Instead of probing the actual outport, you could probe the signal in the subsystem that is wired into the outport. In the case of your example that would be using_subsystem/Subsystem/Sum1:1.
Hope this helps!
Message Edited by Jarrod S. on 08-23-2007 10:59 AM
Jarrod S.
National Instruments -
[SIT 5.0] Problem with running Simulink model dll on RT target
Hello!
This a continuation of my problem described here: http://forums.ni.com/ni/board/message?board.id=170&thread.id=431616
At the moment I am using following versions of software:
LabVIEW 8.6.1
LabVIEW Real-Time 8.6.1
NI-RIO 3.1.0
Simulation Interface Toolkit 5.0.0
Microsoft Visual C++ 6.0
MATLAB 7.4.0 (R2007a)
NI cRIO-9014
I have done everything mentioned in http://digital.natinst.com/public.nsf/$CXIV/ATTACH-AEEE-7JSQXS/$FILE/readme_sit_vxworks.txt
After that I was able to build nidll and nidll_vxworks using Matlab. Then I have configured SIT Connection manager, mapped controls and indicators, selected model dll etc. But when I have tried to deploy it on RT target I got following error message:
Initializing...
Calculating dependencies...
Checking items for conflicts. This operation could take a while...
Preparing items for download. This operation could take a while...
Deploying NI_SIT_Replay.lvlib
Deploying NI_SIT_driversupportVIs.lvlib
Deploying NI_SIT_ClientConnMngr.lvlib
Deploying NI_FileType.lvlib
Deploying NI_SIT_Data Log.lvlib
Deploying XDNodeRunTimeDep.lvlib
Deploying NI_SIT_util.lvlib
Deploying NI_SIT_SITServer.lvlib
Deploying project01_Driver.lvproj
Deploying NI-cRIO9014-00E9D6B1(successfully deployed target settings)
Deploying MD5Checksum pad.vi(8,86 K)
Deploying NI_SIT_Replay.lvlib:Read Select Data Packet FIFO.vi(24,89 K)
Deploying NI_SIT_driversupportVIs.lvlibIT Driver FP Strings.vi(2,39 K)
Deploying NI_SIT_Data Log.lvlib:Allocate Data Log State Machine Buffers.vi(10,17 K)
Deploying compatWriteText.vi(9,04 K)
Deploying NI_SIT_Replay.lvlib:Wait for Ack.vi(5,29 K)
Deploying NI_SIT_SITServer.lvlibITs Read Data Buffer.vi(20,24 K)
Deploying NI_SIT_ClientConnMngr.lvlib:Find Channel.vi(8,23 K)
Deploying NI_SIT_Data Log.lvlib:Get Current Configuration from Queue.vi(9,46 K)
Deploying NI_SIT_Data Log.lvlibend New Group Probe List.vi(5,82 K)
Deploying NI_SIT_Replay.lvlib:Write to Active FIFO.vi(8,71 K)
Deploying NI_SIT_Replay.lvlib:Create Configuration FIFO.vi(6,29 K)
Deploying NI_SIT_driversupportVIs.lvlib:sit Microsecond Timer.vi(9,62 K)
Deploying NI_SIT_Data Log.lvlib:Get All Configurations from Queue.vi(9,30 K)
Deploying NI_SIT_Data Log.lvlibwitch Active Configuration.vi(9,77 K)
Deploying NI_SIT_Data Log.lvlib:Update Current Configuration Log Filename.vi(8,85 K)
Deploying NI_SIT_SITServer.lvlibITs Send Packet.vi(26,80 K)
Deploying Invalid Config Data Reference.vi(2,86 K)
Deploying NI_SIT_driversupportVIs.lvlibIT Set Project Directory Path.vi(16,94 K)
Deploying NI_SIT_Replay.lvlib:Update TCL Position FIFO.vi(16,39 K)
Deploying XDNodeRunTimeDep.lvlib:loadlvalarms.vi(32,39 K)
Deploying NI_SIT_driversupportVIs.lvlibIT Task Loop.vi
Failed to download NI_SIT_driversupportVIs.lvlibIT Task Loop.vi
LabVIEW: Failed to load shared library SITs.*:TaskTakeOneStep:C on RT target device.
Deployment completed with errors
I was hoping that upgrading my software will fix all problems. But sadly, it didn't. Any idea? Many thanks for help!Hello,
I also had quite a lot of problems using Labview 8.6.1, RT and SIT 5.0.1. I upgraded a software using Labview 7.1 and SIT 2.0.3 beeing used for 5 years now and it was real pain.
I not using the SIT as you are (just load the model from a DLL, use a timeloop to step the model and finally close the model) but it seems that SIT 5.0.1 has a bug (confirmed recently by NI tech support) concerning inputs and outputs if you are using an array.
It seems that if you use an array for the input during the transcoding of the simulink model to the DLL an index is not well taken into account resulting in a model not beeing able to read its intputs. In my case whatever the inputs data could be the outputs were always 0.
The model has been changed to use only scalar data and everything works fine, ... well using the developpement software :
I cannot generate an RT target executable as during the deployment it fails all the time.
I saw once a message concerning SIT VIs deployment errors and it happened shortly after i upgraded my target : SIT 2.0.3 was still installed after SIT 5.0.
I spent a few years without updating Labview and i am amazed at how many problems occurs with all versions above 8.0.
Good luck,
Maybe you are looking for
-
and the home button doesn't work so i cant try the home button and power button method. Should i get my home button fixed and try it or is it something else?
-
Prerequisite of Logical standby database ????
Hi, We have Oracle 10g database with two physical standby databases on windows 2003 server 64 bit. we was thinking of shifting physical standby database into logical standby database. We also look at the oracle documentation, as the link below. As we
-
BDC date field should be blank
I am creating a bdc - the date field should be blank. My logic is if input-field ne '0'. if w_ausbs ne '00000000'. PERFORM bdc_field USING 'VIQMEL-AUSBS' w_ausbs. else. PERFORM bdc_field USING 'VIQMEL-AUSBS' ' '. endif. In
-
TS2755 Ipad Mini not showing embedded images on emails
All images coming through all accounts are not showing the images
-
ERROR CODE 50 AND 54 AFTER UPDATING TO IOS 5
I updated my iPhone 4 to ios5 and when it was restoring iTunes said the restore was interrupted and error code 50 and 54. I lost current photos and some apps although iTunes had reported that my phone was backed up. Has anyone else received these err