Serial Interface Operation; Sample Basic Program - Omega Engineering CYD201 Operator's Manual

Table of Contents

Advertisement

OMEGA Model CYD201/CYD208 User's Manual
4.1.2

Serial Interface Operation

Remotely control all thermometer functions, except SoftCal™
compensations from a computer with communications software and modem.
Located on the rear panel is a RJ-11 modular socket designated J2 SERIAL
I/O for host computer connection. Accessories CYD200-J10 (RS-232C
phone cord) and CYD200-D (RJ-11 to DB-25 adapter), as well as a null
modem adapter may be required to link the serial port of the host computer
directly to the thermometer. When programming a Model CYD201/CYD208
from the serial interface, consider the following:
• Type commands in all CAPS.
• The term free field indicates a floating decimal point placed any
appropriate place in the string of digits.
• [term] in examples indicates terminating characters placed by the user or
where they appear on a returning character string from the unit.
• Leading zeros and zeros following a decimal point are not needed in a
command string, but they are sent in response to a query.
• Enter temperature to 0.1 degrees. Greater precision truncates.
Temperature is limited from 0 to 475 K.
• Place no space between commands and the variable being sent.
4.1.3

Sample Basic Program

10 OPEN "COM1:300,O,7,1,RS" AS #1 'Open COM port
11 PRINT "TYPE 'QUIT' TO EXIT"
12 PRINT
20 INPUT "ENTER COMMAND";A$
21 IF A$ = "QUIT" THEN GOTO 100
30 A$ = A$ +CHR$(13)+CHR$(10)
40 PRINT #1,A$;
45 R = INSTR(A$,"W")
46 IF R = 0 THEN GOTO 90
50 FOR Z = 1 TO 500: NEXT Z
60 LINE INPUT#1,B$
70 PRINT B$;
90 GOTO 11
100 CLOSE #1
101 END
Remote Operation
'Print QUIT message
'Print blank line
'Get command to send
'Look for QUIT then quit
'Adding CR and LF
'Sending command string
'Scan CMD for W/QUERRY
'If not a QUERRY skip PRINT
'Short delay
'Read back CYD201/CYD208 response
'PRINT instrument response
'Jump back to the beginning
'Close COM port
'End program
4-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cyd208

Table of Contents