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

wait for sweep to be completed function

parent 8a771cad
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -54500,7 +54500,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.0"
"version": "3.12.0"
}
},
"nbformat": 4,
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment