xpci3xxx: Analog Inputs

xpci3xxx 1.00.00

Macros
Analog Inputs

## Macros
#define | CMD_xpci3xxx_InitAnalogInput _IOR(xpci3xxx_MAGIC, 10,long)
| Initializes one analog input channel.
#define | CMD_xpci3xxx_StartAnalogInput _IOR(xpci3xxx_MAGIC, 11,long)
| Starts the conversion of one analog input channel.
#define | CMD_xpci3xxx_ReadAnalogInputBit _IOR(xpci3xxx_MAGIC, 12,long)
| Reads the End Of Conversion Bit of the analog input conversion.
#define | CMD_xpci3xxx_ReadAnalogInputValue _IOR(xpci3xxx_MAGIC, 13,long)
| Reads the value of the analog input channel.
#define | CMD_xpci3xxx_EnableDisableAnalogInputHardwareTrigger _IOR(xpci3xxx_MAGIC, 40,long)
| Analog Input Hardware Trigger control.
#define | CMD_xpci3xxx_GetAnalogInputHardwareTriggerStatus _IOR(xpci3xxx_MAGIC, 41,long)
| Returns the current status of the trigger and the input state.
#define | CMD_xpci3xxx_EnableDisableAnalogInputSoftwareTrigger _IOR(xpci3xxx_MAGIC, 42,long)
| Control the Analog Input Software Trigger.
#define | CMD_xpci3xxx_AnalogInputSoftwareTrigger _IOR(xpci3xxx_MAGIC, 43,long)
| Triggers the analog input acquisition.
#define | CMD_xpci3xxx_GetAnalogInputSoftwareTriggerStatus _IOR(xpci3xxx_MAGIC, 44,long)
| Returns the status of the software trigger.
#define | CMD_xpci3xxx_EnableDisableAnalogInputHardwareGate _IOR(xpci3xxx_MAGIC, 45,long)
| Controls the analog input hardware gate.
#define | CMD_xpci3xxx_GetAnalogInputHardwareGateStatus _IOR(xpci3xxx_MAGIC, 46,long)
| Returns the state of the input (active or not)

## Detailed Description

## Macro Definition Documentation

## ◆ CMD_xpci3xxx_AnalogInputSoftwareTrigger

#define CMD_xpci3xxx_AnalogInputSoftwareTrigger _IOR(xpci3xxx_MAGIC, 43,long)

Triggers the analog input acquisition.

Parameters

  NULL | (ignored)

Return values

  0 | Success
  1 | Internal error
  2 | No analog input functionality available

Definition at line 858 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_EnableDisableAnalogInputHardwareGate

#define CMD_xpci3xxx_EnableDisableAnalogInputHardwareGate _IOR(xpci3xxx_MAGIC, 45,long)

Controls the analog input hardware gate.

Enable and initialize, or disable, the analog input hardware gate.

Parameters

  [in] | uint8_t | arg[2] Parameters

- arg[0] Hardware Gate Control = 0 : disable the hardware gate | 1 : enable the hardware gate
- arg[1] Level
  - ADDIDATA_LOW: If the hardware gate is used, it is active to "0"

ADDIDATA_HIGH:If the hardware gate is used, it is active to "1"

Return values

  0 | Success
  1 | Internal error
  2 | Wrong hardware gate parameter
  3 | Wrong hardware gate level parameter
  4 | No analog input functionality available
  5 | A conversion is already started

Definition at line 889 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_EnableDisableAnalogInputHardwareTrigger

#define CMD_xpci3xxx_EnableDisableAnalogInputHardwareTrigger _IOR(xpci3xxx_MAGIC, 40,long)

Analog Input Hardware Trigger control.

Enable and initialize the analog input hardware trigger (if present) or disable this trigger.

Parameters

  [in] | uint32_t | arg[4] Parameters

- arg[0] Trigger Control = 0 : disable the hardware trigger | 1 : enable the hardware trigger
- arg[1] Hardware Trigger Level
  - ADDIDATA_LOW: If the hardware trigger is used, it triggers from "1" to "0"
  - ADDIDATA_HIGH: If the hardware trigger is used, it triggers from "0" to "1"
  - ADDIDATA_LOW_HIGH: If the hardware trigger is used, it triggers from "0" to "1" or from "1" to "0"
- arg[2] Action: defines how to react when the HW Trigger counter is reached
  - ADDIDATA_TRIGGER_START_A_SINGLE_CONVERSION 0
  - ADDIDATA_ONE_SHOT_TRIGGER 1
  - ADDIDATA_TRIGGER_START_A_SEQUENCE_SERIES 2
  - ADDIDATA_TRIGGER_START_A_SINGLE_SEQUENCE 3
  - ADDIDATA_TRIGGER_START_A_SCAN_SERIES 6
  - ADDIDATA_TRIGGER_START_A_SINGLE_SCAN 7
  - ADDIDATA_TRIGGER_START_A_AUTO_REFRESH_SERIES 10
  - ADDIDATA_TRIGGER_START_A_SINGLE_AUTO_REFRESH 11
- arg[3] Hardware trigger counter= Defines the number of trigger signals that must come before the "Action" occurs (> 0)

Return values

  0 | Success
  1 | Internal error
  2 | Wrong hardware trigger parameter
  3 | Wrong hardware trigger level parameter
  4 | Wrong hardware trigger action parameter
  5 | Wrong hardware trigger count parameter
  6 | No analog input functionality available
  7 | A conversion is already started

Definition at line 806 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_EnableDisableAnalogInputSoftwareTrigger

#define CMD_xpci3xxx_EnableDisableAnalogInputSoftwareTrigger _IOR(xpci3xxx_MAGIC, 42,long)

Control the Analog Input Software Trigger.

Enable and initialize or disable the analog input software trigger.

Parameters

  [in] | uint8_t | arg[2]

- arg[0] Trigger Control = 0 : disable the software trigger | 1 : enable the software trigger
- arg[1] Action defines how to react when the SW Trigger counter is reached
  - ADDIDATA_TRIGGER_START_A_SINGLE_CONVERSION 0
  - ADDIDATA_ONE_SHOT_TRIGGER 1
  - ADDIDATA_TRIGGER_START_A_SEQUENCE_SERIES 2
  - ADDIDATA_TRIGGER_START_A_SINGLE_SEQUENCE 3
  - ADDIDATA_TRIGGER_START_A_SCAN_SERIES 6
  - ADDIDATA_TRIGGER_START_A_SINGLE_SCAN 7
  - ADDIDATA_TRIGGER_START_A_AUTO_REFRESH_SERIES 10
  - ADDIDATA_TRIGGER_START_A_SINGLE_AUTO_REFRESH 11

Return values

  0 | Success
  1 | Internal error
  2 | Wrong software trigger parameter
  3 | Wrong software trigger action parameter
  4 | No analog input functionality available
  5 | A conversion is already started

Definition at line 848 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_GetAnalogInputHardwareGateStatus

#define CMD_xpci3xxx_GetAnalogInputHardwareGateStatus _IOR(xpci3xxx_MAGIC, 46,long)

Returns the state of the input (active or not)

Parameters

  [out] | uint8_t* | arg = 0: not active (Low state) | 1 : active (High state)

Return values

  0 | Success
  1 | Internal error
  2 | No analog input functionality available

Definition at line 900 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_GetAnalogInputHardwareTriggerStatus

#define CMD_xpci3xxx_GetAnalogInputHardwareTriggerStatus _IOR(xpci3xxx_MAGIC, 41,long)

Returns the current status of the trigger and the input state.

Parameters

  [out] | uint32_t | arg[3] Results

- arg[0] Hardware Trigger Status = 0: Hardware trigger did not occur | 1: Hardware trigger did occur
- arg[1] Hardware Trigger Count : Number of triggering signals yet to happen before the "Action" occur.
- arg[2] Hardware Trigger State = 0: input not active (Low state) | 1: input active (High state)

Return values

  0 | Success
  1 | Internal error
  2 | No analog input functionality available

Definition at line 820 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_GetAnalogInputSoftwareTriggerStatus

#define CMD_xpci3xxx_GetAnalogInputSoftwareTriggerStatus _IOR(xpci3xxx_MAGIC, 44,long)

Returns the status of the software trigger.

Parameters

  [out] | uint8_t* | arg = 0: Software trigger did not occur | 1: Software trigger occurred

Return values

  0 | Success
  1 | Internal error
  2 | No analog input functionality available

Definition at line 869 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_InitAnalogInput

#define CMD_xpci3xxx_InitAnalogInput _IOR(xpci3xxx_MAGIC, 10,long)

Initializes one analog input channel.

Parameters

  [in] | (uint8_t | *)arg[4] Parameters

- arg[0] channel number of the input to be initialized
- arg[1] Hardware configuration = 0 : Single ended | 1 : Differential
- arg[2] Gain factor of the analog input
  - ADDIDATA_1_GAIN : Gain = 1
  - ADDIDATA_2_GAIN : Gain = 2
  - ADDIDATA_5_GAIN : Gain = 5
  - ADDIDATA_10_GAIN: Gain = 10
- arg[4] Polarity of the analog input
  - ADDIDATA_UNIPOLAR: 0V - +10V
  - ADDIDATA_BIPOLAR: -10V - +10V

Return values

  0 | Success
  1 | Internal error
  2 | Wrong channel number
  3 | Wrong single/diff value
  4 | Wrong gain
  5 | Wrong polarity
  6 | A conversion is already started
  7 | Requested single/diff parameter not supported by the board

Definition at line 461 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_ReadAnalogInputBit

#define CMD_xpci3xxx_ReadAnalogInputBit _IOR(xpci3xxx_MAGIC, 12,long)

Reads the End Of Conversion Bit of the analog input conversion.

Parameters

  [out] | (uint8_t | *arg) Status of the EOC bit = 0: no analog input conversion finished | 1: analog input conversion finished

Return values

  0 | Success
  1 | Internal error

Definition at line 494 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_ReadAnalogInputValue

#define CMD_xpci3xxx_ReadAnalogInputValue _IOR(xpci3xxx_MAGIC, 13,long)

Reads the value of the analog input channel.

Parameters

  [out] | uint32_t | *arg = Value of the analog input channel

Return values

  0 | Success
  1 | Internal error

Definition at line 503 of file xpci3xxx.h.

## ◆ CMD_xpci3xxx_StartAnalogInput

#define CMD_xpci3xxx_StartAnalogInput _IOR(xpci3xxx_MAGIC, 11,long)

Starts the conversion of one analog input channel.

Parameters

  [in] | uint16_t | arg[3]

- arg[0] Channel number
- arg[1] b_ConvertTimeUnit : Convert time unit for the analog input:
  - ADDIDATA_NANO_SECOND : nanoseconds
  - ADDIDATA_MICRO_SECOND : microseconds
  - ADDIDATA_MILLI_SECOND : milliseconds
- arg[2] b_ConvertTimeUnit : Convert time value for the analog input conversion

Return values

  0 | Success
  1 | Internal error
  2 | Wrong channel number
  3 | Channel not initialized
  4 | Wrong convert time unit
  5 | Wrong convert time
  6 | A conversion is already started

Definition at line 484 of file xpci3xxx.h.