Skip to content
Snippets Groups Projects
Commit f919f14d authored by JupyterHub User's avatar JupyterHub User
Browse files

small changes

parent 6b737787
No related branches found
No related tags found
No related merge requests found
...@@ -274,7 +274,7 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com ...@@ -274,7 +274,7 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
del device del device
#tlm/ctlm final part #tlm/ctlm final part
def tlm_final(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),comp=10,distances=(5,10,15,25,45),time='MED',innen=0): def tlm_final(innen=0,distances=(5,10,15,25,45),field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),comp=10,time='MED'):
#connect to the device #connect to the device
device = module.HP4155a('GPIB0::17::INSTR') device = module.HP4155a('GPIB0::17::INSTR')
...@@ -346,18 +346,20 @@ def tlm_final(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3 ...@@ -346,18 +346,20 @@ def tlm_final(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3
device.display_variable('Y1','I') device.display_variable('Y1','I')
device.display_variable('Y2','R') device.display_variable('Y2','R')
device.display_variable_min_max('X','MIN',-10) ###-----------------------------autoscaling after measurement------------------------------------------------------------------------------
device.display_variable_min_max('X','MAX',10) #device.display_variable_min_max('X','MIN',-comp)
device.display_variable_min_max('Y1','MIN',start) #device.display_variable_min_max('X','MAX',comp)
device.display_variable_min_max('Y1','MAX',stop) #device.display_variable_min_max('Y1','MIN',start)
device.display_variable_min_max('Y2','MIN',0) #device.display_variable_min_max('Y1','MAX',stop)
device.display_variable_min_max('Y2','MAX',200) #device.display_variable_min_max('Y2','MIN',0)
#device.display_variable_min_max('Y2','MAX',200)
#start measurement #start measurement
device.single_measurement() device.single_measurement()
while device.operation_completed() == False: while device.operation_completed() == False:
pass pass
device.autoscaling()
#return data from the device #return data from the device
V=device.return_data('V') V=device.return_data('V')
......
...@@ -218,3 +218,6 @@ class HP4155a(object): ...@@ -218,3 +218,6 @@ class HP4155a(object):
def display_variable_min_max(self,axis,extremum,value): def display_variable_min_max(self,axis,extremum,value):
command = f":PAGE:DISP:GRAP:{axis}:{extremum} {value}" command = f":PAGE:DISP:GRAP:{axis}:{extremum} {value}"
self.inst.write(command) self.inst.write(command)
def autoscaling(self):
self.inst.write(":PAGE:GLIS:SCAL:AUTO ONCE")
\ No newline at end of file
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.9.7"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment