Commit 05ab07cc3f283d631fe62fbe394bd9f3971a1e17

Authored by bmarechal
1 parent 56312b9abf
Exists in master

-

Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff

instruments/LS350.py
... ... @@ -15,13 +15,13 @@
15 15 def __init__(self, channels, vtypes, adress):
16 16 self.adress = adress
17 17 self.port = 7777
18   - self.channels = channels
  18 + self.channels = channels
19 19 self.vtypes = vtypes
20 20  
21 21 def model(self):
22 22 #self.send("*IDN?")
23 23 #return self.read()
24   - return "LS350"
  24 + return "LS350"
25 25  
26 26 def connect(self):
27 27 print('Connecting to device @%s:%s...' %(self.adress, self.port))
28 28  
... ... @@ -32,14 +32,14 @@
32 32 self.sock.connect((self.adress, self.port))
33 33 print(' --> Ok')
34 34 print(self.model())
35   - self.configure()
  35 + self.configure()
36 36  
37 37 def configure(self):
38   - self.strCh = ''
39   - for ch in self.channels:
40   - self.strCh = self.strCh + '%s %s;'%(CONF_VAL_TYPE[ALL_VAL_TYPE.index(self.vtypes[self.channels.index(ch)])], ch)
41   - self.strCh = self.strCh[0:-1]
42   - print(self.strCh)
  38 + self.strCh = ''
  39 + for ch in self.channels:
  40 + self.strCh = self.strCh + '%s %s;'%(CONF_VAL_TYPE[ALL_VAL_TYPE.index(self.vtypes[self.channels.index(ch)])], ch)
  41 + self.strCh = self.strCh[0:-1]
  42 + print(self.strCh)
43 43  
44 44 def getValue(self):
45 45 self.send(self.strCh)