beautypg.com

Impulse 8011 User Manual

Page 11

background image

© Sealevel Systems, Inc.

- 9 -

PLC-16.PCI User Manual

Writing the Outputs

The output ports are the only ports that can be written. The relays on a standard
PLC-16.PCI are normally open. To close a relay a binary one (1) must be written to
the appropriate bit.

Reading the Outputs

The relay ports can also be read to determine the status of the various relays. A read
will return the ones complement (or opposite) of the value that is currently written to
the port.

Register Description

All ports are set to input after reset or power up.

Address Mode D7

D6

D5 D4 D3 D2 D1 D0

Base+0

RD/WR PAD7 PAD6 PAD5

PAD4

PAD3

PAD2 PAD1

PAD0

Base+1

RD

{0}

{0}

{0}

{0}

{0}

{0}

{0}

{0}

Base+2

RD/WR PCD7 PCD6 PCD5 PCD4 PCD3 PCD2 PCD1 PCD0

Base+3

RD

{0}

{0}

{0}

{0}

{0}

{0}

{0}

{0}

Base+4

RD

{0}

{0}

{0}

{0}

{0}

{0}

{0}

{0}

Base+5

RD/WR

IRQEN

IRQST

{0} {0} {0} {0} IRC1

IRC0

Base+6

RD

{0}

{0}

{0}

{0}

{0}

{0}

{0}

{0}

Base+7

RD

{0}

{0}

{0}

{0}

{0}

{0}

{0}

{0}


Interrupt Control

When enabled, interrupts are generated on Port A bit D0.

IRQEN

Interrupt enable

1 = enabled

0 = disabled ( 0 on power up )

IRC0
IRC1

Interrupt mode select, see table below
Interrupt mode select, see table below

Interrupt Mode Select Table

Interrupt source is Base+0 bit D0. When selecting the Interrupt Type, always disable
interrupts prior to changing or setting states. This will help prevent inadvertent or
unexpected interrupts from occurring.

IRC1 IRC0

Interrupt

Type

0 0 Low

Level

0 1

High

Level

1 0

Falling

Edge

1 1

Rising

Edge

Warning: When using the High and Low Level interrupts, an interrupt occurs when
input D0 changes to either a High or Low state. This will cause the computer to
remain in an interrupt state until the input state changes.

Interrupt Read

Reading the Interrupt Status port (Base+5) clears any interrupt pending.

IRQST

(D0) Interrupt Status

1 = interrupt pending, 0 = none