ReferenceDriverNIAnalog Read Task

NI Analog Read Task

Learn how to acquire analog data from NI devices with Synnax.

For the task lifecycle, see Task Basics.

Task Configuration Reference

ParameterTypeRequiredDefaultDescription
sample_ratenumberNo10Samples per second (Hz), determined by module
stream_ratenumberNo5Rate data is streamed to Synnax (Hz), must be ≤ sample_rate
channelsarrayYes-List of analog input channel configurations

Channel Types Reference

Accelerometer (ai_accel)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum acceleration
max_valnumberNo1Maximum acceleration
terminal_configenumNoCfg_DefaultTerminal configuration
sensitivitynumberNo0Sensor sensitivity
sensitivity_unitsenumNomVoltsPerGmVoltsPerG, VoltsPerG
unitsenumNogg, MetersPerSecondSquared, InchesPerSecondSquared
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)
custom_scaleobjectNo-Custom scaling

Accelerometer 4-Wire DC Voltage (ai_accel_4_wire_dc_voltage)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum acceleration
max_valnumberNo1Maximum acceleration
terminal_configenumNoCfg_DefaultTerminal configuration
unitsenumNogg, MetersPerSecondSquared, InchesPerSecondSquared
sensitivitynumberNo0Sensor sensitivity
sensitivity_unitsenumNomVoltsPerGmVoltsPerG, VoltsPerG
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
scaled_by_excitationbooleanNofalseScale the reading by the excitation voltage
custom_scaleobjectNo-Custom scaling

Accelerometer Charge (ai_accel_charge)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum acceleration
max_valnumberNo1Maximum acceleration
terminal_configenumNoCfg_DefaultTerminal configuration
unitsenumNogg, MetersPerSecondSquared, InchesPerSecondSquared
sensitivitynumberNo0Sensor sensitivity
sensitivity_unitsenumNoPicoCoulombsPerGPicoCoulombsPerG, PicoCoulombsPerMetersPerSecondSquared, PicoCoulombsPerInchesPerSecondSquared
custom_scaleobjectNo-Custom scaling

Bridge (ai_bridge)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum value
max_valnumberNo1Maximum value
unitsenumNomVoltsPerVoltmVoltsPerVolt, VoltsPerVolt
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms), must be > 0
custom_scaleobjectNo-Custom scaling

Charge (ai_charge)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum charge
max_valnumberNo1Maximum charge
terminal_configenumNoCfg_DefaultTerminal configuration
unitsenumNoCoulombsCoulombs, PicoCoulombs
custom_scaleobjectNo-Custom scaling

Current (ai_current)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum current (Amps)
max_valnumberNo1Maximum current (Amps)
terminal_configenumNoCfg_DefaultTerminal configuration
shunt_resistor_locenumNoDefaultDefault, Internal, External
ext_shunt_resistor_valnumberNo1External shunt resistor value (Ohms)
custom_scaleobjectNo-Custom scaling

Current RMS (ai_current_rms)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum current (Amps)
max_valnumberNo1Maximum current (Amps)
terminal_configenumNoCfg_DefaultTerminal configuration
shunt_resistor_locenumNoDefaultDefault, Internal, External
ext_shunt_resistor_valnumberNo1External shunt resistor value (Ohms)
custom_scaleobjectNo-Custom scaling

Force Bridge Polynomial (ai_force_bridge_polynomial)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum force
max_valnumberNo1Maximum force
unitsenumNoNewtonsForce units (Newtons, Pounds, KilogramForce)
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
forward_coeffsarrayNo[]Polynomial coefficients from electrical to physical values
reverse_coeffsarrayNo[]Polynomial coefficients from physical to electrical values
electrical_unitsenumNomVoltsPerVoltElectrical units
physical_unitsenumNoNewtonsPhysical units
custom_scaleobjectNo-Custom scaling

Force Bridge Table (ai_force_bridge_table)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum force
max_valnumberNo1Maximum force
unitsenumNoNewtonsForce units (Newtons, Pounds, KilogramForce)
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
electrical_valsarrayNo[]Electrical values for table
physical_valsarrayNo[]Physical values for table
electrical_unitsenumNomVoltsPerVoltElectrical units
physical_unitsenumNoNewtonsPhysical units
custom_scaleobjectNo-Custom scaling

Force Bridge Two-Point Linear (ai_force_bridge_two_point_lin)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum force
max_valnumberNo1Maximum force
unitsenumNoNewtonsForce units (Newtons, Pounds, KilogramForce)
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
first_electrical_valnumberNo0First electrical value
second_electrical_valnumberNo1Second electrical value
electrical_unitsenumNomVoltsPerVoltElectrical units
first_physical_valnumberNo0First physical value
second_physical_valnumberNo1Second physical value
physical_unitsenumNoNewtonsPhysical units
custom_scaleobjectNo-Custom scaling

Force IEPE (ai_force_iepe)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum force
max_valnumberNo1Maximum force
terminal_configenumNoCfg_DefaultTerminal configuration
unitsenumNoNewtonsForce units (Newtons, Pounds, KilogramForce)
sensitivitynumberNo0Sensor sensitivity
sensitivity_unitsenumNomVoltsPerNewtonmVoltsPerNewton, mVoltsPerPound
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)
custom_scaleobjectNo-Custom scaling

Frequency Voltage (ai_freq_voltage)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum frequency (Hz)
max_valnumberNo1Maximum frequency (Hz)
threshold_levelnumberNo0Voltage level at which a cycle is counted
hysteresisnumberNo0Hysteresis around the threshold (Volts)
custom_scaleobjectNo-Custom scaling

Microphone (ai_microphone)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
terminal_configenumNoCfg_DefaultTerminal configuration
mic_sensitivitynumberNo0Microphone sensitivity
max_snd_press_levelnumberNo0Maximum sound pressure level
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)
custom_scaleobjectNo-Custom scaling

Pressure Bridge Polynomial (ai_pressure_bridge_polynomial)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum pressure
max_valnumberNo1Maximum pressure
unitsenumNoPoundsPerSquareInchPascals, PoundsPerSquareInch, Bar
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
forward_coeffsarrayNo[]Polynomial coefficients from electrical to physical values
reverse_coeffsarrayNo[]Polynomial coefficients from physical to electrical values
electrical_unitsenumNomVoltsPerVoltElectrical units
physical_unitsenumNoPoundsPerSquareInchPhysical units
custom_scaleobjectNo-Custom scaling

Pressure Bridge Table (ai_pressure_bridge_table)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum pressure
max_valnumberNo1Maximum pressure
unitsenumNoPoundsPerSquareInchPascals, PoundsPerSquareInch, Bar
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
electrical_valsarrayNo[]Electrical values for table
physical_valsarrayNo[]Physical values for table
electrical_unitsenumNomVoltsPerVoltElectrical units
physical_unitsenumNoPoundsPerSquareInchPhysical units
custom_scaleobjectNo-Custom scaling

Pressure Bridge Two-Point Linear (ai_pressure_bridge_two_point_lin)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum pressure
max_valnumberNo1Maximum pressure
unitsenumNoPoundsPerSquareInchPascals, PoundsPerSquareInch, Bar
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
first_electrical_valnumberNo0First electrical value
second_electrical_valnumberNo1Second electrical value
electrical_unitsenumNomVoltsPerVoltElectrical units
first_physical_valnumberNo0First physical value
second_physical_valnumberNo1Second physical value
physical_unitsenumNoPoundsPerSquareInchPhysical units
custom_scaleobjectNo-Custom scaling

Resistance (ai_resistance)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum resistance (Ohms)
max_valnumberNo1Maximum resistance (Ohms)
resistance_configenumNo2Wire2Wire, 3Wire, 4Wire
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)
custom_scaleobjectNo-Custom scaling

RTD (ai_rtd)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum temperature
max_valnumberNo1Maximum temperature
unitsenumNoDegCDegC, DegF, Kelvins, DegR
rtd_typeenumNoPt3750Pt3750, Pt3851, Pt3911, Pt3916, Pt3920, Pt3928
r0numberNo0Sensor resistance at 0 degrees Celsius (Ohms)
resistance_configenumNo2Wire2Wire, 3Wire, 4Wire
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)

Strain Gauge (ai_strain_gauge)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum strain
max_valnumberNo1Maximum strain
strain_configenumNoFullBridgeIFullBridgeI, FullBridgeII, FullBridgeIII, HalfBridgeI, HalfBridgeII, QuarterBridgeI, QuarterBridgeII
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
gage_factornumberNo0Gage factor
initial_bridge_voltagenumberNo0Initial bridge voltage
nominal_gage_resistancenumberNo0Nominal gage resistance (Ohms)
poisson_rationumberNo0Poisson’s ratio
lead_wire_resistancenumberNo0Lead wire resistance (Ohms)
custom_scaleobjectNo-Custom scaling

Temperature Built-In Sensor (ai_temp_builtin)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
unitsenumNoDegCDegC, DegF, Kelvins, DegR

Thermistor IEX (ai_thermistor_iex)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum temperature
max_valnumberNo1Maximum temperature
unitsenumNoDegCDegC, DegF, Kelvins, DegR
resistance_configenumNo2Wire2Wire, 3Wire, 4Wire
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)
anumberNo0First Steinhart-Hart coefficient
bnumberNo0Second Steinhart-Hart coefficient
cnumberNo0Third Steinhart-Hart coefficient

Thermistor VEX (ai_thermistor_vex)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum temperature
max_valnumberNo1Maximum temperature
unitsenumNoDegCDegC, DegF, Kelvins, DegR
resistance_configenumNo2Wire2Wire, 3Wire, 4Wire
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
anumberNo0First Steinhart-Hart coefficient
bnumberNo0Second Steinhart-Hart coefficient
cnumberNo0Third Steinhart-Hart coefficient
r1numberNo0Reference resistor (Ohms)

Thermocouple (ai_thermocouple)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum temperature
max_valnumberNo1Maximum temperature
unitsenumNoDegCDegC, DegF, Kelvins, DegR
thermocouple_typeenumNoJJ, K, N, R, S, T, B, E
cjcobjectNobuilt_inCold junction compensation. One of {"source": "built_in"}, {"source": "const_val", "val": <temp>}, or {"source": "chan", "port": <port>}

Torque Bridge Polynomial (ai_torque_bridge_polynomial)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum torque
max_valnumberNo1Maximum torque
unitsenumNoNewtonMetersNewtonMeters, InchPounds, FootPounds, InchOunces
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
forward_coeffsarrayNo[]Polynomial coefficients from electrical to physical values
reverse_coeffsarrayNo[]Polynomial coefficients from physical to electrical values
electrical_unitsenumNomVoltsPerVoltElectrical units
physical_unitsenumNoNewtonMetersPhysical units
custom_scaleobjectNo-Custom scaling

Torque Bridge Table (ai_torque_bridge_table)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum torque
max_valnumberNo1Maximum torque
unitsenumNoNewtonMetersNewtonMeters, InchPounds, FootPounds, InchOunces
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
electrical_valsarrayNo[]Electrical values for table
physical_valsarrayNo[]Physical values for table
electrical_unitsenumNomVoltsPerVoltElectrical units
physical_unitsenumNoNewtonMetersPhysical units
custom_scaleobjectNo-Custom scaling

Torque Bridge Two-Point Linear (ai_torque_bridge_two_point_lin)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum torque
max_valnumberNo1Maximum torque
unitsenumNoNewtonMetersNewtonMeters, InchPounds, FootPounds, InchOunces
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
nominal_bridge_resistancenumberNo1Nominal resistance (Ohms)
first_electrical_valnumberNo0First electrical value
second_electrical_valnumberNo1Second electrical value
electrical_unitsenumNomVoltsPerVoltElectrical units
first_physical_valnumberNo0First physical value
second_physical_valnumberNo1Second physical value
physical_unitsenumNoNewtonMetersPhysical units
custom_scaleobjectNo-Custom scaling

Velocity IEPE (ai_velocity_iepe)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum velocity
max_valnumberNo1Maximum velocity
unitsenumNoMetersPerSecondMetersPerSecond, InchesPerSecond
terminal_configenumNoCfg_DefaultTerminal configuration
sensitivitynumberNo0Sensor sensitivity
sensitivity_unitsenumNoMillivoltsPerMillimeterPerSecondMillivoltsPerMillimeterPerSecond, MilliVoltsPerInchPerSecond
current_excit_sourceenumNoInternalInternal, External, None
current_excit_valnumberNo0Excitation current (Amps)
custom_scaleobjectNo-Custom scaling

Voltage (ai_voltage)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum voltage (Volts)
max_valnumberNo1Maximum voltage (Volts)
terminal_configenumNoCfg_DefaultTerminal configuration (Cfg_Default, RSE, NRSE, Diff, PseudoDiff)
custom_scaleobjectNo-Custom scaling

Voltage RMS (ai_voltage_rms)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum voltage (Volts)
max_valnumberNo1Maximum voltage (Volts)
terminal_configenumNoCfg_DefaultTerminal configuration (Cfg_Default, RSE, NRSE, Diff, PseudoDiff)
custom_scaleobjectNo-Custom scaling

Voltage with Excitation (ai_voltage_with_excit)

ParameterTypeRequiredDefaultDescription
channelnumberYes-Synnax channel key
devicestringYes-Device identifier
portnumberYes-Physical port
min_valnumberNo0Minimum voltage (Volts)
max_valnumberNo1Maximum voltage (Volts)
terminal_configenumNoCfg_DefaultTerminal configuration
bridge_configenumNoFullBridgeFullBridge, HalfBridge, QuarterBridge
voltage_excit_sourceenumNoInternalInternal, External, None
voltage_excit_valnumberNo0Excitation voltage (Volts)
scaled_by_excitationbooleanNofalseScale the reading by the excitation voltage
custom_scaleobjectNo-Custom scaling

Important Rules

  • One task per module -> Only one running task can claim a module at a time.
  • Stream rate -> For sample rates under 50 Hz, set the stream rate equal to the sample rate. Above that, keep the stream rate under 50 Hz.

How-To