Omega Vehicle Security HH508 manual RS-232 Operation Using Quick Basic

Page 12

RS-232 Operation Using Quick BASIC

The following example shows how to send command instruction and receive data responses over the RS-232 interface using Quick BASIC.

The program example is set up on "COM1".

CLS

E$ = "A"

ST1:

CLOSE #1

OPEN "COM1:1200,E,7,1,DS,RS" FOR OUTPUT AS #1

PRINT #1, E$;

CLOSE #1

OPEN "COM1:1200,E,7,1,DS,RS" FOR RANDOM AS #1

ST2:

INPUT #1, A$

B$ = MID$(A$, 2, 6)

DEC = 0

F$ = "0123456789ABCDEF"

N = 6

FOR I = 0 TO 5

C$ = MID$(B$, N, 1)

N = N - 1

D = INSTR(F$, C$) - 1

DEC = DEC + (16 ^ I) * D

NEXT

DEC = DEC / 1000

C$ = MID$(A$, 1, 1)

10

Image 12
Contents Omega Omega.comTM Safety Information IntroductionSpecifications EnvironmentalElectrical Power Switch F Selecting the Temperature ScaleHold Mode Operating InstructionsMIN MAX record Mode 9 T1 T2/T1-T2 for HH501BR/HH501BSREL Relative mode SET mode Relative value set and Hi/Lo Limits value set 12 Hi/Lo Limits mode Operator Maintenance Battery ReplacementRS-232 Operation Using Quick Basic Close #1 Open COM11200,E,7,1,DS,RS for Random AS #1END if RS-232 Transmit and Receive Comammand Summary Output Data Formats Page Communication Calibration Procedure Warranty / Disclaimer 3203/0799