Exemple #1
0
#if lo == '1':
#    lo = '-lo'
#    ctrl.set_1st_lo(config=True)
#else: pass

# Start Log.
msg = String()
msg.data = str(time.time())  # + lo
flag_name = 'sisiv_trigger'
pub = rospy.Publisher(flag_name, String, queue_size=1)
time.sleep(1.5)  # 1.5 sec.

try:
    for cur in range(1, 11):
        for _ in loatt_list:
            ctrl.output_loatt_current(beam=_, current=cur)
            time.sleep(1e-3)
        msg = String()
        msg.data = str(time.time())
        pub.publish(msg)
        for vol in range(roop + 1):
            for _ in beam_list:
                ctrl.output_sis_voltage(sis=_,
                                        voltage=vol * step + initial_voltage)
                time.sleep(1e-2)  # 10 msec.
        f_msg = String()
        f_msg.data = ''
        pub.publish(f_msg)
except KeyboardInterrupt:
    for _ in beam_list:
        ctrl.output_sis_voltage(sis=_, voltage=0)
Exemple #2
0
beam_num = 12

initial_voltage = 7  # mV
final_voltage =  9     # mV
#step = 0.1             # mV
step = 0.3            # for gpib
interval = 5e-3        # 5 msec.
fixtime = 1.           # 1 sec.
#fixtime = 5.           # for gpib
roop = int((final_voltage - initial_voltage) / step)

# Start Chopper


# Set Param
ctrl.output_loatt_current(config=True)
#ctrl.set_1st_lo(config=True)
ctrl.output_hemt_voltage(config=True)

time.sleep(3)


# Start Log.
msg = String()
msg.data = str(time.time())
flag_name = 'sisv_sweep_trigger'
pub = rospy.Publisher(flag_name, String, queue_size=1)
time.sleep(1.5) # 1.5 sec.
#pub.publish('')
time.sleep(3.0)
pub.publish(msg)
step = 0.05             # mV
interval = 5e-3        # 5 msec.
fixtime = 3           # 3 sec.
roop = int((final_current - initial_current) / step)

# Start Chopper


# Set Param
#ctrl.set_1st_lo(config=True)
# ctrl.output_hemt_voltage(config=True)
# ctrl.output_sis_voltage(config = True)

#initialize
for _ in beam_list:
    ctrl.output_loatt_current(beam=_, current=0)
    time.sleep(interval)
time.sleep(1)

# Start Log.
msg = String()
msg.data = str(time.time())
flag_name = 'loatt_sweep_trigger'
pub = rospy.Publisher(flag_name, String, queue_size=1)
time.sleep(1.5) # 1.5 sec.
pub.publish(msg)

try:
    for cur in range(roop+1):
        for _ in beam_list:
            ctrl.output_loatt_current(beam=_, current=cur*step)