source: ETALON/SPARC/SPARC_controls/test.py @ 797

Last change on this file since 797 was 797, checked in by delerue, 6 years ago

Added SPARC controls

File size: 1.6 KB
Line 
1__author__ = 'delerue'
2
3
4from sparc_constants import *
5from motor_function import *
6from encoder import *
7from scope_function import *
8
9global motor_controller_IP
10global motor_controller_port
11
12
13
14motor_controller_IP='10.0.1.160'
15motor_controller_port=30000
16
17
18#find_back_limit_and_move_to_1mm()
19
20check_table_limits()
21
22#init_encoder_ref_pos()
23#read_encoder()
24#tranlation_in_mm(-12)
25#read_encoder()
26#tranlation_in_mm(1)
27read_encoder()
28
29#check_table_limits()
30
31#motor_disable(1)
32#rotation_in_turn(1)
33time.sleep(5)
34#tranlation_in_mm(-1)
35#time.sleep(5)
36motor_move_relative(1,8000,-10000)
37motor_wait_for_ready(1)
38time.sleep(5)
39motor_move_absolute(1,8000,0)
40motor_wait_for_ready(1)
41
42
43#motor_reset(1)
44#motor_enable(1)
45#motor_move_relative(1,2000,50000)
46#motor_move_absolute(1,20,000)
47#motor_wait_for_ready(1)
48#motor_move_absolute(1,20,500)
49#motor_wait_for_ready(1)
50#motor_disable(1)
51
52#get_out_of_limit()
53
54#table_to_mm_from_back(2)
55#find_back_limit_and_move_to_1mm()
56#rotation_in_turn(0.25)
57#get_camera_images(show=1)
58
59#table_to_mm_from_back(1)
60#grating_big_p05()
61#time.sleep(20)
62#grating_big_blank()
63#time.sleep(20)
64#grating_small_p1()
65#time.sleep(20)
66#grating_small_blank()
67#time.sleep(20)
68#grating_small_p1()
69
70
71#read_image("/Users/delerue/Downloads/test.png")
72#read_images_from_scope(3)
73
74
75#read_encoder()
76#init_encoder_ref_pos()
77#check_encoder_constistency()
78#monitor_encoder_consistency()
79
80
81#scpi_command("*IDN?")
82#scpi_command("TIMEbase:SCALE?")
83
84#writeclient('192.168.0.21',80,'GET /'+chr(10),1)
85#writeclient('192.168.0.22',5025,'*IDN?'+chr(10),1)
86#writeclient(SCOPE_IP,5025,'*IDN?'+chr(10),1)
Note: See TracBrowser for help on using the repository browser.