02-19-2025 05:49 PM
I'm new to LabVIEW, and to programming in general, my background is in Mechanical Engineering but in my new role I'm involved in the control and instrumentation of a thermal hydraulic test rig which is how LabVIEW comes to play.
At the moment we have the data acquisition completed by LabVIEW whereas external controls such as the heaters and pump are controlled by other software. We also have a Rheonik Coriolis flowmeter which isn't picked up by the LabVIEW.
Ultimately the aim is to integrate everything into LabVIEW so that the control and data acquisition is all in one, but as a priority I need to integrate the flowmeter readings into the LabVIEW script.
The flowmeter is connected via serial into COM port 6 on the computer, and I have downloaded the modbus library into LabVIEW but I just don't know how to then write the script to get everything working. I know I need to get the baud rate and parity bits all matching but I'm stuck on the actual coding and how it should look.
If anyone has any ideas, I would be extremely grateful.
02-19-2025 06:02 PM
It sounds like you personally haven't really used it before. Have you tried some of the links to the learning center at the top of the forum?
You say "I have downloaded the modbus library", but you don't say whether this is a library specifically made for your flowmeter or whether this is one of the general LabVIEW Modbus libraries that are not for a specific instrument. Also, if this is a general Modbus library, there are at least 3 different ones out there so you need to specify which one you have.
Most libraries include a few VIs as examples. Does the library you downloaded have any files marked as "Example" in the file name?
02-20-2025 10:55 AM - edited 02-20-2025 10:56 AM
If you are using the NI LabVIEW Modbus API there is a dedicated discussion on it here
02-20-2025 12:31 PM
you can start with MODBUS MASTER EXAMPLE.VI
you will need some documentation from the Flow meter , like register addresses, size of bytes etc, so you can look for the data and the registers you need to read the data. Check the documentation from the manufacturer about hte MODBUS protocol, it usually explains what / how to read/write into the instrument.
02-20-2025 07:58 PM
To write and read function, you need to know the address for every command. See inside manual programming