Beispiel #1
0
    def get_setpoint(self):
        '''
        Query Control Loop Setpoint.

        :Return: Returns the control loop setpoint.
        '''
        send_GPIB('\"SETP? ' + self.controlLoop + '\"', self.gpib_address)
        return float(receive_GPIB(self.gpib_address))
Beispiel #2
0
    def heater_output(self):
        '''
        Query Heater Output (0 to 100%).

        :Return: heater output in percent.
        '''
        send_GPIB('HTR?', self.gpib_address)
        return float(receive_GPIB(self.gpib_address))
Beispiel #3
0
    def v(self):
        '''
        Reads a voltage value in Volts.

        :return: measured voltage in volts.
        '''

        send_GPIB(':READ?', self.gpib_address)

        return float(receive_GPIB(self.gpib_address))
Beispiel #4
0
    def heater_range(self, *args):
        '''
        heater_range() >> Query Heater Range.
        heater_range(0-5) >> Configure Heater Range (from 0 to 5).

        :params range: heater range.

        :Return: the heater range.
        '''
        if len(args) == 1:
            send_GPIB('\"Range ' + str(args[0]) + '\"', self.gpib_address)
        else:
            send_GPIB('RANGE?', self.gpib_address)
            return float(receive_GPIB(self.gpib_address))
Beispiel #5
0
    def t(self, *args):
        '''
        t() queries temperature.
        t(setpoint) sets the setpoint temperature of the selected input.

        :params setpoint: temperature setpoint in Kelvin.
        '''

        if len(args) == 1:
            send_GPIB(
                '\"SETP ' + self.controlLoop + ', ' + str(args[0]) + '\"',
                self.gpib_address)
        else:
            send_GPIB('\"KRDG? ' + self.input + '\"', self.gpib_address)
            return float(receive_GPIB(self.gpib_address))
Beispiel #6
0
# -*- coding: utf-8 -*-
"""
amreft-m4p example script 0.

@author: Carlos galdino
[email protected]
"""

from KUSB_488A_communication import init_gpib, terminate_gpib, send_GPIB, receive_GPIB

# %% Initizalize communication

comm_gpib = init_gpib()

# %% Send and receive identification message on adress 3

sent1 = send_GPIB('*idn?', 1)
received1 = receive_GPIB(1)
print(received1)

# %% Terminate communication

terminate_gpib(comm_gpib)