Skip to content
Snippets Groups Projects
Commit 534d7474 authored by Alexandros Asonitis's avatar Alexandros Asonitis
Browse files

integrated into function the first part of tlm

parent 8ca2b472
No related branches found
No related tags found
No related merge requests found
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
No preview for this file type
......@@ -450,7 +450,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.11.4"
}
},
"nbformat": 4,
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -6,6 +6,7 @@ import pandas as pd
from datetime import datetime
import os
from sklearn.linear_model import LinearRegression
import sys
def I_V_Measurement(start,stop,step):
......@@ -269,4 +270,116 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
#close the connection and plot all the diagramms
del device
#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):
#connect to the device
device = module.HP4155a('GPIB0::17::INSTR')
date = str(datetime.today().replace(microsecond=0))
#repeat five times
for i in range(len(distances)):
#setup
device.reset()
device.inst.write(":PAGE:MEAS")
device.inst.write(":PAGE:CHAN:MODE SWEEP") #go to sweep page and prepare sweep measurement
#disable vmus and vsus
device.disable_vsu(1)
device.disable_vsu(2)
device.disable_vmu(1)
device.disable_vmu(2)
#smu1 is constant and common
device.smu_mode_meas(1,'COMM')
device.smu_function_sweep(1,'CONS')
#smu2 is constant and I
device.smu_mode_meas(2,'I')
device.smu_function_sweep(2,'CONS')
device.cons_smu_value(2,0)
#smu3 is var1 and I
device.smu_mode_meas(3,'I')
device.smu_function_sweep(3,'VAR1')
#smu4 is constant and I
device.smu_mode_meas(4,'I')
device.smu_function_sweep(4,'CONS')
device.cons_smu_value(4,0)
#select compliance of smu3
device.comp('VAR1',comp)
#compliance of smu2 and smu4 is 10V
device.const_comp(2,10)
device.const_comp(4,10)
#define user functions
device.user_function('I','A','I3')
device.user_function('V','V','V4-V2')
device.user_function('R','OHM','V/I')
device.user_function('VS','V','V3')
#integration time
device.integration_time(time)
#define start-step-stop
device.start_value_sweep(start)
device.step_sweep(step)
device.stop_value_sweep(stop)
#display variables
device.display_variable('X','V')
device.display_variable('Y1','I')
device.display_variable('Y2','R')
device.display_variable_min_max('X','MIN',-10)
device.display_variable_min_max('X','MAX',10)
device.display_variable_min_max('Y1','MIN',start)
device.display_variable_min_max('Y1','MAX',stop)
device.display_variable_min_max('Y2','MIN',0)
device.display_variable_min_max('Y2','MAX',200)
#start measurement
device.single_measurement()
while device.operation_completed() == False:
pass
%% Cell type:code id:b0bb5705-6d95-44b2-9ef9-83e6b45ba8c6 tags:
``` python
import measurements
from measurements import *
tlm_final()
```
%% Cell type:code id:67adfae9-ea78-4934-a782-b27592b37d46 tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment