The sk.ipesoft.sgcom.iec21 module with its Iec21Connection main class is used to communicate with meters using the IEC62065-21 protocol in C mode.
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.



Napíšte komentár