26 • Computer Control
NEW FOCUS, Inc.
Programming for the Vidia-Discrete
When programming for the laser, keep the following rules in mind.
•
For IEEE-488, issue all commands using the IBWRT function call.
To read the controller’s response, use the IBRD function call.
•
For IEEE-488, a command is not parsed until a hardware EOI is
detected (IEEE-488).
•
For RS-232 operation, end each command with a carriage
return (0x0c).
•
Numbers may contain at most 15 characters. The number 1550
will be read correctly, but the number 00000000000001550 will be
read as 15.
•
Commands that expect integer values will truncate after any
decimal point in the input. For example, if a command is issued to
run “11.76” scans, the laser will run 11 scans.
•
Only one command can be issued per line. For example, if the
controller receives
WAVE 1550;*IDN?
, it will change the
wavelength to 1550, but the Identification Query will be ignored.
Laser-Controller Responses
All commands evoke a response from the driver (set commands return
an “Ok” when executed). If you are using RS-232, the response is sent
immediately; with IEEE-488, the response is loaded into the output
buffer (a first-in, first-out buffer with a capacity of 5 messages).
•
Laser-controller responses are sent differently depending on the
interface you are using.
IEEE-488: responses are written into the output buffer — a first-in
first-out (FIFO) buffer with a capacity for 5 outgoing messages. You
will need to send a separate command to read the response from
the buffer.
RS-232: responses are sent immediately and can be processed or
ignored. Responses are terminated with the <CR> character (0x0c).
•
The controller does not echo commands.
•
When the controller is first turned on, all computer-control
commands other than OPC? will receive the response “Initializing.”
64X7 rev E.fm Page 26 Tuesday, April 3, 2001 4:16 PM
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com