Fraunhofer-FIT-DIEN / iec104-python

A Python module to simulate SCADA and RTU communication over protocol 60870-5-104 to research ICT behavior in power grids.
https://iec104-python.readthedocs.io/latest/python/index.html
GNU General Public License v3.0
51 stars 9 forks source link

Setting t0,t1,t2,t3, k,w parameters #29

Open AntonisMous opened 2 months ago

AntonisMous commented 2 months ago

Hello,

I would like to ask how is it possible to set the timing parameters t0,t1,t2,t3, k,w according to IEC 60870-5-104 using the c104.

m-unkel commented 2 months ago

Hello AntonisMous, Currently, these parameters are hard-coded.

For the server, the default values from lib60870-C are used. For the client, it also relies on the defaults from lib60870-C, with the following exceptions for timing values:

We could make these parameters configurable in the future.

Could you please share more details about the scenario you're working on that requires modification of these values?

AntonisMous commented 2 months ago

Hello,

Thank you for your immediate answer. I am working on a server where these variables should be configured

m-unkel commented 2 months ago

The default values in lib60870-C (as used by the c104.Server) are actually quite close to what you're looking for:

Since we're dealing with timing in seconds and most messages are exchanged within milliseconds, I'm curious if you've encountered specific issues due to the lack of configuration for these parameters. Are you facing any noticeable connection problems or other problems because of this?

AntonisMous commented 2 months ago

Thank you once again for you helpful and immediate answers.

At the moment, I am not facing noticeable connection problems.

However, I would like to know if there is a possibility to modify this parameters, in case where the limitation of not being able to modify timing parameters become a barrier for my project.

Is a new version planned which will include the modification of timing parameters?

m-unkel commented 2 months ago

Not at the moment, but I will add your request as a feature for the upcoming version 2.1.0.

In the meantime, we are planning to release a hotfix (version 2.0.1) this week to address the #28 bug.

As for version 2.1.0, there isn't a set release date yet since your feature request is the first we've received since the release of version 2.0.0. However, I can assure you that we can implement the timing parameter modification within the next two month. So, unless you encounter urgent issues, your project should be safe moving forward.

m-unkel commented 1 month ago

The requested feature is implemented. The Connection as well as the Server class have a new protocol_parameters property (docs). If you wish to, you can verify the new feature via installing from source branch:

pip install git+https://github.com/Fraunhofer-FIT-DIEN/iec104-python.git@main

The changes will be included in the upcoming release.