Exemplo n.º 1
0
#!/usr/bin/env python3

import sys
import time
sys.path.append('/home/amigos/ros/src/nasco_system/scripts')
import nasco_controller
ctrl = nasco_controller.controller()

import rospy
import datetime

from std_msgs.msg import String
from std_msgs.msg import Int64

import os
import shutil
import glob

beam_list = [
    '2l', '2r', '3l', '3r', '4l', '4r', '5l', '5r', '1lu', '1ll', '1ru', '1rl'
]
beam_num = 12

initial_voltage = 6  # mV
final_voltage = 9  # mV

step = 0.05  # mV
interval = 5e-2  # 50 msec.
fixtime = 3  # 0.5 sec.
wait = 1.5
roop = int((final_voltage - initial_voltage) / step)

import sys
import rospy
import time
import std_msgs.msg
import datetime

sys.path.append('/home/amigos/ros/src/nasco_system/scripts/')
import nasco_controller
import jpynb_controller


rospy.init_node(name)

con = nasco_controller.controller(node=False)
jpynb = jpynb_controller.jpynb()

date = datetime.datetime.today().strftime('%Y%m%d_%H%M%S')
dir_name = name + '/' + date + '.necstdb'
dir_name_jpynb = name + '/' + date

# pub intialize
# ------------
logger = rospy.Publisher('/logger_path', std_msgs.msg.String, queue_size=1)
status = rospy.Publisher('/'+name+'/status', std_msgs.msg.String, queue_size=1)
time.sleep(0.5)

# set params.
beam_list = ['2l', '2r', '3l', '3r',
             '4l', '4r', '5l', '5r']
Exemplo n.º 3
0
import nasco_controller
import time
con = nasco_controller.controller()

con.sg_100ghz_1st.set_onoff(0)  # (ON, OFF) = (1, 0)
con.sg_100ghz_2nd_upper.set_onoff(0)  # (ON, OFF) = (1, 0)
con.sg_100ghz_2nd_lower.set_onoff(0)  # (ON, OFF) = (1, 0)
con.sg_200ghz_1st.set_onoff(0)  # (ON, OFF) = (1, 0)
con.sg_200ghz_2nd_upper.set_onoff(0)  # (ON, OFF) = (1, 0)
con.sg_200ghz_2nd_lower.set_onoff(0)  # (ON, OFF) = (1, 0)
time.sleep(1)

#con.sg_100ghz_1st.set_freq(17.4452003333) # GHz
#con.sg_100ghz_2nd_upper.set_freq(9.5) # GHz
#con.sg_100ghz_2nd_lower.set_freq(4) # GHz
con.sg_200ghz_1st.set_freq(18.764)  # GHz
con.sg_200ghz_2nd_upper.set_freq(6.6)  # GHz
con.sg_200ghz_2nd_lower.set_freq(4.2)  # GHz
time.sleep(1)

con.sg_100ghz_1st.set_power(14)  # dBm
con.sg_100ghz_2nd_upper.set_power(20)  # dBm
con.sg_100ghz_2nd_lower.set_power(20)  # dBm
#con.sg_200ghz_1st.set_power(14) # dBm
#con.sg_200ghz_2nd_upper.set_power(20) # dBm
#con.sg_200ghz_2nd_lower.set_power(20) # dBm
time.sleep(1)

con.sg_100ghz_1st.set_onoff(1)  # (ON, OFF) = (1, 0)
con.sg_100ghz_2nd_upper.set_onoff(1)  # (ON, OFF) = (1, 0)
con.sg_100ghz_2nd_lower.set_onoff(1)  # (ON, OFF) = (1, 0)