|
Q: | What is the difference between the data rate and scan rate
|
|
A: |
The data rate is the rate at which the board is running. This can also be thought of the
amount of time required to acquire a single data point. The data rate is a configuration parameter
which is usually set during the signon process.
The scan rate is the time required to acquire all data points for one complete scan. Rather than being
a configuration parameter, it is the result of configuration parameters. To calculate the scan rate, use
the formula:
data rate / (numScanChans * 5)
|
|
Q: | When using the newest functions ( prefixed with, "EX_" ) why does a call to
one of the data-read functions such as,
EX_GetScanDataDbl(...)
consistantly return without error yet no data is written to the arrays that I pass in the call?
|
|
A: |
When connecting using the simplified EX_ prefixed functions, all data that is acquired during a scan is written to
a log file by default. The log file will typically be created within the application directory unless the current application or
another process, changes the "current working directory" programmatically. Options to write to the log file and/or memory buffers
(to be read by application) can be set using either
a configuration file, or using the EX_SetDataLogOptions(...)
function call. Read more about it
HERE.
|
|
Q: | What do the scan data arrays look like for the various types of scan?
|
|
A: | See tables below. Note that all channels are scanned sequentially - for example
you cannot scan channel 3 of the model-302 without also scanning channels 0, 1, and 2. The exception to the rule is when a
calibration scan is used, in which case, channel 7 is automatically included in the scan even if you are configured to scan only channel 0. It
should also noted, in regard to the calibration scan, that when calling
the EX_SetMultiChanScanChans(...)
function, channel 7 should not be included in the channel count, but the expected scan rate is still, "data rate divided by
total number of channels - including channel 7 - multiplied by 5".
The EX_SetMultiChanScanChans(...)
function is documented online at our website
HERE.
Model-301
Showing digital-input type scan
(
MULTI_CHAN_DIGIN_SCAN
)
The following table shows how the buffers will look for a scan that
includes 4 channels. Note that a Model-301 only has
4 channels: 0,1,6, and 7. Channel 6 is the full scale channel and 7
is the offset channel.
|
|
first row shows data, second shows digital input
|
|
pauiDataBuff (24-bit data)
|
channel 0
|
channel 1
|
channel 6
|
channel 7
|
|
pabDiginBuff (8-bit digital input)
|
channel 0
|
channel 1
|
channel 6
|
channel 7
|
|
Model-302
Showing digital-input type scan
(
MULTI_CHAN_DIGIN_SCAN
)
The following table shows how the buffers will look for a scan that
includes 4 channels. Note that a Model-302 can scan up to 8 channels
and that all channels are scanned sequentially.
|
|
first row shows data, second shows digital input
|
|
pauiDataBuff (24-bit data)
|
channel 0
|
channel 1
|
channel 2
|
channel 3
|
|
pabDiginBuff (8-bit digital input)
|
channel 0
|
channel 1
|
channel 2
|
channel 3
|
|
Model-302
showing digital-input-calibration type scan
(
MULTI_CHAN_CAL_DIGIN_SCAN
)
The following table shows how the buffers will look for a scan that
includes 4 channels. Note that a Model-302 can scan up to 8 channels
and that all channels are scanned sequentially.
|
|
first row shows data, second shows digital input
|
|
pauiDataBuff (24-bit data)
|
channel 0
|
channel 1
|
channel 2
|
channel 3
|
channel 7 (offset)
|
|
pabDiginBuff (8-bit digital input)
|
channel 0
|
channel 1
|
channel 2
|
channel 3
|
channel 7 (offset)
|
|
Model-302
showing digital-input-calibration type scan with multiple-scans
(
MULTI_CHAN_CAL_DIGIN_SCAN
)
The following table shows how the buffers will look for a scan that
includes 2 channels, except this time we'll ask for 3 scans - that
means that usNumPointsToRead will be set to 9. I'll condense
the table a little bit so it will all fit, so just look at the tables above for
better descriptions of the actual labels if you need to. The two examples
above show what the buffers will look like if you only ask for one scan
(all the data for all channels). The table below shows how the buffers will
look when you ask for multiple scans. Asking for larger
scans is fine, but it's very important that the value you set
"usNumPointsToRead" is divisable by the number of channels that you're
scanning. Be sure to include the calibration channel in that count. Since
the calibration channel is actually one of the active channels, please note
that a 6 channel scan and a 7 channel scan will both return 7 channels since
the offset channel is automatically returned with that type of scan.
|
|
first row shows data, second shows digital input
|
|
|
|----- first scan -----|
|
|----- second scan -----|
|
|----- third scan -----|
|
|
Data
|
ch 0
|
ch 1
|
ch 7
|
ch 0
|
ch 1
|
ch 7
|
ch 0
|
ch 1
|
ch 7
|
|
Digin
|
ch 0
|
ch 1
|
ch 7
|
ch 0
|
ch 1
|
ch 7
|
ch 0
|
ch 1
|
ch 7
|
|
|
| |