Configuration Aspects for Programmers Appendix C
C-18 NetScan User’s Manual
Acquisition Buffer, A DescriptionOnce scans are read from the buffer by the controlling computer, they are erased from
NetScan’s buffer. The acquisition buffer is a FIFO (First-In First-Out) buffer. In other
words, the oldest data to be written into the buffer is the first data to be read from the
buffer when a read operation is performed. The buffer may be broken up into one or
more “trigger blocks.” A trigger block is comprised of pre-trigger scans (optional), a
trigger point, post-trigger scans, a stop event, and post-stop scans (optional). These
components constitute a trigger block in the internal memory of the unit. Each trigger
block defines an acquisition and each may be of variable length.
Trigger blocks are allocated sequentially and the scans within the Trigger Blocks are
written and read sequentially. In other words, it is not possible to randomly access a
Trigger Block or a scan within a trigger block. When a read operation is performed, the
scan that is read is the oldest scan in the oldest trigger block currently defined. The
figure represents a sample acquisition buffer with 5 trigger blocks, each having different
amounts of scan data.
Trigger Block OrganizationEach Trigger Block in the buffer has an associated trigger block descriptor used by internal processes for
Acquisition Buffer maintenance. Since the trigger block descriptor does take up memory it will have an indirect
affect on some user defined processes. For instance, the 75% limit condition and the buffer overrun condition
will occur on a fewer number of scans as the number of trigger blocks increases.
A trigger block becomes defined when the configured trigger start event occurs. Once the start event occurs the
data within the trigger block (including any pre-tr igger data) is available to be read , even though the trigger
block may not yet be complete. Scan data is read and written to the trigger block in a FIFO fashion. As the
controller requests buffered scan data, NetScan supplies the oldest available scan. Once the scan is supplied it is
no longer available. There is no mechanism which allows jumping around in the buffer or going back to a scan
that had already been read by the controller.
Reading the oldest scan automatically advances the read pointer in the current trigger block so that the next scan,
if acquired, is immediately available.
Since scans are written into the trigger block sequentially, the trigger scan may appear at any location within the
trigger block. NetScan will automatically convert these physical scan locations to logical scan locations where
the trigger scan is always oriented at location 0. The placement of the trigger scan at the origin facilitates the
quick interpretation of the read pointer and gives a frame of reference for other locations within the trigger
block. All trigger block pointers are relative to the trigger scan. From this point on text discussions will assume
references to logical trigger blocks only.
The U6 command may be used to query the current read trigger block. For example, the U6 response for the
previous figure (assuming it was the only trigger block) would b e as follows:
PRINT#1,”U6X”‘ Get status of current read trigger block
LINE INPUT#1, A$ ‘ Get the response
PRINT A$ ‘ Screen shows…
0000001,0001234,-0000076,12:34:54.200, 03/23/97,00000767,12:54:12.900, 03/24/97,00001156,01
10000 Scans
1 Scan
16000 Scans
100 Scans
8000 Scans
Sample A cquisition
Buffer Configuration