No replies
4 Posts

Pinned topic receiving data from simulink by integration SysML-Simulink model

‏2012-12-02T10:56:39Z |
I have a question to you about receiving data from simulink model.
I really do not know how to solve this problem which cost me one week.
When the intergrated project was excuted, two issues has happened as beblow:
(I used the embedded coder for Simulink model code generation.)

1, The complied error coming out if I use Derivative block(du/dt) in P-D Control Simulink model(calculate midMotor by current height and target height)
1.1 complied error as below:
HPDCtrl.obj : error LNK2001: unresolved external symbol "_rtInf"
HPDCtrl.obj : error LNK2019: unresolved external symbol _rt_InitInfAndNaN refererced in...
1.2 But bulit is ok if I removed the Derivative block.
2, can not receive correct data from simulink model if I use integrator block in AirshipPlant simulink model (calcute current height by propeller thrust(midMotor))
(PS: The test case is tested under condition of Derivative block removed )

2.1 The hybrid model simulation can work but transform data from simulink is wrong.(Example: currentHeight = -1.#IND)
2.2 If I remove the integrator block as AirshipPlantTemp.mdl simulink model Which is attached,the data became normal although the exchanged data is not my expectation.
(Example:currentHeight = 0.0345)

PS:Actually,the intergrated simulink model of airshipPlant.mdl and HPDCtrl.mdl can be simulated smoothly in simulink I tested before.

So, can the Rhapsody support code from Derivative block generated or interagetor block for intergration between SysML and Simulink? Is there any other reason ?