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? 😛
Solved! Go to Solution.
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.
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!
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?
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.
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.
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.
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.
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?