12-15-2010 09:25 AM
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
12-16-2010 01:35 PM - edited 12-16-2010 01:35 PM
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,
12-17-2010 08:14 AM
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.
12-19-2010 03:10 PM
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
12-19-2010 03:15 PM
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
12-20-2010 06:57 AM
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.
12-21-2010 01:13 PM
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
01-10-2011 11:35 AM
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!
01-11-2011 11:05 AM