필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Simulink: Why is it so hard to have copies of a block?

조회 수: 2 (최근 30일)
Viren
Viren 2013년 12월 3일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a library of different components for heat transfer analysis. Two of them are basically copies of each other (the evaporator and condenser) with tiny differences. They use an S Function that is written in matlab.
Now, whenever I have them both in a simulink model at the same time, I get an error that has something to do with simulink being unable to differentiate between the Pressure variable of the two blocks.
I found out that this error is resolved when I use a CMEX function instead of the matlab sFunction. Anyone know why this might be happening?
Also, since I had the CMEX function from a former colleague, I do not know how to convert my matlab sFunction into a C SFunction. I tried using the Matlab Coder, but I got the same error as this guy: http://www.mathworks.com/matlabcentral/answers/53964
I tried using an Fcn block instead (with one input (u) and one output (sys), hoping to replicate sFunction functionality , but simulink threw an error about wrong dimensions.
Any advice? Thanks in advance for any help.
  댓글 수: 2
Ketan
Ketan 2013년 12월 3일
Any chance you can provide the Simulink error messages when
1) The two MATLAB S-functions are used within a model
2) Trying to port over the MATLAB s-function to MATLAB function block
Viren
Viren 2013년 12월 9일
Hi Ketan
Thanks for taking the time to reply. I would provide the error message, but I fear it won't be much use. We use a proprietary 'library' of functions that is used to calculate refrigerant properties. The error comes from that library, although it's origin is likely in Simulink rather than the library itself.

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by