第一次提交
1、hpi的可用代码; 2、修复了多次点击曝光后,福亮度数据错误的问题; 3、定标方式为大的蓝菲积分球的标准能量曲线,而不是基于asd的能量曲线;
This commit is contained in:
42
record_system_v24/delete.py
Normal file
42
record_system_v24/delete.py
Normal file
@ -0,0 +1,42 @@
|
||||
import os, subprocess, time, traceback
|
||||
|
||||
print('开始马达')
|
||||
try:
|
||||
# D:\software\Anaconda3\envs\py27_32\
|
||||
python2_command = r'python2.exe ' + os.path.dirname(__file__) + '/ArcusDevice.py' + ' CLR PX=0 EO=1 J+'
|
||||
print(python2_command)
|
||||
print(python2_command.split())
|
||||
process = subprocess.Popen(python2_command.split(), stdout=subprocess.PIPE)
|
||||
try:
|
||||
output, error = process.communicate(timeout=1)
|
||||
except subprocess.TimeoutExpired:
|
||||
print('有错1')
|
||||
process.kill()
|
||||
output, error = process.communicate()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
print('有错2')
|
||||
pass
|
||||
|
||||
|
||||
print('转动5秒')
|
||||
time.sleep(5)
|
||||
|
||||
|
||||
print('返回马达')
|
||||
try:
|
||||
# D:\software\Anaconda3\envs\py27_32\
|
||||
# 打包:https://stackoverflow.com/questions/58995937/using-pyinstaller-to-convert-python3-and-python2-to-exe
|
||||
python2_command = r'python2.exe ' + os.path.dirname(__file__) + '/ArcusDevice.py' + ' CLR STOP X0'
|
||||
print(python2_command)
|
||||
process = subprocess.Popen(python2_command.split(), stdout=subprocess.PIPE)
|
||||
try:
|
||||
output, error = process.communicate(timeout=1)
|
||||
except subprocess.TimeoutExpired:
|
||||
print('有错3')
|
||||
process.kill()
|
||||
output, error = process.communicate()
|
||||
except:
|
||||
traceback.print_exc()
|
||||
print('有错4')
|
||||
pass
|
Reference in New Issue
Block a user