Measurement-computing CIO-RELAY08 Bedienungsanleitung Seite 9

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 20
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 8
4 PROGRAMMING
The CIO-RELAY boards are easy to program. From one to four eight-bit registers
are written to control relays or can be read to determine the state of relays.
In addition to direct I/O programming, the boards are f ully supported by the
powerful Universal Library program as well as most third-party application
programs.
4.1 DIRECT I/O REGISTER PROGRAMMING
The CIO-RELAY family uses between one and four I/O addresses. Each address
controls eight relay s. Relays are co ntrolled by writing to these register(s). T he
address map of the CIO-RELAY boards is shown below.
BASE ADDRESS Relays 0-7 Read/Write (All CIO-RELAY boards
BASE + 1 Relays 8-15 Read/Write (CIO-RELAY16, -24, -32)
BASE + 2 Relays 16-23 Read/Write (CIO-RELAY24, -32)
BASE + 3 Relays 24-31 Read/Write (CIO-RELAY32 only)
The registers are written to and read from as a single, 8-bit byte. Each bit controls an
output to a relay (write) or represents the state of a relay (read).
All registers are read left to right. The leftmost bit (the eighth bit) being the most
significant bit. Following this format, bit seven (OP7) of BASE + 0 corresponds to
relay number 7 and bit 0 to relay number 0.
To construct a control word, use Table 4.1 for bit weights.
Table 4-1. Bit Weights
801287
40646
20325
10164
883
442
221
110
HEX VALUEDECIMAL VALUEBIT POSITION
For example, to assemble the control byte that will turn on relays 0, 1, 3, 5, and 7,
we see in Table 4-2 that we need to write HEX AB or decimal 171.
5
Seitenansicht 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 19 20

Kommentare zu diesen Handbüchern

Keine Kommentare