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.

Modbus profie Satec PM130 Plus
#1
Hi
I read data from Satec power meter PM130 and map Modbus register to knx addresses. I have a problem with reading and mapping int32 registers.
For example:
Power factor L2
Range: -1000-1000
Units:×0.001
Type:INT32
R/W: R 
Can someone help me with example how to read this type of registers and map to knx address.

Desislav
Reply
#2
Are you using scripts or creating a modbus profile?
Reply
#3
(26.01.2016, 13:55)admin Wrote: Are you using scripts or creating a modbus profile?

I create Modbus profile.

Attached Files
.zip   PM.zip (Size: 265 bytes / Downloads: 17)
Reply
#4
Try this, since the resulting value has to be multiplied by 0.001, bus_datatype field has to be set to float32, but datatype field (which tells what kind of data is read from ModBus) should be set to int32.

Code:
{
   "manufacturer": "satec",
   "description": "PM",
   "mapping": [
      {
         "name": "PF_L1",
         "bus_datatype": "float32",
         "datatype": "int32",
         "type": "register",
         "value_multiplier": 0.001,
         "address": 13342
      }
   ]
}
Reply
#5
(27.01.2016, 07:12)admin Wrote: Try this, since the resulting value has to be multiplied by 0.001, bus_datatype field has to be set to float32, but datatype field (which tells what kind of data is read from ModBus) should be set to int32.

Code:
{
   "manufacturer": "satec",
   "description": "PM",
   "mapping": [
      {
         "name": "PF_L1",
         "bus_datatype": "float32",
         "datatype": "int32",
         "type": "register",
         "value_multiplier": 0.001,
         "address": 13342
      }
   ]
}

Thanks for fast reply. I think now the received value is not real ( screenshot in attachment). Value for power factor must be from -1000 to 1000 when is not multiplied.

Attached Files Thumbnail(s)
   
Reply
#6
It might have different register/byte order. Try reading registers 13342 and 13343 as uint16 and post what values you get here.
Reply
#7
(27.01.2016, 16:49)admin Wrote: It might have different register/byte order. Try reading registers 13342 and 13343 as uint16 and post what values you get here.

I think the problem is not reading Modbus register 13342 as int32. May be the value going wrong when transfer it to 4 byte knx variable.

Attached Files Thumbnail(s)
   
Reply
#8
You can set bus_datatype to int32 and remove value_multiplier field. This way you can get the raw value that is being read.
Reply
#9
(01.02.2016, 14:23)admin Wrote: You can set bus_datatype to int32 and remove value_multiplier field. This way you can get the raw value that is being read.

I try but again the value is not true. I made other test with script. I create a script that read value from slave and map this value to Modbus register (LM work as Modbus tcp gateway) , then read the value with Modbus poll. Now the read value is ok (-974). But I need to map the register not to Modbus but to knx.

Attached Files Thumbnail(s)
   
Reply
#10
Here you are reading a single register, not a pair and then converting it to int32.
Reply
#11
(03.02.2016, 06:33)admin Wrote: Here you are reading a single register, not a pair and then converting it to int32.


Yes in the attached screenshot I read a single register. But also I try to read two uint16 registers and store them in int32 knx address again I read wrong value. Can you post the example , may be make a mistake somewhere .
Reply


Forum Jump: