Commit e5a64c5124221a98ad8022e613252f330e643ba6
1 parent
10d2e8222f
Exists in
master
FPC1000: measure MKR_PWR instead PK_SRC_PWR
Showing 1 changed file with 9 additions and 8 deletions Side-by-side Diff
instruments/FPC1000.py
| ... | ... | @@ -3,11 +3,11 @@ |
| 3 | 3 | |
| 4 | 4 | #============================================================================== |
| 5 | 5 | |
| 6 | -ALL_VAL_TYPE = ['PWR_MKR1'] | |
| 7 | -ALL_CHANNELS = ['1'] | |
| 6 | +ALL_VAL_TYPE = ['PWR_MKR'] | |
| 7 | +ALL_CHANNELS = ['1', '2', '3', '4'] | |
| 8 | 8 | |
| 9 | 9 | ADDRESS = "192.168.0.17" |
| 10 | -CONF_VAL_TYPE = ['CALC:MARK1:MAX:PEAK'] | |
| 10 | +CONF_VAL_TYPE = ['CALC:MARK1:Y?', 'CALC:MARK2:Y?', 'CALC:MARK3:Y?', 'CALC:MARK4:Y?'] | |
| 11 | 11 | |
| 12 | 12 | #============================================================================== |
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | |
| ... | ... | @@ -36,16 +36,17 @@ |
| 36 | 36 | self.configure() |
| 37 | 37 | |
| 38 | 38 | def configure(self): |
| 39 | - for ch in self.channels: | |
| 40 | - self.send(CONF_VAL_TYPE[ALL_VAL_TYPE.index(self.vtypes[self.channels.index(ch)])]) | |
| 39 | + #for ch in self.channels: | |
| 40 | + # self.send(CONF_VAL_TYPE[ALL_VAL_TYPE.index(self.vtypes[self.channels.index(ch)])]) | |
| 41 | + pass | |
| 41 | 42 | |
| 42 | 43 | def getValue(self): |
| 43 | 44 | mes = '' |
| 44 | 45 | for ch in self.channels: |
| 45 | - self.send('CALC:MARK1:MAX:PEAK') | |
| 46 | - self.send("CALC:MARK1:Y?") | |
| 46 | + #self.send('CALC:MARK1:MAX:PEAK') | |
| 47 | + self.send(CONF_VAL_TYPE[int(ch)-1]) | |
| 47 | 48 | mesTemp = self.read() |
| 48 | - mes = mes + '\t' + mesTemp | |
| 49 | + mes = mes + '\t' + mesTemp.replace('\n', '') | |
| 49 | 50 | return mes |
| 50 | 51 | |
| 51 | 52 | def read(self): |