Headings:

11 - ModEdit: editing modules

11.1 - Overview.

11.2 - Module elements.

11.2.1 - Pads.

11.2.2 - Contours.

11.2.3 - Fields.

11.3 - Starting ModEdit and selecting a module to edit.

11.4 - Module Editor Toolbars:

11.4.1 - Righthand Toolbar - editing

11.4.2 - Lefthand Toolbar – display options

11.5 - Context Menus.

11.6 - The Module Properties dialog.

11.7 - Creating a new module.

11.8 - Adding and editing pads.

11.8.1 - Adding a pad.

11.8.2 - Setting pad properties.

11.9 - Information about automatic placement for a module.

11.10 - Attributes.

11.11 - Documenting modules in a library.

11.12 - Managing 3-dimensional visualisation

11.13 - Saving a module to the active library

ModEdit: editing modules

Overview.

ModEdit is used for editing and creating modules; this includes:

Adding and removing pads.

Changing pad properties (shape, layer), for individual pads or for all pads in a module.

Adding and editing graphic elements (contours, text).

Editing fields (value, reference,...)

Editing the associated documentation (description, keywords).

Module elements.

A module is the physical representation of the part to be inserted, but it must also link to the schematic. Each module comprises three different elements:

The pads.

Graphical contours and text.

Fields.

In addition, a number of other parameters must be correctly defined if the autoplacement function is to used. The same holds for the generation of auto-insertion files.

Pads.

Two pad properties are important:

Geometry (shape, layers, drill holes).

The pad 'number', which is constituted by up to four alphanumeric characters. Thus, the following are all valid pad numbers: 1, 45 and 9999, but also AA56 and ANOD. The pad number must be identical to that of the corresponding pin number in the schematic, because it is by matching pin and pad numbers that Pcbnew links pins and pads for the module.

Contours.

Graphical contours are used to draw the physical shape of the module. Several different types of contour are available: lines, circles, arcs, and text. Contours have no electrical significance – they are simply graphical aids.

Fields.

These are text elements associated with a module. Two are obligatory and always present: the reference and the value fields. These are automatically read and updated by Pcbnew when a netlist is read during the loading of modules into a board. The reference is replaced by the appropriate schematic reference (U1, IC3,...). The value is replaced by the value of the corresponding part in the schematic (47K, 74LS02,...). Other fields can be added; these will behave like graphical text.

Starting ModEdit and selecting a module to edit.

ModEdit can be started in two ways:

Directly via the icon of the main toolbar of Pcbnew. This allows creation or modification of a module in the library.

Double-clicking a module will launch the 'Module Properties' menu, which offers a 'Goto Module Editor' button. If this option is used, the module from the board will be loaded into the editor, for modification (or saving).

Module Editor Toolbars:

Calling ModEdit will launch a window like this:

Righthand Toolbar - editing

	This toolbar contains tools for: - Placing pads. - Adding graphic elements (contours, text). - Positioning the anchor. - Deleting elements.

The specific functions are the following:

	Add a pad.
	Draw line segments and polygons.
	Draw circles.
	Draw circular arcs.
	Add graphical text (fields are not managed by this tool).
	Position the module anchor.
	Delete elements.

Lefthand Toolbar – display options

	These tools manage the display options in ModEdit

These options are active when the button is pressed:

	Display the grid.
	Display polar coordinates.
	Use units of mm (update: now mm/inches are toggled via two buttons).
	Crosshair cursor.
	Display pad in outline mode.
	Display text in outline mode.
	Display contours in outline mode.

Context Menus.

The right mouse button calls up menus that depend upon the element beneath the cursor:

	The context menu for editing module parameters.
	The context menu for editing pads.
	The context menu for editing graphic elements.

The Module Properties dialog.

This dialog can be launched when the cursor is over a module by clicking on the right mouse button and then selecting 'Edit Module'.

The dialog can be used to define the main module parameters.

Creating a new module.

This icon is used to create a new module.

The name of the new module will be requisted (this will be the name by which the module will be identified in the library).

This text also serves as the module reference, which is ultimately replaced by the real reference (U1, IC3...).

The new module will require:

Contours (and possbily graphic text).

Pads.

A value (hidden text that is replaced by the true value when used).

Alternative method:

When a new module is similar to an existing module in a library or a circuit board, an alternative and quicker method of creating the new module is as follows:

Load the similar module (, , or )

Modify the reference field in order to generate a new identifier (name).

Edit and save the new module.

Adding and editing pads.

Once a module has been created, pads can be added, deleted or modified.

Modification of pads can be local, affecting only the pad under the cursor, or global, affecting all pads of the module.

Adding a pad.

Select the tool in the right-hand toolbar.

Pads can be added by clicking in the desired position with the left mouse button.

Their properties are predefined in the Pad properties menu.

Don't forget to enter the pad number.

Setting pad properties.

This can be done in three ways.

Selecting the tool from the horizontal toolbar.

Clicking on an existing pad and selecting 'Edit Pad'. The pad's settings can then be edited.

Clicking on an existing pad and selecting 'Export Pad Settings'. In this case, the geometrical properties of the selected pad will become the default pad properties.

In the first two cases, the following dialog window will be displayed:

Care should be taken to define correctly the layers to which the pad will belong.

In particular, although the copper layers are easy to define, the management of non-copper layers (solder mask, solder pads...) is equally important for circuit manufacture and documentation.

The Pad Type selector triggers an automatic selection of layers that is generally sufficient.

Note 1:

For smd modules of the VQFP/PQFP type, which have rectangular pads on all four sides, i.e., both horizontal and vertical, it is recommended to use just one shape (for example, a horizontal rectangle) and to place it with different orientations (0 for horizontal and 90 degrees for vertical). Global resizing of pads can then be done in a single operation.

Note 2:

Rotations of -90 or -180 are only required for trapezoidal pads used in microwave modules.

Information about automatic placement for a module.

If the user wishes to exploit the the full capabilities of the autoplacement functions, it is necessary to define the allowed orientations of the module (Module Properties dialog).

Usually, rotation of 180 degrees (Translators note: French said 190 degrees...) is permitted for resistors, non-polarised capacitors and other symmetrical elements.

Some modules (small transistors, for example) are often permitted to rotate by +/- 90 or 180 degrees.

By default, a new module will have its rotation permissions set to zero.

This can be adjusted according to the following rule:

A vallue of 0 makes rotation impossible, 10 allows it completely, and any intermediate value represents a penalty for rotation.

For example, a resistor might have a permission of 10 to rotate 180 degrees (unrestrained) and a permission of 5 for a +/- 90 degree rotation (allowed, but discouraged).

Attributes.

The attributes section is the following:

Normal is the standard attribute.

Normal+Insert indicates that the module must appear in the automatic insertion file (for automatic insertion machines).
This attribute is most useful for surface mount components (SMDs).

Virtual indicates that a component is directly formed by the circuit board. Examples would be edge connectors or inductances created by a particular track shape (as sometimes seen in microwave modules).

Documenting modules in a library.

It is strongly recommended to document newly created modules, in order to facilitate their rapid and accurate retrieval.

Who is able to recall the multiple pinout variants of a TO92 module?

The Module Properties dialog offers a simple solution to this problem.

It allows:

The entry of a comment line (description).

Multiple keywords.

The comment line is displayed with the component list in CVPCB and in the module selection menus in PCBNEW.

The keywords can be used to restrict searches to those parts possessing the given keywords.

Thus, while using the load module command ( in the right-hand toolbar in Pcbnew), it is possible to type the text ''=TO220'' into the dialog box to have PCBNEW display a list of the modules possessing the keyword ''TO220''.

Managing 3-dimensional visualisation

A module may have associated with it a file containing a three-dimensional representation of the component. In order to assocate such a file with a module, select the 3D Settings tab.

The options panel is the following:

The follwing information should be specified:

The file containing the 3D representation (created by the 3D modeller wings3d, in vrml format, via the export to vrml command).
The default path is kicad/modules/package3d. In the example, the file name is discret/to_220horiz.wrl, using the default path)

The x, y and z scales.

The offset with respect to the anchor point of the module (usually zero).

The initial rotation in degrees about each axis (usually zero).

If such a file has been specified, it is possible to view the component in 3D:

The 3D model will automatically appear in the 3D representation of the printed circuit board.

Saving a module to the active library

The save command (modification of the file of the active library) is activated by the icon.

If a module of the same name exists (an older version), it will be overwritten.

Because it is important to be able to have confidence in the library modules, it is worth double-checking the module for errors before saving.

Before saving, it is also recommended to change the reference or value of the module to be equal to the library name of the module.

ModEdit: editing modules	PCBNEW

Page 11 - - 11

IUT

1996-01-27T12:47:00