Omega Engineering HH507R manual RS-232 Operation Using Quick Basic

Page 13

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)

11

Image 13
Contents Omega Omega.comTM Introduction Safety InformationElectrical SpecificationsT/E-TYPE Environmental F Selecting the Temperature Scale Power SwitchHold Mode only Main display Operating InstructionsMIN MAX with Time record Mode only Main display Timer STOP-WATCH ModeJ/T/E/R/S/N T1 Input Thermocouple Type Select Main display REL Relative mode only Main display Hi/Lo Limits mode only Main display 11 Hi/Lo Limits value Recall display mode Relative value Recall display modeButton Battery Replacement Operator MaintenanceRS-232 Operation Using Quick Basic END if CLS Locate 13 RS-232 Transmit and Receive Comammand Summary Output Data Formats LSD MSD Communication HH 506R/HH 507R Calibration Procedure Warranty / Disclaimer 2814/0799