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
d6572a91
Commit
d6572a91
authored
9 months ago
by
Alexandros Asonitis
Browse files
Options
Downloads
Patches
Plain Diff
wait for sweep to be completed function
parent
8a771cad
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
hp4194/control.py
+14
-2
14 additions, 2 deletions
hp4194/control.py
hp4194/first.ipynb
+1
-1
1 addition, 1 deletion
hp4194/first.ipynb
with
15 additions
and
3 deletions
hp4194/control.py
+
14
−
2
View file @
d6572a91
...
...
@@ -3,6 +3,7 @@ import enum
import
pandas
as
pd
import
warnings
import
numpy
as
np
import
time
class
hp4194
(
object
):
...
...
@@ -87,13 +88,24 @@ class hp4194(object):
with
pd
.
option_context
(
'
display.max_rows
'
,
None
,
'
display.max_columns
'
,
None
,
'
display.max_colwidth
'
,
3000
):
display
(
self
.
library
)
def
bit_set
(
self
):
def
__bit_set
(
self
):
"""
Returns if the measurement has finished
"""
decimal
=
self
.
inst
.
read_stb
()
status_byte_register
=
np
.
binary_repr
(
decimal
,
8
)
print
(
status_byte_register
)
measurement_bit
=
int
(
status_byte_register
[
-
2
])
return
bool
(
measurement_bit
)
def
wait
(
self
):
"""
Wait until the measurement is finished
"""
time
.
sleep
(
2
)
while
self
.
__bit_set
()
==
False
:
time
.
sleep
(
0.1
)
...
...
This diff is collapsed.
Click to expand it.
hp4194/first.ipynb
+
1
−
1
View file @
d6572a91
...
...
@@ -54500,7 +54500,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.1
3
.0"
"version": "3.1
2
.0"
}
},
"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