-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest1.py
More file actions
141 lines (104 loc) · 4.17 KB
/
test1.py
File metadata and controls
141 lines (104 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
####################################################################################################
# This test is an example of how to write a test, and contains a few code lines #
# for every module. #
# Notice that every test shoulld contain the next defines: #
# #Test ID: #
# USER_NAME - this variable is being used in the init.py file, to choose the right address. #
# FOLDER_PATH - the path for the test's log to be saved. #
# TEST_NAME - the test's name. #
# #
# #defines: #
# T32_APP_CMM_PATH of every define that is specific to this test. #
# #
# #call the init.py module: #
# execfile(r"C:\Users\bar.kristal\Documents\GitHub\Python\init.py") #
####################################################################################################
## Test ID:
USER_NAME = 'Bar'
FOLDER_PATH = r"C:\\Users\bar.kristal\Documents\GitHub\Python\Tests\functionality_test"
TEST_NAME = "test1"
#defines:
T32_APP_CMM_PATH = r"T:\\barkristal\DVF101\SPI\scripts\dvf101_app.cmm"
#call the init.py module:
execfile(r"C:\Users\bar.kristal\Documents\GitHub\Python\init.py")
#######################################################################################
## Uart_Device:
# D6 = UartDevice('DBMD6', 'COM13', baudrate=912600, bytesize=8, parity='N', stopbits=1,timeout=1)
# D6.change_baudrate(115200)
# print D6.ser.baudrate
# D6.sync(10)
# D6.load_boot_file(r'T:\Barkristal\VT_D6_ver_293_Sen333.bin')
# print D6.read_IO_port('3000000')
########################
## Lauterbach:
# DVF101 = Lauterbach("DVF101")
# DVF101.write_register("5300000", "5555")
# DVF101.set_bits("5300000", "410", "40")
# print DVF101.read_register("5300000")
# DVF101.execute_cmm_file(br"T:\barkristal\DVF101\SPI\clkout.cmm")
# DVF101.close()
########################
## Excel:
# wb1, path = create_excel_file(DIR_NAME, LOG_NAME_EXCEL)
# ws1 = wb1.create_sheet("new sheet is the new shit!")
# ws1.cell(row=1,column=1).value="write something"
# wb1.save(full_path)
# wb=open_excel_file(full_path)
# print wb.get_sheet_names()
########################
## Power Supply:
# pwr_sply = QL355TPPwrSply(POWER_SUPLLY_ADDRESS)
# print pwr_sply.name
# pwr_sply.channel_on('1')
# pwr_sply.set_volt(1,4.3)
# pwr_sply.read_current(1)
# pwr_sply.sense(2,1)
#
# pwr_sply.set_current_lim(1,1.32)
# pwr_sply.close()
########################
## Frequency counter:
# freq_counter = HP53131aFreqCounter(FREQUENCY_COUNTER_ADDRESS)
# print freq_counter.name
# freq_counter.meas("freqency")
# a= freq_counter.meas("volt_min_peak")
# freq_counter.meas("phase")
########################
## Electronc load:
# load = KikusuiPLZ70UA(ELECTRONIC_LOAD_ADDRESS)
# print load.name
# load.reset()
# load.load_on()
# load.load_off()
# load.set_resistance("0.234")
# load.read_current("1")
# load.read_voltage("2")
########################
## Small oven:
# fridg = VotschVT4002("COM19")
# fridg.stop_chamber()
# time.sleep(3)
# fridg.wait_for_temp(82)
# time.sleep(2)
# print fridg.read_error()
# fridg.close()
########################
## Blue oven:
# termotron = Termotron3800(TERMOTRON_TCP_IP)
# termotron.stop_chamber()
# termotron.set_temp(23)
# termotron.wait_for_temp(22)
# write_to_log(termotron.read_temp())
# time.sleep(1)
# termotron.stop_chamber()
########################
## DMM
# dmm = Agillent34401A(DMM_ADDRESS)
# dmm.meas("DCV")
# dmm.meas("ACV")
# dmm.meas("frequency")
# dmm.close()
########################
## Wave generator
wave_gen = HP33120aWaveGen("GPIB0::12::INSTR")
wave_gen.generate("SIN", '1000', "1", "0")