LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bronkhorst MFC with LabVIEW using NI PCIe 8431/8 card - RS 485 protocol

I am trying to control Bronkhorst MFC using LabVIEW via RS 485 protocol. I am using NI PCIe 8431/8 card to connect the device with PC. Can we directly try measuring the mass flow rate through the MFC without any gas lines connected? If so, what value of flow rate (in %) can we expect?

0 Kudos
Message 1 of 18
(1,312 Views)

you may find better information at bronkhorst support. 

Message 2 of 18
(1,275 Views)

Thanks for your suggestion. I figured out the initial problem I had. I was using FlowBUS VI (which used RS 232 standard) to control and it should have resulted in garbage values. Now that I am trying to send commands as per ModBus protocol by referring device's manual through LabVIEW, I am facing another issue where the session gets timed out. I suspected wiring issue. But I have connected A/A' pin to RS 485 - and B/B' pin to RS 485 +. Can someone help me addressing the following doubts?

 

1. Does nomenclature of A and B in RS 485 vary among different manufacturers? Also, will it cause any harm to the device if I tried connecting A to RS 485+ and B to RS 485-?

2. Can I use Chassis ground as signal common for RS 485 connection? I have currently used Chassis ground as signal common using a resistor in the connection.

3. I have not used any termination or biasing resistor as my connection length is short and I have only 1 device connected through the communication port. Are termination and biasing resistor crucial even in such setup?

 

Sorry for such long message.

 

Cheers!

0 Kudos
Message 3 of 18
(1,203 Views)

Hey everyone,

 

I was wondering if anyone could still help. Here's what I tried until now.

 

I have flipped the earlier connected RS 485 terminals  (i.e., D0 Modbus (A/A') from MFC is taken RS 485 + to NI PCIe card and D1 Modbus (B/B') is taken as RS 485 - to the PCIe card. I have connected the ground terminal of the PCIe card with the Chassis ground of MFC using a 390 ohm resistor. I have followed the Bronkhorst Modbus interface manual's example to measure the flow rate inside the MFC (right now the MFC is not connected with any gas lines, so I am expecting that flow rate should be '0').

 

I get the output as 0000 0000 0000 0000 0000 (no. of zeroes increase if I run it another time).

 

Can anyone suggest anything that I could try that can help me establish the communication?

0 Kudos
Message 4 of 18
(1,151 Views)

Are you using the Modbus Version of MFC or the "standard" version.

We are using the Modbus version successfully. On Modbus I eventually can help you.

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
Message 5 of 18
(1,142 Views)

Sorry !

 

I see you are using modbus. Which modbus library are you using. 

We use the "NI Modbus Library v1.2.1.42 by National Instruments" from the VIPM

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
Message 6 of 18
(1,140 Views)

I didn't use modbus library. I give Modbus commands from the example given in the Modbus Interface document by Bronkhorst (Document no. 9.17.035). I actually have not heard of NI Modbus Library. I will look into it thanks.

Also I have not connected 0V power pin to the NI PCIe card along with the RS 485 + and - connection. Instead I have connected device ground using a resistor as the third-wire. Let me check by connecting the 0V power pin as the third-wire too. Maybe that could be the issue.

 

Thanks for your suggestion.

0 Kudos
Message 7 of 18
(1,122 Views)

Hi,

 

You tried to swap to wire (a and B) For a short connection it should also work without terminator resistors, like you said.

 

If the 0V levels of both connection are equal (same supply) you do;t need the 0V, but if the ports are galvanically isolated you should use the 0V connection (not ground or chassis)

 

For a good (longer) RS-485 connection you should always use terminators at both ends (preferable one active), the 0V connection and a RS-485 cable that matches the terminators.

 

Can you show us the VI you use and the data you sent?

 

Kees

Message 8 of 18
(1,095 Views)

NioFlash77_0-1688109952922.png

This is the VI I created. The output I get is

Read string: <empty>

VISA Write return count: 0

VISA Read return count: 0

 

Also I have added terminating resistors (121 ohms) on both the ends

0 Kudos
Message 9 of 18
(1,084 Views)

You really should watch the tutorial created by crossrulz if you insist on doing your own serial port communication.

 

VIWeek 2020/Proper way to communicate over serial

 

There are several errors in respect to termination character handling in your code when trying to implement a binary protocol such as what Modbus is. Of course, rather than trying to implement an entire Modbus protocol layer, you really could also use one of the several already existing Modbus libraries out there.

 

I know that the "not invented here" syndrome can be very strong for engineers, but learning to talk with a new instrument is maybe not the best place to let that syndrome prevail.

Rolf Kalbermatter
My Blog
Message 10 of 18
(1,062 Views)