Herunterladen Inhalt Inhalt Diese Seite drucken

B&R BRCOMP1-0 Anwenderhandbuch Seite 210

Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

B&R COMPACT PLC
Outputting a Character
Before writing the character to be output to the data register, the transmitter (sender) must first be
checked for whether it is ready to send a character or not (Bit 4 must be 1 in the status register).
LDAB
BITB
BLS
LDAA
STAA
Reading a Character
Whether a character has been received or not is determined by checking bit 3 in the status register. If
bit 3 = 1, a character has been received. Bits 0 through 2 in the status register indicate whether trans-
mission errors have occurred (parity error, overrun error or framing error). If one of these error bits is
set, the received character is invalid.
The data register must also be read if an error has occurred, since the error message must be acknowl-
edged through it.
LDAB
BITB
BLS
LDAA
BITB
BLS
:
FAIL
:
- 210 -
P 101
# %00010000
NO
x xxx
P 100
P 101
# %00001000
NO
P 100
# %00000111
FAIL
Status register
Transmitter ready ?
Branch, if transmitter not ready
Frame (character) to be output
Data register
Status register
Frame (character) received ?
Branch, if no character received
Read data register
Transmission error ?
Branch, if transmission error
Check received character

Quicklinks ausblenden:

Werbung

Inhaltsverzeichnis
loading

Diese Anleitung auch für:

Brcomp2-0

Inhaltsverzeichnis