MX Foundation 4
|
The KMXF_ANALOG_MODULE_ADC_SCAN_MODE
attribute defines the scan mode. The IPM-ADC offers eight different scan modes of sampling:
Constant | Description |
---|---|
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_DISABLE | Scanning disabled. This mode may be used to start acquisition or sampling on many ADC channels before starting the scanning. No data is received while the scan mode is disabled. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_UNIFORM_CONTINUOUS | The A/D conversions are performed in sequential order for all selected channels. Only one channel at a time is converted at each period. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_UNIFORM_SINGLE | The A/D conversions are performed in sequential order for all selected channels only one time. Only one channel at a time is converting at each period. The conversions stop after the last selected channel. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_BURST_CONTINUOUS (default) | The A/D conversions are performed in sequential order for all selected channels. All selected channels are converted at each period as fast as possible (one channel each 4 microseconds). |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_BURST_SINGLE | The A/D conversions are performed in sequential order for all selected channels only one time. All selected channels are converted at each period as fast as possible (one channel each 4 microseconds). The conversions stop after the last selected channel. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_UNIFORM_CONTINUOUS_EXT_TRIG | The A/D conversions are performed in sequential order for all selected channels. Only one channel at a time is converted at each external trigger pulse (falling edge of trigger input). The conversion period has no functionality is this mode. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_UNIFORM_SINGLE_EXT_TRIG | The A/D conversions are performed in sequential order for all selected channels only one time. Only one channel at a time is converted at each external trigger pulse (falling edge of trigger input). The conversions stop after the last selected channel. The conversion period has no functionality in this mode. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_BURST_CONTINUOUS_EXT_TRIG | The A/D conversions are performed in sequential order for all selected channels only one time. All selected channels are converted at each external trigger pulse (falling edge of trigger input) as fast as possible (one channel each 4 microseconds). The conversion period has no functionality is this mode. |
VMXF_ANALOG_MODULE_ADC_SCAN_MODE_BURST_SINGLE_EXT_TRIG | The A/D conversions are performed in sequential order for all selected channels only one time. All selected channels are converted at each external trigger pulse (falling edge of trigger input) as fast as possible (one channel each 4 microseconds). The conversions stop after the last selected channel. The conversion period has no functionality is this mode. |
The KMXF_ANALOG_MODULE_ADC_CONVERSION_PERIOD
attribute defines the conversion period. The attribute value resolution is based on the timebase resolution.
This period value represents:
The supported range is:
Range | Value (microsecond) |
---|---|
Minimum | 4 |
Maximum | 4294967295 |
Default value: 100000 microseconds.
The KMXF_ANALOG_MODULE_ADC_DATA_FORMAT
attribute defines the data format. Float format is the default one and the simplest to use. Raw data is also available. Raw data will need a little less CPU from the device as no floating point conversion is done.
The supported values are:
Constant | Description |
---|---|
VMXF_ANALOG_MODULE_ADC_DATA_FORMAT_RAW_SIGNED | Signed (Binary two’s complement) |
VMXF_ANALOG_MODULE_ADC_DATA_FORMAT_RAW_UNSIGNED | Unsigned (Straight binary) |
VMXF_ANALOG_MODULE_ADC_DATA_FORMAT_FLOAT (default) | Floating point |
The KMXF_ANALOG_MODULE_ADC_TRIGGER_MODE
attribute defines the trigger mode. The external trigger input/output is used to synchronize the sampling with other IPM-ADC modules, or with any other source. When set to master, a 500ns pulse will be output when the time to scan is reached. When set to slave and an “EXT_TRIG” mode is used (see Scan Mode, the external trigger is used as an input.
The supported values are:
Constant | Description |
---|---|
VMXF_ANALOG_MODULE_ADC_TRIGGER_MASTER | Master (output trigger) |
VMXF_ANALOG_MODULE_ADC_TRIGGER_SLAVE (default) | Slave (input trigger) |
The KMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE
attribute defines the calibration mode. When enabled, internal power source will be connected to the input.
The supported values are:
Constant | Description |
---|---|
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_DISABLE (default) | Calibration disabled. External value will be returned. |
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_0 | 0 Volt |
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_306250 | 0.30625 Volt |
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_612500 | 0.6125 Volt |
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_1225000 | 1.225 Volt |
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_2450000 | 2.45 Volt |
VMXF_ANALOG_MODULE_ADC_CALIBRATION_MODE_4900000 | 4.9 Volt |
The KMXF_ANALOG_MODULE_ADC_INPUT_RANGE
attribute defines the input range. The input range must match the dip switches setting of the module.
The supported values are:
Constant | Description |
---|---|
VMXF_ANALOG_MODULE_ADC_INPUT_RANGE_5v | -5V to 5V |
VMXF_ANALOG_MODULE_ADC_INPUT_RANGE_0v_5v | 0V to 5V |
VMXF_ANALOG_MODULE_ADC_INPUT_RANGE_10v (default) | -10V to 10V |
VMXF_ANALOG_MODULE_ADC_INPUT_RANGE_0v_10v | 0V to 10V |
VMXF_ANALOG_MODULE_ADC_INPUT_RANGE_2_5v | -2.5V to 2.5V |
VMXF_ANALOG_MODULE_ADC_INPUT_RANGE_0v_2_5v | 0V to 2.5V |
The KMXF_ANALOG_MODULE_ADC_CHN_DIFF_SELECTION
attribute defines the channel differential selection. The IPM-ADC has up to 32 single-ended or up to 16 differential channels. Each channel pair (channel 0-16, 1-17, 2-18, etc.) may be set to single-ended or to differential mode independently. This attribute is a 16-bit mask that selects differential channels.
The bit #0 represents channel pairs 0-16, bit #1 represents the channel pairs 1-17, …, bit #15 represents the channel pairs 15-31.
Default value: 0xffff (16 differential channels).
The KMXF_ANALOG_MODULE_ADC_CHN_SELECTION
attribute defines the channel selection. The IPM-ADC has up to 32 single-ended or up to 16 differential channels. Each channel may be selected independently. This attribute is a 32-bit mask that selects channels. When a channel pair is set to differential, only the first channel of the pair may be selected.
Ex. If the channel pair 0-16 is set to differential (Channel Differential Mask = 0x0001), the channel 0 (Channel Selection Mask = 0x00000001) must be used to enable the pair. An error will occur if bit 16 is present. To add channel 1 and 17 that are set in single ended mode, the Channel Selection Mask will be 0x00020003.
Default value: 0x0000ffff (16 channels).
The KMXF_ANALOG_MODULE_ADC_FIFO_AGING
attribute defines the FIFO aging timeout value for a receiver channel. It defines the longest delay that a received word can wait in the hardware FIFO before a receive interrupt is generated. The attribute value resolution is based on the timebase resolution. A RX FIFO Aging Timeout value of 0 disables the aging timeout. The attribute value is rounded down to step of 512 microseconds.
The supported range is:
Range | Value (microsecond) |
---|---|
Minimum | 0 (disabled) |
Maximum | 65024 |
Default value: 8192 microseconds.
The KMXF_ANALOG_MODULE_ADC_FIFO_AF
attribute holds the almost full threshold for a receiver channel. This attribute value determines the number of received words that must be accumulated in the receive hardware FIFO before an interrupt is generated.
The supported range is:
Range | Value (16-bit word) |
---|---|
Minimum | 1 |
Maximum | 2048 |
Default value: 16.
The KMXF_ANALOG_CHN_ADC_GAIN
attribute holds the hardware gain for a channel. The gain must be chosen depending on the type of signal that will be sampled on the channel. For example, if the input range is set to +/-5V, and the input signal is known to be a +/-1V signal, a gain of 4 could be applied to the input, so the ADC range (with gain of 4, +/-1.25V) would be more adapted to the signal.
The supported values are:
Constant | Gain |
---|---|
VMXF_ANALOG_CHN_ADC_GAIN_1 (default) | 1 |
VMXF_ANALOG_CHN_ADC_GAIN_2 | 2 |
VMXF_ANALOG_CHN_ADC_GAIN_4 | 4 |
VMXF_ANALOG_CHN_ADC_GAIN_8 | 8 |
The KMXF_ANALOG_MODULE_DAC_OUTPUT_RANGE
attribute defines the output range. The output range must match the jumpers setting of the module.
The supported values are:
Constant | Description |
---|---|
VMXF_ANALOG_MODULE_DAC_OUTPUT_RANGE_5v (default) | -5V to 5V |
VMXF_ANALOG_MODULE_DAC_OUTPUT_RANGE_10v | -10V to 10V |
The KMXF_ANALOG_CHN_CALIBRATION_SLOPE
attribute holds the calibration slope for a channel. The “m” in equation “mx + b”. This is a floating point attribute.
The slope could take a value in the following range:
Range | Value (V) |
---|---|
Minimum | -10000.0 |
Maximum | 10000.0 |
Default value: 1.0.
The KMXF_ANALOG_CHN_CALIBRATION_OFFSET
attribute holds the calibration offset for a channel. The “b” in equation “mx + b”. This is a floating point attribute.
The offset could take a value in the following range:
Range | Value (V) |
---|---|
Minimum | -10000.0 |
Maximum | 10000.0 |
Default value: 0.0.