question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Felix Möhlmann commented

How to access the output port of Fluid Object - Tank?

Hi Team,

I am using Fluid Library objects. I have to access the output port to change the value from 1 to 0.75. But when I am trying to access the output port using following code, it is not working.

1739867666044.png

Could you help me to resolve it?

Thank you!

FlexSim 25.0.2
output portvaluechangingfluid objectstank
1739867666044.png (49.7 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

You are assigning the value of the node (1) to a treenode type variable. A number is not a node, so the result is null. Assign the node (removing the ".value") and then set its value.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ankur A3 avatar image Ankur A3 commented ·

@Felix Möhlmann

Got it! Thanks!

Could we use the below code to aceess the node as well?

treenode OP = cellrowcolumn(list,1,1);



0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ankur A3 commented ·
No, while the data is presented as a table in the GUI, the node structure does not match that of a proper node table. That command would try to access subnodes of the "OutputPort" nodes (those would be the "row" nodes and their subnodes the cells for each column)
0 Likes 0 ·