beautypg.com

Application tips – Ocean Optics SAD500 Communications and Control User Manual

Page 14

background image

14

Example 4

Store 50 spectra with every 4

th

pixel in slow memory, read them out

aA

(Set ASCII Data Mode)

M2

(Set storage mode to slow memory)

P1 4

(Set pixel mode to transmit/store every 4

th

pixel)

N50

(Set # of scans to 50)

S

(Acquire spectra)

C1

(Close session storing read and write pointers in memory)
Cycle power if desired

Z2

(Read one scan from slow memory)

Z2

Repeat 50 times

C1

(Store pointers so previously read out data will not be reread)

Application Tips

v During the software development phase of a project, the operating parameters of the SAD500 may

become out-of-synch with the controlling program. It is good practice to cycle power on the SAD500
when errors occur.

v If you question the state of the SAD500, you can transmit a space (or another non-command) using a

terminal emulator. If you receive a NAK, the SAD500 is awaiting a command; otherwise, it is still
completing the previous command.

v For Windows 95 users, use HyperTerminal as a terminal emulator after selecting the following:

1. Select File | Properties.
2. Under Connect using, select Direct to Com x.
3. Click Configure and match the following Port Settings:

Bits per second (Baud rate): Set to desired rate
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None

4. Click the Advanced button and slide the Receive Buffer and Transmit Buffer arrows to the Low

1 value. Click OK.

5. Click OK in Port Settings and in Properties dialog boxes.

v Determine the power-up baud rate by using a terminal emulator and observing the baud rate that

displays the power-up message “Ocean Optics Serial A/D – x”.

v On some computers, the virus protection software and advanced power management must be disabled

to insure timely and complete transfer of the data at 115.2Kbaud.

v When communicating at 115,200 baud, it is possible to overrun the SAD500’s one byte receive buffer.

To prevent this from occurring, we recommend that a 1-millisecond delay be implemented between the
transfer of each byte.