How to use the nidmm.visatype.ViInt32 function in nidmm

To help you get started, we’ve selected a few nidmm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ni / nimi-python / generated / nidmm / session.py View on Github external
cal_type (int): Specifies the type of calibration performed (external or
                self-calibration).

                +-----------------------------------+---+----------------------+
                | NIDMM_VAL_INTERNAL_AREA (default) | 0 | Self-Calibration     |
                +-----------------------------------+---+----------------------+
                | NIDMM_VAL_EXTERNAL_AREA           | 1 | External Calibration |
                +-----------------------------------+---+----------------------+

                Note: The NI 4065 does not support self-calibration.

        Returns:
            temperature (float): Returns the **temperature** during the last calibration.
        '''
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        cal_type_ctype = visatype.ViInt32(cal_type)  # case 9
        temperature_ctype = visatype.ViReal64()  # case 14
        error_code = self._library.niDMM_GetLastCalTemp(vi_ctype, cal_type_ctype, ctypes.pointer(temperature_ctype))
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return float(temperature_ctype.value)
github ni / nimi-python / generated / nidmm / session.py View on Github external
+-----------------------------------+---+----------------------+
                | NIDMM_VAL_EXTERNAL_AREA           | 1 | External Calibration |
                +-----------------------------------+---+----------------------+

                Note: The NI 4065 does not support self-calibration.

        Returns:
            month (int): Indicates the **month** of the last calibration.
            day (int): Indicates the **day** of the last calibration.
            year (int): Indicates the **year** of the last calibration.
            hour (int): Indicates the **hour** of the last calibration.
            minute (int): Indicates the **minute** of the last calibration.
        '''
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        cal_type_ctype = visatype.ViInt32(cal_type)  # case 9
        month_ctype = visatype.ViInt32()  # case 14
        day_ctype = visatype.ViInt32()  # case 14
        year_ctype = visatype.ViInt32()  # case 14
        hour_ctype = visatype.ViInt32()  # case 14
        minute_ctype = visatype.ViInt32()  # case 14
        error_code = self._library.niDMM_GetCalDateAndTime(vi_ctype, cal_type_ctype, ctypes.pointer(month_ctype), ctypes.pointer(day_ctype), ctypes.pointer(year_ctype), ctypes.pointer(hour_ctype), ctypes.pointer(minute_ctype))
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return int(month_ctype.value), int(day_ctype.value), int(year_ctype.value), int(hour_ctype.value), int(minute_ctype.value)
github ni / nimi-python / generated / nidmm / session.py View on Github external
On the NI 4060, the **sample_interval** value is used as the settling
                time. When sample interval is set to 0, the DMM does not settle between
                measurement cycles. The NI 4065 and NI 4070/4071/4072 use the value
                specified in **sample_interval** as additional delay. The default value
                (-1) ensures that the DMM settles for a recommended time. This is the
                same as using an Immediate trigger.

                Note: This attribute is not used on the NI 4080/4081/4082 and the NI 4050.
        '''
        if type(sample_trigger) is not enums.SampleTrigger:
            raise TypeError('Parameter mode must be of type ' + str(enums.SampleTrigger))
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        trigger_count_ctype = visatype.ViInt32(trigger_count)  # case 9
        sample_count_ctype = visatype.ViInt32(sample_count)  # case 9
        sample_trigger_ctype = visatype.ViInt32(sample_trigger.value)  # case 10
        sample_interval_ctype = visatype.ViReal64(sample_interval)  # case 9
        error_code = self._library.niDMM_ConfigureMultiPoint(vi_ctype, trigger_count_ctype, sample_count_ctype, sample_trigger_ctype, sample_interval_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return
github ni / nimi-python / generated / nidmm / session.py View on Github external
'''_get_error

        Returns the error information associated with the
        **Instrument_Handle**. This function retrieves and then clears the
        error information for the session. If you leave the
        **Instrument_Handle** unwired, this function retrieves and then clears
        the error information for the process.

        Returns:
            error_code (int): Returns the **error_code** for the session or execution thread. If you
                pass 0 for the **Buffer_Size**, you can pass VI_NULL for this
                parameter.
        '''
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        error_code_ctype = visatype.ViStatus()  # case 14
        buffer_size_ctype = visatype.ViInt32()  # case 7
        description_ctype = None  # case 12
        error_code = self._library.niDMM_GetError(vi_ctype, ctypes.pointer(error_code_ctype), buffer_size_ctype, description_ctype)
        errors.handle_error(self, error_code, ignore_warnings=True, is_error_handling=True)
        buffer_size_ctype = visatype.ViInt32(error_code)  # case 7.5
        description_ctype = (visatype.ViChar * buffer_size_ctype.value)()  # case 12.5
        error_code = self._library.niDMM_GetError(vi_ctype, ctypes.pointer(error_code_ctype), buffer_size_ctype, description_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=True)
        return int(error_code_ctype.value), description_ctype.value.decode(self._encoding)
github ni / nimi-python / generated / nidmm / session.py View on Github external
acquisition to complete.

                The valid range is 086400000. The default value is
                NIDMM_VAL_TIME_LIMIT_AUTO (-1). The DMM calculates the timeout
                automatically.

        Returns:
            waveform_array (list of float): An array of measurement values.

                Note:
                The size of the **Waveform_Array** must be at least the size that you
                specify for the **Array_Size** parameter.
            actual_number_of_points (int): Indicates the number of measured values actually retrieved from the DMM.
        '''
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        maximum_time_ctype = visatype.ViInt32(maximum_time)  # case 9
        array_size_ctype = visatype.ViInt32(array_size)  # case 8
        waveform_array_ctype = (visatype.ViReal64 * array_size)()  # case 13
        actual_number_of_points_ctype = visatype.ViInt32()  # case 14
        error_code = self._library.niDMM_ReadWaveform(vi_ctype, maximum_time_ctype, array_size_ctype, waveform_array_ctype, ctypes.pointer(actual_number_of_points_ctype))
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return [float(waveform_array_ctype[i]) for i in range(array_size_ctype.value)]
github ni / nimi-python / generated / nidmm / session.py View on Github external
acquisition to complete.

                The valid range is 086400000. The default value is
                NIDMM_VAL_TIME_LIMIT_AUTO (-1). The DMM calculates the timeout
                automatically.

        Returns:
            waveform_array (list of float): **Waveform Array** is an array of measurement values stored in waveform
                data type.
            actual_number_of_points (int): Indicates the number of measured values actually retrieved from the DMM.
        '''
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        maximum_time_ctype = visatype.ViInt32(maximum_time)  # case 9
        array_size_ctype = visatype.ViInt32(array_size)  # case 8
        waveform_array_ctype = (visatype.ViReal64 * array_size)()  # case 13
        actual_number_of_points_ctype = visatype.ViInt32()  # case 14
        error_code = self._library.niDMM_FetchWaveform(vi_ctype, maximum_time_ctype, array_size_ctype, waveform_array_ctype, ctypes.pointer(actual_number_of_points_ctype))
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return [float(waveform_array_ctype[i]) for i in range(array_size_ctype.value)]
github ni / nimi-python / generated / nidmm / session.py View on Github external
applies when the **Sample_Trigger** is set to INTERVAL.

                On the NI 4060, the **sample_interval** value is used as the settling
                time. When sample interval is set to 0, the DMM does not settle between
                measurement cycles. The NI 4065 and NI 4070/4071/4072 use the value
                specified in **sample_interval** as additional delay. The default value
                (-1) ensures that the DMM settles for a recommended time. This is the
                same as using an Immediate trigger.

                Note: This attribute is not used on the NI 4080/4081/4082 and the NI 4050.
        '''
        if type(sample_trigger) is not enums.SampleTrigger:
            raise TypeError('Parameter mode must be of type ' + str(enums.SampleTrigger))
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        trigger_count_ctype = visatype.ViInt32(trigger_count)  # case 9
        sample_count_ctype = visatype.ViInt32(sample_count)  # case 9
        sample_trigger_ctype = visatype.ViInt32(sample_trigger.value)  # case 10
        sample_interval_ctype = visatype.ViReal64(sample_interval)  # case 9
        error_code = self._library.niDMM_ConfigureMultiPoint(vi_ctype, trigger_count_ctype, sample_count_ctype, sample_trigger_ctype, sample_interval_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return
github ni / nimi-python / generated / nidmm / session.py View on Github external
before taking a measurement. The driver sets the
                TRIGGER_DELAY attribute to this value. By default,
                **trigger_delay** is NIDMM_VAL_AUTO_DELAY (-1), which means the DMM
                waits an appropriate settling time before taking the measurement. On the
                NI 4060, if you set **trigger_delay** to 0, the DMM does not settle
                before taking the measurement. The NI 4065 and NI 4070/4071/4072 use the
                value specified in **trigger_delay** as additional settling time.

                Note:
                When using the NI 4050, **Trigger_Delay** must be set to
                NIDMM_VAL_AUTO_DELAY (-1).
        '''
        if type(trigger_source) is not enums.TriggerSource:
            raise TypeError('Parameter mode must be of type ' + str(enums.TriggerSource))
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        trigger_source_ctype = visatype.ViInt32(trigger_source.value)  # case 10
        trigger_delay_ctype = visatype.ViReal64(trigger_delay)  # case 9
        error_code = self._library.niDMM_ConfigureTrigger(vi_ctype, trigger_source_ctype, trigger_delay_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return
github ni / nimi-python / generated / nidmm / session.py View on Github external
| NIDMM_VAL_TEMP_TC_S | Thermocouple type S |
                +---------------------+---------------------+
                | NIDMM_VAL_TEMP_TC_T | Thermocouple type T |
                +---------------------+---------------------+
            reference_junction_type (enums.ThermocoupleReferenceJunctionType): Specifies the type of reference junction to be used in the reference
                junction compensation of a thermocouple measurement. NI-DMM uses this
                value to set the Reference Junction Type property. The only supported
                value is NIDMM_VAL_TEMP_REF_JUNC_FIXED.
        '''
        if type(thermocouple_type) is not enums.ThermocoupleType:
            raise TypeError('Parameter mode must be of type ' + str(enums.ThermocoupleType))
        if type(reference_junction_type) is not enums.ThermocoupleReferenceJunctionType:
            raise TypeError('Parameter mode must be of type ' + str(enums.ThermocoupleReferenceJunctionType))
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        thermocouple_type_ctype = visatype.ViInt32(thermocouple_type.value)  # case 10
        reference_junction_type_ctype = visatype.ViInt32(reference_junction_type.value)  # case 10
        error_code = self._library.niDMM_ConfigureThermocouple(vi_ctype, thermocouple_type_ctype, reference_junction_type_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return
github ni / nimi-python / generated / nidmm / session.py View on Github external
+---------------------+---------------------+
                | NIDMM_VAL_TEMP_TC_S | Thermocouple type S |
                +---------------------+---------------------+
                | NIDMM_VAL_TEMP_TC_T | Thermocouple type T |
                +---------------------+---------------------+
            reference_junction_type (enums.ThermocoupleReferenceJunctionType): Specifies the type of reference junction to be used in the reference
                junction compensation of a thermocouple measurement. NI-DMM uses this
                value to set the Reference Junction Type property. The only supported
                value is NIDMM_VAL_TEMP_REF_JUNC_FIXED.
        '''
        if type(thermocouple_type) is not enums.ThermocoupleType:
            raise TypeError('Parameter mode must be of type ' + str(enums.ThermocoupleType))
        if type(reference_junction_type) is not enums.ThermocoupleReferenceJunctionType:
            raise TypeError('Parameter mode must be of type ' + str(enums.ThermocoupleReferenceJunctionType))
        vi_ctype = visatype.ViSession(self._vi)  # case 1
        thermocouple_type_ctype = visatype.ViInt32(thermocouple_type.value)  # case 10
        reference_junction_type_ctype = visatype.ViInt32(reference_junction_type.value)  # case 10
        error_code = self._library.niDMM_ConfigureThermocouple(vi_ctype, thermocouple_type_ctype, reference_junction_type_ctype)
        errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
        return