xpci3xxx  1.00.00
Macros
Autorefresh mode

Macros

#define CMD_xpci3xxx_InitAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 14,long)
 Initialise an analog input auto-refresh acquisition. More...
 
#define CMD_xpci3xxx_StartAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 15,long)
 Start an analog input auto refresh conversion. More...
 
#define CMD_xpci3xxx_StopAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 16,long)
 Stop an analog input auto refresh conversion. More...
 
#define CMD_xpci3xxx_ReadAnalogInputAutoRefreshValueAndCounter   _IOR(xpci3xxx_MAGIC, 17,long)
 Read the auto refresh values. More...
 
#define CMD_xpci3xxx_ReleaseAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 18,long)
 Release (stop) an analog input auto refresh conversion. More...
 

Detailed Description

Macro Definition Documentation

◆ CMD_xpci3xxx_InitAnalogInputAutoRefresh

#define CMD_xpci3xxx_InitAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 14,long)

Initialise an analog input auto-refresh acquisition.

This function prepare the board for an acquisition in auto-refresh mode and allocate the relevant resources. A call to CMD_xpci3xxx_ReleaseAnalogInputAutoRefresh is necessary to release theses resources before being able to start another type of acquisition.

Parameters
[in]uint32_t*arg[(3 * ADDIDATA_MAX_AI) + 6] contains initialization parameters - Must be a pointer to an array of maximum 54 uint32_t (216 bytes) -

The ordered list of parameters is given below.

  • arg[0] : Number of channel to initialize (1 .. ADDIDATA_MAX_AI)
  • arg[1] .. arg[arg[0]-1] : List of channels to initialize.
  • arg[arg[0]] .. arg[2*arg[0]-1] : Gain factor array of the channels
    • ADDIDATA_1_GAIN : Gain = 1
    • ADDIDATA_2_GAIN : Gain = 2
    • ADDIDATA_5_GAIN : Gain = 5
    • ADDIDATA_10_GAIN: Gain = 10
  • arg[2*arg[0]] .. arg[3*arg[0]-1] : Polarity of the channels
    • ADDIDATA_UNIPOLAR: 0V - +10V
    • ADDIDATA_BIPOLAR: -10V - +10V
  • arg[3*arg[0]+1] : Hardware configuration = 0 : Single ended HW config | 1 : Differential HW config
  • arg[3*arg[0]+2] : Number of sequence = 0 : continuous mode | 1: single mode
  • arg[3*arg[0]+3] : Delay mode for the analog input
    • ADDIDATA_DELAY_MODE_1: Mode 1
    • ADDIDATA_DELAY_MODE_2: Mode 2
  • arg[3*arg[0]+4] : Delay time unit for the analog input:
    • ADDIDATA_MICRO_SECOND :micros
    • ADDIDATA_MILLI_SECOND :ms
    • ADDIDATA_SECOND :s
  • arg[3*arg[0]+5] : Delay time value for the analog input conversion
Return values
0Success
1Internal error
2Wrong number of channels
3Wrong channel number
4Wrong gain factor
5Wrong polarity
6Wrong single diff parameter (not 0 or 1)
7Wrong delay mode parameter
8Wrong delay time unit parameter
9Wrong delay time parameter
10A conversion is already started
11requested single diff parameter not supported by the board
Note

More on pb_ChannelList

b_NumberOfChannels describes the sequence to follow during acquisition. It must contain indexes of valid channels. Which index is valid depends on the connection mode of the board (single or differential).

The order of the index in this array have no influence on the order of the values returned after an acquisition.

Constraints on parameter NumberOfChannel let NumberOfAnalogInput be the number of analog inputs (4,8,16) of the board, then NumberOfChannel is correct if

  • 0 < NumberOfChannel <= ADDIDATA_MAX_AI
  • if the board is in differential mode, NumberOfChannel < (b_NumberOfAnalogInput/2)
  • if the board is in single mode, NumberOfChannel < b_NumberOfAnalogInput

Constraints on parameter pb_ChannelList let NumberOfAnalogInput be the number of analog inputs (4,8,16) of the board, then NumberOfChannel is correct if:

  • if the board is in differencial mode, for each value in pb_ChannelList, value < (b_NumberOfAnalogInput/2)

Definition at line 577 of file xpci3xxx.h.

◆ CMD_xpci3xxx_ReadAnalogInputAutoRefreshValueAndCounter

#define CMD_xpci3xxx_ReadAnalogInputAutoRefreshValueAndCounter   _IOR(xpci3xxx_MAGIC, 17,long)

Read the auto refresh values.

Parameters
[out]uint32_t[ADDIDATA_MAX_AI+ 1] Values
  • Values[0] .. Values[ADDIDATA_MAX_AI-1] : Digital values of the initialized channels - each element is the next initialized channel
  • Values[ADDIDATA_MAX_AI] : Current counter
Return values
0Success
1Internal error
2Auto refresh not initialized

Definition at line 620 of file xpci3xxx.h.

◆ CMD_xpci3xxx_ReleaseAnalogInputAutoRefresh

#define CMD_xpci3xxx_ReleaseAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 18,long)

Release (stop) an analog input auto refresh conversion.

This function frees the resources allocated by a CMD_xpci3xxx_InitAnalogInputAutoRefresh and must be called before initializing another acquisition.

Parameters
NULL(ignored)
Return values
0: Success
1: Internal error
2: Auto refresh not initialized
3: A conversion is already started

Definition at line 634 of file xpci3xxx.h.

◆ CMD_xpci3xxx_StartAnalogInputAutoRefresh

#define CMD_xpci3xxx_StartAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 15,long)

Start an analog input auto refresh conversion.

Parameters
[in]uint16_targ[2]
  • arg[0] Convert time unit for the analog input:
    • ADDIDATA_NANO_SECOND : nanoseconds
    • ADDIDATA_MICRO_SECOND : microseconds
    • ADDIDATA_MILLI_SECOND : milliseconds
  • arg[1] Convert time value for the analog input conversion
Return values
0Success
1Internal error
2Auto refresh not initialized
3Wrong convert time unit
4Wrong convert time
5A conversion is already started

Definition at line 597 of file xpci3xxx.h.

◆ CMD_xpci3xxx_StopAnalogInputAutoRefresh

#define CMD_xpci3xxx_StopAnalogInputAutoRefresh   _IOR(xpci3xxx_MAGIC, 16,long)

Stop an analog input auto refresh conversion.

Parameters
NULL(ignored)
Return values
0Success
1Internal error
2Auto refresh not initialized

Definition at line 607 of file xpci3xxx.h.