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: 

Problem reading flow with Brooks MFCs via RS232

Solved!
Go to solution

Hi,

I'd like to control my Brooks MFCs from LabView. To do that I have downloaded the subroutine Brooks Labview DLL available here https://www.brooksinstrument.com/en/products/accessories-software/product-software/brooks-labview-dl....

Using their example I am able to communicate with the MFC, I can write a SP and the gas flows. Unfortunately I am not able to read back the flow value. The answer is always 0. It is strange because if I write a value higher then 100%, in the reading part it says the value is out of range. So basically I have a communication, I can write but I cannot read. As second check I have used the Brooks Smart DDE software which, communicating with Excel, can well read the value, so it is really a problem of LabView. Can someone help me? Thanks 

 

Marco

0 Kudos
Message 1 of 14
(5,618 Views)

I use Brooks MFCs with LabVIEW without major problems for a year or so (system running 24/7). Sometimes the controller does not update the new SP value I write, but it starts to work second time always.

 

Do you connect to the MFCs directly via serial, or you communicate with the MFCs using the Controller unit 0254?

The official driver from Brooks website is a big mess, I only reused the DLL calls, but totally rewrote the driver for the 0254 unit.

I attach the lvlib, unzip it, and add to your project if you wanna have a try...This should give you proper error response, if something goes wrong with the communication (at least works for me).

You can use the TESTER.vi to check if this works for you or not:

 

EDIT: by the way, if you wish to implement your driver only using pure VISA functions (so no DLL calls), check this post from rolfk out: https://forums.ni.com/t5/LabVIEW/Brooks-controller-0254/m-p/3314710/highlight/true#M970874

 

Brooks_controller_0254.lvlib_TESTER.png

0 Kudos
Message 2 of 14
(5,601 Views)

Thank you Blokk for your answer. I am using directly RS232 without unit 0254. Would that imply any problems testing your files? I got some errors opening Testing.vi saying that some libraries are not found or not loaded properly. 

0 Kudos
Message 3 of 14
(5,588 Views)

@Maferrar wrote:

Thank you Blokk for your answer. I am using directly RS232 without unit 0254. Would that imply any problems testing your files? I got some errors opening Testing.vi saying that some libraries are not found or not loaded properly. 


  1. Did you add the lvlib to your project?
  2. Did you check that the DLL file path is correct in all the subVI Call Library Nodes?

edit: when you see a broken arrow, you can go to the function by clicking on the error description, and fix the path for the DLL (or just use the DLL name, LV should be able to find it). I guess your problem is that I set (bad habit) an absolute path for the DLL calls:

(and you do not have the DLL behind the same path):

 

dll.png 

0 Kudos
Message 4 of 14
(5,583 Views)

But I guess you cannot use my implementation, with those DLL functions, since they explicitly state they are for the 0254 controller...

However, you can check the official driver for the S-protocol in "//Brooks DLL 1.0.1.0 Release 10032016/S Protocol". As I see it uses the same DLL file.

 

By the way, are you sure the RS232 protocol officially supported for these MFCs? I thought they only can be used with RS485 S-protocol...

0 Kudos
Message 5 of 14
(5,571 Views)

I can now open it without problems. After having set everywhere the good COM port if I run it I have errors that the channel is not good or if I change it that the device did not reply. This might be due to the 0254 controller?

I did not do the implementation, I am just the final user. When you say "official driver for the S-protocol in "//Brooks DLL 1.0.1.0 Release 10032016/S Protocol" you mean the .vi I can find in the DLL folder I have downloaded online? I could try to re use your .vi syntax and substitute the link/macro?

0 Kudos
Message 6 of 14
(5,566 Views)

Yes, you could try to alter the DLL functions at the function calls. But my Init VI also checks whether you have the 0254 unit, so you should alter lots of things. You could just try those example VIs in the S-protocol folder. Actually what did you try before? When you downloaded the zip file from the link you specified in your first post, which folder VIs did you use? One folder is for the 0254, and the other one is for the "S-protocol".

 

I also repeat, I do not think you can use the MFCs with RS232. You need RS485 interface. At least, this is the case for our GF80 MFCs: https://www.brooksinstrument.com/en/products/mass-flow-controllers/thermal-metal-sealed/gf80-series

"DeviceNetTM, Profibus®, RS-485 and analog interfaces"

There is no Rs232 mentioned in the spec sheet...

0 Kudos
Message 7 of 14
(5,563 Views)

I have SL5800 series https://www.brooksinstrument.com/en/products/mass-flow-controllers/thermal-elastomer-sealed/sla5800-...

It is true actually RS232 is not mentioned, but then it is confusing the fact that under "Accessories and Software" it points to the link to download the DLL which should then works. I used the "S-protocol" folder, in particular the example to get the ID of the MFC, to set the Unit and to Write the SP. All work. The only one not working is ReadFlow which does not give warning about the communication but it does not read the flow (value 0).

0 Kudos
Message 8 of 14
(5,558 Views)

Well, you could contact the company and ask them...

0 Kudos
Message 9 of 14
(5,555 Views)

Sorry you were right, the communication is actually a RS-485. 

0 Kudos
Message 10 of 14
(5,550 Views)