Remote-processing RPC-52 Bedienungsanleitung Seite 13

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 36
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 12
CHAPTER 4 SERIAL PORTS
Page 11
Figure 4-3 Data packet
> 22MB1
The protocol starts w ith the < cr> character. This
character synchronizes all units and alerts them that the
next few characters coming down are address and data.
In this case, "> 22" is the units address. "M " is the
comm and and " B1" is the checksum . T he comm and is
terminated with a < cr> character.
A response depends upon the nature of the command.
Suppose command M means "return a digital I/O port
status". The RPC-52 could read the port and respond
with AA2< cr> . The first A is an acknow ledge, that is
no errors were detected in the message. The data, A2,
can be broken down as follows:
Bit/line 7 6 5 4 3 2 1 0
Status 1 0 1 0 0 0 1 0 = A2
Lines 1, 5 and 7 are high while the others are low.
ACCESSING SERIAL BUFFERS
You can access C OM0 and COM 1 buffers in three w ays:
1. INPUT statement. This removes all characters in
the buffer up to the term inator cha racter and puts
them into a variable.
When using the INPUT statement, program
execution is suspended until a < cr> (Enter key) is
received. W hether this is a problem depends on
your particular application.
INPUT strips bit 7. This means ASCII characters
from 0 to 127 are received. The IN PUT statement
can return a maximum string length of about 150
characters.
2. GET function. Characters ar e rem oved one at a
time as a numerical value. A 0 is returned when the
buffer is empty. Use the C OM function to
determ ine if the buffer is empty or if a 0 is a data
value.
If you don' t read the buffer an d the buffer fills, all
subsequent characters are discarded. GET m ay be
used anywhere in the program.
3. COM$(n) retrieves all characters in the buffer,
including other control codes (except CR).
ACCESSING COM0 AND COM1
The port INPUT and GE T functions retrieve data using
the UIn comm and. UI0 routes inputs to C OM0 while
UI1 routes inputs to the COM1 port. PRINT outputs are
set by the UOn com mand. UO0 p rints out COM0 while
UO1 outputs COM 1.
The following show how UIn and UOn work.
100 UI0 Set to COM0
110 INPUT A Get data from COM0 port
520 UI1 Switch to COM1 port
530 INPUT B Get data from COM1 port
800 UO0 Print to COM0
810 PRINT "Temperature:",T
900 UO1 Print to COM1
910 PRINT "Set pressure at:",CA
Power up default is set to COM0. UIn has no effect
upon COM $(n) function.
Seitenansicht 12
1 2 ... 8 9 10 11 12 13 14 15 16 17 18 ... 35 36

Kommentare zu diesen Handbüchern

Keine Kommentare

Futaba CIU-2 podręczniki

Instrukcje obsługi i podręczniki użytkownika dla Sprzęt komputerowy Futaba CIU-2.
Dostarczamy 1 pdf podręczników Futaba CIU-2 do pobrania za darmo według typów dokumentów: Instrukcja Użytkownika






Więcej produktów i instrukcji dla Sprzęt komputerowy Futaba

Modele Rodzaj dokumentu
CR-2000 DC Peak Charger Instrukcja Użytkownika   Futaba CR-2000 DC Peak Charger User Manual, 2 strony
CR-2500 Charger Instrukcja Użytkownika   Futaba CR-2500 Charger User Manual, 2 strony
DT1 Tach Instrukcja Użytkownika   Futaba DT1 Tach User Manual [de] , 4 strony
FBC-I Charger Instrukcja Użytkownika   Futaba FBC-I Charger User Manual, 2 strony
FC1 Flight Checker Instrukcja Użytkownika   Futaba FC1 Flight Checker User Manual, 1 strony
FSU2 Instrukcja Użytkownika   Futaba FSU2 User Manual, 2 strony
MPDX-1 Instrukcja Użytkownika   Futaba MPDX-1 User Manual, 4 strony
MSA-10 Instrukcja Użytkownika   Futaba MSA-10 User Manual, 1 strony
RS302CD Instrukcja Użytkownika   Futaba RS302CD User Manual, 33 strony
SBS-01V Instrukcja Użytkownika   Futaba SBS-01V User Manual, 2 strony
WTR-7 Instrukcja Użytkownika   Futaba WTR-7 User Manual, 1 strony
S.Bus Servos Instrukcja Użytkownika   Futaba S.Bus Servos User Manual, 2 strony
SBC-1 Instrukcja Użytkownika   Futaba SBC-1 User Manual, 1 strony
SBD-1 Instrukcja Użytkownika   Futaba SBD-1 User Manual, 1 strony
SBE-1 Instrukcja Użytkownika   Futaba SBE-1 User Manual, 1 strony
SBS-01A Instrukcja Użytkownika   Futaba SBS-01A User Manual, 1 strony
SBS-01G Instrukcja Użytkownika   Futaba SBS-01G User Manual [fr] , 1 strony
SBS-01RM Instrukcja Użytkownika   Futaba SBS-01RM User Manual, 1 strony
SBS-01RO Instrukcja Użytkownika   Futaba SBS-01RO User Manual, 1 strony
SBS-01T Instrukcja Użytkownika   Futaba SBS-01T User Manual, 1 strony