Basic Operation
Last updated
Was this helpful?
Last updated
Was this helpful?
Primary EDAQ functionality (e.g. data capture, image processing, streaming to host) is provided by the FPGA processor. As such, interactions like controlling imaging modes and changing user-configurable settings on the DAQ are accomplished via writing 16-bit hexadecimal codes or values to a series of FPGA registers. Likewise, querying FPGA status is accomplished via reading values from these FPGA registers. Although the user has access to all FGPA registers, only those which provide user-accessible functionality are documented in . Most FPGA registers in the full register map are reserved for Axsun internal purposes.
User read/write access to individual FPGA registers is provided via low-level methods in or when connected using Ethernet or USB 2.0, and/or via methods in when connected via PCIe. These same low-level read/write methods are exposed as GUI buttons in and the (Ethernet or USB 2.0 only), and the (PCIe only).
The GUI provides convenient access to many DAQ functions by obscuring multiple consecutive FPGA register accesses behind more user-friendly GUI buttons which call higher-level functions in . Conversely, and the API provide only the ability to interact with low-level register read/write operations. As such, the Hardware Control Tool and the AxsunOCTControl_LW library are recommended for straightforward interaction with the DAQ.
It is helpful to understand the core image acquisition functionality provided by the library, even when interacting only with the Image Capture Tool GUI and not directly integrating the Capture API.
The first step when using the AxsunOCTCapture library is starting a Capture session. A Capture session is automatically started when launching the Image Capture Tool and selecting either the Ethernet or PCIe interface. Starting the Capture session achieves three primary outcomes:
The desired hardware interface (Ethernet or PCIe) is opened for image data capture. If a hardware interface is not found or cannot be opened due to conflicts or missing dependencies, the session will support only review of previously captured images subsequently loaded from disk.
A circular Main Image Buffer is allocated in RAM to store captured images. The size of the Main Image Buffer is user-configurable and should be selected to provide the desired amount of storage needed for the expected recording time.
A thread is started which moves data into the Main Image Buffer when detected on the desired interface. This happens automatically in the background without subsequent user interaction (other than starting the data stream on the EDAQ hardware using the API or related GUI Tool).
Images streamed from the EDAQ are numbered in a monotonically increasing, consecutive fashion. The image sequence number is reset (to 1) only when the imaging sequence is stopped and restarted on the EDAQ or when Burst Record Mode is initiated (see below). Once image data has been captured and enqueued in the Main Image Buffer, the calling application can retrieve images arbitrarily (in a random-access fashion) using one of two approaches:
By an image’s unique sequence number. This assumes the image is in the Main Image Buffer and has not been overwritten by a newer image due to an undersized buffer. A loop at the application level can retrieve all images from the Main Image Buffer sequentially for comprehensive review, export, analysis, etc.
By requesting the most recently enqueued image. Often the image display rate is lower than the image acquisition rate. This approach allows a loop at the application level to display in a “live” fashion with the lowest possible display latency. The Main Image Buffer still contains all images for later retrieval via the first approach.
The final step when using the AxsunOCTCapture library is deallocating host resources and freeing the interface by stopping the Capture session. This must be done via the API prior to a custom client application quitting; it is done automatically when quitting the Image Capture Tool GUI.
The two primary operational modes of the EDAQ are 1) Imaging-Off or "Idle" wherein no data capture or transmission is occurring, and 2) Imaging-On or "Live" wherein the DAQ is capturing, processing, and streaming image data to the host PC via Ethernet and/or PCIe interfaces.
For many typical OCT workflows, these EDAQ modes have corresponding modes in the host software application and the Laser emission state as discussed in the notes below.
In Imaging-On or Live mode, images are streamed from the EDAQ to the host PC, received on the PC’s interface (Ethernet or PCIe) and then enqueued into the Main Image Buffer by the Capture library. Transmitted images are numbered sequentially starting with n = 1. The DAQ will persist in Live Imaging mode indefinitely until explicitly commanded to stop. Captured images are stored in the Main Image Buffer indefinitely and available for retrieval until overwritten by newer data in a circular buffer fashion, or explicitly cleared/deallocated.
The image width (in number of A-lines) is defined by the period of the Image_sync pulse provided to the EDAQ. The Image_sync pulse period, and therefore the width of each transmitted image, can change instantaneously over a large range from one image to the next. The Capture library accommodates this uncertainty with a restriction only on the minimum image size of 256 A-lines (a maximum image rate of ≈390 Hz for a 100 kHz laser).
If an attempt is made to retrieve the most recently enqueued image but an Image_sync pulse has not been detected by the EDAQ within a user-configurable period (i.e. Image_sync is too slow or missing altogether), the Capture library will automatically transition into a sub-state of Live Imaging mode called Force Trigger mode. The data retrieved from the Main Image Buffer in this instance will be the most recent 256 A-line frame with no external synchronization. This is analogous to the behavior of an oscilloscope without a valid trigger input: it immediately updates the screen with the most recently acquired data in an asynchronous fashion.
The EDAQ provides a Burst Record functionality for workflows that need to gather a finite number of consecutive images following a single start command, such as the acquisition of a 3D volume scan. Burst Record is a sub-state of Live Imaging mode in which the EDAQ acquires a pre-configured number of images (N) and then automatically transitions to Idle following the Nth image. Images are transmitted with metadata indicating that they were acquired in Burst Record mode and are marked with unique and monotonically-increasing image numbers from 1 up to N for easy retrieval from the Main Image Buffer. The DAQ does not have on-board memory which can store image data for later transmission to the host PC; rather, all images – whether Burst Record or not – are stored in host RAM within the Main Image Buffer created and managed by the AxsunOCTCapture library. There must be N+1 valid Image_sync pulses detected by the EDAQ for the Burst Record operation to fully execute.
While in Imaging-Off or Idle mode, no new image data is generated or transmitted from the DAQ and the contents of the Main Image Buffer remain unchanged (unless explicitly cleared/deallocated or overwritten by loading data from disk).
GUI Application or Library
Buttons or API Function Calls
Hardware Control Tool
AxsunOCTControl API
To enable Laser emission issue StartScan()
.
To disable Laser emission issue StopScan()
.
AxsunOCTControl_LW API
axSetLaserEmission()
Image Capture Tool
n/a
AxsunOCTCapture API
n/a
GUI Application or Library
Buttons or API Function Calls
Hardware Control Tool
AxsunOCTControl API
To enable Live Imaging set FPGA register 19 [bit 15] and set FPGA register 2 [bit 2] using WriteDAQRegisterBit()
To disable Live Imaging (-> Idle) clear FPGA register 2 [bit 2] and clear FPGA register 19 [bit 15] using WriteDAQRegisterBit()
AxsunOCTControl_LW API
To enable Live Imaging axImagingCntrlEthernet(-1,0)
To disable Live Imaging axImagingCntrlEthernet(0,0)
Image Capture Tool
n/a
AxsunOCTCapture API
n/a
GUI Application or Library
Buttons or API Function Calls
Hardware Control Tool
AxsunOCTControl API
1) Write the desired number of images to record "N" into FPGA register 33 using SetFPGARegister(33,N)
2) To start the burst record operation set FPGA register 31 [bit 0] using WriteDAQRegisterBit(31,0,1)
3) After the operation has completed, disable Burst Record by clearing FPGA register 31 [bit 0] using WriteDAQRegisterBit(31,0,0)
4) Select Idle mode (as described above) before returning to live mode again.
AxsunOCTControl_LW API
To burst record N images issueaxImagingCntrlEthernet(N,0)
Image Capture Tool
n/a
AxsunOCTCapture API
n/a
GUI Application or Library
Buttons or API Function Calls
Hardware Control Tool
n/a
AxsunOCTControl API
n/a
AxsunOCTControl_LW API
n/a
Image Capture Tool
AxsunOCTCapture API
To enable Live Imaging issue axImagingCntrlPCIe(-1)
To disable Live Imaging (-> Idle) issue axImagingCntrlPCIe(0)
GUI Application or Library
Buttons or API Function Calls
Hardware Control Tool
n/a
AxsunOCTControl API
n/a
AxsunOCTControl_LW API
n/a
Image Capture Tool
AxsunOCTCapture API
To burst record N images issue
axImagingCntrlPCIe(N)
The EDAQ operational mode (and associated Laser emission state) can be controlled using convenient buttons in the Axsun-provided or by low-level FPGA register configurations made via API functions called in a custom application. Note that the API and GUI Tool used depends on whether the EDAQ board is connected via Ethernet or PCIe interface.