Topic
2 replies Latest Post - ‏2013-01-09T05:23:48Z by Stubeginner
Stubeginner
Stubeginner
6 Posts
ACCEPTED ANSWER

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

‏2013-01-07T05:10:35Z |
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 ?
Updated on 2013-01-09T05:23:48Z at 2013-01-09T05:23:48Z by Stubeginner
  • Stubeginner
    Stubeginner
    6 Posts
    ACCEPTED ANSWER

    Re: receiving data from simulink by integration SysML-Simulink model

    ‏2013-01-07T05:43:36Z  in response to Stubeginner
    The q1 have already solved with changing the derivative block to equivalent transfer Fcn block.
  • Stubeginner
    Stubeginner
    6 Posts
    ACCEPTED ANSWER

    Re: receiving data from simulink by integration SysML-Simulink model

    ‏2013-01-09T05:23:48Z  in response to Stubeginner
    About q2:
    If the input block is followed by a saturation block to limited the input value. Transfer data likes " -1.#IND" will be cleared and change to normal likes "0.02433".But the data is not right.