Menu

TPLCBlock and Unsigned long integer 64bit

Help
Lefteris
2014-12-08
2014-12-08
  • Lefteris

    Lefteris - 2014-12-08

    Hello,

    I work the TModBusRTUDriver, TPLCBlock and TSerialPortDriver and I would like to read UINT64 (Unsigned long integer 64bit) values from TPLCBlock.
    How can I do it?

    Thanks.

     
  • Fabio Luis Girardi

    Please Sir.

    What's you PascalSCADA version and what's your environment (Delphi/Lazarus)?

    If are you using Lazarus with development version of PascalSCADA, set the property TTagBlock.TagType to pttQWord, and use SwapBytes, SwapWords and SwapDWords to get the correct value.

     
  • Fabio Luis Girardi

    If you are using Delphi, note that it don't have QWord (unsigned int64) type.

     
  • Fabio Luis Girardi

    No Sir. I tried to define a QWord type using this:

    type
    QWord = 0 .. 18446744073709551615;

    But this generates a compiler error.
    On Delphi the nearest setting is TagType = pttInt64.

     
  • Fabio Luis Girardi

    Can you reproduce this error?

     
  • Lefteris

    Lefteris - 2014-12-08

    I get error:
    [DCC Error]: E2011 Low bound exceeds high bound

     
  • Fabio Luis Girardi

    The same error here. This is why Delphi can't support QWord.

     
  • Lefteris

    Lefteris - 2014-12-08

    Ok, Thanks a lot!

     

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.