OMEGA Model CYD201/CYD208 User’s Manual

4.1.2Serial 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.3Sample Basic Program

10 OPEN “COM1:300,O,7,1,RS” AS #1

11 PRINT “TYPE ‘QUIT’ TO EXIT”

12 PRINT

20INPUT “ENTER COMMAND”;A$

21IF A$ = “QUIT” THEN GOTO 100

30A$ = A$ +CHR$(13)+CHR$(10)

40PRINT #1,A$;

45R = INSTR(A$,”W”)

46IF R = 0 THEN GOTO 90

50FOR Z = 1 TO 500: NEXT Z

60LINE INPUT#1,B$

70PRINT B$;

90GOTO 11

100CLOSE #1

101END

‘Open COM port ‘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

Remote Operation

4-3

Page 31
Image 31
Omega Engineering CYD201 and CYD208 manual Serial Interface Operation, Sample Basic Program