Showing results 1 to 5 of 5

Thread: Modbus Energy Driver // MiddleEndian

  1. #1
    philippevdt Gast

    Default Modbus Energy Driver // MiddleEndian

    Hi,

    I want to set up a Modbus TCP connection using the MODBUS ENERGY driver. The device I want to connect to, has its data available in Middle Endian format.

    Big Endan= B1 B2 B3 B4
    Middle Endian: B3 B4 B1 B2

    In the Modbus Energy driver, I can only choose between Big and Little Endian.

    Is there an easy way to read in data in Middle Endian as well?

    Best regards,
    Philippe
    Last edited by philippevdt : 1st August 2016 at 10:33

  2. #2
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    816

    Default Re: Modbus Energy Driver // MiddleEndian

    Middle Endian? No, not directly in the driver, too seldom.

    You may try a workaround:
    - read this register as two UINT values (or UDINT), set the "integer" variable(s) 'extern visible'. Do to forget to create 'Logic to SCADA connection' driver in Logic.
    - in Logic parse and reorder bytes and paste into an additional REAL (32 bits) stratonNG variable (or LREAL for 64 bits values).

    In Logic there are function blocks SerializeOut and SerializeIn to transfer any variable to/from a (local) array of bytes. So, you may call SerializeOut to transfer "integer" to some bytes in array, then reorder bytes, and using SerializeIn paste all bytes into float variable.
    Last edited by ursulak : 1st August 2016 at 11:08

  3. #3
    philippevdt Gast

    Default Re: Modbus Energy Driver // MiddleEndian

    Thanks for the fast reply ...

    (I feared having to re-order the bytes myself ...) :-)

  4. #4
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    816

    Default Re: Modbus Energy Driver // MiddleEndian

    let me know if it works for you

  5. #5
    Join Date
    24.09.2016
    Posts
    1

    Default Re: Modbus Energy Driver // MiddleEndian

    I was looking for this info for a long time. Thanks.

Similar Threads

  1. Per Shift Energy
    By tanveerali in forum zenon Energy Edition
    Replies: 4
    Last Post: 22nd May 2018, 12:40
  2. energy calculation in zenon 6.51
    By hoscillada in forum zenon Energy Edition
    Replies: 1
    Last Post: 2nd January 2012, 08:02
  3. Calculating energy
    By talal.mubarak in forum zenon Energy Edition
    Replies: 1
    Last Post: 15th December 2011, 11:53
  4. Replies: 1
    Last Post: 23rd October 2011, 23:09

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •