Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble Reading from SEL735 #3

Open
senormeow opened this issue Jan 9, 2018 · 6 comments
Open

Trouble Reading from SEL735 #3

senormeow opened this issue Jan 9, 2018 · 6 comments

Comments

@senormeow
Copy link

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)

@sstevan
Copy link
Contributor

sstevan commented Jan 9, 2018

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.

@senormeow
Copy link
Author

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}]

@senormeow
Copy link
Author

senormeow commented Jan 9, 2018

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

@sstevan
Copy link
Contributor

sstevan commented Jan 10, 2018

Great!

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

@senormeow
Copy link
Author

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

@caldweln
Copy link

caldweln commented Feb 6, 2020

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.

Hofsmo added a commit to hallvar-h/pypmu that referenced this issue Aug 10, 2022
Updates to run in the SINTEF lab

I changed collections to collections.abs in frame.py. Since Sequence was moved to collections.abc as of Python 3.7.

It seems that we are receiving frequency and not frequency deviations. I therefore implemented iicsys#3 (comment) . I also implemented iicsys#35 (comment) to fix a bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants