iicsys / pypmu

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

The question about PyPDC program #32

Closed haoyu112 closed 5 months ago

haoyu112 commented 2 years ago

When I run the main PyPDC program, it failed in the line 14 pdc.get(). 1631506833(1) When I debug the program, I find that in pdc.py, we can run the line 102 self.get() successfully. image However, when I run the data = pdc.get() in main program, it failed in line 128 and 129 in Pdc.py. image I am not sure whether the line 99 and 100 influence the result. get_config = CommandFrame(self.pdc_id, version) self.pmu_socket.sendall(get_config.convert2bytes()) Should I paste these commands in the main program? like this image

sstevan commented 2 years ago

Hey @haoyu112

Let me explain what is actually happening:

First screenshot: Line 9 - Aks PMU (or OpenPDC) to send ConfigFrame in order to describe the data stream that is about to be sent; Line 11 - Send CommandFrame to start sending measurements; Line 14 - Collect data stream until you get one formed and valid synchrophasor message;