Menu

Read real from s7 in delphi

2024-06-26
2024-06-27
  • Edoardo Ceccarini

    hi, I have a problem reading the Real values from the s7 plc.
    reading the value with the function
    Client.ReadArea(Area, DBNumber, Start, Amount, WLen, @Buffer);
    this returns me this string 6556144.
    I don't understand how to convert it to a real number.
    if I try to read Int value it works fine.

     
  • Edoardo Ceccarini

    Thank you!
    Now I have another problem, I have to read data of type String(25). How should I read this type of data? Because he is not a native type.

     
  • Davide Nardella

    Davide Nardella - 2024-06-27

    byte by byte checking the first two bytes which contains max length and actual size

     
    👍
    1
  • Edoardo Ceccarini

    ok thank you again!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.