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.

M-bus problem
#1
Hi, 
I am having problems reading data from m-bus meter. I have Caleffi Conteca Easy with M-Bus (750705) a Techbase M-Bus to rs485 Converter (MBus10) and a LM, i am trying with this script:
Code:
require('mbus')

mbus.init('/dev/ttyUSB0', 9600 ,"half")


res, err = mbus.scan(1 , 10, 1)
log(res)
log(err)
log(mbus.getdata(7))
 to scan for the Caleffi meter (address:7) and to read some data from it. As a result i get this:
Code:
m-bus 17.05.2023 12:07:52
* table:
[1]
  * bool: false
[2]
  * bool: false
[3]
  * bool: false
[4]
  * bool: false
[5]
  * bool: false
[6]
  * bool: false
[7]
  * bool: false
[8]
  * bool: false
[9]
  * bool: false
[10]
  * bool: false
m-bus 17.05.2023 12:07:52
* nil
m-bus 17.05.2023 12:07:54
* arg: 1
  * nil
* arg: 2
  * string: failed to send/receive frame
I have tried changing polarity of the m-bus and of the rs485 connection with no result though. Could you help me? Huh
Reply
#2
To which LM port is it connected? Are you sure it is RS485 not RS232? Your port is clearly wrong as it points to USB
------------------------------
Ctrl+F5
Reply
#3
Sorry, right now i am using a rs485 to usb converter but i am having the same problem.  
See the attachment for the techbase converter.   [attachment=3221]
Reply
#4
The meter documentation says "M-Bus protocol on BUS RS-485". This means that you can connect the meter directly to LM RS-485 port without any additional converters.
Reply
#5
I tried connecting the caleffi meter to the /dev/RS485-2 port as a result i don't get the scan table and still no data

Code:
require('mbus')

mbus.init('/dev/RS485-2', 9600 ,"half")


res, err = mbus.scan(1 , 10, 1)
log(res)
log(err)
log(mbus.getdata(7))

log:
Code:
m-bus 17.05.2023 12:38:53
* table:
m-bus 17.05.2023 12:38:53
* nil
m-bus 17.05.2023 12:38:55
* arg: 1
  * nil
* arg: 2
  * string: failed to send/receive frame
Reply
#6
Did you try swapping A/B?
------------------------------
Ctrl+F5
Reply
#7
Try setting a lower baudrate (2400) on both LM and the meter. It's possible that RS485 is damaged on the meter if you've connected M-Bus there - not all RS485 ports are protected against 24V DC connection. There's also a similar meter model with Modbus instead of M-Bus.
Reply


Forum Jump: