plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <>
Subject Re: Doing some read-tests with S7
Date Mon, 26 Oct 2020 19:07:46 GMT
Hi folks

Guess the "String(10)[3]" issue is going to be a tricky one :-(
Perhaps it's easier for me to also implement the automatic splitting of items that are itself
too big for one packet.

I was hoping on the proposed generic optimizer, but I guess I better get working on this myself
and implement some basic rules manually.

Or @Julian Feinauer ... any progress/plans for this?


Am 25.10.20, 23:42 schrieb "Christofer Dutz" <>:

    Ok ... so I fixed most of the issues.

    So-far the problems I need to address are the following:

    - When using "BOOL[]" we have to read a bit-string (byte, word, dword) instead and filter
out the bits that are not asked for.
    - When reading "STRING(x)[]" (limited strings), we have to split up the request into multiple
items as the typical array notation doesn't work.
    - When reading bit-strings the order of the bits looks the wrong way around
    - When reading bit-string arrays, I would like to concatenate the values to one bit-string
instead of returning lists of lists


    Am 25.10.20, 21:59 schrieb "Christofer Dutz" <>:

        Hi all,

        in order to have some good tests for the S7 protocol, I defined a lot of variables
in one of the data-blocks of one of my S7 devices.
        I then created a little test program that should simply use this to read all sorts
of types of elements.
        With these tests I found some things:

          *   In general all Bit-String operations, when reading arrays, produce lists of
lists … I think it would be cooler if for bit-strings they would return one large List
          *   STRING handling seems to be messed up again
          *   When reading a BOOL array, it seems the S7 only returns the first bit (I would
have expected it to send up to 8 bits in one byte and after that to add more bytes, but it’s
always just one and that always just contains the first bit) -> We need to translate BOOL-array
reads into bit-string operations which return partial lists.
          *   Reading of DATE_AND_TIME arrays seems to be messed up as only the first item
is correct and the succeeding elements are always “null”
          *   Reading of CHAR values seems messed up

        I’ll be working on addressing this asap


View raw message