Skip to main content

Interfaces with external programs

OPUS

Up to version 4.1.4, PYRA used DDE to communicate with OPUS. Since Microsoft replaced it internally with Windows 95, the interface has only been kept for compatibility reasons. This means that there is almost no documentation or libraries for DDE. Since OPUS also has an HTTP interface, Pyra 4.2.0 and above uses this HTTP interface. We added the OPUS HTTP Client to our Python utility library, so one can use it outside of PYRA to: see tum-esm-utils.

CamTracker

The CamTrackerConfig.txt file contains geographical coordinates Pyra Core uses in its Astronomy utility class. The coordinates can be found by looking for the $1 mark inside the file:

...

$1
48.15
11.57
0.54

...

The LEARN_Az_Elev.dat file contains CamTracker's logs about the mirror position and the currently estimated sun position. Example:

Julian Date, Tracker Elevation, Tracker Azimuth, Elev Offset from Astro, Az Offset from Astro, Ellipse distance/px
2458332.922778,107.490800,149.545000,0.197305,0.188938,705.047211
2458332.922836,107.494400,149.761400,0.192179,0.365420,736.914133
2458332.922905,107.498400,150.208200,0.188914,0.778934,736.914133
2458332.922975,107.499200,149.811600,0.179557,0.335728,736.914133
2458332.923032,107.508400,149.647800,0.182958,0.145281,736.914133
...

The SunIntensity.dat file contains CamTracker's own evaluation of the sun conditions. This is currently not used in Pyra Core, but it might be in the future. Example:

Julian Date, Date UTC[yyyy/MM/dd HH:mm:ss], Intensity[px*ms], big and small obj good
2457057.199028, 2015/02/03 16:46:36, 0.000000, good
2457057.200347, 2015/02/03 16:48:30, 0.000000, good
2458332.906019, 2018/08/02 09:44:40, 0.000000, good
2458332.906088, 2018/08/02 09:44:46, nan, bad
2458332.906169, 2018/08/02 09:44:53, nan, bad
...

When stopping CamTracker, we have to add a stop.txt inside CamTracker's code directory, and the application will shut down gracefully.

TUM PLC

We are using the Snap7 Python library to communicate with the TUM PLC. Here is a manual for the underlying Snap7 API: http://snap7.sourceforge.net/sharp7.html