plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunther Gruber <>
Subject Re: S7 read multiple variables
Date Thu, 07 Mar 2019 15:41:57 GMT
I resolved it by doing multiple request instead of one big request, and i skipped a few boolean





skipped (%F1.0-%1.3)


On 3/7/19 4:26 PM, Christofer Dutz wrote:

Hi Gunther,

I was a little surprised about your finding as it seems all items have even byte-number types
so the fill-byte problem shouldn't occur.

And the splitting of requests should also work quite well for S7 ... In one POC we even read
2600 items in one logical request, which was automatically split up into 30 requests and correctly
merged back together.

How did you avoid the problem. I would assume you found a bug ... so we should fix it.


Am 07.03.19, 15:29 schrieb "Gunther Gruber" <><>:


    with some small tweaks in my code i can read all the variables from a s7-1500 with the
0.3 version. I will switch to 0.3.1 after release.

    Thx for this awesome library.

    Below some proof :)

    timestamp       driveSetFreqInPercent   currentDrivePercent     currentSpeedInRpm









    On 3/6/19 1:51 PM, Tim Mitsch wrote:

    Hello Gunther

    This bug is known and we fixed it already in development branch.
    The problem is not the amount of variables rather than one-byte variables like BOOL,BYTE,USINT,
... - Simens uses a filling-byte when acquiring a single one-byte request
    Right now we have the bugfix-release 0.3.1 as RC1 in vote, so you can try using a checkout
development-branch from GitHub or just wait a few days until vote is finished and the version
is available on MavenCentral.
    Or you can use the staging-repository by integrating that in your pom and change plc4x-version
to 0.3.1:


    Am 06.03.19, 13:40 schrieb "Gunther Gruber" <><><><>:

        I try to read multiple variables synchronous from a S7-1500 and get a exception. I
use the code from the hello world example. When i split up the variables into smaller units
like 5-8 it works. any suggestion on this? Is there a limit to the number of variables?


        String vars = "%Q73:WORD,%Q75:WORD,%I73:WORD,%I75:WORD,%I74:WORD,%I77:WORD,%F81.1:BOOL,%Q82:REAL,%F86:INT,%F89:REAL,%I40:INT,%Q2.5:BOOL,%Q3:INT,%I66:WORD,%Q20:REAL,%I61:WORD,%Q25:WORD,%I58.0:BOOL,%F1:BYTE,%F1.0:BOOL,%F1.1:BOOL,%F1.2:BOOL,%F1.3:BOOL,%F28.0:BOOL,%I58:WORD,%F0.7:BOOL,%F0.6:BOOL,%F0.5:BOOL,%F0.4:BOOL,%F0.3:BOOL,%F0.2:BOOL,%F0.1:BOOL,%F0.0:BOOL,%F0:BYTE";

        for (String item : splitVariables(vars)){


Gunther Gruber

Software Developer


Intelligent Data Analytics GmbH & Co. KG

c/o TechQuartier

Platz der Einheit 2

60327 Frankfurt

Telefon: +49 6421/4805274

Telefax: +49 6421/4805275



Unternehmenssitz: Frankfurt am Main | Handelsregister beim Amtsgericht: Frankfurt am Main,
Registernummer: HRA 49357 | USt. ID-Nr.: DE310205810 | Finanzamt: Frankfurt am Main

Persönlich haftende Gesellschafterin: IDA Intelligent Data Analytics GmbH | Sitz: Frankfurt
am Main | Handelsregister beim Amtsgericht: Frankfurt am Main | Handelsregister-Nummer: HRB
106805 | Geschäftsführer: Mohamed Ayadi, Nils Björn Krugmann, Matthias Leinweber, Marc

If you are not the addressee, please inform us immediately that you have received this e-mail
by mistake, and delete it. We thank you for your support.
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message