Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.5K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Creating Connection : How to specify the connection port on the Icon ?

Posted 12 years ago

Greetings,

I am new to Modelica and SystemModeler. I thought if I create new components from scratch, I will learn better. I am trying to create a simple orifice component. I started with creating a fluid connector. When I insert the component into a model, I cannot connect it, in other words, I don't know how to define the ports connection on the icons and diagrams of the component/connector. What is the code responsible for that ?

POSTED BY: Mohamed Mahmoud
3 Replies
Posted 12 years ago

I think I found the mistake. I didn't make the annotation for the FluidPort. There's a difference between the annotation for the whole interface and for the ports themselves. Each port should have a separate annotation like the code below. I copied the annotations from the Fluid library since I don't really understand how it works.

FluidPort_a port_a annotation(Placement(transformation(extent={{-110,-10},{-90,10}}, rotation=0)));
FluidPort_b port_b annotation(Placement(transformation(extent={{110,-10},{90,10}}, rotation=0), iconTransformation(extent={{110,-10},{90,10}})));

Thanks Johan for your help anyway :)

POSTED BY: Mohamed Mahmoud
Posted 12 years ago
POSTED BY: Mohamed Mahmoud
Posted 12 years ago

Hi Mohamed,

I'd recommend you to take a look at the IntroductoryExamples package. It is bundled with SystemModeler. There's a guide called "Getting Started" that you can reach from the Help menu. Look at chapter 7 and especially 7.2.1. I hope that helps!

Johan

POSTED BY: Johan Rhodin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard