Issues using group 30 variation 3

46 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Adam Jorgensen

ungelesen,
03.12.2021, 15:21:3603.12.21
an opendnp3
Hi all

I'm working via OpenDNP3 via the Java bindings.

I have an outstation configured with an Analog Input with group 30 variation 3.

When I write a value to this outstation (E.g. 6377801074) and then query the Outstation with a scan for g30v3 what I get back from the Oustation is data indicating that the returned data is g30v5. The returned value is formatted as a float (E.g. 2.147483647E9 in the case of 6377801074) and is truncated.

If I modify the type on the Outstation to actually be g30v5 and submit the value mentioned above and query for I get a response value of 6.377801216E9, which is closed to the original value but still truncated incorrectly.

Does anyone have any idea what is going on here? I did a little bit of debugging and the value is going into the Outstation with no issues (as far as I can tell, I can't debug from the Java wrapped into the C++ of course...)

When it comes to debugging the scan response in the SOE Handler I noticed that while the header info indicates g30v3 as requested, the actual response value is coming back as g30v5 and is truncated as mentioned :-/

Thanks
Adam


Adam Jorgensen

ungelesen,
03.12.2021, 18:44:5303.12.21
an opendnp3
Hi all, just a quick clarification. I realised there there were some errors in the numeric examples in previous message but I have tested with corrected numbers and I'm still observing a problem.

Consider the following two 32-bit integers:
  1. 612621374
  2. 2810115650
For my Outstation configured with g30v3 for a given input and a Master executing a scan for g30v3 on said Outstation I'm finding that:
  1. The value is returned correctly
  2. The value is truncated to 2147483647
It seems to me like OpenDNP3 uses a double to store all analog values, regardless of whether they are defined as an integer or a floating point number. Is this correct?

Thanks
Adam

Adam Jorgensen

ungelesen,
04.12.2021, 18:22:3704.12.21
an opendnp3
Hi all

Pay no heed to the messages above. I realise I had a major brain fart and forgot that g30v3 is a signed 32-bit value whereas the 32-bit values I was working with were unsigned. 

Thanks

Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten