plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject Re: [Modbus] Querying Values from Holding Register
Date Tue, 26 May 2020 09:49:18 GMT
Yes I did release them ... I can see them in Apache-Central, but not Maven-Central.
I asked on the infra slack to see if there is anything holding up the sync.

Till then ... which Maven version are you using? I think in really new Maven versions the
default has switched to use the Apache repo as primary source, perhaps that would help.

Chris



´╗┐Am 26.05.20, 10:58 schrieb "Julian Feinauer" <j.feinauer@pragmaticminds.de>:

    Indeed its not there yet.

    @Christofer Dutz did you already release the maven repo?

    Julian

    Am 26.05.20, 10:23 schrieb "venki hadoop" <hadooponsite@gmail.com>:

        Hi Chris,.
                          Is  it will be part of maven central repo( I haven't
        found 0.7 version in repository) or we have to build from source?

        On Tuesday, May 26, 2020, Christofer Dutz <christofer.dutz@c-ware.de> wrote:

        > Hi Venki,
        >
        > Well I guess it would be an option ... I would give that a try and if you
        > run into problems try with 0.6.0 in order to help track down if there's a
        > regression.
        >
        > The Modbus driver is actually one we had an external driver in the past
        > and which is now replaced by a full implementation by us.
        >
        > Chris
        >
        >
        >
        > Am 26.05.20, 09:36 schrieb "venki hadoop" <hadooponsite@gmail.com>:
        >
        >     Hi Chris,.
        >                         Shall we use 0.7.0 version to resolve this issue.
        >                   Regards,
        >
        >     On Wednesday, May 20, 2020, Christofer Dutz <christofer.dutz@c-ware.de
        > >
        >     wrote:
        >
        >     > Hi Tim,
        >     >
        >     > I guess you are using one of the "old generation" drivers (As you
        > say it's
        >     > working and the address seems to imply that).
        >     > Perhaps you should either try the version 0.8.0-SNAPSHOT or wait for
        > 2
        >     > more days till we release the 0.7.0 version.
        >     >
        >     > In the 0.7.0 version we have completely deleted all existing drivers
        > and
        >     > replaced them by new ones.
        >     > While at it I took the liberty of making the Modbus a little more
        > robust.
        >     >
        >     > So it would be great if you could give us feedback if your problem
        > goes
        >     > away magically when updating to these driver versions.
        >     >
        >     > Chris
        >     >
        >     >
        >     >
        >     > Am 20.05.20, 10:24 schrieb "udeho" <udeho@student.kit.edu>:
        >     >
        >     >     Hi all,
        >     >
        >     >     I have tried to query values from the holding register of a
        > simulated
        >     > modbus device and process them as integer using the following code:
        >     >     // read integer / holding register
        >     >                         PlcDriverManager driverManager = new
        >     > PlcDriverManager();
        >     >                         String conString = "modbus:tcp://localhost";
        >     >                         PlcConnection plcCon =
        > driverManager.getConnection(
        >     > conString);
        >     >                         PlcReadRequest.Builder builder =
        >     > plcCon.readRequestBuilder();
        >     >                         builder.addItem("value",
        > "readholdingregisters:1");
        >     >                         PlcReadRequest readRequest = builder.build();
        >     >                         PlcReadResponse resp =
        > readRequest.execute().get();
        >     >
        >     >     This runs well, but when I try to handle the result as integer
        > (using
        >     > resp.getInteger("value")) I always get null as result no matter
        > what's in
        >     > the register.
        >     >     For Boolean values in the coil this works without any problem
        > (using
        >     > getBoolean() of course).
        >     >     Another approach I tried is using the getAllByteArrays("value");
        >     > command, but I haven't found a way to get the returned collection of
        > byte
        >     > arrays into integers.
        >     >
        >     >     Can you give me an indication of what my problem may be or what
        > I'm
        >     > doing wrong?
        >     >
        >     >     Thank you very much in advance!
        >     >
        >     >     Best
        >     >     Tim
        >     >
        >     >
        >
        >


Mime
View raw message