EAGLE Help

UL_PIN


Data members

angle real (0, 90, 180 and 270)
contact UL_CONTACT (see note)
direction int (PIN_DIRECTION_...)
function int (PIN_FUNCTION_FLAG_...)
length int (PIN_LENGTH_...)
name string (PIN_NAME_LENGTH)
net string (see note)
swaplevel int
visible int (PIN_VISIBLE_FLAG_...)
x, y int (connection point)

Loop members

circles() UL_CIRCLE
texts() UL_TEXT
wires() UL_WIRE

Constants

PIN_DIRECTION_NC not connected
PIN_DIRECTION_IN input
PIN_DIRECTION_OUT output (totem-pole)
PIN_DIRECTION_IO in/output (bidirectional)
PIN_DIRECTION_OC open collector
PIN_DIRECTION_PWR power input pin
PIN_DIRECTION_PAS passive
PIN_DIRECTION_HIZ high impedance output
PIN_DIRECTION_SUP supply pin

PIN_FUNCTION_FLAG_NONE no symbol
PIN_FUNCTION_FLAG_DOT inverter symbol
PIN_FUNCTION_FLAG_CLK clock symbol

PIN_LENGTH_POINT no wire
PIN_LENGTH_SHORT 0.1 inch wire
PIN_LENGTH_MIDDLE 0.2 inch wire
PIN_LENGTH_LONG 0.3 inch wire

PIN_NAME_LENGTH max. recommended length of a pin name (used in formatted output only)

PIN_VISIBLE_FLAG_OFF no name drawn
PIN_VISIBLE_FLAG_PAD pad name drawn
PIN_VISIBLE_FLAG_PIN pin name drawn

See also UL_SYMBOL, UL_PINREF, UL_CONTACTREF

Note

The contact data member returns the contact that has been assigned to the pin through a CONNECT command. It can be used as a boolean function to check whether a contact has been assigned to a pin (see example below).

The coordinates (and layer, in case of an SMD) of the contact returned by the contact data member depend on the context in which it is called:

The name data member always returns the name of the pin as it was defined in the library, with any '@' character for pins with the same name left intact (see the PIN command for details).
The texts loop member, on the other hand, returns the pin name (if it is visible) in the same way as it is displayed in the current drawing type.

The net data member returns the name of the net to which this pin is connected.

Example

library(L) {
  L.symbols(S) {
    printf("Symbol: %s\n", S.name);
    S.pins(P) {
      printf("\tPin: %s, (%d %d)", P.name, P.x, P.y);
      if (P.direction == PIN_DIRECTION_IN)
         printf(" input");
      if ((P.function & PIN_FUNCTION_FLAG_DOT) != 0)
         printf(" inverted");
      printf("\n");
      }
    }
  L.devices(D) {
    D.gates(G) {
      G.symbol.pins(P) {
        if (!P.contact)
           printf("Unconnected pin: %s/%s/%s\n", D.name, G.name, P.name);
        }
      }
    }
  }

Index Copyright © 2005 CadSoft Computer GmbH