lib60870 icon indicating copy to clipboard operation
lib60870 copied to clipboard

How set/find max PayloadSize & Server very slow

Open labarababa opened this issue 5 years ago • 3 comments

Hello,

i have q question. Hopefully u can help me

where can I set or find the maximum Payload of an Asdu with a 104 server. I am using the server example and can only add 30 InformationObjects to the ASDU (MeasuredShortValues). So is 30 the maximum Number of InformationObjects per ASDU?

I solved this problem by cutting my message down to pieces and add an ASDU for every piece of information. But thats very slow. We want to send 3000 values. How fast can we send these values.

labarababa avatar Mar 22 '19 14:03 labarababa

Hello, the maximum size is about 240 bytes. You can change this but only to a lower value. This is a restriction of the protocol and cannot be changed. It is not designed to send so many values at once.

mzillgith avatar Mar 22 '19 16:03 mzillgith

Thank you for your help.

Okay got it. So cutting my message down to piece was probalbly the right decision.

Regarding my second problem:

How fast do u think your libaray is capable of sending these 3000 values.

In detail:

I am using sockets with libuv as an inter process communication and we want send every 1-2 Seconds 3000 values using lib60870.

So we send 82 values -> bulding 3 asdu's and puting them in the queue

Psuedo code for one asdu

CS101_ASDU newAsdu = CS101_ASDU_create(alParams, false, CS101_COT_PERIODIC, 0, 1, false, false);
CS101_ASDU_addInformationObject(newAsdu,` (InformationObject)
MeasuredValueScaled_create((MeasuredValueScaled) io, 101, values1, IEC60870_QUALITY_GOOD));

CS101_ASDU_addInformationObject(newAsdu, (InformationObject)
MeasuredValueScaled_create((MeasuredValueScaled) io, 102, values2, IEC60870_QUALITY_GOOD));
....
CS101_ASDU_addInformationObject(newAsdu, (InformationObject)
MeasuredValueScaled_create((MeasuredValueScaled) io, 102, values30, IEC60870_QUALITY_GOOD));

CS101_ASDU_addInformationObject(newAsdu, io);
InformationObject_destroy(io);
CS104_Slave_enqueueASDU(slave, newAsdu);
CS101_ASDU_destroy(newAsdu);

-> 3 ASDU per second

I dont think that receiving the data from the sockets and creating the asdu's is the problem ... just sending them to our "network control center" is slow. Meaning 2 Seconds sometimes 5-8 secondes.

Do you think that we can solve our problem using 60870 or did i do a mistake implementing/using ur libary?

Kind Regards

labarababa avatar Mar 22 '19 21:03 labarababa

If you have a fast network with small delays then it should be possible. The protocol uses a flow control mechanism on application layer. When the client/master doesn't process the data fast enough the server has to wait before it can send new messages.

mzillgith avatar Mar 27 '19 15:03 mzillgith