04-10-2018 03:00 AM
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
Solved! Go to Solution.
04-10-2018 03:29 AM - edited 04-10-2018 03:39 AM
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
04-10-2018 03:42 AM
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.
04-10-2018 03:44 AM - edited 04-10-2018 03:48 AM
@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.
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):
04-10-2018 03:58 AM
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...
04-10-2018 04:09 AM
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?
04-10-2018 04:18 AM
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...
04-10-2018 04:30 AM
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).
04-10-2018 04:33 AM
Well, you could contact the company and ask them...
04-10-2018 05:22 AM
Sorry you were right, the communication is actually a RS-485.