Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Help: how to communicate with NI 9870 moudle to Brooks mass flow controller?

Hi everyone,

I ran into some troubles of Labview realtime project these days,

I have a cRIO9073 chassis, and a NI9870 serial moudle in one of its slots.

Now I want to control some Brooks Mass Flow Controller (MFC) thorugh this 9870 moudle, but how

can I make these two communicating with each other?

 

PS: I downloaded a dll file from Brooks website, and tested with the com port in my PC, that worked.

Here is an example of the MFC dll file.

 

Advices are greatly appreciated!

Vitto

Download All
0 Kudos
Message 1 of 9
(5,011 Views)

Hi Vitto,

 

The Instrument Driver Network lists a couple of Brooks Mass Flow controllers. Does either of these drivers correspond to your device? If so, you should be able to use the driver to control the instrument from your development computer.

 

I'm unsure of the present supported status of VISA on the cRIO, but I'll check into it and post back.

Hope this helps,

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 2 of 9
(4,994 Views)

Vitto,

 

I'm currently working on a project that uses a 9074 and the 9870 module.  The 9870 module is not compatible with the Scan Engine.  That means that you can't use VISA functions to access it.  You'll need to create the functionality of the VISA functions such as read, write etc in a vi that will run on the FPGA.  Suggest you start with example that ships with LV titled 'NI-987x Serial Loopback.lvproj'. 

 

http://zone.ni.com/devzone/cda/epd/p/id/6366 is also a good example that uses the 9870.  Every application is different.  So take a look at these examples and be sure to post any questions you have as how to best approach your project.

0 Kudos
Message 3 of 9
(4,977 Views)

Hi Wayne,

 

Sorry for being late, thank you very much for your reply,

Yes, 9870 module can be used only under FPGA mode, I have down loaded the 9870 example as given in your link. But still got some problems in modifying it. Since the brooks driver is based on the "VISA" interface, do I need, as I understood, to do as following?

 

1. Change the I/O visa port (in the NI website, two Brooks drivers can be found, one is based on dll, the other is VISA, see the attachment) into PFGA mode or sth?

2. Can I simply change the 9870 example with two connectors, one is input string, the other is ouput string? And then plant it into the Brooks read and write?

 

Thanks!

Vitto

 

0 Kudos
Message 4 of 9
(4,947 Views)

Dear Fred,

 

Thanks a lot for your suggestions! I've checked the drivers for Brooks mass flow controller, there are both dll based and VISA based drivers.

 

Actually, by using the dll driver through my PC com port, the MFC functions very well. But the pb is I don't know how to use it under FPGA mode through the cRIO...

 

Hope to hear more of your advices.

 

Vitto

0 Kudos
Message 5 of 9
(4,946 Views)

Vitto,

 

You need to start with the VISA based driver for the Brooks and modify it.  In your case you will have a cRIO target.vi compiled and running on the FPGA that directly interfaces with the 9870 module.  You need to create sub vi's that call the fuctionality of the cRIO target.vi from the cRIO host.vi  These sub vi's can then be substituted for VISA Read, VISA Write etc in the existing Brooks driver. 

 

 http://zone.ni.com/devzone/cda/epd/p/id/6166 is an example where the LV Modbus library has been modified to work like this.

0 Kudos
Message 6 of 9
(4,934 Views)

Hi Wayne,

 

I tried the module2bus example, it's really nice, and I changed all the FPGA property nodes, as well as the cRIO and chassis names into mine setup (no errors in debugging).

But new problems came, when I run the host vi, it returned a message: Communication Error Occured, Warning, connection to the real-time target (THE NAME of my target) has been lost.

What the problem of it? Thanks a lot!

 

Vitto

 

 

 

0 Kudos
Message 7 of 9
(4,912 Views)

Hi Wayne,

 

I think my last problem with the ¨Communication Error Occurred¨ message was because of the version mismatch, I had a 9.0.1 software in the target, but a 9.0.0 in the host.

I am making a little progress, but still stopped at some point

When I was using the ¨cRIO-ModBus¨ sample given by you (http://zone.ni.com/devzone/cda/epd/p/id/6166), there was some error (code -63195) in the ¨901x 9870 DMA Read (Sub).vi¨, see the attached picture.

Could you please give me some ideas about it? Thank you so much!

 

 

0 Kudos
Message 8 of 9
(4,790 Views)

Hi Vitto,

 

The error code -63195 you mention is quite similar to this discussion forum. Have you tried the solution there? This KnowledgeBase article covers another possible reason for the error.

Hope this helps, 

Fred Visser -- SystemLink R&D -- National Instruments
0 Kudos
Message 9 of 9
(4,771 Views)