Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

Serial/USB communication with Mbus via NImyRIO(Mbus-LabVIEW)

Go to solution

Hii everyone,


I want to read electricity meter(Mbus) with LV. I am new with this protocol. My connection is as follows: Mbus meter to NImyRIO via serial/USB connection and myRIO hardware is connected to PC. 


I tried to send SND_NKE 10 40 00 40 16 (in string constant hex display- 1040 0040 16), however, I don't get any response. It should return E5, but I did not got any thing.


I attached my VI with this message.


My experience with this is not more. Hopefully someone can help me where I did mistake.

0 Kudos
Message 1 of 8


There's a forum thread (Problems with serial/usb communication with M-bus) where similar issue was solved.

Please take a look and see if it helps.

0 Kudos
Message 2 of 8

Hii nbabajan,


Yes, I have looked into it and tried,  but it did not help me.


0 Kudos
Message 3 of 8

Can you provide your M-Bus device documentation or specify what meter are you using?

Also, you're running the VI on MyRIO right?

0 Kudos
Message 4 of 8

Hii nababajan,


Yes I am running my VI on myrio. I attached the datasheet of Mbus device and pegelwandler(convert Mbus to RS485).

0 Kudos
Message 5 of 8

Hi again, 

Thank you for provided documents, I'll try to figure the things up.

Meanwhile you can try using Modbus Library for LabVIEW (can install it using VIPM).

0 Kudos
Message 6 of 8

Hii nbabayan,


Yes, I know about Modbus library, but my meter works on Mbus protocol. there is a different version for Modbus available, but I don't have that. So I have to find solution for this Mbus protocol.

0 Kudos
Message 7 of 8
Accepted by topic author parthsuhagiya

Hii everyone,


I found the problem. when I put a probe on refnum after visa configuration, it showed me 9600 baud rate, I don't know why, because I made a constant of 2400 for that. than I deleted visa configuration VI and put a new. It is working now. 


Thank you for your help, time and support and sorry for inconvenience that I created.

I attached the final VI.

0 Kudos
Message 8 of 8