LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW modbus help!

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.

0 Kudos
Message 1 of 5
(269 Views)

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?

0 Kudos
Message 2 of 5
(261 Views)

If you are using the NI LabVIEW Modbus API there is a dedicated discussion on it here

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 5
(216 Views)

you can start with MODBUS MASTER EXAMPLE.VI 

LVNinja_0-1740076231029.png

 

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. 

 

0 Kudos
Message 4 of 5
(206 Views)

To write and read function, you need to know the address for every command. See inside manual programming

0 Kudos
Message 5 of 5
(195 Views)