Software Library API naibrd 1.62
See all documentation at naii.docs.com
naibrd_sd.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include "functions/naibrd_modCommon.h"
#include "functions/naibrd_sd.h"
#include "maps/nai_map_modCommon.h"
#include "maps/nai_map_sd.h"
#include "advanced/naibrd_adv.h"
#include "naibrd_config.h"
#include "boards/naibrd_gen5.h"

Functions

NAIBRDFUNC int32_t NAIAPI naibrd_SD_GetChannelCount (uint32_t modid)
 Returns the number of channels for the specified SD Module ID.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetAngle (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outangle)
 Retrieves the angle reading from the specified channel. The angle value is scaled between 0 - 359.9954 Deg.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetVelocity (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outvelocity)
 Retrieves velocity reading from the specified channel. The Velocity Scale register is read and used to scale the returned value between +/- 190.7348 RPS.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFrequency (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outfrequency)
 Retrieves the Frequency in Hertz from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetSignalVoltage (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outsigvolt)
 Retrieves the signal voltage (VLL) in volts from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetRefVoltage (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outrefvolt)
 Retrieves the reference voltage in volts from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetSine (int32_t cardIndex, int32_t module, int32_t channel, float32_t *outsine)
 Retrieves the Sine from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetCosine (int32_t cardIndex, int32_t module, int32_t channel, float32_t *outcosine)
 Retrieves the Cosine from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_status_type_t type, uint32_t *outstatus)
 Retrieves the SD Status from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ClearStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_status_type_t type)
 Clears the latched status for the specified SD channel and status type.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetLatch (int32_t cardIndex, int32_t module, int32_t channel, uint32_t latch)
 Sets the Latch Control register to Latch the Angle Data for the specified channel. The Latch Control register
allows for simultaneously measure inputs. After latching the channel, the angle data is latched until it is released by reading the channel's Angle Data register or setting the Latch Control register to 0.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetLatch (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outlatch)
 Retrieves the Latch Control register to Latch the Angle Data for the specified channel. The Latch Control register
allows for simultaneously measure inputs. After latching the channel, the angle data is latched until is release released by reading the channel's Angle Data register or setting the Latch Control register to 0.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetChanMode (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_format_t mode)
 Sets the SD Configuration Mode for the specified channel.

 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetChanMode (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_format_t *outmode)
 Retrieves the SD Configuration Mode from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, uint32_t setting)
 Sets the channel status enable bit for the specified channel. When the channel status enable is set to "NAI_SD_CHAN_STATUS_ENABLE_ACTIVE", it will report any bad status in the following module functions: 1. BIT Status,.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetChanStatusEnable (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outsetting)
 Gets the channel status enable bit for the specified channel. When the channel status enable is set to "NAI_SD_CHAN_STATUS_ENABLE_ACTIVE", it will report any bad status in the following module functions: 1. BIT Status,.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetVelScale (int32_t cardIndex, int32_t module, int32_t channel, uint32_t velscale)
 Sets the Velocity Scale Factor for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetVelScale (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outvelscale)
 Retrieves the Velocity Scale Factor from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetRatio (int32_t cardIndex, int32_t module, int32_t channel, uint32_t ratio)
 Sets the ratio for the specified channel to be used for a two-speed or multi-speed configuration. When a 'ratio' is programmed, the odd channels provide the 'coarse' angle measurement. The even channels provide the 'combined' angle reading for both the coarse and fine angle measurements (which is a more accurate representation of the coarse channel). Ratio = 1 for single speed (independent channel) operation. 2 <= Ratio <= 255 for even channels for two-speed or multi-speed configuration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetRatio (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outratio)
 Retrieves the ratio from the specified channel to be used for a two-speed or multi-speed configuration. When a 'ratio' is programmed, the odd channels provide the 'coarse' angle measurement. The even channels provide the 'combined' angle reading for both the coarse and fine angle measurements (which is a more accurate representation of the coarse channel). Ratio = 1 for single speed (independent channel) operation. 2 <= Ratio <= 255 for even channels for two-speed or multi-speed configuration.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetSigLossThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t threshold)
 Sets the minimum signal voltage level in volts before indicating a signal loss for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetSigLossThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outthreshold)
 Retrieves the minimum signal voltage level in volts before indicating a signal loss from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetRefLossThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t threshold)
 Sets the minimum reference voltage level in volts before indicating a reference loss for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetRefLossThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outthreshold)
 Retrieves the minimum reference voltage level in volts before indicating a reference loss from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetOpenThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t threshold)
 Sets the open circuit threshold of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetOpenThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outthreshold)
 Retrieves the open threshold of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetShortThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t threshold)
 Sets the short threshold of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetShortThreshold (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outthreshold)
 Retrieves the short threshold of the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetBandwidth (int32_t cardIndex, int32_t module, int32_t channel, uint32_t bandwidth)
 Sets the Bandwidth for the specified channel in 2 Hz resolution from 6Hz to 1280Hz.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetBandwidth (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outbandwidth)
 Retrieves the Bandwidth from the specified channel in 2 Hz resolution from 6Hz to 1280Hz.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetBandwidthSelect (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_bandwidth_select_t bwselect)
 Sets the Bandwidth Select for the specified channel. The BW Select can be set to "Automatic" or "Manual". When in "Automatic BW" mode, the input reference frequency is read and the bandwidth is automatically adjusted to approximately 1/10 of the carrier frequency. The Auto Bandwidth range has a minimum value of 10 Hz and a maximum value of 100 Hz. When in "Manual BW" mode, the user can enter the bandwidth between the range of 6 Hz and 1280 Hz, in 2 Hz increments.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetBandwidthSelect (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_bandwidth_select_t *outbwselect)
 Retrieves the Bandwidth Select from the specified channel. The BW Select can be set to "Automatic" or "Manual". When in "Automatic BW" mode, the input reference frequency is read and the bandwidth is automatically adjusted to approximately 1/10 of the carrier frequency. The Auto Bandwidth range has a minimum value of 10 Hz and a maximum value of 100 Hz. When in "Manual BW" mode, the user can enter the bandwidth between the range of 6 Hz and 1280 Hz, in 2 Hz increments.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetEncoderResolution (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_enc_or_comm_setting_t resolution)
 Sets the Encoder Output Resolution or Commutation for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetEncoderResolution (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_enc_or_comm_setting_t *outresolution)
 Retrieves the Encoder Output Resolution or Commutation from the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFloatingPointAngleOffset (int32_t cardIndex, int32_t module, int32_t channel, float64_t angleOffset)
 Sets the HW floating point angle offset for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFloatingPointAngleOffset (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outAngleOffset)
 Retrieves the HW floating point angle offset for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFloatingPointAngleScale (int32_t cardIndex, int32_t module, int32_t channel, float64_t angleScale)
 Sets the HW floating point angle scale factor for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFloatingPointAngleScale (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outAngleScale)
 Retrieves the HW floating point angle scale factor for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFloatingPointVelocityOffset (int32_t cardIndex, int32_t module, int32_t channel, float64_t velocityOffset)
 Sets the HW floating point velocity offset for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFloatingPointVelocityOffset (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outVelocityOffset)
 Retrieves the HW floating point velocity offset for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFloatingPointVelocityScale (int32_t cardIndex, int32_t module, int32_t channel, float64_t velocityScale)
 Sets the HW floating point velocity scale factor for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFloatingPointVelocityScale (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outVelocityScale)
 Retrieves the HW floating point velocity scale factor for the specified S/D channel. This feature is only applicable when the HW floating point conversion mode is enabled (See naibrd_SetFloatingPointModeEnable()). Not all modules support HW floating point conversions, please refer to the module's HW specification for details.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetThreshold (int32_t cardIndex, int32_t module, int32_t channel, naibrd_sd_threshold_t type, float64_t threshold)
 Sets the threshold (depending on the naibrd_sd_threshold_t type specified) for the specified SD channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetThreshold (int32_t cardIndex, int32_t module, int32_t channel, naibrd_sd_threshold_t type, float64_t *p_outthreshold)
 Retrieves threshold (depending on the naibrd_sd_threshold_t type specified) for the specified SD channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetInverse (int32_t cardIndex, int32_t module, int32_t channel, uint32_t value)
 Sets the inverse for the sin, cos, or reference controls. This is only supported on FPGA rev > 9.13.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetInverse (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outvalue)
 Retrieves the inverse for the sin, cos, or reference controls. This is only supported on FPGA rev > 9.13.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetActiveChannel (int32_t cardIndex, int32_t module, int32_t channel, uint32_t setting)
 Note: This routine has been deprecated and has been replaced with naibrd_SD_SetChanStatusEnable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetActiveChannel (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outsetting)
 Note: This routine has been deprecated and has been replaced with naibrd_SD_GetChanStatusEnable.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetModuleBITEnable (int32_t cardIndex, int32_t module, nai_sd_test_enable_t type, bool_t bitEnable)
 Enables/Disables the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetModuleBITEnable (int32_t cardIndex, int32_t module, nai_sd_test_enable_t type, bool_t *p_outbitEnable)
 Retrieves the state (Enabled or disabled) of the BIT test specified by the type parameter. BITs are described as follows:
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_CheckPowerOnBITComplete (int32_t cardIndex, int32_t module, bool_t *p_outpbitComplete)
 Retrieves the Power-On BIT (PBIT) status (complete or incomplete) for the specified module. The PBIT result will be in the BIT status register. Feature supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetTestAngle (int32_t cardIndex, int32_t module, float64_t testangle)
 Sets the Test Angle used for the D0 Test.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetTestAngle (int32_t cardIndex, int32_t module, float64_t *outtestangle)
 Retrieves the Test Angle used for the D0 Test.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetD2TestVerifyValue (int32_t cardIndex, int32_t module, uint32_t value)
 Sets the D2 Test Verify value. When the D2 test is enabled, the board will set the D2 Test Verify register to 0x55. An external application can write a value to the D2 Test Verify register and then read it after 30 seconds to verify that the background bit testing (D2 test) is activated.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetD2TestVerifyValue (int32_t cardIndex, int32_t module, uint32_t *outvalue)
 Retrieves the D2 Test Verify value. When the D2 test is enabled, the board will set the D2 Test Verify register to 0x55. An external application can write a value to the D2 Test Verify register and then read it after 30 seconds to verify that the background bit testing (D2 test) is activated.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetBITErrorLimit (int32_t cardIndex, int32_t module, int32_t channel, float64_t bitErrorLimit)
 Sets the BIT Test Error Limit for the specified SD channel. Feature supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetBITErrorLimit (int32_t cardIndex, int32_t module, int32_t channel, float64_t *p_outbitErrorLimit)
 Retrieves the BIT Test Error Limit for the specified SD channel. Feature supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetAngleDelta (int32_t cardIndex, int32_t module, int32_t channel, float64_t angledelta)
 Sets the angle delta in degrees before indicating an angle delta alter for the specified channel. Setting the angle delta to zero, disables the Angle Delta alert.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetAngleDelta (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outangledelta)
 Retrieves the angle delta in degrees before indicating an angle delta alter from the specified channel. Setting the angle delta to zero, disables the Angle Delta alert.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetAngleDataInit (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Set Angle Delta Monitoring for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetAngleDataInit (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outenable)
 Get the current state of Angle Delta Monitoring for the channel specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_status_type_t type, nai_sd_enable_t intenable)
 Sets the Interrupt Enable associated with the Status Type for the specified channel. By default, interrupts are disabled. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetInterruptEnable (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_status_type_t type, nai_sd_enable_t *outintenable)
 Retrieves the Interrupt Enable associated with the Status Type from the specified channel. By default, interrupts are disabled. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetEdgeLevelInterrupt (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_status_type_t type, nai_sd_interrupt_t interruptType)
 Sets the Interrupt Edge/Level property for the specified channel and interrupt status type. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetEdgeLevelInterrupt (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_status_type_t type, nai_sd_interrupt_t *outinterruptType)
 Retrieves the Interrupt Edge/Level property for the specified channel and interrupt status type. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetInterruptVector (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, uint32_t interruptvector)
 Sets the Interrupt Vector associated with the Status Type for the specified channel. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetInterruptVector (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, uint32_t *outinterruptvector)
 Retrieves the Interrupt Vector associated with the Status Type from the specified channel. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetInterruptSteering (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified channel. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetInterruptSteering (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, naibrd_int_steering_t *outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOCount (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outcount)
 Retrieves the number of items in the S/D Buffer Fifo for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOValue (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outvalue)
 Retrieves one value from the S/D Fifo Buffer for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOFloatValue (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outvalue)
 Retrieves one value in floating-point format from the S/D Fifo Buffer for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOLoThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t threshold)
 Sets the number of data words the FIFO will have left before setting the LoThreshold bit in the FIFO status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOLoThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outthreshold)
 Retrieves the count set in the LoThreshold register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOHiThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t threshold)
 Sets the number of data words the FIFO will receive before setting the HiThreshold bit in the FIFO status register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOHiThreshold (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outthreshold)
 Retrieves the count set in the HiThreshold register.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, uint32_t empty)
 Sets the almost empty mark/threshold to set or to reset the SD channel's FIFO Status "Almost Empty" bit. When the SD channel's FIFO counter is less than or equal to the almost empty mark, the "Almost Empty" bit will be set (1). When the SD channel's FIFO counter is greater than the almost empty mark, the "Almost Empty" bit will be reset (0).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOAlmostEmpty (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outempty)
 Retrieves the "almost empty" mark/threshold used to set or to reset the SD channel's FIFO Status "Almost Empty" bit. When the SD channel's FIFO counter is less than or equal to the "almost empty" mark, the "Almost Empty" bit will be set (1). When the A/D channel's FIFO counter is greater than the "almost empty" mark, the "Almost Empty" bit will be reset (0).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, uint32_t full)
 Sets the almost full mark/threshold to set or to reset the SD channel's FIFO Status "Almost Full" bit. When the SD channel's FIFO counter is less than or equal to the almost full mark, the "Almost Full" bit will be set (1). When the SD channel's FIFO counter is greater than the almost full mark, the "Almost Full" bit will be reset (0).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOAlmostFull (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outfull)
 Retrieves the "almost full" mark/threshold to set or to reset the SD channel's FIFO Status "Almost Full" bit. When the SD channel's FIFO counter is less than or equal to the "almost full" mark, the "Almost Full" bit will be set (1). When the SD channel's FIFO counter is greater than the "almost full" mark, the "Almost Full" bit will be reset (0).
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOInterruptVector (int32_t cardIndex, int32_t module, int32_t channel, uint32_t vector32)
 Sets the Interrupt Vector for the specified SD channel's FIFO Buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOInterruptVector (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outvector32)
 Retrieves the Interrupt Vector for the specified SD channel's FIFO Buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_fifo_status_t edgelevelmask)
 Sets the edge or level triggered interrupt mask for the specified SD channel's FIFO Buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOInterruptEdgeLevel (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_fifo_status_t *outedgelevelmask)
 Retrieves the edge or level triggered interrupt mask for the specified SD channel's FIFO Buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOInterruptSteering (int32_t cardIndex, int32_t module, int32_t channel, naibrd_int_steering_t steering)
 Sets the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOInterruptSteering (int32_t cardIndex, int32_t module, int32_t channel, naibrd_int_steering_t *outsteering)
 Retrieves the Interrupt Steering which indicates the interrupt direction for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFODelay (int32_t cardIndex, int32_t module, int32_t channel, uint32_t delay)
 Sets the time delay before samples are taken after the trigger occurs. The LSB of this value is 10.24us. The maximum delay is about 335 ms.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFODelay (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outdelay)
 Retrieves the time delay before samples are taken after the trigger occurs. This LSB of this value is 10.24us.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOSize (int32_t cardIndex, int32_t module, int32_t channel, uint32_t size)
 Sets the number of samples we take after the trigger occurs.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOSize (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outsize)
 Retrieves the number of samples we take after the trigger occurs.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOSampleRateValue (int32_t cardIndex, int32_t module, int32_t channel, float64_t samplerate)
 Sets the time in usec between samples taken (0 to 671078 us) in intervals of 10.24 usec.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOSampleRateValue (int32_t cardIndex, int32_t module, int32_t channel, float64_t *outsamplerate)
 Retrieves the time in usec between samples taken (0 to 671078 us) in intervals of 10.24 usec.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOSampleRate (int32_t cardIndex, int32_t module, int32_t channel, uint32_t samplerate)
 Sets the time between samples taken. The LSB is 10.24us.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOSampleRate (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outsamplerate)
 Retrieves the time between samples taken. The LSB is 10.24us.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFODataType (int32_t cardIndex, int32_t module, int32_t channel, uint32_t datatype)
 Sets the type of data to acquire in the buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFODataType (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outdatatype)
 Retrieves the type of data to acquire in the buffer.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ClearFIFO (int32_t cardIndex, int32_t module, int32_t channel)
 Clears the S/D FIFO buffers for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOTrigMode (int32_t cardIndex, int32_t module, int32_t channel, uint32_t trigmode)
 Sets the trigger mode to start data buffering.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOTrigMode (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outtrigmode)
 Retrieves the trigger mode to start data buffering.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SoftwareTrigger (int32_t cardIndex, int32_t module)
 Sends a software trigger to all channels.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFORealtimeStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outfifostatus)
 Retrieves the S/D Buffer Fifo Real-time Status for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOLatchedStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outfifostatus)
 Retrieves the S/D Buffer Fifo Latched Status for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ClearFIFOLatchedStatus (int32_t cardIndex, int32_t module, int32_t channel, uint32_t bit)
 Clears the S/D Buffer Fifo Latched Status for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetFIFOIntEnable (int32_t cardIndex, int32_t module, int32_t channel, uint32_t intEnableFifo)
 Set the S/D Buffer Fifo interrupt enable for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetFIFOIntEnable (int32_t cardIndex, int32_t module, int32_t channel, uint32_t *outIntEnableFifo)
 Retrieves the S/D Buffer Fifo interrupt enable for the specified channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetOnboardRefFreq (int32_t cardIndex, int32_t module, float64_t frequency)
 Sets the Frequency in Hz for the Optional Onboard Reference Supply. Frequency range is 47 to 10000 Hz.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetOnboardRefFreq (int32_t cardIndex, int32_t module, float64_t *outfrequency)
 Retrieves the Frequency in Hz for the Optional Onboard Reference Supply. Frequency range is 47 to 10000 Hz.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetOnboardRefVoltage (int32_t cardIndex, int32_t module, float64_t voltage)
 Sets the Voltage in volts for the Optional Onboard Reference Supply. Voltage range is 2 to 115 volts.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetOnboardRefVoltage (int32_t cardIndex, int32_t module, float64_t *outvoltage)
 Retrieves the Voltage in volts for the Optional Onboard Reference Supply. Voltage range is 2 to 115 volts.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ConvertToAngle (uint32_t modid, uint32_t rawdata, float64_t *outangle)
 Converts raw angle data to an angle value in degrees.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ConvertToAngleRaw (uint32_t modid, float64_t angle, uint32_t *outrawdata)
 Converts Angle value to raw angle value.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ConvertToVelocity (uint32_t modid, uint32_t rawdata, float64_t rawvelscale, float64_t *outvelocity)
 Converts raw velocity data to a velocity value in RPS.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ConvertToFrequency (uint32_t modid, uint32_t rawdata, float64_t *outfreq)
 Converts raw frequency data to a frequency value represented as a 64 bit float.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ConvertToVoltage (uint32_t modid, uint32_t rawdata, float64_t *outvoltage)
 Converts raw voltage data to a voltage value represented as a 64 bit float.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_ConvertToVoltageRaw (uint32_t modid, float64_t voltage, uint32_t *p_outrawData)
 Converts scaled voltage value to raw voltage data.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetRaw (int32_t cardIndex, int32_t module, nai_sd_raw_t type, uint32_t rawdata)
 Sets the raw data value in the register associated to the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetRaw (int32_t cardIndex, int32_t module, nai_sd_raw_t type, uint32_t *outrawdata)
 Sets the raw data value in the register associated with the register type specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_channel_raw_t type, uint32_t rawdata)
 Sets the raw data value in the register associated with the channel and channel register type specified. BIT Error Limit feature supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetChannelRaw (int32_t cardIndex, int32_t module, int32_t channel, nai_sd_channel_raw_t type, uint32_t *outrawdata)
 Retrieves the raw data value in the register associated with the channel and channel register type specified. BIT Error Limit feature supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetStatusRaw (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, uint32_t statusraw)
 Sets the raw data value in the status register associated with the status type specified. This function may be used to clear multiple latched status bits in the status word. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetStatusRaw (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, uint32_t *outstatusraw)
 Retrieves the raw data value in the status register associated with the status type specified. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_SetInterruptEnableRaw (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, uint32_t statusintenabraw)
 Sets the raw data value in the interrupt enable register associated with the status type specified. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_SD_GetInterruptEnableRaw (int32_t cardIndex, int32_t module, nai_sd_status_type_t type, uint32_t *outstatusintenabraw)
 Retrieves the raw data value in the interrupt enable register associated with the status type specified. NAI_SD_STATUS_SUMMARY supported in FPGA Version >= 9.28.
 

Variables

union { 
 
   uint32_t   raw 
 
   float32_t   outValue 
 
uintToFloatUnion 
 

Variable Documentation

◆ outValue

float32_t outValue

◆ raw

uint32_t raw

◆ [union]

union { ... } uintToFloatUnion