From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-28-2009 10:19 AM
Hi all,
When I inline parameters in a Simulink model,and when I run it into the SIT's Simulation Environment, it's like if they wouldn't have been inlined. Every block of the model appears.
And when I try to run it on a remote target (PXI RT Controller), the blocks which don't interrest me are present, while the constants I put in the workspace have disapear.
Any suggestion, please? 😛
Thanks,
Hugues
Solved! Go to Solution.
07-30-2009 08:38 AM
Hi Hugues,
Could you provide your code or a screentshot of the simulink model so I can get a better idea of whatyou are asking. Please tell me exactly what in that code is not working correectly. Thanks you.
07-30-2009 10:31 AM
Hello Chris (!),
Bellow is the model. The schematic is horrible because of conversions 'losts' between R2009a and R2008b. However, it's working well...
I also have a parameter initialisation script which look like this...
What is not working?
Look at my SIT mappings when I use the Simulation Environment:
Then compare with when I select the real time target (with the proper compiled dll).
My car speed port disappeared!
07-31-2009 03:22 PM
Hi uG,
What version of SIT are you using? This process is simplified in the newer version of SIT which has the SIT connection manager. In anycase, it looks as if the model being compled in the .dll is completely different than the one being run in simulation. Not only have some of your I/O nodes disappeared. Other ones that are not in the screenshot have cropped up. What do you mean that your .dll is properly compiled?
07-31-2009 03:56 PM
Hello again Chris,
I'm using 5.0.1, is there a newer release? I do use the SIT connection manager.
I had previously problems with the compiling process. However I fixed them. And, now, the dll pass the dll checker test.
Thanks
08-04-2009 10:51 AM
Hi uG, take a look at this link. It explains how to fix invalid mappings and make inline parameters work when simulink is being uncooperative. Pay particularly close attention to the part that discusses attaching test points to IO nodes that you want to use as inline.
http://zone.ni.com/reference/en-XX/help/371504C-01/lvsimtkconcepts/sit_c_creating_mappings/
08-04-2009 02:44 PM
Hello Chris,
I tried disabling Signal Storage Reuse, Block Reduction Optimization and Inlined Parameters. I also tried checking the Test point checkbox. No luck. The document you were reffereing to was reffering to the Simulink documentation about linked and masked subsystems. Do you know exacltly which "document" should I read? :-S I'm using some Simscape / SimPowerSystems blocks that use some type of mask.
Thanks, once again.
08-05-2009 04:50 PM
08-07-2009 03:32 PM
The screenshot you gave is of mapping a indicator. When you map an indicator you map it to signals of the model. If you want to map to a parameter you should use a control (either place a new one, or right-click the indicator and choose Change to Control). Inlining parameter does not affect signals, which is why you are not seeing a difference based on this option. Inlining paramters does affect the parameters you see when mapping a control. Instead of seeing the hierarchy of blocks and parameters, you will just see the tunable variables. That is if you have a gain block with a gain of "a+b". If you don't have your parameters inlined you can change the gain value of the block. If you inline the parameters and make a and b tunable, then you can set the variables a and b.
Carl L
National Instruments
08-07-2009 08:33 PM
Hi Carl,
Thank you for the awesome explanation. I now understand the inline parameter option.
Sadly, it doesn't solve my problem: I wanted to map some variables (vehicle speed, voltage, current, ...) with indicators, and... they don't appear in the compilled dll's hierarchy. I tried disabeling some optimisation options Chris recommanded me, without any success. Any suggestion?