Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
labcode
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CST
labcode
Commits
f919f14d
Commit
f919f14d
authored
Sep 18, 2023
by
JupyterHub User
Browse files
Options
Downloads
Patches
Plain Diff
small changes
parent
6b737787
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
hp4155/measurements.py
+10
-8
10 additions, 8 deletions
hp4155/measurements.py
hp4155/module.py
+4
-1
4 additions, 1 deletion
hp4155/module.py
hp4155/tlm_final.ipynb
+1
-1
1 addition, 1 deletion
hp4155/tlm_final.ipynb
with
15 additions
and
10 deletions
hp4155/measurements.py
+
10
−
8
View file @
f919f14d
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
hp4155/module.py
+
4
−
1
View file @
f919f14d
...
@@ -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
This diff is collapsed.
Click to expand it.
hp4155/tlm_final.ipynb
+
1
−
1
View file @
f919f14d
...
@@ -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,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment