Specifications
Remote Programming – Command List
46
since the data transmission is limited only by the
baud rate and the character wait interval.
The EA command dumps the counter A buffer, EB
dumps the counter B buffer, and ET dumps both
counters. EB and ET generate errors if counter B
is preset. Data from the ET command is ordered
A1,B1,A2,B2,... with each data point separated by
the terminator sequence.
FA
FB
FT
The F commands start a new scan. Data is returned
at the end of each count period. Data continues to
be returned until all N PERIODS points are
completed and sent. If data points accumulate
faster than they can be sent over the computer
interface, they are buffered and sent as fast as the
interface allows. F commands may only be sent
when the counters are in reset.
The FA command starts the scan and returns the
next N PERIODS data points from counter A. FB
returns points from counter B and FT returns
points from both counters. FB and FT generate
errors if counter B is preset. Data from the FT
command is ordered A1,B1,A2,B2,... with each
data point separated by the terminator sequence.
NOTE
Scan buffers are reset at the start of each scan.
When the counters reset, data from the
previous scan is lost and any actively
transmitting E or F command is terminated.
Thus, programs may hang if the counters are
reset or a new scan is started before all data
points from the previous scan are received. To
prevent this, the scan end mode should be
STOP and a new scan initiated only after
receiving N PERIODS data points. An E
command sent while a previous E command is
still executing generates an error.
EXAMINE DATA
XA
XB
The X commands read the counter contents
regardless of the count state. An X command sent
while counting returns the current counter
contents. If the counters are in the dwell cycle,
paused, or reset, the counter value will be zero.
The display may still be showing the most recently
completed count but the counters are already
internally reset. The X command is generally only
useful for long count periods and/or slow count
rates. If the count rate is faster than the interface
speed, then the returned count values may be in
error.
The XA command reads the contents of counter A.
XB reads the contents of counter B. XB returns -1
if counter B is preset.
STATUS BYTE
The SR400 maintains an 8-bit status register
which the user may read to obtain information on
the unit's status. The status byte is read using the
SS command which returns the value of the byte
in ASCII coded decimal. The returned status byte
reflects all of the status conditions which have
occurred since the last time the byte was read.
After the status byte has been read, it is cleared.
Thus, the status byte should be read initially to
clear all previous conditions (especially after a
power up or after settings have been changed).
The definitions for each bit of the status byte are
given below:
Bit 0
Parameter Changed from front panel. When this
bit is set, it indicates that the front panel knob has
been rotated and a setting has been altered.
Bit 1
Data Ready. This bit is set at the end of each count
period to indicate that counter data is available.
Bit 2
Scan Finished. This bit is set at the end of a scan if
the scan end mode is STOP to indicate that the
scan buffer is available for reading. This bit is not
set if the scan end mode is START.
Bit 3
Counter Overrun. This bit is set whenever counter
A or B exceeds or equals10
9
-1 counts.