Analog

Analog channel related API functions.

GHS.ghs_get_trigger_settings(slot_id: str, channel_index: int) tuple[str, str | None, float | None, float | None, float | None, str | None][source]

Determine the trigger settings for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSTriggerMode - Trigger Mode

  • primary_level - The primary trigger level

  • secondary_level - The secondary trigger level

  • hysteresis - The trigger hysteresis

  • direction - The trigger direction

GHS.ghs_set_trigger_settings(slot_id: str, channel_index: int, trigger_mode: str | int, primary_level: float, secondary_level: float, hysteresis: float, direction: str | int) str[source]

Set the trigger settings for an analog channel.

The system needs to be idle before calling this function.

This function overwrites any previously set trigger settings for the specified recorder.

If the specified trigger mode or value is not supported by the recorder, the trigger mode remains unchanged or the value is rounded to the nearest supported value.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • trigger_mode – Trigger Mode. Default is Basic

  • primary_level – The desired primary trigger level

  • secondary_level – The desired secondary trigger level

  • hysteresis – The desired trigger hysteresis

  • direction – The desired trigger direction

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_signal_coupling(slot_id: str, channel_index: int) tuple[str, str | None][source]

Determine the signal coupling for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSSignalCoupling - The signal coupling

GHS.ghs_set_signal_coupling(slot_id: str, channel_index: int, signal_coupling: str | int) str[source]

Set the signal coupling for an analog channel.

If the specified signal coupling mode is not supported by the recorder, the signal coupling mode remains unchanged.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • signal_coupling – The desired signal coupling.

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_input_coupling(slot_id: str, channel_index: int) tuple[str, str | None][source]

Determine the input coupling for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSInputCoupling - The input coupling

GHS.ghs_set_input_coupling(slot_id: str, channel_index: int, input_coupling: str | int) str[source]

Set the input coupling for an analog channel.

If the specified input coupling mode is not supported by the recorder, the input coupling mode remains unchanged.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • input_coupling – The desired input coupling.

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_span_and_offset(slot_id: str, channel_index: int) tuple[str, float | None, float | None][source]

Determine the span and offset for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • span - The span in user units

  • offset - The offset in user units

GHS.ghs_set_span_and_offset(slot_id: str, channel_index: int, span: float, offset: float) str[source]

Set Span and offset for analog channels.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • span – The span in user units. The value is adapted to available options.

  • offset – The offset in user units. The value is adapted to available options.

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_filter_type_and_frequency(slot_id: str, channel_index: int) tuple[str, str | None, float | None][source]

Determine the filter type and frequency for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSFilterType - The filter type

  • frequency - The filter frequency in Hz

GHS.ghs_set_filter_type_and_frequency(slot_id: str, channel_index: int, filter_type: str | int, frequency: float) str[source]

Set the filter type and frequency for an analog channel.

This function overwrites any previously set filter settings for the specified recorder.

If a specified filter type or value is not supported by the recorder, the filter type remains the same or the value is rounded to a supported vale.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • filter_type – The filter type. Default is Bessel.

  • frequency – The filter frequency in Hz.

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_excitation(slot_id: str, channel_index: int) tuple[str, str | None, float | None][source]

Determine the excitation type and value for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSExcitationType - The excitation type

  • excitation_value - The excitation value in user units (voltage or current).

GHS.ghs_set_excitation(slot_id: str, channel_index: int, excitation_type: str | int, excitation_value: float) str[source]

Set the excitation type and value for an analog channel.

The system needs to be idle before calling this function.

If the specified excitation type or value is not supported by the recorder, the excitation type remains unchanged or the value is rounded to the nearest supported value.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • excitation_type – The desired excitation type. Default is Voltage.

  • excitation_value – The desired excitation value in user units (voltage or current).

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_amplifier_mode(slot_id: str, channel_index: int) tuple[str, str | None][source]

Determine the amplifier mode for an analog channel.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSAmplifierMode - The amplifier mode

GHS.ghs_set_amplifier_mode(slot_id: str, channel_index: int, amplifier_mode: str | int) str[source]

Set the amplifier mode for an analog channel.

The system needs to be idle before calling this function.

If the specified amplifier mode is not supported by the recorder, the amplifier mode remains unchanged.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • amplifier_mode – The desired amplifier mode

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_technical_units(slot_id: str, channel_index: int) tuple[str, str | None, float | None, float | None][source]

Determine the technical units, unit multiplier and unit offset for an analog channel.

The units parameter is UTF-8 encoded.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • units - The technical units (e.g. ‘V’ for Volt or ‘Hz’ for Hertz).

  • multiplier - The technical units multiplier value.

  • offset - The technical units offset value.

GHS.ghs_set_technical_units(slot_id: str, channel_index: int, units: str, multiplier: float, offset: float) str[source]

Set the technical units, unit multiplier and unit offset for an analog channel.

The units parameter must be UTF-8 encoded.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • units – The desired technical units (e.g. ‘V’ for Volt or ‘Hz’ for Hertz).

  • multiplier – The desired technical units multiplier value.

  • offset – The desired technical units offset value.

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_auto_range(slot_id: str, channel_index: int) tuple[str, str | None, float | None][source]

Determine the auto range enable and time settings.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • GHSEnableDisable - The auto range enabled setting.

  • auto_range_time - The time for auto range in seconds.

GHS.ghs_set_auto_range(slot_id: str, channel_index: int, auto_range_enabled: str | int, auto_range_time: float) str[source]

Set Auto range settings for analog channels.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • auto_range_enabled – The auto range enabled setting. The value is adapted to available options.

  • auto_range_time – The time for auto range in seconds. The value is adapted to available options.

Returns

  • GHSReturnValue - API return values

GHS.ghs_cmd_auto_range_now(slot_id: str, channel_index: int, auto_range_time: float) str[source]

Command a single shot for auto range.

The system needs to be acquiring for this function to have any effect.

ReadWrite - This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

  • auto_range_time – The time for auto range in seconds. The value is adapted to available options.

Returns

  • GHSReturnValue - API return values

GHS.ghs_get_channel_cal_info(slot_id: str, channel_index: int) tuple[str, str | None, str | None, str | None, str | None, str | None, str | None][source]

Retrieve calibration information for an analog channel.

The calibrationDateTime, verificationDateTime, powerVerificationDateTime, calibrationLab, verificationLab and powerVerificationLab parameters are UTF-8 encoded.

Read - This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • channel_index – The zero-based index of the channel

Returns

  • GHSReturnValue - API return values

  • calibration_date_time - The date and time this analog channel has been calibrated.

  • verification_date_time - The date and time the calibration for this analog channel has been verified.

  • power_verification_date_time - The date and time the power calibration for this analog channel has been verified (if applicable).

  • calibration_lab - The laboratory that conducted the calibration for this analog channel.

  • verification_lab - The laboratory that verified the calibration for this analog channel.

  • power_verification_lab - The laboratory that verified the power calibration for this analog channel (if applicable).

Accepted values:

  • slot_id - Analog channel slot id

  • trigger_mode - “Basic”, “Dual”, “Window”, “DualWindow”, “Sequential”, “QualifierBasic”, “QualifierDual”

  • direction - “RisingEdge”, “FallingEdge”

  • signal_coupling - “GND”, “DC”, “AC”, “DC_RMS”, “AC_RMS”, “DC_Frequency”, “AC_Frequency”, “DC_TrueRMS”, “AC_TrueRMS”, “DC_ExternalProbe”, “AC_ExternalProbe”, “Reference”, “ZeroSet”, “SinglePrecision”, “DoublePrecision”, “QuadPrecision”, “Charge”

  • input_coupling - “SingleEndedPositive”, “SingleEndedNegative”, “Differential”, “Current”, “FloatingDifferential”

  • filter_type - “Bessel”, “Butterworth”, “Elliptic”, “FIR”, “IIR”, “Wideband”, “Bessel_AA”, “Butterworth_AA”, “SigmaDeltaWB”, “SigmaDelta”, “BandPass”, “FIR3dB”

  • excitation_type - “Voltage”, “Voltage_Sense”, “Current”, “Voltage_Strobed”, “Voltage_Sense_Strobed”, “Current_Strobed”

  • amplifier_mode - “Basic”, “Bridge”, “Icp”, “ThermoCouple”, “BasicSensor”, “Charge”, “Current4_20”, “ThermoResistor”

  • auto_range_enabled - “Disable”, “Enable”