iicsys / pypmu

pyPMU - Python implementation of the IEEE C37.118 synchrophasor standard
BSD 3-Clause "New" or "Revised" License
62 stars 46 forks source link

phasor2int does not comply with IEEE C37.118-2 standard #27

Closed SophieAltenburg closed 4 years ago

SophieAltenburg commented 4 years ago

The IEEE C37.118-2 standard says about the FORMAT field:

Data format in data frames, 16-bit flag. Bits 15–4: Unused Bit 3: 0 = FREQ/DFREQ 16-bit integer, 1 = floating point Bit 2: 0 = analogs 16-bit integer, 1 = floating point Bit 1: 0 = phasors 16-bit integer, 1 = floating point Bit 0: 0 = phasor real and imaginary (rectangular), 1 = magnitude and angle (polar)

When I print self.config_frame.get_data_format() to console, I get: (False, False, True, False) But when I print self.config_frame.get_data_format()[1] to console, I get: False But the phasor values have been in floating point format all the time, still i run into a "The required value is not an integer" error.

I assume the pypmu code handles the Bits in the wrong order.

SophieAltenburg commented 4 years ago

I am trying to capture and manipulate traffic between tinyPMU.py and tinyPDC.py. Please help.

SophieAltenburg commented 4 years ago

Sorry, the pymu code is correct but the data frame example given in IEEE C37-118-2 is not compatible with the configuration frame example given in IEEE C37-118-2.