LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hey,

 

Thanks a lot for the very clear explanation and the link for tutorial. I'll go through it but I'll also try with a library. And I can vouch for that syndrome lol.

 

I suspected this issue when the other NI user in the discussion said about NI Modbus Library. Though I couldn't find the version the user specified, I have installed GModbus Over Serial Link Toolkit for LabVIEW NXG from NI Package manager. I hope that should help.

 

Thanks a lot everyone, your suggestions surely helps. 

 

Cheers,

Nio.

0 Kudos
Message 11 of 18
(499 Views)

Dear Nioflash

 

We typically use no termination for normal RS485 to Modbus devices tests. We also never encountered any problem by doing these tests.

 

Typically there are two issues.

Either: A and B are swapped.

Or: The request command is not properly formed so you will never have a valid response.

 

Especially on serial modbus (RTU) communication the timing is "realtively" strict. So if you don't have the proper timing between characters and at the end of the command you will not have a valied response. 

 

Also you need to be sure to set the communcation parameters of your RS485 interface properly: 19200, Even, None. are the default settings for Bronkhorst MFCs

 

Still i strongly request to use a modbus library insted of the plain serial interface vi's.

 

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 12 of 18
(478 Views)

Hi Gernot Hanel,

 

I am currently using the NI Modbus Library for MFC communication. Upon trying to read the fluid name I get a timeout error. I also don't see anyway to include a Wait time or Time delay option to wait for the device's response.

 

One thing which I want to ask specifically is, can we use the 0V pin as the third wire in RS 485 communication standard. If so, should I be do it by including a resistor (say 100 ohms) in the wiring? Right now I only use two wires in my connection (RS 485 A(+) and RS 485 B(-) from pin 1 and 6 of the MFC respectively)

 

Thanks,

Nio.

0 Kudos
Message 13 of 18
(458 Views)

Hi,

 

Normally you should use the 0V. If the two connection are already at the same 0V level (common supply) than this is not necessary. 

I observed bad communication with galvanic isolated interfaces without using the 0V connection.

 

I don't know how you want to connect the resistor. A single terminator is not connected to the 0V

 

Kees

0 Kudos
Message 14 of 18
(448 Views)

Here I have attached an example program to test bronkhorst PC FCs.

The main is the "Bronkhorst PC FC Test.vi"

 

Hope it helps.

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 15 of 18
(441 Views)

I adapted a device I have to use your ModBus addresses. I changed the slave number from 11 to 1.

The first read and write are Ok.

The VI 'MB Bronk PC FC read act set'  is Ok

The VI's 'MB Bronk PC FC read capacity', 'MB Bronk PC FC read unit' and 'MB Bronk PC FC read act set direct' fail because of the fixed address in these VI's which I did include in my device.

 

I don't know why you are using the 'Open VISA' at the start. It is not necessary.

 

If the first read and write fail at your side you should have a look at the hardware. 

 

Kees

 

 

0 Kudos
Message 16 of 18
(426 Views)

Hey all.

I realize this thread is getting longer and longer. But I still see a timeout error upon running this code too.

Actually I didn't run the entire code but only chose to run the blocks that corresponds to measure the flow rate and getting the capacity unit by copying it into another file and I get error56 (Timeout error). I didn't want to set or write any values to the device because the gas lines are not yet connected with the device.

 

I eliminated the usual suspects like making sure the control mode is digital input, baud rate, parity and flow control is same for device and the com port.

 

My wiring is as follows:

          D0 Modbus (A/A') ---------- RS 485 +

          D1 Modbus (B/B') ---------- RS 485 -

                      0 V power ---------- Signal GND

                               +Us  ---------- (+) 24 Vdc

                      0 V power ---------- (-)Vdc

                              Pin 9 ---------- Chasis GND

 

I am not using any biasing or terminating voltage. Does anyone have any idea where things can get wrong?

 

Cheers,

Nio.                          

0 Kudos
Message 17 of 18
(374 Views)

Hey all,

 

Thanks a lot for all of your suggestions.

 

The issue with my modbus communication using RS 485 standard is still persisting. I have switched to RS 232 standard and LabVIEW communication was successfully established and I will continue using this standard for my instrument.

 

Why the modbus communication failed is still a mystery to me and understanding it now is purely for knowledge basis. If any of you have any idea about this can suggest and I will also update in this thread if at all I found the solution for my issue so that it might help others in the future.

 

Cheers,

Nio.

0 Kudos
Message 18 of 18
(320 Views)