Commit bb6b0804113cd8ab7939323f5ca3246b3c13f9f6
1 parent
ff6ac07476
Exists in
master
Add configure method
Showing 1 changed file with 11 additions and 18 deletions Side-by-side Diff
instruments/TPG261.py
| ... | ... | @@ -10,30 +10,23 @@ |
| 10 | 10 | #============================================================================== |
| 11 | 11 | |
| 12 | 12 | class TPG261(abstract_instrument): |
| 13 | - def __init__(self, adress=ADRESS, vtype=[ALL_VAL_TYPE[0]], channels = [ALL_CHANNELS[0]]): | |
| 13 | + def __init__(self, channels, vtypes, adress): | |
| 14 | 14 | self.adress = adress |
| 15 | - self.vtype = vtype | |
| 15 | + self.channels = channels | |
| 16 | + self.vtypes = vtypes | |
| 16 | 17 | |
| 17 | 18 | def model(self): |
| 18 | 19 | return "PfeifferTPG261" |
| 19 | 20 | |
| 20 | 21 | def connect(self): |
| 21 | - try: | |
| 22 | - print('Connecting to device @%s...' %(self.adress)) | |
| 23 | - self.TPG = MaxiGauge(self.adress) | |
| 24 | - print(' --> Ok') | |
| 22 | + print('Connecting to device @%s...' %(self.adress)) | |
| 23 | + self.TPG = MaxiGauge(self.adress) | |
| 24 | + print(' --> Ok') | |
| 25 | + print(self.model()) | |
| 26 | + self.configure() | |
| 25 | 27 | |
| 26 | - print(self.model()) | |
| 27 | - | |
| 28 | - if self.vtype == "PRE": | |
| 29 | - 1 | |
| 30 | - else: | |
| 31 | - print("Wrong -v argument") | |
| 32 | - raise | |
| 33 | - | |
| 34 | - except Exception as er: | |
| 35 | - print("Unexpected error during connection: " + str(er)) | |
| 36 | - raise | |
| 28 | + def configure(self): | |
| 29 | + pass | |
| 37 | 30 | |
| 38 | 31 | def getValue(self): |
| 39 | 32 | self.read() |