plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Feinauer <j.feina...@pragmaticminds.de>
Subject Re: [MODBUS][DISCUSS] Improving handling of datatypes ...
Date Wed, 02 Sep 2020 13:26:30 GMT
Hi,

agree with your suggestion!
Although we have to be careful to not mix it up with specific implementations of datatypes
in some drivers.

Julian

Am 02.09.20, 15:21 schrieb "Christofer Dutz" <christofer.dutz@c-ware.de>:

    Hi all,

    today I was at a customer’s site and used the Modbus driver to get data. This generally
worked fine.
    The thing however I found a little complicated, was that the PLC seemed to offer all values
as 32Bit Floating point values.
    So in order to correctly read them, I had to read an array of two consecutive shorts and
then manually convert them into a float.

    I bet we can do this better.

    So I thought … how about we use the same https://en.wikipedia.org/wiki/IEC_61131-3 datatypes
we are already using in other drivers and for example if you write:

    holding-register:1:REAL

    it would automatically use modbus to read an array of two shorts and to internally convert
these to one REAL/float.

    What do you think? I think we could probably do this in most drivers.

    Chris



Mime
View raw message