From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus vs Analog current input interface using LabVIEW

Solved!
Go to solution

Hi,

I am trying to interface OMNI-ECO-200M DIN Rail Mounted Ultrasonic Flow Meter with LabVIEW

 

www.omniinstruments.co.uk/flow-meters/ultrasonic-flowmeters-fixed-time-of-flight-and-doppler/omni-ec...

 

I have some question about the best, easy and reliable method of interfacing the device with LabVIEW

 

1. Looking at the datasheet of OMNI-ECO-200M the Signal outputs are 

OCT output: Pulse signal

Relay 

RS485 o/p with MODBUS Slave support. 

Output Current : 4-20mA

Signal Input : 3 channel analog signal inputs.

 

Since pulse is mentioned as output type, can use a counter to count the pulse ?

Also it is mentioned as RS485 o/p with MODBUS Slave support - How easy is it to use a MODBUS compared to using current output of 4-20mA. LabVIEW NI-9203 general-purpose analog input modules can be used to interface with the OMNI-ECO-200M device ?

 

2. Is there a NI MODBUS library files for LabVIEW 2017. The Below link shows the library file for version 86. 

http://www.ni.com/example/29756/en/

 

Also I was not to install the library file as recommended on the READ ME file comes along with the zip file. 

 

3. Since RS485 is mentioned on the datasheet do I need to buy USB-485 Serial interface device and communicate with LabVIEW ?

 

4. I have USB - 6211. Will I be able to use it to interface OMNI-ECO-200M device as USB - 6211 has AI and AO. 

The input current during overvoltage condition is mentioned as ±20mA. 

OMNI-ECO-200M Output Current is 4-20mA. Will I be able to use USB - 6211? Or do I need to get USB-9203 16-Bit Analog Input Module ?

 

Also I need to interface 4 other devices with LabVIEW. Some of them have 4-20mA current ouput and RS485. 

So can I please know if serial bus module is better option or 16-Bit Analog Input Module is a better option for interfacing two or more modules ?

Thanks.

 

Regards,

Vikash

0 Kudos
Message 1 of 11
(3,492 Views)

Personally, I would get the 4-20mA module and use that to get your readings.  I mostly say this for the simplicity and the timing will be more deterministic.  Something like the NI-9203 looks like it should do the job (8 channels).  So get that along with a cDAQ chassis of your choice.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 11
(3,467 Views)

That library will also work in LV 17.

 

There is also a newer Modbus library in the Data Communication palette.

0 Kudos
Message 3 of 11
(3,463 Views)

@RavensFan wrote:

There is also a newer Modbus library in the Data Communication palette.


RavensFan is referring to the NI Modbus Library that is currently available on the NI Tools Network.  You can install it using the JKI VI Package Manager (VIPM).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(3,458 Views)

Thanks Crossrulz,

 

I had gotten it so long ago, I forgot it didn't come built into LabVIEW.

0 Kudos
Message 5 of 11
(3,453 Views)

Oh I need to buy cDAQ chassis ?

I didn't realise that I need a cDAQ chassis.

Is there a USB version of 4-20mA module ?

Or will my USB-6211 will perform the task ?

0 Kudos
Message 6 of 11
(3,448 Views)

Hi Vikash,

 

will my USB-6211 will perform the task ?

Yes - with an additional resistor…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 11
(3,445 Views)
Solution
Accepted by VikashKumar23

@VikashKumar23 wrote:

Oh I need to buy cDAQ chassis ?

I didn't realise that I need a cDAQ chassis.

Is there a USB version of 4-20mA module ?

Or will my USB-6211 will perform the task ?


Your problem is the USB-6211 is setup to read voltage, not current.  So if you want to use it, you have to add in some conversion.  You could just use a 50 Ohm resistor between the signal and the return.  But you typically want to add some sort of buffer circuit to protect your DAQ and help with ghosting if you do that.  A simple Voltage Follower works well.

 

Or you can get an NI-9203 and a cDAQ-9071 for ~$900.  The 9071 is a single slot USB cDAQ chassis.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 11
(3,439 Views)

There is also an output of 0-10V from the sensor.

 

My USB-6211 has 16 AI which can accept voltage range of +/-10V. 

 

I am trying to avoid spending £495 for the NI-9203 and £285 for the chassis. 

 

NI sells USB-485 which is again £175. Can I use USB-485 from any other manufacturer like FTDI. ? 

http://www.ftdichip.com/Products/Cables/USBRS485.htm

0 Kudos
Message 9 of 11
(3,428 Views)
Solution
Accepted by VikashKumar23

For 485 communication, I've never actually used a USB RS485 device, I've always gotten away with using a USB RS-232 device.  This can be based on Prolific, FTDI, or probably many others.  Then I'd use a RS232 to RS485 adapter.  Either way, to use VISA (and the Modbus protocol) you aren't required to use the NI based hardware.  As long as it shows up as a port in device manager, and you have NI-VISA installed it should work just fine.  The Modbus API I like isn't from the Tools Network, it may have came with my RT Module but it is also on the Data Communication palette.  The benefit of this is you can get more than just the single analog reading.  Typically you can read set points, set setpoints, and get status.  Where with the analog reading you just get a single reading, and have to assume the device is plugged in and working on the other side.  Still analog is simpler if you have the spare IO.

Message 10 of 11
(3,416 Views)