Omega DAQP-208 User Manual

Page of 61
4.9 A/D State Machine
The DAQP card has an internal state machine that controls A/D operation, (see Figure 4-1).
The state machine defaults to S0 after power up or reset.  The normal state flow would be first
S0 to S3, initiated by a scan list (queue) flush command (RSTQ). Then the queue must be
programmed by writing into the queue (base + 1).  With the queue being programmed, the
next step is moving the state machine from S3 back to S0. This is done by issuing a flush data
FIFO command (RSTF), which sets up the gain and channel selections for the first channel in
the scan list and then waits for a trigger to start the scan. When the trigger (ADCLK) comes, the
state machine moves from S0 to S1 and then A/D conversion is started.  The state machine will
wait at S2 until the conversion is completed. It then moves to S4, where the A/D conversion
result is written into the data FIFO. The scan rate is determined by the time the state machine
moves from S1 to S4, which can be programmed as either 10, 20 or 40 ms. If there are more
channels left in the scan list, the state machine will skip to S1 for another conversion loop.
Otherwise it will return to S0, waiting for another trigger (or a sampling pulse from the pacer
clock if in continuous trigger mode).  Any time during data acquisition, an A/D stop
command will stop the data acquisition by moving the state machine back to S0.
S0
S1
S2
S4
S3
RSTF
data
FIFO
flush
RSTQ
scan
list flush
>
<
ADCLK (trigger)
Wait (A/D conversion)
 < Scan list completed
Channels
   remaining
<
Figure 4-1. Transition Diagram of A/D Conversion Process
It is important that the sequence of S0-S3-S0 be followed as described above.  The user must
issue two commands to the DAQP card: the flush scan list command (RSTQ) and the flush
data FIFO command (RSTF).  This guarantees that the scan list and the data FIFO are flushed
properly for the expected data acquisition. Once the flush data FIFO command is issued, the
DAQP card will prepare the first channel in the scan list and then return to state S0 waiting for
the first trigger. Anytime the data FIFO is flushed, the default threshold setting will be
restored (7 bytes to full) by the hardware. The data FIFO threshold should always be
programmed after flushing if the required threshold is different from the default threshold.
DAQP-208/208H/308 Users Manual
34