A link is a physical component that carries information from one part to another. Thus, a link can only be created with two existing parts at its ends. The end parts can be the same part in SansGUI, but it may be meaningless or disallowed in the particular simulator you are creating the Project Model for.
A link is attached to a part via a port that belongs to the part. Following link creations, the use of the Port Properties dialog to examine and change the port number of a part in a connection is explained in detail.
Similar to selecting a component object for creating parts, you need to select a link object before creating a link. The procedure, though, is a little different. Unlike the Object Toolbox for selecting component objects to create parts, all available link objects in the Project Model are listed in a drop-down combo box in the Build toolbar next to the New Link button. The name of the currently selected link object is shown in the combo box. There is always a Default link object created for the Project Model. You can add more link objects to the Project Model by using the same procedures described in the Creating Objects section.
To select a link object, you can either click on the link object from the component Tree View in the left pane, or from the drop-down combo box in the Build toolbar. The selected link object with the name shown in the combo box will be used for subsequent link creation.
To create a link, take the following steps:
Click on the New Link button in the Build toolbar and check the selected link object, described previously.
From the Canvas View of the assembly, click on the inside of the part to be used to start the link. The side near the mouse pointer may be critical, depending upon the port definitions from the simulator. In general, a port will be created according to the rules defined by the simulator and the nearest side to the clicking point. The rules for creating the port can be found in the Model Construction section in Chapter 1 of this manual. The port number is assigned automatically and you can change it later if needed.
Moving the mouse around, you can see a rubberband line on the canvas. Optionally, you can click on a few intermediate points in blank areas for the link. If you want to start over, just cancel the unfinished link by pressing the Esc key.
You can turn on or off snapping for the intermediate points by clicking on the Snap button in the Build toolbar.
Finally, click on the ending part to finish the link. Again, the clicking position inside the part is used to decide the side for the ending port.
The beginning part and end part decide the direction of the link, from the beginning part to the end part. The direction, however, may or may not be meaningful depending upon the definitions from the simulator.
The name of a link is similar to that of a part. It is a string of alpha-numeric characters and, possibly, with hyphens for clarity. Just like object names, all other characters will be turned into hyphens. To change the name, double click on the link line in the Canvas View or use the Properties menu item in the context menu to invoke the Link Properties dialog. Modify the name and click on the OK button to commit the change.
A new link is automatically assigned with a name, unique in the assembly, and a unique serial number in the Project Model. The initial name of a link is a number and an increasing-by-one series of numbers is used for subsequent links. You can start a new series by changing a link's name to a new starting number. For example, after changing the name of a link to 1100, the subsequent parts created will be named 1101, 1102, etc., provided that they are unambiguous in the same assembly. A non-numeric link name will be skipped in the name generation process.
Similar to part values, again, the values of a link can be modified with a link value overriding mechanism. It is described in the Overriding Values section.
Sometimes, the generated port number may not be the desired one because there may be more than one choice. To modify the port identifier, do the following:
Click on the link with the port at one end. The link will be highlighted.
Move the mouse pointer over the port, indicated by a small square. The mouse pointer will be changed to an up arrow.
While the mouse pointer is an up arrow, double click on the port to invoke the Port Properties dialog.
Enter the desired port number in the Port @ field.
Click on the OK button to commit the change. SansGUI will perform port number validation.
Depending on the simulator, ports in a part may be defined either implicitly or explicitly. When the ports are defined explicitly, a list of compatible ports are displayed. You can change the port number to any number in the list. When they are defined implicitly, there is a set of port number generation rules displayed in the Port Properties dialog:
Highest Number for Port Labels (0 for no limit check): contains the highest number that can be entered as the port number. If the number is 0, no limit is checked.
Check Unique Port Label (Check for one link per port): if checked, the port number has to be unique in the part; its cannot have the same port number as those of other ports in the same part.
Use Odd/Even Numbers for In/Out Ports: if checked, it requires an odd number for an input port and and even number for an output port.
Allow Special Port # 0: if checked, the port number 0 can be entered for a special meaning defined by the simulator. Check the simulator documentation for details.
There are some properties associated with the port:
In: indicates an input port, for the ending of a link.
Out: indicates an output port, for the beginning of a link.
Unique: indicates that port number uniqueness is enforced.
Export: indicates that the port can be exported.
Top: indicates that the port is limited to the top side of the part in the Canvas View.
Bottom: indicates that the port is limited to the bottom side of the part.
Left: indicates that the port is limited to the left side of the part.
Right: indicates that the port is limited to the right side of the part.
Memo: is for you to enter a short note for the port.
SansGUI Modeling and Simulation Environment Version 1.2
Copyright © 2000-2003 ProtoDesign, Inc. All rights reserved.