NI Home > Community > NI Discussion Forums

Real-Time Measurement and Control

Showing results for 
Search instead for 
Do you mean 
Reply
Member
SteveB1
Posts: 12
0 Kudos

Hybrid mode question with 9870 and 9512 modules

Good Morning

 I am having trouble with using hybrid mode on my cRIO-9024 controller and backplane.  Here is the scenario...

 

  I have an existing project (start.jpg) that is a model of an existing production vi.  Everything works and runs under scan mode with a scan interval of 5ms.  But i need to add some serial capability, so

 

1.  I change from scan mode to FPGA mode at the chassis, click on "Run when loaded to the FPGA" to make it checked and then deploy the chassis.

 

2.  Then I add 2 9780's (slot 1 and 2) and a 9781 in slot 3 and deploy the chassis again.

 

3.  I add the vi "WriteToPortFPGA.vi" and compile it (still under FPGA Mode)

 

4.  After compiling (25 or so minutes) I use the "RIO Device Setup" to download the bitfile to flash memory and in device settings set "Autoload VI on Device Reboot" to true and click on "Apply".  Then just to make sure everything is set I deploy and reboot.

 

5.  Then the "WriteBtyeToPortHost.vi" is added and the "Open FPGA VI Reference" is pointed at the bit file.  And then i deploy everything. (Chassis is still in FPGA mode).

 

6.  I test the host vi and it works (it clearly needs refining but it works!).

 

7.  I set the chassis to scan interface, do a deploy all and reboot

 

When i run the host FPGA i get the error -61141 which seems to say i should be running this in FPGA mode.

And the "MoveZAxis" vi does not work and returns the error -77008.
The Interactive test panel for Axis 1 does not work either

 

how do i get both vi's to work?!

 

I've attached a zip file with 3 VI's, a jpeg of the beginning project layout and the final project project file

 

Any help is greatly appreciated!!

 

Steve B

Active Participant
charris
Posts: 242
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

Steve:

 

I believe the modules need to be added under scan interface mode, and the chassis needs to be set to FPGA mode in order to operate in hybrid mode. Is it possible that steps 1 and 7 may be reversed in your outline?

 

The full process for setting up and operating in hybrid mode is documented in this KB. The error you are encountering is also explained at the end of the article.

 

Let me know if that helps!

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
Member
SteveB1
Posts: 12
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

Thanks for the suggestion!

 

I tried it but when i got to the point of setting the scan mode to active, the option wasn't available.  When i went to system manager to try and set it to active manually, I got an error that said...

 

   "Error changing to Active Mode: -77008"

   NI Softmotion: The specified device was not detected

 

There was another kb article about using the 9512 in conjuction with FPGA mode, but when i followed that i got the same error.

 

 

Thanks for responding!  Any additional ideas would be greatly appreciated as i'm running out of them!

 

Steve B

Active Participant
charris
Posts: 242
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

Steve:

 

I'm sorry it took me so long to find, but I ran across this KB that documents the process for using 951x modules in hybrid mode. I don't work with that particular range of c-series modules, so I overlooked the fact that those modules use a slightly different setup process for hybrid mode.

 

Let me know if that helps out!

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
Member
vgravel
Posts: 124
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

Sorry for brining back an old thread...

 

My question is quite the same, I would like to use a 9870 on a cRIO-9075 in hybrid mode.

 

The tricky part is that I would like my application to be a "Startup Application", so I can't launch the FPGA code manually. Is there any way to do that?

 

At the moment, since the cRIO is in interface mode, my RS-232 ports are not reconized in LabVIEW RT as they are in Scan Interface mode.

 

Any idea?

 

Thanks!

 

Vincent

Member
SteveB1
Posts: 12
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

We upgraded to Labview 2011 and don't need to control the serial ports using FPGA anymore.   Labview 2011 allows serial control through scan mode by using either the standard Labview VISA controls or through Measurement studio.  I have been able to build Measurement studio programs in c# that control the serial ports without any issues.  I haven't built any Labview executables that use serial control so I don't know whether that would work or not.

 

Hope this helps!

Steve

 

 

Member
Doug-B
Posts: 100
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

@Vgravel

 

Here is a good document that walks through how to set up a FPGA VI to run at startup:

 

http://digital.ni.com/public.nsf/allkb/BC513C2A0DC29C89862574BF0002B0B9?OpenDocument

 

Hope This Helps,

 

Doug B

Applications Engineer
National Instruments
Member
vgravel
Posts: 124
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

Hello Doug,

 

I think you didn't read the post carefully...

 

I'm talking about a cRIO (not a RIO board in a PXI chassis)... I want the 9870 (serial port cSeries module) to be in scan mode and a 9221 in FPGA mode, thus have my cRIO chassis in hybrid mode.

 

The reason I mentionned the startup executable, is that the KB (mentionned by Charris) says that a solution is to launch the FPGA by hand using LabVIEW. In my case, this is not an option since The overall application must be launch at the startup of the cRIO...

 

To resume, I want to control instruments (GPS, Altimeter, etc) using LabVIEW RT and still be able to acquire data relatively fast using the 9221 on the cRIO FPGA.

 

Hope it is clearer!

 

Thanks!

 

Vincent

Member
Doug-B
Posts: 100
0 Kudos

Re: Hybrid mode question with 9870 and 9512 modules

Hey vgravel,

 

Just to clarify, you want both the RT application that runs the 9870 and the FPGA application that runs the 9221 to run when you boot up the cRIO?

 

Below is a link that describes how to deploy a Real-Time executable at startup:

 

http://digital.ni.com/public.nsf/allkb/B37FA04A1CB84B6C862571A30060EF03?OpenDocument

 

That should take care of the RT (scan mode) end of things.

 

Here is a link that describes how to interface the startup RT executable with your FPGA code:

 

http://digital.ni.com/public.nsf/allkb/39795847AC67296D862575FB0046944F?OpenDocument

 

Hope This Helps

 

Doug B

Applications Engineer
National Instruments