Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

Modul The sk.ipesoft.sgcom.iec21 so svojou hlavnou triedou Iec21Connection slúži na komunikáciu s meračmi protokolom module with its Iec21Connection main class is used to communicate with meters using the IEC62065-21 v móde protocol in C mode.
Po navodení módu C sa komunikácia prepína buď do „Data Readout" módu, v ktorom elektromer zašle aktuálne hodnoty z vybranej sady svojich registrov alebo do „Programming" módu, v ktorom klient zasiela príkazy a elektromer odpovedá. Po navodení jedného z módov už nie je možné prepnutie do druhého a naspäť. A z nevyjasneného dôvodu nie je možné získať hodnoty viacerých registrov v Programming móde, sú však súčasťou Readout sady.
Z toho dôvodu sa pri volaní Iec21Connection.initiateConnection v skutočnosti komunikácia s elektromerom nadviaže niekoľkokrát – najskôr sa spraví Readout. V prípade elektromeru EMH LZQJ sa Readout opakuje 3-krát, lebo LZQJ rozlišuje viacero Readout tabuliek Vykoná sa Readout pre T1, T3 a TS. T2 sa nečíta, lebo obsahuje príliš dlhý výpis hodnôt profilov.. Následne sa navodí Programming mód a v tomto stave sa objekt triedy „odovzdá na používanie".
Pri dopyte na prečítanie registra sa najskôr hodnota vyhľadá medzi dátami získanými z Readout-ov a až keď sa tam nenájde, dopytuje sa elektromer. Ostatné typy príkazov – čítanie profilov, nastavenie presného času do hodín v elektromeri – sa zasielajú na elektromer. Odpojenie a pripojenie odberateľa na diaľku nie je implementované, lebo to nebolo možné testovaťAfter mode C is introduced, the communication switches either to "Data Readout" mode, in which the meter sends current values from a selected set of its registers, or to "Programming" mode, in which the client sends commands and the meter responds. After inducing one of the modes, it is no longer possible to switch to the other and back. And, for some unexplained reason, it is not possible to get the values of multiple registers in Programming mode, but they are part of the Readout set.
For this reason, when Iec21Connection.initiateConnection is called, the communication with the meter is actually established several times - the Readout is done first. In the case of the EMH LZQJ power meter, the Readout is repeated 3 times, because the LZQJ distinguishes several Readout tables. Readout is performed for T1, T3, and TS. T2 is not read because it contains too long a list of profile values. Subsequently, Programming mode is entered and in this state, the class object is "passed for use".
When requesting to read the register, the value is first searched among the data obtained from the Readouts, and only when it is not found there, the electricity meter is queried. Other types of commands - reading profiles, and setting the exact time to the clock in the electricity meter - are sent to the electricity meter. Remote subscriber disconnection and connection are not implemented as they could not be tested.