AxsunOCTControl_LW
0.9.2.0
A light-weight & cross-platform alternative to the .NET-based AxsunOCTControl.dll.
|
This header file defines the usage of the AxsunOCTControl_LW "lightweight" library in a C or C++ application. More...
Go to the source code of this file.
Typedefs | |
typedef void(__cdecl * | AxConnectCallbackFunctionC_t) (void *) |
Type defintion for a user-provided function to be called upon connection or disconnection of a device. | |
Enumerations | |
enum | AxEdgeSource { EXTERNAL = 0, INTERNAL = 1, LVDS = 2, LVCMOS = 3 } |
DAQ clock and trigger sources. More... | |
enum | AxPolarizationMode { HORIZONTAL = 0, VERTICAL = 1, DIVERSE = 2 } |
DAQ polarization modes. More... | |
enum | AxConnectionType { NONE = 0, USB = 1, RS232_PASSTHROUGH = 2, RS232 = 3, ETHERNET = 4 } |
enum | AxDevType { UNDEFINED = 0, LASER = 40, CLDAQ = 41, EDAQ = 42 } |
enum | AxTECState { TEC_UNINITIALIZED = 0, WARMING_UP = 1, WAITING_IN_RANGE = 2, READY = 3, NOT_INSTALLED = 5, ERROR_NEVER_GOT_TO_READY = 16, ERROR_WENT_OUT_OF_RANGE = 17 } |
Laser TEC states. More... | |
Functions | |
void | axGetErrorString (AxErr errornum, char *error_string) |
Gets a string which explains an error code in a more verbose fashion. More... | |
AxErr | axOpenAxsunOCTControl (uint32_t open_all_interfaces) |
Opens the AxsunOCTControl context for subsequent device communication. More... | |
AxErr | axCloseAxsunOCTControl () |
Closes an AxsunOCTControl context previously opened with axOpenAxsunOCTControl(). More... | |
AxErr | axNetworkInterfaceOpen (uint32_t interface_status) |
Opens, resets, or closes the Ethernet network interface. More... | |
AxErr | axUSBInterfaceOpen (uint32_t interface_status) |
Opens, resets, or closes the USB interface. More... | |
AxErr | axSerialInterfaceOpen (uint32_t interface_status, char *port) |
Opens, resets, or closes a RS-232 serial interface on a given port. More... | |
AxErr | axImagingCntrlEthernet (int16_t number_of_images, uint32_t which_DAQ) |
Control the DAQ operational mode (Live Imaging, Burst Recording, or Imaging Off) when using the Ethernet interface. More... | |
AxErr | axSetImageSyncSource (AxEdgeSource source, float frequency, uint32_t which_DAQ) |
Select the Image_sync source. More... | |
AxErr | axSetSampleClockSource (AxEdgeSource source, uint32_t which_DAQ) |
Select the ADC sample clock source. More... | |
AxErr | axSetSweepTriggerSource (AxEdgeSource source, uint32_t which_DAQ) |
Select the sweep trigger source. More... | |
AxErr | axSetPipelineMode (AxPipelineMode pipeline_mode, uint32_t which_DAQ) |
Select the DAQ's pipeline mode (i.e. bypass mode). More... | |
AxErr | axSetPolarizationMode (AxPolarizationMode polarization_mode, uint32_t which_DAQ) |
Select the DAQ's polarization channel configuration. More... | |
AxErr | axSetEightBitGain (float gain, uint32_t which_DAQ) |
Set the GAIN term during 16- to 8-bit dynamic range compression. More... | |
AxErr | axSetEightBitOffset (float offset, uint32_t which_DAQ) |
Set the OFFSET term during 16- to 8-bit dynamic range compression. More... | |
AxErr | axSetSubsamplingFactor (uint8_t subsampling_factor, uint32_t which_DAQ) |
Set the A-line subsampling factor. More... | |
AxErr | axGetFPGARegister (const uint32_t regnum, uint16_t *regval, uint32_t which_DAQ) |
Gets (i.e. reads) the current value in a FPGA register. More... | |
AxErr | axGetFPGARegisterRange (const uint32_t start_regnum, const uint32_t end_regnum, uint16_t *regvals, const uint32_t bytes_allocated, uint32_t which_DAQ) |
Gets (i.e. reads) current values in a range of FPGA registers. More... | |
AxErr | axGetFPGARegisterDefaults (uint32_t elements_allocated, uint16_t *regnums, uint16_t *regvals, uint32_t *elements_returned, uint32_t which_DAQ) |
Gets (i.e. reads) the programmed power-on default FPGA register configuration script as register number-value pairs. More... | |
AxErr | axSetFPGARegisterDefaults (const uint16_t *regnums, const uint16_t *regvals, const uint32_t count, uint32_t which_DAQ) |
Sets (i.e. writes) a power-on default FPGA register configuration script, overwriting the existing script. More... | |
AxErr | axSetFPGARegister (const uint32_t regnum, const uint16_t regval, uint32_t which_DAQ) |
Sets (i.e. writes) a FPGA register with a single value. More... | |
AxErr | axSetFPGARegisterSingleBit (const uint32_t regnum, const uint32_t bitnum, const uint32_t value, uint32_t which_DAQ) |
Sets or Clears a single bit in a FPGA register. More... | |
AxErr | axSetFPGADataArray (const uint32_t regnum, const uint16_t *data_array, const uint32_t number_of_words, uint32_t which_DAQ) |
Sets (i.e. writes) a FPGA register with an array of multiple values. More... | |
AxErr | axReadDAQPHYRegister (uint32_t phynum, uint32_t regnum, uint16_t *regval, uint32_t which_DAQ) |
Reads the current value in a DAQ PHY register. More... | |
AxErr | axConnectionHeartbeat (uint32_t heartbeat_state, uint32_t which_device) |
Disable or re-enable the Connection Heartbeat for a device connected by Ethernet network or RS-232. More... | |
AxErr | axDebugCommand (uint32_t command_number, uint32_t value_out, uint32_t *command_in, uint32_t *value_in, uint32_t which_device) |
Send a debug command. More... | |
AxErr | axFirmwareVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t which_device) |
Gets the device firmware version. More... | |
AxErr | axFPGAVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build, uint32_t which_device) |
Gets the device FPGA version. More... | |
AxErr | axLibraryVersion (uint32_t *major, uint32_t *minor, uint32_t *patch, uint32_t *build) |
Gets the library version. More... | |
AxErr | axDeviceType (AxDevType *device_type, uint32_t which_device) |
Gets the device type (e.g. Laser, EDAQ). More... | |
AxErr | axSerialNumber (char *serial_number, uint32_t which_device) |
Gets the device serial number string. More... | |
AxErr | axConnectionType (AxConnectionType *connection_type, uint32_t which_device) |
Gets the device connection interface (e.g. USB, Ethernet, RS-232). More... | |
AxErr | axCountDeviceSettings (uint32_t *float_count, uint32_t *int_count, uint32_t *bool_count, uint32_t which_device) |
Counts the number of individual device settings elements for each of the three data types (float, int, and bool). More... | |
AxErr | axGetFloatSetting (uint32_t which_setting, float *setting_value, char *setting_string, uint32_t which_device) |
Gets a floating point setting's value and name string. More... | |
AxErr | axGetIntSetting (uint32_t which_setting, int32_t *setting_value, char *setting_string, uint32_t which_device) |
Gets a integer setting's value and name string. More... | |
AxErr | axGetBoolSetting (uint32_t which_setting, uint8_t *setting_value, char *setting_string, uint32_t which_device) |
Gets a boolean setting's value and name string. More... | |
AxErr | axSettingsToDevice (uint32_t float_count, uint32_t int_count, uint32_t bool_count, float *float_values, int32_t *int_values, uint8_t *bool_values, uint32_t which_device) |
Write device settings to non-volatile memory (i.e. flash). More... | |
uint32_t | axCountConnectedDevices () |
Counts the number of devices successfully connected and enumerated by AxsunOCTControl. More... | |
AxErr | axSetLaserEmission (uint32_t emission_state, uint32_t which_laser) |
Enables or disables laser emission. More... | |
AxErr | axGetLaserEmission (uint32_t *emitting, uint32_t which_laser) |
Gets laser emission status. More... | |
AxErr | axSetClockDelay (uint32_t delay_code, uint32_t which_laser) |
Sets the electronic K-clock delay. More... | |
AxErr | axGetClockDelay (uint32_t *delay_code, uint32_t which_laser) |
Gets the currently configured electronic K-clock delay. More... | |
AxErr | axHomeVDL (uint32_t which_laser) |
Starts the VDL home operation. More... | |
AxErr | axStopVDL (uint32_t which_laser) |
Stops any VDL operation (e.g. move or home) currently in progress. More... | |
AxErr | axMoveRelVDL (float rel_position, float speed, uint32_t which_laser) |
Move the VDL relative to its current position. More... | |
AxErr | axMoveAbsVDL (float abs_position, float speed, uint32_t which_laser) |
Move the VDL to an absolute position. More... | |
AxErr | axGetVDLStatus (float *current_pos, float *target_pos, float *speed, int32_t *error_from_last_home, uint32_t *last_move_time, uint8_t *state, uint8_t *home_switch, uint8_t *limit_switch, uint8_t *VDL_error, uint32_t which_laser) |
Gets the current status of the VDL. More... | |
AxErr | axGetTECState (AxTECState *TEC_state, uint32_t which_TEC, uint32_t which_laser) |
Gets the current state of a Laser Thermo-Electric Cooler (TEC). More... | |
AxErr | axSetDACTable (uint32_t points, uint32_t speed, uint32_t timer1time, uint32_t timer2time, uint32_t timer1duration, uint32_t timer2duration, uint16_t *volts_currents, uint32_t which_laser) |
Sets the DAC table. More... | |
AxErr | axGetDACTable (uint32_t *points, uint32_t *speed, uint32_t *timer1time, uint32_t *timer2time, uint32_t *timer1duration, uint32_t *timer2duration, uint16_t *volts_currents, uint32_t which_laser) |
Gets the currently configured DAC table. More... | |
AxErr | axSetDriveConfiguration (uint32_t which_config, uint32_t which_laser) |
Selects a pre-programmed laser drive configuration. More... | |
AxErr | axGetDriveConfiguration (uint32_t *current_configuration, uint32_t which_laser) |
Gets the currently selected drive configuration. More... | |
AxErr | axRegisterConnectCallback (AxConnectCallbackFunctionC_t callback_function, void *userData) |
Registers a callback function to be executed following a device connection or disconnection event. More... | |
AxErr | axRegisterLabVIEWCallback (LVUserEventRef *refnumptr) |
Registers a LabVIEW user event to be executed following a device connection or disconnection event. More... | |
This header file defines the usage of the AxsunOCTControl_LW "lightweight" library in a C or C++ application.
Refer to the Main Page for C API Usage Guidelines .
enum AxConnectionType |
enum AxDevType |
enum AxEdgeSource |
enum AxPolarizationMode |
enum AxTECState |
Laser TEC states.
AxErr axCloseAxsunOCTControl | ( | ) |
Closes an AxsunOCTControl context previously opened with axOpenAxsunOCTControl().
AxErr axConnectionHeartbeat | ( | uint32_t | heartbeat_state, |
uint32_t | which_device | ||
) |
Disable or re-enable the Connection Heartbeat for a device connected by Ethernet network or RS-232.
heartbeat_state | =1 to enable the Heartbeat, =0 to disable the Heartbeat. |
which_device | The numeric index of the desired device. |
The Connection Heartbeat is enabled by default when a device is connected. This function can be used to disable or subsequently re-enable it. The Connection Heartbeat sends a periodic, non-functional message to a connected device for determining its current connectivity status. If a Heartbeat response is not received, a device disconnection has occurred. If the connection Heartbeat is disabled, a disconnected device will not be recognized as such until the response to a subsequent functional message is not received.
AxErr axConnectionType | ( | AxConnectionType * | connection_type, |
uint32_t | which_device | ||
) |
Gets the device connection interface (e.g. USB, Ethernet, RS-232).
connection_type | The interface on which the device is connected. |
which_device | The numeric index of the desired device. |
uint32_t axCountConnectedDevices | ( | ) |
Counts the number of devices successfully connected and enumerated by AxsunOCTControl.
Count includes Laser engine and DAQ boards. A device connected on two interfaces concurrently will be counted twice and thus is not a recommended configuration.
AxErr axCountDeviceSettings | ( | uint32_t * | float_count, |
uint32_t * | int_count, | ||
uint32_t * | bool_count, | ||
uint32_t | which_device | ||
) |
Counts the number of individual device settings elements for each of the three data types (float, int, and bool).
float_count | The number of floating point settings. |
int_count | The number of integer settings. |
bool_count | The number of boolean settings. |
which_device | The numeric index of the desired device. |
AxErr axDebugCommand | ( | uint32_t | command_number, |
uint32_t | value_out, | ||
uint32_t * | command_in, | ||
uint32_t * | value_in, | ||
uint32_t | which_device | ||
) |
Send a debug command.
command_number | |
value_out | |
command_in | |
value_in | |
which_device | The numeric index of the desired device. |
This function is for Axsun internal use only.
Gets the device type (e.g. Laser, EDAQ).
device_type | The type of device. |
which_device | The numeric index of the desired device. |
AxErr axFirmwareVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t | which_device | ||
) |
Gets the device firmware version.
major | Version number major element. |
minor | Version number minor element. |
patch | Version number patch element. |
which_device | The numeric index of the desired device. |
AxErr axFPGAVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t * | build, | ||
uint32_t | which_device | ||
) |
Gets the device FPGA version.
major | Version number major element. |
minor | Version number minor element. |
patch | Version number patch element. |
build | Version number build element. |
which_device | The numeric index of the desired device. |
Devices which do not have an FPGA will return all version elements = 0.
AxErr axGetBoolSetting | ( | uint32_t | which_setting, |
uint8_t * | setting_value, | ||
char * | setting_string, | ||
uint32_t | which_device | ||
) |
Gets a boolean setting's value and name string.
which_setting | The index of a boolean setting. |
setting_value | The boolean setting value (non-zero if TRUE, zero if FALSE). |
setting_string | A char array pre-allocated with at least 40 bytes into which the setting name will be copied as a null-terminated string. |
which_device | The numeric index of the desired device. |
Use axCountDeviceSettings() to determine the number of boolean settings available (bool_count
) and then call this function in a loop while indexing which_setting
from 0
up to bool_count - 1
.
AxErr axGetClockDelay | ( | uint32_t * | delay_code, |
uint32_t | which_laser | ||
) |
Gets the currently configured electronic K-clock delay.
delay_code | Will contain a 6-bit code representing the configured delay value. |
which_laser | The numeric index of the desired Laser. |
See details for axSetClockDelay().
AxErr axGetDACTable | ( | uint32_t * | points, |
uint32_t * | speed, | ||
uint32_t * | timer1time, | ||
uint32_t * | timer2time, | ||
uint32_t * | timer1duration, | ||
uint32_t * | timer2duration, | ||
uint16_t * | volts_currents, | ||
uint32_t | which_laser | ||
) |
Gets the currently configured DAC table.
points | |
speed | |
timer1time | |
timer2time | |
timer1duration | |
timer2duration | |
currents | |
voltages | |
which_laser | The numeric index of the desired Laser. |
This function is for Axsun internal use only.
AxErr axGetDriveConfiguration | ( | uint32_t * | current_configuration, |
uint32_t | which_laser | ||
) |
Gets the currently selected drive configuration.
current_configuration | The currently selected drive configuration. |
which_laser | The numeric index of the desired Laser. |
Laser Engines must be programmed during manufacture to support multiple drive configurations. Contact Axsun technical support for more information.
void axGetErrorString | ( | AxErr | errornum, |
char * | error_string | ||
) |
Gets a string which explains an error code in a more verbose fashion.
errornum | An error code number returned from other "ax" functions in this library. |
error_string | A char array pre-allocated with at least 512 bytes into which the error explanation will be copied as a nul-terminated string. |
axGetErrorString() can be called at any time. It is unsafe to pass a error_string output buffer allocated with fewer than 512 bytes.
AxErr axGetFloatSetting | ( | uint32_t | which_setting, |
float * | setting_value, | ||
char * | setting_string, | ||
uint32_t | which_device | ||
) |
Gets a floating point setting's value and name string.
which_setting | The index of a floating point setting. |
setting_value | The floating point setting value. |
setting_string | A char array pre-allocated with at least 40 bytes into which the setting name will be copied as a null-terminated string. |
which_device | The numeric index of the desired device. |
Use axCountDeviceSettings() to determine the number of floating point settings available (float_count
) and then call this function in a loop while indexing which_setting
from 0
up to float_count - 1
.
AxErr axGetFPGARegister | ( | const uint32_t | regnum, |
uint16_t * | regval, | ||
uint32_t | which_DAQ | ||
) |
Gets (i.e. reads) the current value in a FPGA register.
regnum | The FPGA register number to read. |
regval | The value read back from the FPGA register. |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axGetFPGARegisterDefaults | ( | uint32_t | elements_allocated, |
uint16_t * | regnums, | ||
uint16_t * | regvals, | ||
uint32_t * | elements_returned, | ||
uint32_t | which_DAQ | ||
) |
Gets (i.e. reads) the programmed power-on default FPGA register configuration script as register number-value pairs.
elements_allocated | Indicates the size (in number of U16 elements, NOT bytes) of the pre-allocated regnums and regvals arrays. |
regnums | Pointer to a pre-allocated array to hold the 16-bit register numbers read back from the device. |
regvals | Pointer to a pre-allocated array to hold the 16-bit register values read back from the device. |
elements_returned | The number of register number-value pairs read back from the device. |
which_DAQ | The numeric index of the desired DAQ. |
regnums
and regvals
are arrays which must be pre-allocated by the user. elements_returned
will never be higher than elements_allocated
, however if elements_returned == elements_allocated
, there may be more register number-value pairs stored on the device which were not returned (indicating elements_allocated
was too small to hold the full FPGA register configuration script).
AxErr axGetFPGARegisterRange | ( | const uint32_t | start_regnum, |
const uint32_t | end_regnum, | ||
uint16_t * | regvals, | ||
const uint32_t | bytes_allocated, | ||
uint32_t | which_DAQ | ||
) |
Gets (i.e. reads) current values in a range of FPGA registers.
start_regnum | The first FPGA register to read in the range. |
end_regnum | The last FPGA register to read in the range; must be greater than or equal to start_regnum . |
regvals | Pointer to a pre-allocated array to hold the 16-bit register values read back from the requested range of FPGA registers. |
bytes_allocated | The number of bytes pre-allocated by the user in the array pointed to by regvals . |
which_DAQ | The numeric index of the desired DAQ. |
The size of the pre-allocated memory pointed to by regvals
must be 2 bytes per register in the included range: bytes_allocated
should equal 2 * (end_regnum - start_regnum + 1)
.
AxErr axGetIntSetting | ( | uint32_t | which_setting, |
int32_t * | setting_value, | ||
char * | setting_string, | ||
uint32_t | which_device | ||
) |
Gets a integer setting's value and name string.
which_setting | The index of an integer setting. |
setting_value | The integer setting value. |
setting_string | A char array pre-allocated with at least 40 bytes into which the setting name will be copied as a null-terminated string. |
which_device | The numeric index of the desired device. |
Use axCountDeviceSettings() to determine the number of integer settings available (int_count
) and then call this function in a loop while indexing which_setting
from 0
up to int_count - 1
.
AxErr axGetLaserEmission | ( | uint32_t * | emitting, |
uint32_t | which_laser | ||
) |
Gets laser emission status.
emitting | Will be non-zero if laser is emitting or =0 if laser is not emitting. |
which_laser | The numeric index of the desired Laser. |
AxErr axGetTECState | ( | AxTECState * | TEC_state, |
uint32_t | which_TEC, | ||
uint32_t | which_laser | ||
) |
Gets the current state of a Laser Thermo-Electric Cooler (TEC).
TEC_state | Current state of the queried laser TEC as described by the AxsunOCTControl_LW::TECState enum. |
which_TEC | The index of which TEC to query (1 or 2). |
which_laser | The numeric index of the desired Laser. |
Some Laser Engines support more than one TEC. To query the state of the primary "TEC 1", use which_TEC
= 1, or for a secondary TEC use which_TEC
= 2.
AxErr axGetVDLStatus | ( | float * | current_pos, |
float * | target_pos, | ||
float * | speed, | ||
int32_t * | error_from_last_home, | ||
uint32_t * | last_move_time, | ||
uint8_t * | state, | ||
uint8_t * | home_switch, | ||
uint8_t * | limit_switch, | ||
uint8_t * | VDL_error, | ||
uint32_t | which_laser | ||
) |
Gets the current status of the VDL.
current_pos | Current VDL position (mm). |
target_pos | Target VDL position (mm). Will be different than the current position during a move or home operation. |
speed | Current speed of VDL (mm/sec). |
error_from_last_home | Accumulated error since last home operation (number of microsteps). |
last_move_time | Time for last move operation (sec). |
state | Integer codes to represent VDL state.
|
home_switch | Non-zero if home (minimum position) limit switch is activated, =0 otherwise. |
limit_switch | Non-zero if maximum position limit switch is activated, =0 otherwise. |
VDL_error | Debugging information for VDL errors. |
which_laser | The numeric index of the desired Laser. |
Refer to documentation on AxsunOCTControl_LW::VDLStatus for additional explanation of function arguments.
AxErr axHomeVDL | ( | uint32_t | which_laser | ) |
Starts the VDL home operation.
which_laser | The numeric index of the desired Laser. |
This function returns after requesting the homing operation from the VDL controller; it does not wait for the mechanical homing operation to complete before returning.
AxErr axImagingCntrlEthernet | ( | int16_t | number_of_images, |
uint32_t | which_DAQ | ||
) |
Control the DAQ operational mode (Live Imaging, Burst Recording, or Imaging Off) when using the Ethernet interface.
number_of_images | =0 for Imaging Off (idle), =-1 for Live Imaging (no record), or any positive value between 1 and 32767 to request the desired number of images in a Burst Record operation. |
which_DAQ | The numeric index of the desired DAQ. |
This function does NOT control the laser and therefore the laser emission must be enabled/disabled separately using axSetLaserEmission(). To control the DAQ operational mode when using the PCIe interface, call axImagingCntrlPCIe() in the AxsunOCTCapture library.
AxErr axLibraryVersion | ( | uint32_t * | major, |
uint32_t * | minor, | ||
uint32_t * | patch, | ||
uint32_t * | build | ||
) |
Gets the library version.
major | Version number major element. |
minor | Version number minor element. |
patch | Version number patch element. |
build | Version number build element. |
AxErr axMoveAbsVDL | ( | float | abs_position, |
float | speed, | ||
uint32_t | which_laser | ||
) |
Move the VDL to an absolute position.
abs_position | The new desired position in mm. |
speed | The speed at which to move in mm/sec (maximum =7.5). |
which_laser | The numeric index of the desired Laser. |
AxErr axMoveRelVDL | ( | float | rel_position, |
float | speed, | ||
uint32_t | which_laser | ||
) |
Move the VDL relative to its current position.
rel_position | The distance to move from the current position in mm. |
speed | The speed at which to move in mm/sec (maximum =7.5). |
which_laser | The numeric index of the desired Laser. |
AxErr axNetworkInterfaceOpen | ( | uint32_t | interface_status | ) |
Opens, resets, or closes the Ethernet network interface.
interface_status | =1 opens the interface or resets an existing open interface, =0 closes the interface. |
When the interface is open, devices present on this interface will be detected, enumerated, and trigger the execution of a callback function registered using axRegisterConnectCallback(). Use this function if the interface was not opened automatically during the initial axOpenAxsunOCTControl() call.
AxErr axOpenAxsunOCTControl | ( | uint32_t | open_all_interfaces | ) |
Opens the AxsunOCTControl context for subsequent device communication.
open_all_interfaces | If TRUE the USB and Ethernet interfaces will be started automatically. If FALSE no interfaces will be started. |
See C API Usage Guidelines on the Main Page for more information.
If interfaces are not opened at the time of this function call, they can be opened later using axNetworkInterfaceOpen(), axUSBInterfaceOpen(), or axSerialInterfaceOpen(). This allows the registration of the connect/disconnect callback function using axRegisterConnectCallback() prior to opening interfaces and gives the user individual control over which interface(s) to use.
Close an AxsunOCTControl context by calling axCloseAxsunOCTControl().
AxErr axReadDAQPHYRegister | ( | uint32_t | phynum, |
uint32_t | regnum, | ||
uint16_t * | regval, | ||
uint32_t | which_DAQ | ||
) |
Reads the current value in a DAQ PHY register.
phynum | The PHY to read. |
regnum | The PHY register number to read. |
regval | The value read back from the PHY register. |
This function is for Axsun internal use only.
AxErr axRegisterConnectCallback | ( | AxConnectCallbackFunctionC_t | callback_function, |
void * | userData | ||
) |
Registers a callback function to be executed following a device connection or disconnection event.
callback_function | A user-supplied function to be called. |
userData | An arbitrary structure to be made available inside the callback function (or NULL if unused). |
The supplied callback function will be executed by a background thread when a new device is detected or when an existing device is disconnected. Within the callback function, access is provided to arbitrary user data passed as a void* parameter to this function.
AxErr axRegisterLabVIEWCallback | ( | LVUserEventRef * | refnumptr | ) |
Registers a LabVIEW user event to be executed following a device connection or disconnection event.
refnumptr | A refnum pointer of a LabVIEW user event. |
LabVIEW code can be called directly from this library when a new device is detected or when an existing device is disconnected, similar to a C-based callback function registered using axRegisterConnectCallback(). See the AxsunOCTControl_LW LabVIEW example project and extcode.h header file (provided by National Instruments) for more details.
AxErr axSerialInterfaceOpen | ( | uint32_t | interface_status, |
char * | port | ||
) |
Opens, resets, or closes a RS-232 serial interface on a given port.
interface_status | =1 opens an interface or resets an existing open interface, =0 closes an interface if a port is provided, or closes all interfaces if port is "" (empty string). |
port | Null-terminated char array describing the name of the port (e.g. typically "COM_" on Windows or "/dev/tty.___" on Linux/macOS) |
When the interface is open, a device present on this interface will be detected, enumerated, and trigger the execution of a callback function registered using axRegisterConnectCallback().
AxErr axSerialNumber | ( | char * | serial_number, |
uint32_t | which_device | ||
) |
Gets the device serial number string.
serial_number | A char array pre-allocated with at least 40 bytes into which the device serial number will be copied as a null-terminated string. |
which_device | The numeric index of the desired device. |
AxErr axSetClockDelay | ( | uint32_t | delay_code, |
uint32_t | which_laser | ||
) |
Sets the electronic K-clock delay.
delay_code | A 6-bit code representing the desired delay value. |
which_laser | The numeric index of the desired Laser. |
<TODO> SOME DETAILS HERE
AxErr axSetDACTable | ( | uint32_t | points, |
uint32_t | speed, | ||
uint32_t | timer1time, | ||
uint32_t | timer2time, | ||
uint32_t | timer1duration, | ||
uint32_t | timer2duration, | ||
uint16_t * | volts_currents, | ||
uint32_t | which_laser | ||
) |
Sets the DAC table.
points | |
speed | |
timer1time | |
timer2time | |
timer1duration | |
timer2duration | |
currents | |
voltages | |
which_laser | The numeric index of the desired Laser. |
This function is for Axsun internal use only.
AxErr axSetDriveConfiguration | ( | uint32_t | which_config, |
uint32_t | which_laser | ||
) |
Selects a pre-programmed laser drive configuration.
which_config | The desired configuration number (0, 1, 2, or 3). |
which_laser | The numeric index of the desired Laser. |
Laser Engines must be programmed during manufacture to support multiple drive configurations. Contact Axsun technical support for more information.
AxErr axSetEightBitGain | ( | float | gain, |
uint32_t | which_DAQ | ||
) |
Set the GAIN term during 16- to 8-bit dynamic range compression.
gain | Gain must be between 0 and 15.999756. |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetEightBitOffset | ( | float | offset, |
uint32_t | which_DAQ | ||
) |
Set the OFFSET term during 16- to 8-bit dynamic range compression.
offset | Offset must be between -128.0 and 127.996094. |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetFPGADataArray | ( | const uint32_t | regnum, |
const uint16_t * | data_array, | ||
const uint32_t | number_of_words, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) a FPGA register with an array of multiple values.
regnum | The FPGA register number in which to write. |
data_array | Pointer to an array containing 16-bit values to be written. |
number_of_words | The number of 16-bit register values pointed to by data_array . |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetFPGARegister | ( | const uint32_t | regnum, |
const uint16_t | regval, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) a FPGA register with a single value.
regnum | The FPGA register number in which to write. |
regval | The value to be written. |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetFPGARegisterDefaults | ( | const uint16_t * | regnums, |
const uint16_t * | regvals, | ||
const uint32_t | count, | ||
uint32_t | which_DAQ | ||
) |
Sets (i.e. writes) a power-on default FPGA register configuration script, overwriting the existing script.
regnums | Pointer to an array containing 16-bit register numbers. |
regvals | Pointer to an array containing 16-bit register values. |
count | The number of register number-value pairs to be written to the device. |
which_DAQ | The numeric index of the desired DAQ. |
regnums
points to an array containing count
register numbers and regvals
points to an equal-sized array of corresponding register default values.
AxErr axSetFPGARegisterSingleBit | ( | const uint32_t | regnum, |
const uint32_t | bitnum, | ||
const uint32_t | value, | ||
uint32_t | which_DAQ | ||
) |
Sets or Clears a single bit in a FPGA register.
regnum | The FPGA register number in which to set or clear a bit. |
bitnum | The bit number in the interval [0..15] to set or clear. |
value | =1 to Set the bit, =0 to Clear the bit. |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetImageSyncSource | ( | AxEdgeSource | source, |
float | frequency, | ||
uint32_t | which_DAQ | ||
) |
Select the Image_sync source.
source | The desired Image_sync source. Must be either INTERNAL, LVCMOS, or LVDS. |
frequency | The Image_sync frequency (Hz); this parameter is optional and is ignored when source is not INTERNAL. |
which_DAQ | The numeric index of the desired DAQ. |
Use INTERNAL Image_sync source only for simulation and troubleshooting.
AxErr axSetLaserEmission | ( | uint32_t | emission_state, |
uint32_t | which_laser | ||
) |
Enables or disables laser emission.
emission_state | =1 enables laser emission, =0 disables laser emission. |
which_laser | The numeric index of the desired Laser. |
AxErr axSetPipelineMode | ( | AxPipelineMode | pipeline_mode, |
uint32_t | which_DAQ | ||
) |
Select the DAQ's pipeline mode (i.e. bypass mode).
pipeline_mode | The desired pipeline mode. |
which_DAQ | The numeric index of the desired DAQ. |
Insure that A-line subsampling has been configured with SetSubsamplingFactor() prior to setting a pipeline mode which could saturate the data interface bandwidth if subsampling is insufficient.
AxErr axSetPolarizationMode | ( | AxPolarizationMode | polarization_mode, |
uint32_t | which_DAQ | ||
) |
Select the DAQ's polarization channel configuration.
polarization_mode | The desired polarization channel (HORIZONTAL, VERTICAL, or DIVERSE). |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetSampleClockSource | ( | AxEdgeSource | source, |
uint32_t | which_DAQ | ||
) |
Select the ADC sample clock source.
source | The desired sample clock source. Must be either EXTERNAL (Laser k-clock) or INTERNAL (500 MS/s). |
which_DAQ | The numeric index of the desired DAQ. |
Use INTERNAL sample clock source only for simulation and troubleshooting.
AxErr axSetSubsamplingFactor | ( | uint8_t | subsampling_factor, |
uint32_t | which_DAQ | ||
) |
Set the A-line subsampling factor.
subsampling_factor | Subsampling factor must be between 1 and 166. |
which_DAQ | The numeric index of the desired DAQ. |
AxErr axSetSweepTriggerSource | ( | AxEdgeSource | source, |
uint32_t | which_DAQ | ||
) |
Select the sweep trigger source.
source | The desired sweep trigger source. Must be either EXTERNAL (from Laser) or INTERNAL (100 kHz). |
which_DAQ | The numeric index of the desired DAQ. |
Use INTERNAL sweep trigger source only for simulation and troubleshooting.
AxErr axSettingsToDevice | ( | uint32_t | float_count, |
uint32_t | int_count, | ||
uint32_t | bool_count, | ||
float * | float_values, | ||
int32_t * | int_values, | ||
uint8_t * | bool_values, | ||
uint32_t | which_device | ||
) |
Write device settings to non-volatile memory (i.e. flash).
float_count | The number of floating point settings in the float_values array. |
int_count | The number of integer settings in the int_values array. |
bool_count | The number of boolean settings in the bool_values array. |
float_values | An array of floating point setting values. |
int_values | An array of integer setting values. |
bool_values | An array of boolean setting values (1 = TRUE, 0 = FALSE). |
which_device | The numeric index of the desired device. |
After reading all device setting values and names (using axCountDeviceSettings(), axGetFloatSetting(), axGetIntSetting(), and axGetBoolSetting()), original (i.e. unchanged) and new (i.e. changed or updated) settings are written back to the device's non-volatile memory with this function. Do NOT change the ordering or indexing of the device settings. The original values of unchanged settings must be written back to the device with the changed ones.
AxErr axStopVDL | ( | uint32_t | which_laser | ) |
Stops any VDL operation (e.g. move or home) currently in progress.
which_laser | The numeric index of the desired Laser. |
AxErr axUSBInterfaceOpen | ( | uint32_t | interface_status | ) |
Opens, resets, or closes the USB interface.
interface_status | =1 opens the interface or resets an existing open interface, =0 closes the interface. |
When the interface is open, devices present on this interface will be detected, enumerated, and trigger the execution of a callback function registered using axRegisterConnectCallback(). Use this function if the interface was not opened automatically during the initial axOpenAxsunOCTControl() call.