06-11-2018 09:01 PM
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).
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:
Solved! Go to Solution.
06-12-2018 12:25 PM
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.
06-12-2018 02:34 PM
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.
06-12-2018 02:38 PM
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/
06-12-2018 02:56 PM
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/.
06-12-2018 04:49 PM
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)