#1

Adding Port Types

Description

When creating a component in the block generator, the Port Type column defines the appearances of the ports.
In this tutorial, you will learn how to add more port types.
(If you do not see the Port Type column in the block generator, unhide it by following this tutorial, starting at 0:35. 
If you still do not see it, kindly let us know on the forum.)

 

Topics covered

Block generator, graphic, port, terminal, appearance

 

Main content

Almost all the instructions below pertain to working in the tree view or symbol library deep settings from within SkyCAD.
Never modify (copy, paste, rename, move) files in the SkyCAD directory or file explorer.

 

Adding an entry to the Port Type property

  1. Go to the Catalogue Tools tab and select Open Catalogue Class
  2. Go to the Show tab and select Class List
  3. Select Connection port group (not Connection point group) and click OK
  4. For the Port Type property, double click on the List cell, which should list the currently available graphics
  5. Place the cursor at the end of a graphic name, hit SHIFT+ENTER to start typing on a new line, then type the name of the new graphic you wish to add
  6. Close the Connection port group class

 

Making a new graphic

When making new graphics, it is useful to have Show connection points, Show sub-grid and Snap to sub-grid on from the Drawing tab.
We suggest doing that before continuing with the instructions below. 
Once your new graphic files are created, you can turn those off if you wish.

 

Generic terminals

  1. Go to \SkyCAD Environments\Standard Environment\Catalogue\root class\SkyCad specific Classes\Graphical Element\graphical object\graphical block\work block\Graphical I-O
  2. Double-click the GenericDirectionTerminal_4 file to open it in SkyCAD, where the direction is the same as the direction of the graphic you wish to create, e.g. to create a new graphic for Generic Terminal Left, you must open GenericLeftTerminal_4. (If you want both directions, follow the instructions for both directions.)
  3. Expand the properties of the file and change the Name property by simply adding a suffix. Ideally, the suffix should be the name of the graphic you entered in step 5 of the Adding an entry to the Port Type property section above
  4. Select the file in the tree view, go to the Show tab and select Graphical sub-elements
  5. Right-click the Connection point block listed below the generic terminal file and choose Open Block
  6. Expand the properties of the connection point block file and change the Name property by simply adding a suffix. Ideally, the suffix should be the same as suffix added in step 3 above
  7. Double-click the connection point block file to open it, then change the graphics using the Drawing tools to how you want it
  8. Save the connection point block file. When prompted to save it to a library folder, cancel.
  9. Delete the original connection point block file listed below the generic terminal file
  10. Copy the new connection point block file and Paste it onto the generic terminal file
  11. Close the connection point block file
  12. Double-click the generic terminal file to open it and see how the result looks
  13. Save the generic terminal file. When prompted to save it to a library folder, cancel.
  14. Copy the generic terminal file
  15. Follow the Implementing the new graphic section below

 

I-O Terminals (DO, DI, AO, AI, RO)

Unlike generic terminals, which use separate files for each direction of generic terminal, all input I-O use the same file and all output I-O use the same file. 
This means that if you want to create a new graphic which can be used on both digital inputs and analog inputs, you only need to create one new graphic file.
Similarly, if you want to create a new graphic which can be used on digital outputs, analog outputs and relay outputs, you only need to create one new graphic file.

  1. Go to \SkyCAD Environments\Standard Environment\Catalogue\root class\SkyCad specific Classes\Graphical Element\graphical object\graphical block\work block\Graphical I-O
  2. Double-click the appropriate file to open it in SkyCAD. 
    To create a graphic for an:
    1. Input I-O, open TopChannel_3 if using IEC, or LeftChannel_2 if not
    2. Output I-O, open BottomChannel_3 if using IEC, or RightChannel_2 if not
  3. Expand the properties of the file and change the Name property by simply adding a suffix. Ideally, the suffix should be the name of the graphic you entered in step 5 of the Adding an entry to the Port Type property section above
  4. Select the file in the tree view, go to the Show tab and select Graphical sub-elements
  5. Right-click the Connection point block listed below the channel file and choose Open Block
  6. Expand the properties of the connection point block file and change the Name property by simply adding a suffix. Ideally, the suffix should be the same as suffix added in step 3 above
  7. Double-click the connection point block file to open it, then change the graphics using the Drawing tools to how you want it
  8. Save the connection point block file. When prompted to save it to a library folder, cancel.
  9. Delete the original connection point block file listed below the channel file
  10. Copy the new connection point block file and Paste it onto the channel file
  11. Close the connection point block file
  12. Double-click the channel file to open it and see how the result looks
  13. Save the channel file. When prompted to save it to a library folder, cancel.
  14. Copy the channel file
  15. Follow the Implementing the new graphic section below

 

Communication ports

  1. Go to \SkyCAD Environments\Standard Environment\Catalogue\root class\SkyCad specific Classes\Graphical Element\graphical object\graphical block\work block\Graphical I-O
  2. Double-click the appropriate file to open it in SkyCAD. 
    To create a graphic for:
    1. Communication Port Left, open ComPortLeft_2
    2. Communication Port Right, open ComPortRight_2
    3. Communication Port Top, open ComPortTop_3
    4. Communication Port Bottom, open ComPortBottom_3
  3. Expand the properties of the file and change the Name property by simply adding a suffix. Ideally, the suffix should be the name of the graphic you entered in step 5 of the Adding an entry to the Port Type property section above
  4. Double-click the file to open it
  5. Select the existing graphical block, go to the Drawing tab and select Explode graphical block
  6. Change the graphics using the Drawing tools to how you want it.
    (It is unnecessary to make your new graphics a graphical block.)
  7. Save the ComPort file. When prompted to save it to a library folder, cancel.
  8. Copy the ComPort file
  9. Follow the Implementing the new graphic section below

 

Commons (Feed common and return common)

  1. Go to \SkyCAD Environments\Standard Environment\Catalogue\root class\SkyCad specific Classes\Graphical Element\graphical object\graphical block\work block\Graphical I-O
  2. Double-click the appropriate file to open it in SkyCAD. 
    To create a graphic for:
    1. Feed common, open FeedCommon_IEC_2 if using IEC, or FeedCommon_2 if not
    2. Return common, open ReturnCommon_IEC_2 if using IEC, or ReturnCommon_2 if not
  3. Expand the properties of the file and change the Name property by simply adding a suffix. Ideally, the suffix should be the name of the graphic you entered in step 5 of the Adding an entry to the Port Type property section above
  4. Double-click the file to open it
  5. Change the graphics using the Drawing tools to how you want it.
  6. Save the file. When prompted to save it to a library folder, cancel.
  7. Copy the file
  8. Follow the Implementing the new graphic section below

 

Implementing the new graphic

  1. Double-click on the Symbol Library heading
  2. Go to the Show tab and select Class library folders
  3. Select the class library folder for which you created a graphic. Only choose from the following:
    1. Feed common
    2. Return common
    3. Analog input
    4. Analog output
    5. Digital input
    6. Digital output
    7. Relay Output
    8. Generic terminal (Left)             
    9. Generic terminal (Right)
    10. Communication port (Left)
    11. Communication port (Right)

For IEC, Left is used for Top and Right is used for Bottom.

If you created a graphic for input I-O terminals, and would like that graphic for all input terminals, select all the input I-O from the list, i.e. Analog input and Digital Input.
The same principle is true for output I-O terminals.

  1. Go to the Create/Add tab and select New Block mapping rule. Existing block mapping rules will be listed, with the new one at the bottom.
  2. Expand the properties of the new block mapping rule
  3. Set Mapping property name to Port Type
  4. Set Mapping property value to the same as the name of the graphic you entered in step 5 of the Adding an entry to the Port Type property section above
  5. Right-click the new block mapping rule and choose Paste
  6. Go to the Show tab and select Graphical objects. You should see the new graphic file below the new block mapping rule

 

Using the new graphic

When creating a component in the block generator, your new port graphic will be selected in the Port Type drop-down menu.

If you have already created the block in the block generator and want to change some of its port types, simply open the component in the block generator again, adjust the desired Port Type values and click Generate Block to re-generate the block.

If you have already customized a block and you do not want to lose those customizations:

  1. Open the component in the block generator again
  2. Adjust the desired Port Type values
  3. Save the component
  4. Close and re-open the project/system
  5. On the block in the project, delete the port(s) you modified in step 2
  6. Use Add Channels to Block to re-add the port(s), but using the new port type