05-15-2025 11:26 AM
I am having a lot of trouble finding a labview library that allows ModbusRTU communication over a serial port in runtime. I currently have the NI Modbus Library v1.09.23. It allows comms, but does not seem to work in Runtime.
I also have windows 7 to complete the 'old' motif.
I would really appreciate any help that anyone has. I am new to Modbus, and its different than RS232, GPIB, and TCP in a lot of ways!
05-15-2025 02:39 PM
You may need the NI VISA run time engine along with the LabVIEW 2011 Run time engine. If you use a project and make an installer build, it should detect and include any run time engines required (At least for 2015 and up, not 100% sure about previous versions)
05-15-2025 03:45 PM
I have VISA and Visa Runtime 14.0.1. I know I have needed to work around certain functions when using an executable.
I just seem to be having a lot of difficulty locating tools to use this interface.
Thanks for your input!
05-15-2025 04:17 PM
What specifically is not working? What is the error code?
Run-Time engines and sometimes NI driver versions need to match up. If you are making an executable with LabVIEW 2011, you need the 2011 Run Time engine, and from what I remember, there are limitations on what versions of drivers will work between run-time builds and development.
Open Measurement and Automation explorer on the run-time system, under devices, if you can see the com port, then so can LabVIEW.
05-15-2025 07:37 PM
It might take a rewrite since it sounds like you started with a different library, and I don't know how big your codebase is, but if none of the above solutions work there is an older Modbus library still available to download:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LP9SAM&l=en-US
That will allow you to go back as far as 7.1.
It's completely separate from the more modern library though, so don't expect it to be an easy 1:1 replacement.
05-16-2025 07:28 AM
Yesterday I was getting no comms on the FTDI driver in the executable. After a reboot I am magically getting the same results. perhaps the comm port was tied up somehow from all the testing. This is very promising!! I have seen several vi's that just don't execute properly in run-time and I may have panicked. BUT the fact that I have happy blinking lights and the same results as the test VI on my USB converter is a big change from yesterday!
If I continue to have intermittent results, I will definitely use your advice and try to get all versions to align. I actually have several run times on my machine, and I may need to find a way to select which one the compiler utilizes.
Thanks!!!
05-16-2025 07:29 AM
I am having much better results after some sleep and a compute restart. I have noted the 8.2 library and will use if needed. Thanks! It has been difficult to locate libraries, and this is a big help!