-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathYokogawa1030DPMspecific.py
531 lines (454 loc) · 18 KB
/
Yokogawa1030DPMspecific.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
import visa
#Create instance of class: ThisIsMyDPM = Yokogawa1030DPM.YDPM(instrument address)
#Example: asking for voltage -> voltage = instancename.getVoltage()
class YDPM(visa.Instrument):
def __init__(self, address):
visa.Instrument.__init__(self, "GPIB::"+str(address))
#Turns on all of the normal outputs
self.write("MEASURE:ITEM:NORMAL:PRESET ALL")
self.__wAIndex = 0
self.__wBIndex = 1
# self.__wCIndex = 2
self.__freqIndex = 2
def getInstrumentInformation(self):
return self.ask("*IDN?")
def disableVoltageMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleVoltageMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleVoltageMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:V:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:V:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:V:ELEMENT2 ON")
else:
self.write("MEASURE:ITEM:NORMAL:V:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:V:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:V:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:V:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:V:SIGMA OFF")
def disableCurrentMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleCurrentMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleCurrentMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:A:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:A:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:A:ELEMENT2 ON")
else:
self.write("MEASURE:ITEM:NORMAL:A:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:A:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:A:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:A:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:A:SIGMA OFF")
def disableActivePowerMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleActivePowerMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleActivePowerMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:W:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:W:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:W:ELEMENT2 ON")
else:
self.write("MEASURE:ITEM:NORMAL:W:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:W:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:W:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:W:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:W:SIGMA OFF")
def disableApparentPowerMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleApparentPowerMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleApparentPowerMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:VA:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VA:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:VA:ELEMENT2 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VA:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:VA:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VA:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:VA:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:VA:SIGMA OFF")
def disableReactivePowerMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleReactivePowerMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleReactivePowerMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:VAR:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VAR:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:VAR:ELEMENT2 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VAR:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:VAR:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VAR:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:VAR:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:VAR:SIGMA OFF")
def disablePowerFactorMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.togglePowerFactorMeasurements(phaseA,phaseB,phaseC,sigma)
def togglePowerFactorMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:PF:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:PF:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:PF:ELEMENT2 ON")
else:
self.write("MEASURE:ITEM:NORMAL:PF:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:PF:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:PF:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:PF:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:PF:SIGMA OFF")
def disablePhaseAngleMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.togglePhaseAngleMeasurements(phaseA,phaseB,phaseC,sigma)
def togglePhaseAngleMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:DEG:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:DEG:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:DEG:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:DEG:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:DEG:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:DEG:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:DEG:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:DEG:SIGMA OFF")
def disablePeakVoltageMeasurements(self, phaseA = False, phaseB = False, phaseC = False):
self.togglePeakVoltageMeasurements(phaseA,phaseB,phaseC)
def togglePeakVoltageMeasurements(self, phaseA, phaseB, phaseC):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:VPK:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VPK:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:VPK:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VPK:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:VPK:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:VPK:ELEMENT3 OFF")
def disablePeakCurrentMeasurements(self, phaseA = False, phaseB = False, phaseC = False):
self.togglePeakCurrentMeasurements(phaseA,phaseB,phaseC)
def togglePeakCurrentMeasurements(self, phaseA, phaseB, phaseC):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:APK:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:APK:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:APK:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:APK:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:APK:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:APK:ELEMENT3 OFF")
def disableWattHourMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleWattHourMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleWattHourMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:WH:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WH:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:WH:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WH:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:WH:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WH:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:WH:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:WH:SIGMA OFF")
def disableWattHourPeakMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleWattHourPeakMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleWattHourPeakMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:WHP:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHP:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:WHP:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHP:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:WHP:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHP:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:WHP:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHP:SIGMA OFF")
def disableWattHourMeterMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleWattHourMeterMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleWattHourMeterMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:WHM:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHM:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:WHM:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHM:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:WHM:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHM:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:WHM:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:WHM:SIGMA OFF")
def disableAmpHourMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleAmpHourMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleAmpHourMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:AH:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AH:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:AH:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AH:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:AH:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AH:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:AH:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:AH:SIGMA OFF")
def disableAmpHourPeakMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleAmpHourPeakMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleAmpHourPeakMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:AHP:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHP:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:AHP:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHP:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:AHP:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHP:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:AHP:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHP:SIGMA OFF")
def disableAmpHourMeterMeasurements(self, phaseA = False, phaseB = False, phaseC = False, sigma = False):
self.toggleAmpHourMeterMeasurements(phaseA,phaseB,phaseC,sigma)
def toggleAmpHourMeterMeasurements(self, phaseA, phaseB, phaseC, sigma):
if phaseA == True:
self.write("MEASURE:ITEM:NORMAL:AHM:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHM:ELEMENT1 OFF")
if phaseB == True:
self.write("MEASURE:ITEM:NORMAL:AHM:ELEMENT1 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHM:ELEMENT2 OFF")
if phaseC == True:
self.write("MEASURE:ITEM:NORMAL:AHM:ELEMENT3 ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHM:ELEMENT3 OFF")
if sigma == True:
self.write("MEASURE:ITEM:NORMAL:AHM:SIGMA ON")
else:
self.write("MEASURE:ITEM:NORMAL:AHM:SIGMA OFF")
def disableTimeMeasurements(self, time = False):
self.toggleTimeMeasurements(time)
def toggleTimeMeasurements(self, time):
if time == True:
self.write("MEASURE:ITEM:NORMAL:TIME ON")
else:
self.write("MEASURE:ITEM:NORMAL:TIME OFF")
def disableEfficiencyComputation(self, math = False):
self.toggleEfficiencyComputation(math)
def toggleEfficiencyComputation(self, math):
if math == True:
self.write("MEASURE:ITEM:NORMAL:MATH ON")
else:
self.write("MEASURE:ITEM:NORMAL:MATH OFF")
def disableTorque(self, torque = False):
self.toggleTorque(torque)
def toggleTorque(self, torque):
if torque == True:
self.write("MEASURE:ITEM:NORMAL:TORQUE ON")
else:
self.write("MEASURE:ITEM:NORMAL:TORQUE OFF")
def disableRPM(self, rpm = False):
self.toggleRPM(rpm)
def toggleRPM(self, rpm):
if rpm == True:
self.write("MEASURE:ITEM:NORMAL:RPM ON")
else:
self.write("MEASURE:ITEM:NORMAL:RPM OFF")
def disableSRPM(self, srpm = False):
self.toggleSRPM(srpm)
def toggleSRPM(self, srpm):
if srpm == True:
self.write("MEASURE:ITEM:NORMAL:SRPM ON")
else:
self.write("MEASURE:ITEM:NORMAL:SRPM OFF")
def disableSlip(self, slip = False):
self.toggleSlip(slip)
def toggleSlip(self, slip):
if slip == True:
self.write("MEASURE:ITEM:NORMAL:SLIP ON")
else:
self.write("MEASURE:ITEM:NORMAL:SLIP OFF")
def disableMPower(self, mPower = False):
self.toggleMPower(mPower)
def toggleMPower(self, mPower):
if mPower == True:
self.write("MEASURE:ITEM:NORMAL:MPOWER ON")
else:
self.write("MEASURE:ITEM:NORMAL:MPOWER OFF")
def disableMEfficiency(self, mEfficiency = False):
self.toggleMEfficiency(mEfficiency)
def toggleMEfficiency(self, mEfficiency):
if mEfficiency == True:
self.write("MEASURE:ITEM:NORMAL:MEFFICIENCY ON")
else:
self.write("MEASURE:ITEM:NORMAL:MEFFICIENCY OFF")
def disableTEfficiency(self, tEfficiency = False):
self.toggleTEfficiency(tEfficiency)
def toggleTEfficiency(self, tEfficiency):
if tEfficiency == True:
self.write("MEASURE:ITEM:NORMAL:TEFFICIENCY ON")
else:
self.write("MEASURE:ITEM:NORMAL:TEFFICIENCY OFF")
#####################################################################
def takeReading(self):
#asks instrument for measurements and puts returned string into variable reading
reading = self.ask("MEASURE:VALUE?")
return self.parseResponse(reading)
def parseResponse(self, str):
#initialize list for the values read from instrument
readvalues = []
#split the string from the instrument into list of data
readvalues = str.split(',')
return readvalues
def getActivePowers(self, reading = None):
if reading == None:
reading = []
reading = self.takeReading()
activePowers = [reading[self.__wAIndex], reading[self.__wBIndex]]
return activePowers
def getThreePhaseActivePower(self, reading = None):
if reading == None:
reading = []
reading = self.takeReading()
activePowers = []
activePowers = self.getActivePowers(reading)
realPower = float(activePowers[0]) + float(activePowers[1])
return realPower
def getPhaseAActivePower(self, reading = None):
if reading == None:
reading = []
reading = self.takeReading()
activePowers = []
activePowers = self.getActivePowers(reading)
return activePowers[0]
def getPhaseBActivePower(self, reading = None):
if reading == None:
reading = []
reading = self.takeReading()
activePowers = []
activePowers = self.getActivePowers(reading)
return activePowers[1]
# def getPhaseCActivePower(self, reading = None):
# if reading == None:
# reading = []
# reading = self.takeReading()
# activePowers = []
# activePowers = self.getActivePowers(reading)
# return activePowers[2]
# def getApparentPowers(self, reading = None):
# if reading == None:
# reading = []
# reading = self.takeReading()
# apparentPowers = []
# apparentPowers[0] = reading[self.__vaaIndex]
# apparentPowers[1] = reading[self.__vabIndex]
# apparentPowers[2] = reading[self.__vacIndex]
# return apparentPowers
# def getPhaseAApparentPower(self, reading = None):
# apparentPowers = []
# apparentPowers = self.getApparentPowers(reading)
# return apparentPowers[0]
# def getPhaseBApparentPower(self, reading = None):
# apparentPowers = []
# apparentPowers = self.getApparentPowers(reading)
# return apparentPowers[1]
# def getPhaseCApparentPower(self, reading = None):
# apparentPowers = []
# apparentPowers = self.getApparentPowers(reading)
# return apparentPowers[2]
# def getReactivePowers(self, reading = None):
# if reading == None:
# reading = []
# reading = self.takeReading()
# apparentPowers = []
# reactivePowers[0] = reading[self.__varaIndex]
# reactivePowers[1] = reading[self.__varbIndex]
# reactivePowers[2] = reading[self.__varcIndex]
# return reactivePowers
# def getPhaseAReactivePower(self, reading = None):
# reactivePowers = []
# reactivePowers = self.getReactivePowers(reading)
# return reactivePowers[0]
# def getPhaseBReactivePower(self, reading = None):
# reactivePowers = []
# reactivePowers = self.getReactivePowers(reading)
# return reactivePowers[1]
# def getPhaseCReactivePower(self, reading = None):
# reactivePowers = []
# reactivePowers = self.getReactivePowers(reading)
# return reactivePowers[2]
def getFrequency(self, reading = None):
if reading == None:
reading = []
reading = self.takeReading()
frequency = float(reading[self.__freqIndex])
return frequency
# def getThreePhaseApparentPower(self, reading):
# apparent = self.getPhaseAApparentPower(reading) + self.getPhaseBApparentPower(reading) + self.getPhaseCApparentPower(reading)
# return apparent
# def getThreePhaseReactivePower(self, reading):
# reactive = self.getPhaseAReactivePower(reading) + self.getPhaseBReactivePower(reading) + self.getPhaseCReactivePower(reading)
# return reactive