Examples – Ocean Optics SAD500 Communications and Control User Manual
Page 13
13
Examples
Below are examples on how to use some of the commands. Commands are in BOLD and descriptions are
in parenthesis. For clarity, the commands are shown in the ASCII mode (“aA” command) instead of the
default binary mode.
Example 1
The desired operating conditions are: acquire spectra from spectrometer channel 0 (master) with a 200ms
integration time, set pixel boxcar width to 5
aA
(Set ASCII Data Mode)
Q
(Reset SAD500 to default conditions)
I200
(Set integration time to 200ms)
B5
(Set boxcar width to 5)
S
(Acquire spectra)
…
Repeat as necessary
Example 2
The desired operating conditions are: acquire spectra from spectrometer channels 0 and 1 with a 50ms
integration time on channel 0 and 10ms integration time on channel 1; add 5 scans on each channel;
transmit pixels 500, 600 and 700 on each channel
aA
(Set ASCII Data Mode)
Q
(Reset SAD500 to default conditions)
A5
(Add 5 spectra)
P4 3 500 600 700
(Set pixel mode -- spaces shown for clarity)
I50
(Set integration time to 50ms)
H0
(Set active channel to 0)
S
(Acquire spectra)
I10
(Set integration time to 10ms)
H1
(Set active channel to 1)
S
(Acquire spectra)
Loop back to I50 command and repeat for additional data sets.
Example 3
Store these operating conditions in flash memory so they are recalled for subsequent power-ups: acquire
spectra from channel 0 with 50ms integration time, set software trigger mode, set baud rate at 57600
aA
(Set ASCII Data Mode)
Q
(Reset SAD500 to default conditions)
I50
(Set integration time to 50ms)
T1
(Set trigger mode to software trigger)
K5
(Start baud rate change to 57,600)
Wait for ACK, change to 57600, wait for 50ms
K5
(Verify command, communicate at 57600)
C2
(Store all operating parameters in flash memory)
Cycle power
S
(Acquire spectra)
…
Repeat as necessary