Hi Cesar,

I'm not saying that I won't implement the other ... of course that's the better 
solution. 

But for now this helps simplify things. And given that no one seems to be 
willing to fund such extensions and I'm currently doing them in my free time, 
I'm just postponing them in order to be able to do a little paid work. 

If anyone wants to start to tackle them now, I'm happy to have someone else 
implement this feature. :-)

Chris



Am 20.08.20, 20:31 schrieb "Cesar Garcia" <cesar.gar...@ceos.com.ve>:

    HI,

    > So my idea is to only request one byte (the ACT size) of the String and
    as soon as that’s returned, to ask for only the chars that are actually
    used. This should drastically reduce the payload on the wire.

    I find it better to work in a two-step process as you point out.

    I have my doubts about predefining the length of the STRING, as you point
    out. For example, what happens if I ask for an array of 32 bytes and it is
    actually 10, would the filtering work be left to the S7Field?

    And it gets more complicated as you point out with the handling of
    arrangements.

    I believe I have the STRING read captures from a TP1200, this uses the
    STRING read as an array of BYTES, it does not take into account the maximum
    length or the character count.

    I'm going to keep an eye on the code,

    Best regards,


    El jue., 20 ago. 2020 a las 7:27, Christofer Dutz (<
    christofer.d...@c-ware.de>) escribió:

    > Hi Julian,
    >
    > what I didn't like with using the Array syntax was that your're not
    > reading an array of Strings ...
    >
    > How would you read an array of strings?
    >
    > How about using round-braces?
    >
    > STRING(10)
    >
    > This way you could read an array of 10-Char strings:
    >
    > STRING(10)[5]
    >
    > Chris
    >
    >
    > Am 20.08.20, 13:16 schrieb "Julian Feinauer" <
    > j.feina...@pragmaticminds.de>:
    >
    >     Hi,
    >
    >     this also was a bit controversial in the past and AFAIR we already hat
    > STRING[xx] as the command to not read a String Array but a String with
    > given size (ignoring ACT value).
    >     In the end its about latency vs bandwith I guess.
    >     Personally, I would stick to the rule: Read MAX either given by
    > STRING[xx] syntax or the default 254 or 256 (dont remember the spec
    > exactly).
    >
    >     Julian
    >
    >     Am 20.08.20, 12:46 schrieb "Christofer Dutz" <
    > christofer.d...@c-ware.de>:
    >
    >         Another alternative would be to explicitly limit the number of
    > chars read.
    >
    >         So if we would extend the address syntax for STRING types to
    > something like
    >
    >         %DB2:30:STRING:10
    >
    >         It would simply read the 10 chars without checking the size first.
    >
    >         Chris
    >
    >
    >
    >         Am 20.08.20, 12:44 schrieb "Christofer Dutz" <
    > christofer.d...@c-ware.de>:
    >
    >             Hi all,
    >
    >             while investigating:
    > https://issues.apache.org/jira/browse/PLC4X-240 I noticed that the
    > reading of STRING types seems to be extremely inefficient.
    >
    >             The reason is that we are currently reading a STRING element
    > by reading 258 bytes (1 byte for MAX num of chars, 1 byte for ACT num of
    > chars and then 256 bytes containing char data).
    >
    >             The problem is that with a PDU-Size of 240 you can’t read one
    > STRING with only one packet. With a S7 1500 or 400 it might work as they
    > have larger PDU sizes. Currently the 0.6 drivers split this up into 2
    > requests.
    >
    >             But it’s highly inefficient as usually the content will not be
    > anywhere near the 256 chars.
    >
    >             So my idea is to only request one byte (the ACT size) of the
    > String and as soon as that’s returned, to ask for only the chars that are
    > actually used. This should drastically reduce the payload on the wire.
    >
    >             What do you think?
    >
    >             Chris
    >
    >
    >
    >
    >

    -- 
    *CEOS Automatización, C.A.*
    *GALPON SERVICIO INDUSTRIALES Y NAVALES FA, C.A.,*
    *PISO 1, OFICINA 2, AV. RAUL LEONI, SECTOR GUAMACHITO,*

    *FRENTE A LA ASOCIACION DE GANADEROS,BARCELONA,EDO. ANZOATEGUI*
    *Ing. César García*

    *Cel: +58 414-760.98.95*

    *Hotline Técnica SIEMENS: 0800 1005080*

    *Email: support.aan.automat...@siemens.com
    <support.aan.automat...@siemens.com>*

Reply via email to