This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Use of address_scale with read_count and read_offset Modbus Profiles
#1
Hi i Hope this is relative simple question 
When using read_count and read_offset features in a modbus profile,  can i use address_scale in the same process and if so what value do you use for address_scale, the offset from the block read point or the actual address. 

I have in fact tried both and Neither work I know when using the  read_count and read_offset  on there own return the correct value, but when using with  address_scale I just get 0 back.  Examples of what i have tried below from my profile,  i have tested each of these with no address_scale using the block read and i get results  so i know the registeres and offsets are all working fine.   and note the SF location are all in the block that is read 


/* I_AC_Current (A)  @40071, SF @ Address Location 40075 */
    { "name": "I_AC_Current", "type": "register",
      "address": 40069, "read_count": 50, "read_offset": 2,
      "datatype": "uint16", "bus_datatype": "float32",
      "address_scale": 40075, "units": "A",
      "value_nan": [65535], "value_default": 0
    },

    /* I_AC_CurrentA (A) @40072, SF @ Offset Location */
    { "name": "I_AC_CurrentA", "type": "register",
      "address": 40069, "read_count": 50, "read_offset": 3,
      "datatype": "uint16", "bus_datatype": "float32",
      "address_scale": 6, "units": "A",
      "value_nan": [65535], "value_default": 0
    },

    /* I_AC_VoltageAN (V) @40079, SF Note Defined (this works)*/
    { "name": "I_AC_VoltageAN", "type": "register",
      "address": 40069, "read_count": 50, "read_offset": 10,
      "datatype": "uint16", "bus_datatype": "float32",
      "units": "V",
      "value_nan": [65535], "value_default": 0
    },

Any help here would be appreciated. 

If you have to ask why using block read,  it is because i need to get all values back with the same time stamp  for calculations,  reading each item individually introduces errors .
Reply


Forum Jump: