def __init__(self):

        com = ogameasure.gpib_prologix(host, gpibport)
        loatt = ogameasure.ELVA1.GPDVC15.GPDVC15_100(com)


        topic = "/dev/gpdvc15_100rs/__IP__/port_5/i_cmd"
        rospy.Subscriber(topic, Float64, self.set_output)
示例#2
0
    def __init__(self):
        host = rospy.get_param("~host")
        port = rospy.get_param("~gpibport")
        com = ogameasure.gpib_prologix(host, port)
        self.sw = ogameasure.Agilent.agilent_11713B(com)

        rospy.Subscriber("/dev/87104b/__IP__/open_ch_cmd", Int32,
                         self.switch_open)
        rospy.Subscriber("/dev/87104b/__IP__/close_ch_cmd", Int32,
                         self.switch_close)
示例#3
0
    def __init__(self):
        host = rospy.get_param("~host")
        gpibport = rospy.get_param("~gpibport")
        com = ogameasure.gpib_prologix(host, gpibport)

        self.pm = ogameasure.Anritsu.ml2437a(com)

        ave_onoff = rospy.get_param("~ave_onoff")
        ave_num = rospy.get_param("~ave_num")
        self.pm.set_average_onoff(ave_onoff)
        self.pm.set_average_count(ave_num)
示例#4
0
    def __init__(self):
        self.host = rospy.get_param("~host")
        self.gpibport = rospy.get_param("~gpibport")
        com = ogameasure.gpib_prologix(self.host, self.gpibport)
        #print(host)
        #print(gpibport)
        self.l218 = ogameasure.Lakeshore.model218(com)

        self.pub_list = [
            rospy.Publisher("/dev/218/__IP__/temp/ch{0}".format(ch),
                            Float64,
                            queue_size=1) for ch in range(1, ch_num + 1)
        ]
    def __init__(self):

        self.loatt = []
        for i in gpibport_list:
            gpibport = i
            com = ogameasure.gpib_prologix(host, gpibport)
            lo = ogameasure.ELVA1.GPDVC15.GPDVC15_100(com)
            lo.com.close()
            self.loatt.append(lo)
            time.sleep(60)

        for i, port in enumerate(gpibport_list):
            topic = "/dev/gpdvc15_100rs/__IP__/port_%d/i_cmd"%(port)
            sub = rospy.Subscriber(topic, Float64, self.set_output, callback_args=i)
            time.sleep(60)
示例#6
0
 def gpib_address_search(self):
     print('GPIB Address Searching...')
     for i in range(31):
         sys.stdout.write('\r try address %d ...   ' % (i))
         sys.stdout.flush()
         com = ogameasure.gpib_prologix(self.com.com.host, i)
         try:
             com.com.timeout = 1.2
             com.open()
             com.send('*IDN?')
             com.readline()
         except socket.timeout:
             com.close()
             sys.stdout.write('\x08\x08NG')
             sys.stdout.flush()
             time.sleep(0.1)
             continue
         sys.stdout.write('\x08\x08OK\n')
         sys.stdout.flush()
         com.close()
         return i
     return
示例#7
0
 def connect(self):
     com = ogameasure.gpib_prologix(self.host, self.gpibport)
     self.l218 = ogameasure.Lakeshore.model218(com)