01-23-2017 11:56 PM
hello
and thanks for your example
i want to communicate with some autonics power meter thru modbus
but i have some error
please check attached file and help me to solve my problem
01-24-2017 07:52 AM
Well, something is wrong with that subVI. One error says it is already running, while the other says it is broken. That is kind of contradictory. There really should be nothing wrong with it since it is a built-in LabVIEW subVI. Did anyone modify it?
Other than that, we can't help because you didn't attach any LabVIEW code that we can open up, look at, poke around in.
01-24-2017 10:47 PM
i'm using modbus libbarry and vi example that mr Himanshu_Goyal posted in several previous page
01-25-2017
01:23 AM
- last edited on
03-03-2025
11:13 AM
by
Content Cleaner
Something is very odd about your VI. I am wondering if it is somewhat corrupted. It could not find MB Serial Init, and when I tried dropping a new one in it, nothing happened. Only after I dropped it into a different new VI, and it asked me about resolving a conflict, was I then able to copy it into your VI.
Try deleting MB Serial Init. Save and close your VI. Reopen, See if you can add a fresh one.
If that fails, rebuild the VI from scratch, it's not that big.
If that fails, then try reinstalling the MB library from http://www.ni.com/example/29756/en/ or https://forums.ni.com/t5/Reference-Design-Content/LabVIEW-Modbus-API/ta-p/3524019
02-20-2017
12:24 PM
- last edited on
03-03-2025
11:13 AM
by
Content Cleaner
Hi all, sorry to bump an old thread but I am having a similar problem. I was hoping to get some help with modbus parameter settings for my project. Here is a link to my thread;
https://forums.ni.com/t5/LabVIEW/MODBUS-parameters-for-VFD-communication-to-Labview/td-p/3586442
Any help is greatly appreciated, Thank you.
09-07-2017 04:31 PM
I've found you need to fix the CRC vi datatype bug to get rid of the transient read error, then the next issue is the speed of the routines. The implementation of the code is a mess; It reads only a specific address of the modbus map so reading or setting 6 channels takes 6 serial transactions...where one would do one read of the entire memory map for that datatype!.
I am going to fix this code and update a revised usable one, as soon as I can.
11-22-2017 07:37 AM
Hello Sir,
Your VI is working fine. But i am not getting output for "Read input register". I am getting output only for "read holding register". Those values are coming 65535. May i know why it is not working??
My application reading data from Energy meter TN 8400 using RS485.
attachments:
Error display
Modbus register for energy meter.
11-22-2017 08:57 AM
Function code 4 is for Read Input Registers. If you want to Read Holding Registers, then use function code 3.
Other than that, I can' help you because you haven't attached any code and really haven't adequately explained the problem you are having.
12-05-2017 01:07 AM
Thank you for response.
Finally i got the solution for that problem.
Energy meter sending the data in floating format. In modbus VI, i couldn't read the floating values. Even i tried to convert the values(what i am getting) into floating, but it doesn't work. So, i have used NI OPC server to read the values from the energy meter and i have interfaced NI OPC and my VI file. there after, i got the values based on modbus address.
12-05-2017 08:18 AM
Your solution is for a completely different problem than the one you stated where you said you were getting an error on read.
With Modbus, if you want floating point values, they tend to be single precision (4-byte) values. You need to read two registers that are consecutive and combine those two 16 bit integers into a SGL float. You can do that with typecast. You might have to do something special depending on whether the high word is first or second of those two registers.