You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Etienne Robinet <43...@etu.he2b.be> on 2020/03/18 18:41:39 UTC

S7 Read /develop branch

Hi all,
After spending some time on my work, I wanted to make some tests with the S7. After I pulled from the actaul dev branch, I noticed an error: seems like the Parser for INT and REAL datatype does not work (for me at least). I don't understand why but from wireshark and debugging it seems like the data from the read response are Big Endian, although the requests are little endian. 
Maybe I did not use correct instruction, but from what I remember, S7 is little endian. Here the case:

Trying to read a REAL number in the DB1 with offset 0 : %DB1.DBD0:REAL
Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT

As I said, from the Wireshark dump, the request is ok... but the data comes back Big  endian.

Etienne

Re: S7 Read /develop branch

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Etienne,

I just started reviewing that PR of yours ... unfortunately It doesn't just address the processing of Strings.
It contains API refactorings, modification in a lot of drivers ... the entire EIP protocol. 

I think the problem is that you worked on your fork of develop and submitted a PR ... then you continued working on the S7 and submitted a new PR for the same branch. The problem is that this now contains all of your changes. 

Unfortunately I can't accept it the way it is. Could you perhaps send a patch file for the S7 fixes separately?

I doubt it's possible to untangle the commits into separate branches now so I'll help you pull in your contributions in a Zoom session?
Where are you located? When would you like us to do such a session?

But again ... thank you for your hard work :-)

Chris



Am 20.03.20, 20:00 schrieb "Julian Feinauer" <j....@pragmaticminds.de>:

    Hi Etienne,
    
    you are a Machine __
    Thank you soo much for your contributions!
    
    Julian
    
    Am 20.03.20, 17:25 schrieb "Etienne Robinet" <43...@etu.he2b.be>:
    
        Hi Chris
        Just did a small PR, for the STRING type in the Read Response. Tested on my 1500 here.
        Have a nice weekend,
        Etienne
        
        On 2020/03/19 13:10:01, Christofer Dutz <ch...@c-ware.de> wrote: 
        > Hi Etienne, 
        > 
        > I would not be surprised to see some sort of "not implemented yet" remark from me on it ;-)
        > 
        > 
        > Chris
        > 
        > 
        > 
        > Am 19.03.20, 13:42 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
        > 
        >     Hi all,
        >     The PLC is indeed bigEndian. There were some leftovers from another branch
        >     I modified for AB. The code works fine now. But the String read still does
        >     not work on that branch is that right?
        >     
        >     Etienne
        >     
        >     Le jeu. 19 mars 2020 à 13:21, Christofer Dutz <ch...@c-ware.de> a
        >     écrit :
        >     
        >     > Hi all,
        >     >
        >     > sorry for not replying sooner ... currently helping another Apache project
        >     > sort out their release problems :/
        >     >
        >     > I am no expert on the direct encoding, but I would be surprised if we had
        >     > such an un-noticed error in this protocol for these elementary datatypes
        >     > because we would have heard complaints sooner. What type of PLC are you
        >     > using?
        >     >
        >     > Chris
        >     >
        >     >
        >     >
        >     > Am 19.03.20, 13:14 schrieb "Cesar Garcia" <ce...@ceos.com.ve>:
        >     >
        >     >     Hi,
        >     >
        >     >     Th Simatic S7 is Big Endian.
        >     >
        >     >     I have NOT seen the code generated by the mspec or the infrastructure,
        >     > but
        >     >     in general your code must perform the conversion.
        >     >
        >     >     With Netty ByteBuf it is compatible by default.
        >     >
        >     >     My grain of sand
        >     >
        >     >     Best regards,
        >     >
        >     >     El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43823@etu.he2b.be
        >     > >)
        >     >     escribió:
        >     >
        >     >     > Hi all,
        >     >     > After spending some time on my work, I wanted to make some tests
        >     > with the
        >     >     > S7. After I pulled from the actaul dev branch, I noticed an error:
        >     > seems
        >     >     > like the Parser for INT and REAL datatype does not work (for me at
        >     > least).
        >     >     > I don't understand why but from wireshark and debugging it seems
        >     > like the
        >     >     > data from the read response are Big Endian, although the requests are
        >     >     > little endian.
        >     >     > Maybe I did not use correct instruction, but from what I remember,
        >     > S7 is
        >     >     > little endian. Here the case:
        >     >     >
        >     >     > Trying to read a REAL number in the DB1 with offset 0 :
        >     > %DB1.DBD0:REAL
        >     >     > Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
        >     >     >
        >     >     > As I said, from the Wireshark dump, the request is ok... but the data
        >     >     > comes back Big  endian.
        >     >     >
        >     >     > Etienne
        >     >     >
        >     >
        >     >
        >     >     --
        >     >     *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: 0416-681.03.99*
        >     >
        >     >     *Cel: 0414-760.98.95*
        >     >
        >     >     *Hotline Técnica SIEMENS: 0800 1005080*
        >     >
        >     >     *Email: support.aan.automation@siemens.com
        >     >     <su...@siemens.com>*
        >     >
        >     >
        >     >
        >     
        > 
        > 
        
    
    


Re: S7 Read /develop branch

Posted by Julian Feinauer <j....@pragmaticminds.de>.
Hi Etienne,

you are a Machine __
Thank you soo much for your contributions!

Julian

Am 20.03.20, 17:25 schrieb "Etienne Robinet" <43...@etu.he2b.be>:

    Hi Chris
    Just did a small PR, for the STRING type in the Read Response. Tested on my 1500 here.
    Have a nice weekend,
    Etienne
    
    On 2020/03/19 13:10:01, Christofer Dutz <ch...@c-ware.de> wrote: 
    > Hi Etienne, 
    > 
    > I would not be surprised to see some sort of "not implemented yet" remark from me on it ;-)
    > 
    > 
    > Chris
    > 
    > 
    > 
    > Am 19.03.20, 13:42 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
    > 
    >     Hi all,
    >     The PLC is indeed bigEndian. There were some leftovers from another branch
    >     I modified for AB. The code works fine now. But the String read still does
    >     not work on that branch is that right?
    >     
    >     Etienne
    >     
    >     Le jeu. 19 mars 2020 à 13:21, Christofer Dutz <ch...@c-ware.de> a
    >     écrit :
    >     
    >     > Hi all,
    >     >
    >     > sorry for not replying sooner ... currently helping another Apache project
    >     > sort out their release problems :/
    >     >
    >     > I am no expert on the direct encoding, but I would be surprised if we had
    >     > such an un-noticed error in this protocol for these elementary datatypes
    >     > because we would have heard complaints sooner. What type of PLC are you
    >     > using?
    >     >
    >     > Chris
    >     >
    >     >
    >     >
    >     > Am 19.03.20, 13:14 schrieb "Cesar Garcia" <ce...@ceos.com.ve>:
    >     >
    >     >     Hi,
    >     >
    >     >     Th Simatic S7 is Big Endian.
    >     >
    >     >     I have NOT seen the code generated by the mspec or the infrastructure,
    >     > but
    >     >     in general your code must perform the conversion.
    >     >
    >     >     With Netty ByteBuf it is compatible by default.
    >     >
    >     >     My grain of sand
    >     >
    >     >     Best regards,
    >     >
    >     >     El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43823@etu.he2b.be
    >     > >)
    >     >     escribió:
    >     >
    >     >     > Hi all,
    >     >     > After spending some time on my work, I wanted to make some tests
    >     > with the
    >     >     > S7. After I pulled from the actaul dev branch, I noticed an error:
    >     > seems
    >     >     > like the Parser for INT and REAL datatype does not work (for me at
    >     > least).
    >     >     > I don't understand why but from wireshark and debugging it seems
    >     > like the
    >     >     > data from the read response are Big Endian, although the requests are
    >     >     > little endian.
    >     >     > Maybe I did not use correct instruction, but from what I remember,
    >     > S7 is
    >     >     > little endian. Here the case:
    >     >     >
    >     >     > Trying to read a REAL number in the DB1 with offset 0 :
    >     > %DB1.DBD0:REAL
    >     >     > Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
    >     >     >
    >     >     > As I said, from the Wireshark dump, the request is ok... but the data
    >     >     > comes back Big  endian.
    >     >     >
    >     >     > Etienne
    >     >     >
    >     >
    >     >
    >     >     --
    >     >     *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: 0416-681.03.99*
    >     >
    >     >     *Cel: 0414-760.98.95*
    >     >
    >     >     *Hotline Técnica SIEMENS: 0800 1005080*
    >     >
    >     >     *Email: support.aan.automation@siemens.com
    >     >     <su...@siemens.com>*
    >     >
    >     >
    >     >
    >     
    > 
    > 
    


Re: S7 Read /develop branch

Posted by Etienne Robinet <43...@etu.he2b.be>.
Hi Chris
Just did a small PR, for the STRING type in the Read Response. Tested on my 1500 here.
Have a nice weekend,
Etienne

On 2020/03/19 13:10:01, Christofer Dutz <ch...@c-ware.de> wrote: 
> Hi Etienne, 
> 
> I would not be surprised to see some sort of "not implemented yet" remark from me on it ;-)
> 
> 
> Chris
> 
> 
> 
> Am 19.03.20, 13:42 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:
> 
>     Hi all,
>     The PLC is indeed bigEndian. There were some leftovers from another branch
>     I modified for AB. The code works fine now. But the String read still does
>     not work on that branch is that right?
>     
>     Etienne
>     
>     Le jeu. 19 mars 2020 à 13:21, Christofer Dutz <ch...@c-ware.de> a
>     écrit :
>     
>     > Hi all,
>     >
>     > sorry for not replying sooner ... currently helping another Apache project
>     > sort out their release problems :/
>     >
>     > I am no expert on the direct encoding, but I would be surprised if we had
>     > such an un-noticed error in this protocol for these elementary datatypes
>     > because we would have heard complaints sooner. What type of PLC are you
>     > using?
>     >
>     > Chris
>     >
>     >
>     >
>     > Am 19.03.20, 13:14 schrieb "Cesar Garcia" <ce...@ceos.com.ve>:
>     >
>     >     Hi,
>     >
>     >     Th Simatic S7 is Big Endian.
>     >
>     >     I have NOT seen the code generated by the mspec or the infrastructure,
>     > but
>     >     in general your code must perform the conversion.
>     >
>     >     With Netty ByteBuf it is compatible by default.
>     >
>     >     My grain of sand
>     >
>     >     Best regards,
>     >
>     >     El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43823@etu.he2b.be
>     > >)
>     >     escribió:
>     >
>     >     > Hi all,
>     >     > After spending some time on my work, I wanted to make some tests
>     > with the
>     >     > S7. After I pulled from the actaul dev branch, I noticed an error:
>     > seems
>     >     > like the Parser for INT and REAL datatype does not work (for me at
>     > least).
>     >     > I don't understand why but from wireshark and debugging it seems
>     > like the
>     >     > data from the read response are Big Endian, although the requests are
>     >     > little endian.
>     >     > Maybe I did not use correct instruction, but from what I remember,
>     > S7 is
>     >     > little endian. Here the case:
>     >     >
>     >     > Trying to read a REAL number in the DB1 with offset 0 :
>     > %DB1.DBD0:REAL
>     >     > Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
>     >     >
>     >     > As I said, from the Wireshark dump, the request is ok... but the data
>     >     > comes back Big  endian.
>     >     >
>     >     > Etienne
>     >     >
>     >
>     >
>     >     --
>     >     *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: 0416-681.03.99*
>     >
>     >     *Cel: 0414-760.98.95*
>     >
>     >     *Hotline Técnica SIEMENS: 0800 1005080*
>     >
>     >     *Email: support.aan.automation@siemens.com
>     >     <su...@siemens.com>*
>     >
>     >
>     >
>     
> 
> 

Re: S7 Read /develop branch

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Etienne, 

I would not be surprised to see some sort of "not implemented yet" remark from me on it ;-)


Chris



Am 19.03.20, 13:42 schrieb "Robinet, Etienne" <43...@etu.he2b.be>:

    Hi all,
    The PLC is indeed bigEndian. There were some leftovers from another branch
    I modified for AB. The code works fine now. But the String read still does
    not work on that branch is that right?
    
    Etienne
    
    Le jeu. 19 mars 2020 à 13:21, Christofer Dutz <ch...@c-ware.de> a
    écrit :
    
    > Hi all,
    >
    > sorry for not replying sooner ... currently helping another Apache project
    > sort out their release problems :/
    >
    > I am no expert on the direct encoding, but I would be surprised if we had
    > such an un-noticed error in this protocol for these elementary datatypes
    > because we would have heard complaints sooner. What type of PLC are you
    > using?
    >
    > Chris
    >
    >
    >
    > Am 19.03.20, 13:14 schrieb "Cesar Garcia" <ce...@ceos.com.ve>:
    >
    >     Hi,
    >
    >     Th Simatic S7 is Big Endian.
    >
    >     I have NOT seen the code generated by the mspec or the infrastructure,
    > but
    >     in general your code must perform the conversion.
    >
    >     With Netty ByteBuf it is compatible by default.
    >
    >     My grain of sand
    >
    >     Best regards,
    >
    >     El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43823@etu.he2b.be
    > >)
    >     escribió:
    >
    >     > Hi all,
    >     > After spending some time on my work, I wanted to make some tests
    > with the
    >     > S7. After I pulled from the actaul dev branch, I noticed an error:
    > seems
    >     > like the Parser for INT and REAL datatype does not work (for me at
    > least).
    >     > I don't understand why but from wireshark and debugging it seems
    > like the
    >     > data from the read response are Big Endian, although the requests are
    >     > little endian.
    >     > Maybe I did not use correct instruction, but from what I remember,
    > S7 is
    >     > little endian. Here the case:
    >     >
    >     > Trying to read a REAL number in the DB1 with offset 0 :
    > %DB1.DBD0:REAL
    >     > Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
    >     >
    >     > As I said, from the Wireshark dump, the request is ok... but the data
    >     > comes back Big  endian.
    >     >
    >     > Etienne
    >     >
    >
    >
    >     --
    >     *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: 0416-681.03.99*
    >
    >     *Cel: 0414-760.98.95*
    >
    >     *Hotline Técnica SIEMENS: 0800 1005080*
    >
    >     *Email: support.aan.automation@siemens.com
    >     <su...@siemens.com>*
    >
    >
    >
    


Re: S7 Read /develop branch

Posted by "Robinet, Etienne" <43...@etu.he2b.be>.
Hi all,
The PLC is indeed bigEndian. There were some leftovers from another branch
I modified for AB. The code works fine now. But the String read still does
not work on that branch is that right?

Etienne

Le jeu. 19 mars 2020 à 13:21, Christofer Dutz <ch...@c-ware.de> a
écrit :

> Hi all,
>
> sorry for not replying sooner ... currently helping another Apache project
> sort out their release problems :/
>
> I am no expert on the direct encoding, but I would be surprised if we had
> such an un-noticed error in this protocol for these elementary datatypes
> because we would have heard complaints sooner. What type of PLC are you
> using?
>
> Chris
>
>
>
> Am 19.03.20, 13:14 schrieb "Cesar Garcia" <ce...@ceos.com.ve>:
>
>     Hi,
>
>     Th Simatic S7 is Big Endian.
>
>     I have NOT seen the code generated by the mspec or the infrastructure,
> but
>     in general your code must perform the conversion.
>
>     With Netty ByteBuf it is compatible by default.
>
>     My grain of sand
>
>     Best regards,
>
>     El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43823@etu.he2b.be
> >)
>     escribió:
>
>     > Hi all,
>     > After spending some time on my work, I wanted to make some tests
> with the
>     > S7. After I pulled from the actaul dev branch, I noticed an error:
> seems
>     > like the Parser for INT and REAL datatype does not work (for me at
> least).
>     > I don't understand why but from wireshark and debugging it seems
> like the
>     > data from the read response are Big Endian, although the requests are
>     > little endian.
>     > Maybe I did not use correct instruction, but from what I remember,
> S7 is
>     > little endian. Here the case:
>     >
>     > Trying to read a REAL number in the DB1 with offset 0 :
> %DB1.DBD0:REAL
>     > Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
>     >
>     > As I said, from the Wireshark dump, the request is ok... but the data
>     > comes back Big  endian.
>     >
>     > Etienne
>     >
>
>
>     --
>     *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: 0416-681.03.99*
>
>     *Cel: 0414-760.98.95*
>
>     *Hotline Técnica SIEMENS: 0800 1005080*
>
>     *Email: support.aan.automation@siemens.com
>     <su...@siemens.com>*
>
>
>

Re: S7 Read /develop branch

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi all,

sorry for not replying sooner ... currently helping another Apache project sort out their release problems :/

I am no expert on the direct encoding, but I would be surprised if we had such an un-noticed error in this protocol for these elementary datatypes because we would have heard complaints sooner. What type of PLC are you using?

Chris



Am 19.03.20, 13:14 schrieb "Cesar Garcia" <ce...@ceos.com.ve>:

    Hi,
    
    Th Simatic S7 is Big Endian.
    
    I have NOT seen the code generated by the mspec or the infrastructure, but
    in general your code must perform the conversion.
    
    With Netty ByteBuf it is compatible by default.
    
    My grain of sand
    
    Best regards,
    
    El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43...@etu.he2b.be>)
    escribió:
    
    > Hi all,
    > After spending some time on my work, I wanted to make some tests with the
    > S7. After I pulled from the actaul dev branch, I noticed an error: seems
    > like the Parser for INT and REAL datatype does not work (for me at least).
    > I don't understand why but from wireshark and debugging it seems like the
    > data from the read response are Big Endian, although the requests are
    > little endian.
    > Maybe I did not use correct instruction, but from what I remember, S7 is
    > little endian. Here the case:
    >
    > Trying to read a REAL number in the DB1 with offset 0 : %DB1.DBD0:REAL
    > Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
    >
    > As I said, from the Wireshark dump, the request is ok... but the data
    > comes back Big  endian.
    >
    > Etienne
    >
    
    
    -- 
    *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: 0416-681.03.99*
    
    *Cel: 0414-760.98.95*
    
    *Hotline Técnica SIEMENS: 0800 1005080*
    
    *Email: support.aan.automation@siemens.com
    <su...@siemens.com>*
    


Re: S7 Read /develop branch

Posted by Cesar Garcia <ce...@ceos.com.ve>.
Hi,

Th Simatic S7 is Big Endian.

I have NOT seen the code generated by the mspec or the infrastructure, but
in general your code must perform the conversion.

With Netty ByteBuf it is compatible by default.

My grain of sand

Best regards,

El mié., 18 mar. 2020 a las 14:41, Etienne Robinet (<43...@etu.he2b.be>)
escribió:

> Hi all,
> After spending some time on my work, I wanted to make some tests with the
> S7. After I pulled from the actaul dev branch, I noticed an error: seems
> like the Parser for INT and REAL datatype does not work (for me at least).
> I don't understand why but from wireshark and debugging it seems like the
> data from the read response are Big Endian, although the requests are
> little endian.
> Maybe I did not use correct instruction, but from what I remember, S7 is
> little endian. Here the case:
>
> Trying to read a REAL number in the DB1 with offset 0 : %DB1.DBD0:REAL
> Trying to read a INT number in the DB1 with offset 8 : %DB1.DBW8:INT
>
> As I said, from the Wireshark dump, the request is ok... but the data
> comes back Big  endian.
>
> Etienne
>


-- 
*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: 0416-681.03.99*

*Cel: 0414-760.98.95*

*Hotline Técnica SIEMENS: 0800 1005080*

*Email: support.aan.automation@siemens.com
<su...@siemens.com>*