iicsys/pypmu

Trouble Reading from SEL735

senormeow opened this issue · 6 comments

I am trying the tinyPDC example on a SEL735 Meter, the program connects to the meter however it hangs after the "Requesting header message from PMU" log. Attached is a successful pcap reading this meter with SEL synchrowave. Any help would be appreciated.
pmu2.zip

2018-01-09 08:57:25,205 INFO [7] - PDC successfully connected to PMU (10.206.181.130:4722)
2018-01-09 08:57:25,205 INFO [7] - Requesting header message from PMU (10.206.181.130:4722)

Hello @senormeow

I have checked the .pcap file and this is how communication goes.
So PDC is telling SEL735 to:

  1. stop sending
  2. send cfg2 frame
  3. start sending data frames

What you should try is to match tinyPDC script to follow this scenario. So this part:

header = pdc.get_header()  # Get header message from PMU
config = pdc.get_config()  # Get configuration from PMU
pdc.start()  # Request to start sending measurements

Should be changed to:

pdc.stop()
config = pdc.get_config()
pdc.start()

However, as soon as you start receiving data you'll get ValueError since FREQ value is 60.0
and we have implemented it as the frequency deviation from nominal.

c37 118

In order to fix this, you can simply change line 2144 in frame.py
if not -32.767 <= freq <= 32.767: to if not -100.0 <= freq <= 100.0: or something felxibile enough.

I will check if I misunderstood the meaning of FREQ filed but I guess in combination with nominal frequency FNOM from Configuration Frame 2 should give exact frequency.

Those changed looked like they worked, thanks! I am interested in using Python Twisted instead of generic sockets. If I do I will be sure to send you a pull request. Below is an example output, the Frequency does look to be the actual value.

2018-01-09 15:24:30,363 DEBUG [1] - Received DataFrame from PMU (10.206.181.130:4722)
{'pmu_id': 1, 'time': 1515536670.316667, 'measurements': [{'stream_id': 1, 'stat': 'ok', 'phasors': [(14.167395118116932, -0.6166878408988471), (31.708126831304394, 0.9470344595254727), (18.018802197394457, 2.309206379676536), (35.69849041771825, 1.0431649104944631), (8105.4000577959205, -1.2214707168409344), (8069.890667719708, 0.8611331690331355), (8076.250602748128, 2.9645323684563176)], 'analog': [], 'digital': [], 'frequency': 60.06, 'rocof': 0.0}]

Just another note, I also had to set the default buffer_size down to 16 in order for this to work.

Great!

Can you please verify that received data is actually correct (you've received what you expected)?

So the IV data looks good, I do notice that frequency doesn't seem to be changing at all.

Hi @sstevan , I have come across this issue also.

Similar to @senormeow my freq data is formatted as floating point.

I believe the spec tells us to treat this as the frequency value, rather than a deviation which is the case for 16bit format.

I think the get_measurements in frame.py needs adjusting.... probably more actually on the packing side, but I don't see any use of floating pt format freq in this repo.