User`s guide

PCI-2513 User's Guide Functional Details
33
In hysteresis mode, each setpoint has two forced update values. Each update value can drive one timer or the
FIRSTPORTC digital output port. In hysteresis mode, the outputs do not change when the input values are
inside the window. There is one update value that gets applied when the input values are less than the window
and a different update value that gets applied when the input values are greater than the window.
Update on True and False uses two update values. The update values can drive FIRSTPORTC or timer outputs.
FIRSTPORTC digital outputs can be updated immediately upon setpoint detection.
FIRSTPORTC or timer update latency
Setpoints allow timers or FIRSTPORTC digital outputs to update very quickly. Exactly how fast an output can
update is determined by these factors:
scan rate
synchronous sampling mode
type of output to be updated
For example, you set an acquisition to have a scan rate of 100 kHz, which means each scan period is 10 µs.
Within the scan period you sample six analog input channels. These are shown in the following figure as
channels 1 through 6. The ADC conversion occurs at the beginning of each channel's 1 µs time block.
FIRSTPORTC
Figure 22. Example of FIRSTPORTC latency
By applying a setpoint on analog input channel 2, that setpoint gets evaluated every 10 µs with respect to the
sampled data for channel 2.
Due to the pipelined architecture of the analog-to-digital converter system, the setpoint cannot be evaluated
until 2 µs after the ADC conversion. In the example above, the FIRSTPORTC digital output port can be
updated no sooner than 2 µs after channel 2 has been sampled, or 3 µs after the start of the scan. This 2 µs delay
is due to the pipelined ADC architecture. The setpoint is evaluated 2 µs after the ADC conversion and then
FIRSTPORTC can be updated immediately.
The detection circuit works on data that is put into the acquisition stream at the scan rate. This data is acquired
according to the pre-acquisition setup (scan group, scan period, etc.) and returned to the PC. Counters are
latched into the acquisition stream at the beginning of every scan. The actual counters may be counting much
faster than the scan rate, and therefore only every 10
th
, 100
th
, or n
th
count shows up in the acquisition data.
As a result, you can set a small detection window on a totalizing counter channel and have the detection setpoint
"stepped over" since the scan period was too long. Even though the counter value stepped into and out of the
detection window, the actual values going back to the PC may not. This is true no matter what mode the counter
channel is in.