LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-9402 can't run with cRIO-9039

Solved!
Go to solution

Hello,

I am using the cRIO-9039 and created a project as shown in the image below.  Connecting to this cRIO-9039 are two NI-9402 modules.  I can run a VI called "I2C_NI940_One I2C Port with Multiple Commands Sent v12 - Multiple Slaves.VI" fine when this VI is located in the "FPGA Target" folder, and I select "Labview FPGA Interface" in the "Chassis Properties" (see image below). 

 

1 - 9039 cRIO project file.png

 

However, when I tried running the NI-9402 under the cRIO-9039 project, tons of errors popped up. How do i fix this problem? Here are some info on these errors:

  • I've dragged the 9402 VI called "I2C_NI940_One I2C Port with Multiple Commands Sent v12 - Multiple Slaves.VI" into the cRIO folder and tried running, but it's giving me errors (see errors below). 
  • None of my I2C block seems to exist in the cRIO-9039 folder, but it does exist in the FPGA folder.  See the 3rd image below.

2 - errors.png

 

3 - I2C blocks.png

 

 

 

0 Kudos
Message 1 of 6
(3,308 Views)
Solution
Accepted by topic author Amy4082001

Hi Amy4082001,

 

Your VI that you are referencing is a FPGA VI, which needs to run on your FPGA target. If you have modules that will be in Scan Interface (running on your RT OS), then you can use Hybrid Mode: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019PCsSAM.

 

For your application, you can open a reference to the FPGA VI/bitfile in your RT code (Open FPGA VI Reference), and then transfer your data to/from the FPGA. Some of these options are outlined in section 4 of this document: http://www.ni.com/white-paper/53345/en/#toc6. Typically, Read/Write controls are used for tag data, while DMA FIFOs are used for streaming. There are several examples available online and in LabVIEW for communicating between the FPGA and RT.

 

 

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 2 of 6
(3,268 Views)

And to add, if you look up the specs for your NI-9402 modules, you will find that they only work under FPGA, you can't use them under the RIO.

0 Kudos
Message 3 of 6
(3,258 Views)

I can't use I/O Variables to transfer the data from FPGA to cRIO?   I'm following up on this note right now http://zone.ni.com/reference/en-XX/help/371599N-01/lvfpgaconcepts/fpga_data_transfer_scan_engine/

 

 

0 Kudos
Message 4 of 6
(3,255 Views)

What documentation states that the NI-9402 cannot be used in Scan Interface mode? I would like to get that fixed, since this is possible: http://zone.ni.com/reference/en-XX/help/372603F-01/riohelprt/crio-9402_rt/. This is also a helpful document to understand what versions of software is required for certain hardware, and which programming modes are supported: http://www.ni.com/product-documentation/10622/en/.

Brian.D
NI Product Owner
VeriStand
0 Kudos
Message 5 of 6
(3,251 Views)

Brian,

 

Ok, it works. I am now able to read data from my FPGA VI in my cRIO vi.  Thanks for your help, and this example was super helpful was well (User-Defined IO Variable - Basic.lvproj in the labview\examples\CompactRIO\NI Scan Engine\Getting Started\User-Defined IO Variable - Basic\ directory)

0 Kudos
Message 6 of 6
(3,240 Views)