LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI & I2C Driver API

Hello, 

 

I try to use a I2C example from API SPI & I2C Driver API bu I receive a error (code 1003) at compilation. I have a broken Vi: niFPGAFifoResurceEmitCode.vi. 

 

Unfortunately this Vi have a paswword and I can not see what is the problem. 

 

When I downloaded this API I have disabled Mas Compile but still have problems.

 

I have Labview 2014 on my PC and I have a SBrio 9606 and a Mezanin card SBRIo 9683. 

 

Can somebody to help maybe with this Vi that is broken on my PC?

 

Thnk you.I2C error.jpg

0 Kudos
Message 1 of 17
(7,067 Views)
This error code typically means that the subVI is broken and needs to be opened in the development environment. On a practical level what it REALLY means is that something (likely a driver or some other external resource) is missing.

Are you sure you have installed everything the FPGA needs?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 17
(7,028 Views)

Hi,

 

I have a PXIe-7976R FlexRIO FPGA Module for PXI Express with the NI 6581 Digital Adapter Module and I want to try using one of the SPI examples that come with the SPI & I2C Driver API. When I try to load "SPI Slave FPGA Only" project I get the attached warning message for the sbRIO target.

 

Do all of the examples in the API only work for for the sbRIO?  

 

Thanks

 

0 Kudos
Message 3 of 17
(6,823 Views)

If you install the compactRIO driver you should see it in your project but you should still be able to open the VI ( the I/O nodes will be broken though).

 

The base example is for the sbRIO but it is pretty easy to make modifications to get it working on any FPGA target.

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 17
(6,815 Views)

Hi Matt,

 

I installed the CompactRIO drivers  but I still see the same warning and no vi's after restarting my pc. Are you refering to the vi's inside the project folder in windows (One SPI Port with Multiple Commands.vi, One SPI Port with One Command.vi, and Two SPI ports with one command.vi)? How would I modify these to work on my PXIe-7976R FlexRIO + NI 6581 target?

 

Thanks,

Scott 

0 Kudos
Message 5 of 17
(6,789 Views)

Hi Scott,

 

You need the LabVIEW RT Module as well to see the sbrio in that project. I took a look around for other examples and I think you would be better off starting with the NI SPI IP example in VIPM. It has a project example for an R Series card which is much closer in implementation as to what you would do for your FlexRIO. Really the only thing you will need to change for the R Series SPI example is IO Nodes to match the CLIP of your 6581, and any other sort of IO configuration associated with the CLIP. Put any initialization you need to do outside the loops.

 

Hope that helps!

Eric H.

Applications Engineer

National Instruments

Message 6 of 17
(6,761 Views)

Hi Eric,

 

I downloaded the NI SPI FPGA Simulation project example from NI SPI IP and I moved it to my FPGA target. I modified R Series - NI SPI FPGA Simulation - FPGA.vi to use DDCA_DIO0 - DDCA_DIO7 of my I/O adapter module (using DDCA_DIOx_WRITE for outputs and DDCA_DIOx_READ for inputs as indicated by the IO Mapping table).   before.pngafter.png

 

The front pannel comments say not to run this VI but to open the Host.vi and follow the instuctions in it, but I am not sure I understand how to complete the block diagram:

host.png 

What do I need to do to implement this loopback example in simulattion and in actual hardware? Eventually, I plan to swap either the host of device with an acutal microcontroller but for now I would like to get this example up and running first. Am I missing something? I am new to LabVIEW FPGA so please forgive my ignorance.


Thanks,

Scott

0 Kudos
Message 7 of 17
(6,706 Views)

Hi Scott,

 

That is wierd that it defaults to broken like that. I saw the same with my example. I downloaded the R Series Multifunction 16.0 driver so that I could not have warnings, then wired up the execution node as so - Block Diagram.PNG

I chose the connections based on the names of the controls and indicators, then looked at the R Series - NI SPI FPGA Simulation - FPGA.vi for notes on how to connect the feedback nodes for simulating a SPI connection. I'm not sure this is correct, but the simulated data looked alright on my front panel. 

To do this, right-click on the Desktop Execution Node and select "Configure Desktop Execution Node" Include all available resources, then order them in a logical way. I ordered them in a way that it appeared the broken wires would make the appropriate connections. Hope that helps.

 

Eric H.
Senior Field Applications Engineer
NI
0 Kudos
Message 8 of 17
(6,690 Views)

Hi Eric,

 

I downloaded NI R Series Multifunction RIO 15.0 driver but it did not fix the issue I am having. When I right click the Desktop Exeuction node and try to select the R Series - NI SPI FPGA Simulation - FPGA.vi I get the following error:

ConfigureFPGADesktopExecutionNodeError.png

I'm pretty much stuck here and I'm not sure how to resolve this error. I also couldn't find the R Series Multifunction 16.0 driver download. Do you have a link to this driver and do you think this could be causing the error with the Desktop Exectution Node?

 

Appreciate your help,

Scott

0 Kudos
Message 9 of 17
(6,675 Views)
0 Kudos
Message 10 of 17
(6,670 Views)