Exemplo n.º 1
0
 def __init__(self):
     com1 = pymeasure.ethernet('192.168.40.31', 1234)
     com2 = pymeasure.ethernet('192.168.40.32', 1234)
     
     elva100 = pymeasure.ELVA1.GPDVC15_100
     elva200 = pymeasure.ELVA1.GPDVC15_200
     
     att = [(elva100, com1, 4),
            (elva100, com1, 5),
            (elva200, com1, 6),
            (elva200, com1, 7),
            (elva100, com1, 8),
            (elva100, com1, 9),
            (elva100, com1, 10),
            (elva100, com1, 11),]
     
     self.att = []
     for _att, _host, _gpib in att:
         gpib = pymeasure.gpib_prologix(_host, _gpib)
         self.att.append(_att(gpib))
         continue
         
     self.bias_set(0)
     self.bias_get()
     pass
Exemplo n.º 2
0
    def __init__(self):
        com1 = pymeasure.ethernet('192.168.40.31', 1234)
        com2 = pymeasure.ethernet('192.168.40.32', 1234)

        elva100 = pymeasure.ELVA1.GPDVC15_100
        elva200 = pymeasure.ELVA1.GPDVC15_200

        att = [
            (elva100, com1, 4),
            (elva100, com1, 5),
            (elva200, com1, 6),
            (elva200, com1, 7),
            (elva100, com1, 8),
            (elva100, com1, 9),
            (elva100, com1, 10),
            (elva100, com1, 11),
        ]

        self.att = []
        for _att, _host, _gpib in att:
            gpib = pymeasure.gpib_prologix(_host, _gpib)
            self.att.append(_att(gpib))
            continue

        self.bias_set(0)
        self.bias_get()
        pass
 def __init__(self, IP='', GPIB=1, connection='GPIB'):
     self.IP = IP
     self.GPIB = GPIB
     if connection == 'GPIB':
         self.com = pymeasure.gpib_prologix(self.IP, self.GPIB)
     elif connection == 'LAN':
         self.com = pymeasure.ethernet(self.IP, self.GPIB)
Exemplo n.º 4
0
 def __init__(self):
     self.host = rospy.get_param('~host')
     self.port = rospy.get_param('~port')
     self.rate = rospy.get_param('~rate')
     ###=== Create instance ===###
     try:
         com = pymeasure.ethernet(self.host, self.port)
         self.sg = pymeasure.Phasematrix.FSW0010(com)
     except OSError as e:
         rospy.logerr("{e.strerror}. node={node_name}".format(
             self.node_name, self.rsw_id))
     ###=== Define topic ===###
     topic_freq = 'phasematrix_freq'
     topic_power = 'phasematrix_power'
     topic_onoff = 'phasematrix_onoff'
     ###=== Define Publisher ===###
     self.pub_freq = rospy.Publisher(topic_freq, Float64, queue_size=1)
     self.pub_power = rospy.Publisher(topic_power, Float64, queue_size=1)
     self.pub_onoff = rospy.Publisher(topic_onoff, String, queue_size=1)
     ###=== Define Subscriber ===###
     self.sub_freq = rospy.Subscriber(topic_freq + '_cmd', Float64,
                                      self.freq_set)
     self.sub_power = rospy.Subscriber(topic_power + '_cmd', Float64,
                                       self.power_set)
     self.sub_onoff = rospy.Subscriber(topic_onoff + '_cmd', String,
                                       self.onoff_set)
def Ethernet_search(IP, sport=0, eport=65535):
    '''
    DESCRIPTION
    ================
    This function searches the port responding to '*IDN?'

    ARGUMENTS
    ================
    1. IP: IP adress
        Type: string
    2. sport: searching start port
        Number: 0 -- 65535
        Type: int
    3. eport: searching stop port
        Number: 0 -- 65535
        Type: int
    
    RETURNS
    ================
    Nothing.
    '''
    for i in range(sport, eport + 1, 1):
        com = pymeasure.ethernet(IP, i)
        try:
            com.open()
            com.send('*IDN?')
            ret = com.readline()
            com.close()
        except Exception:
            sys.stdout.write('\rtest port: %d' % i)
            sys.stdout.flush()
        else:
            print('  (o _ o)!!! ')
            print('port = ' + str(i))
            print(ret)
Exemplo n.º 6
0
    def __init__(self, ip='192.168.100.28', port=6001):

        self.pub_value = rospy.Publisher("/set_p_att1", Int32, queue_size=1)
        self.pub_value = rospy.Publisher("/set_p_att2", Int32, queue_size=1)
        self.pub_state1 = rospy.Publisher("/get_p_att1", Int32, queue_size=1)
        self.pub_state2 = rospy.Publisher("/get_p_att2", Int32, queue_size=1)
        
        self.com = pymeasure.ethernet(ip, port)
        self.IO = pymeasure.SENA.adio(self.com)
Exemplo n.º 7
0
 def __init__(self, IP='192.168.100.1', port=5025, connection='GPIB'):
     self.IP = IP
     self.port = port
     if connection == 'GPIB':
         self.com = pymeasure.gpib_prologix(self.IP, self.port)
     elif connection == 'LAN':
         self.com = pymeasure.ethernet(self.IP, self.port)
     else:
         print('!!!!ERROR!!!!\n'
               'INVALID CONNECTION: {}\n'
               'AVAILABLE: "GPIB" or "LAN"\n'.format(connection))
     return
Exemplo n.º 8
0
    def __init__(self, IP='192.168.100.1', port=5025, connection='GPIB'):
        self.IP = IP
        self.port = port

        if connection == 'GPIB':
            self.com = pymeasure.gpib_prologix(self.IP, self.port)
            self.com.open()
            # time.sleep(0.5)

        elif connection == 'LAN':
            self.com = pymeasure.ethernet(self.IP, self.port)
            self.com.open()
            # time.sleep(0.5)
        return
Exemplo n.º 9
0
def losg1():
    com = pymeasure.ethernet('192.168.40.21', 7777)
    sg = pymeasure.Agilent.E8257D(com)
    return sg
Exemplo n.º 10
0
 def __init__(self):
     com = pymeasure.ethernet('192.168.40.51', 5025)
     self.driver = pymeasure.Agilent.agilent_11713C(com)
     self.ch_check()
     pass
Exemplo n.º 11
0
 def __init__(self, IP='192.168.100.1', port=5025):
     self.IP = IP
     self.port = port
     self.com = pymeasure.ethernet(IP, port)
 def __init__(self, IP='192.168.100.1', port=10001):
     self.IP = IP
     self.port = port
     self.com = pymeasure.ethernet(self.IP, self.port)
     self.sg = pymeasure.Phasematrix.FSW0020(self.com)
Exemplo n.º 13
0
def irrsg():
    com = pymeasure.ethernet('192.168.40.41', 10001)
    sg = pymeasure.Phasematrix.FSW0020(com)
    return sg
 def __init__(self, IP="", GPIB=1):
     self.IP = IP
     self.GPIB = GPIB
     # self.com = pymeasure.gpib_prologix(self.IP, self.GPIB)
     self.com = pymeasure.ethernet(self.IP, self.GPIB)
Exemplo n.º 15
0
 def __init__(self):
     com = pymeasure.ethernet('192.168.40.51', 5025)
     self.driver = pymeasure.Agilent.agilent_11713C(com)
     self.ch_check()
     pass
Exemplo n.º 16
0
def irrsg():
    com = pymeasure.ethernet('192.168.40.41', 10001)
    sg = pymeasure.Phasematrix.FSW0020(com)
    return sg
Exemplo n.º 17
0
def speana1():
    com = pymeasure.ethernet('192.168.40.61', 5025)
    sp = pymeasure.Agilent.N9343C(com)
    return sp
# Outputs
savedir = "/home/amigos/data/SIS/HotCold/SA/"
filename = savedir + "HC" + datetime

# Devices =====================================
"""
#Ondoroti
ond = TR72W.tr72w()
# Attenuator
att = A11713B.a11713b()
"""
# Spectrum Analyze
IP_SA = "192.168.100.107"
port_SA = 49153
com_SA = pymeasure.ethernet(IP_SA, port_SA)
sp = pymeasure.Agilent.N9343C(com_SA)

load = CPZ7204.cpz7204()
load.set_home()
print "============"
print "HOT LOAD"
print "Current position is defined as the COLD position"
print "   "

# settings of spectrum analyzer
band_start = 2  #[GHz]
band_end = 14  #[GHz]

## Query Setting of Spectrum Analyzer
sp.com.send("BAND?")