Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

I cannot connect RelTemperatureSensor and CombiTable1D

I cannot connect RelTemperatureSensor and CombiTable1D

Hello,

I try to connect the RelTemperatureSensor and CombiTable1D, but got error warning and message:

Unused input variable tableAvailable in function .Modelica.Blocks.Tables.CombiTable1D.getTableValue.


Unmatched dimension in equation connect(relTemperatureSensor2.T_rel, combiTable1D1.u), [] != [1].



Please see attached screen.

T_rel of RelTemperatureSensor is RealOutput, and u of CombiTable1D is RealInput, so I think that these port  can connect.

Thanks in advance.

https://www.openmodelica.org/images/agorapro/attachments/6041/mini_RelTempSensor-and-CombiTable1D.png

Edited by: takataka1970 - Oct-24-17 06:38:08

Re: I cannot connect RelTemperatureSensor and CombiTable1D

Hi Takataka1970,

The problem lies in the connect statement

connect(relTemperatureSensor2.T_rel, combiTable1D1.u);


It doesn't specify which of the 'n' inputs of the combiTable you want to connect to the temperature sensor

You should do one of the following:
1) change the connect statement to connect(relTemperatureSensor2.T_rel, combiTable1D1.u[1]); — provided that the table has only one input entry.
2) replace the class combiTable1D with a combiTable1Ds (which has only one input).

Best regards,
Rene Just Nielsen

Edited by: justnielsen - Oct-24-17 07:39:57

Re: I cannot connect RelTemperatureSensor and CombiTable1D

justnielsen,

I replaced CombiTabled1D with CombiTable1Ds, then worked fine !
Thanks a lot.

There are 0 guests and 0 other users also viewing this topic
You are here: