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

checked parameters of the labview measurement

parent c6facf56
Branches
No related tags found
No related merge requests found
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
This diff is collapsed.
%% Cell type:code id:44cebdf0-d79f-4c34-83c0-ed74f9eb3cf9 tags:
``` python
import module
```
%% Cell type:code id:b1a01977-062f-4bf2-8539-743a9fbcc10b tags:
``` python
device = module.HP4155a('GPIB0::17::INSTR')
```
%% Cell type:code id:28c660ec-3c79-4075-aa6c-e4b7078a199f tags:
``` python
device.show_variables()
```
%% Output
'q,k,e,@PGT,@PGD,@PG1W,@PG2W,@PG1DL,@PG2DL,@PG1B,@PG2B,@PG1LD,@PG2LD,@PG1TR,@PG2TR,@TIME,@INDEX,@MX,@MY,@MY1,@MY2,@MI,@CX,@CY,@CY1,@CY2,@L1X,@L1Y,@L1Y1,@L1Y2,@L2X,@L2Y,@L2Y1,@L2Y2,@L1G,@L1G1,@L1G2,@L2G,@L2G1,@L2G2,@IX,@IY,@IY1,@IY2,@L1CO,@L2CO,VGND,V2,VS,V4,IGND,I2,IS,I4,I,V,R\n'
%% Cell type:code id:773d5cc4-4830-48f8-9ef8-e14d8a726ed1 tags:
``` python
device.inst.write(":PAGE:CHAN:MODE SWEEP") #go to sweep page and prepare sweep measurement
```
%% Output
23
%% Cell type:code id:4d0f1206-743b-40c5-839b-35cfc619fd83 tags:
``` python
''' some instructions for the measurement setup
smu1 is constant and common(GND)
smu2 is constant and mode I(2)
smu3 is VAR1 and mode I(S)
smu4 is constant and mode I(4)
we calculate the difference between i4-i2
'''
```
%% Cell type:code id:7ea283a7-827d-4194-a7c4-7f05fec34339 tags:
``` python
device.inst.query(":PAGE:MEAS:VAR1:COMP?")
```
%% Output
'+1.000000E+001\n'
%% Cell type:code id:6aa55567-d9ca-44c1-8121-2aa58031da68 tags:
``` python
'''
smu2 and smu4 have current zero
the line of voltage=0 returns if
'''
device.inst.query(":PAGE:CHAN:UFUN:CAT?")
```
%% Output
'+3,I,V,R\n'
%% Cell type:code id:86186b8c-87ab-43f3-97aa-b564ef35e7a3 tags:
``` python
device.inst.query(":PAGE:DISP:DVAR?")
```
%% Output
'\n'
%% Cell type:code id:d4dab174-5f7c-42c3-b46c-5fc234a3e414 tags:
``` python
''' from this command the data variable v4-v2 is displayed
idea: v4-v2 is zero when two smus have created a shortcut
'''
voltage=device.return_data('V')
```
%% Output
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
Cell In[9], line 5
1 ''' from this command the data variable v4-v2 is displayed
2 idea: v4-v2 is zero when two smus have created a shortcut
3 '''
----> 5 voltage=device.return_data('V')
File ~\labcode\hp4155\module.py:168, in HP4155a.return_data(self, variable)
164 def return_data(self, variable):
165
166 #send command to instrument returns a string of comma seperated values
167 command = f":DATA? '{variable}'"
--> 168 data = self.inst.query(command)
170 # separate the string to a list of strings
171 values = data.replace("\n",",").split(",")
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvisa\resources\messagebased.py:648, in MessageBasedResource.query(self, message, delay)
645 if delay > 0.0:
646 time.sleep(delay)
--> 648 return self.read()
File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyvisa\resources\messagebased.py:486, in MessageBasedResource.read(self, termination, encoding)
484 if termination is None:
485 termination = self._read_termination
--> 486 message = self._read_raw().decode(enco)
487 else:
488 with self.read_termination_context(termination):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf4 in position 9: ordinal not in range(128)
%% Cell type:code id:419bca96-97ca-47ba-876b-2b3a99722a68 tags:
``` python
device.operation_completed()
```
%% Output
True
%% Cell type:code id:7e49a29b-6261-4b0f-8fb2-fbeaedf604a7 tags:
``` python
device.inst.query(":PAGE:MEAS:MSET:ITIM?")
```
%% Output
'MED\n'
%% Cell type:code id:2ddb04ba-1368-4443-94e6-6440c772899b tags:
``` python
'''
measurement range has range limited 1nA gnd
auto for smu2 and 4
limited 2v for smu3
default wait time 1
shor 640 microsecond 0,032
med 20ms 1
long 320ms 16
'''
```
%% Output
'\nmeasurement range has range limited 1nA gnd\nauto for smu2 and 4\nlimited 2v for smu3\n\ndefault wait time 1\n\nshor 640 microsecond 0,032\nmed 20ms 1\nlong 320ms 16\n'
%% Cell type:code id:076df1d7-3df7-4355-9503-585847927a93 tags:
``` python
del device
```
%% Output
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Cell In[10], line 1
----> 1 del device
NameError: name 'device' is not defined
%% Cell type:code id:dae1e02e-3e61-4a56-9c23-643d45d2892c tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment