Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outstation data are sometimes malformed. #54

Open
HushmKun opened this issue Nov 5, 2024 · 1 comment
Open

Outstation data are sometimes malformed. #54

HushmKun opened this issue Nov 5, 2024 · 1 comment

Comments

@HushmKun
Copy link

HushmKun commented Nov 5, 2024

I have been using dnp3-python to try and make a gateway for a specific project in my company and have noticed the following:

Sometimes the data is malformed:

  1. Case 1 :
    • From: My outstation (Based on the class OutstationApplication)
    • To : dnp3demo master.
    • Result: data is correctly formed and consistent.
  2. Case 2:
    • From: My outstation (Based on the class OutstationApplication)
    • To : FreyrSCADA demo master.
    • Result: Analog data is incorrect and appear truncated to integers. (i.e. 5.2 --> 5)
  3. Case 3:
    • From: My outstation (Based on the class OutstationApplication)
    • To : TriangleMicroWorks demo master.
    • Result: Analog data is incorrect and appear truncated to integers. (i.e. 5.2 --> 5)

It appears the same with #51, though they check using Wireshark.

Also it appears I can't send any time with an analog point (or any other data type) whatever variation I use.

db_size = opendnp3.DatabaseSizes(
	numBinary=config.get_Binary(),
	numDoubleBinary=config.get_DoubleBinary(),
	numAnalog=config.get_Analog(),
	numBinaryOutputStatus=config.get_BinaryOutsput(),
	numAnalogOutputStatus=config.get_AnalogOutput(),
	numTimeAndInterval=0,
	numCounter=0,
	numFrozenCounter=0
)
outstation =  OutStationApplication(
	outstation_ip="0.0.0.0",
	port=20000,
	db_sizes=db_size
)
outstation.my_outstation.apply_update(opendnp3.Analog(value=float(5.2),  flags=opendnp3.Flags(),time=opendnp3.DNPTime(value=10000)),  0)
# it doesn't show anywhere.

And all the thanks for the great work 🙌🏿 .

@HushmKun
Copy link
Author

HushmKun commented Nov 5, 2024

Update 1:

Data malformation:

It appears that during integrity poll all values are returned as int (?) not sure if this was intended or not, if data is polled by Group & Variation, it works well.

Confirmed with dnp3demo master, WireShark & TriangleMicroWorks.

Time:

No updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant