Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Two cRIOs with the same code in 1 project

I have a project that contains two cRIOs that run the same exact program.  The only difference is the IP address in the ni-rt.ini file.  I would like to create a project that represents the actual targets but uses the same vis.  In doing this I found the FPGA targets must have a different name and therefore a different bit file.  Also, the DMA FIFO is a different instance in each target.  I'm really trying to get away from supporting two copies of the same exact code.

So, it seems this type of project doesn't fit well into the project explorer and decided to create only 1 target with 2 source distribution's. I can create 2 source distributions but the target destination directory must be different. Had anyone run into this situation and come up with a better way to handle this?  I guess I'm back to manually deploying the files and making sure the correct ni-rt.ini file get placed in the corresponding cRIO.
Message 1 of 6
(5,505 Views)
Dwisti,

I suggest you look into using the Open FPGA Reference node in Bitfile mode (right-click the Open FPGA Reference node). From my experience, that's the best way to share the same FPGA code between multiple targets; you just need to be aware that if you recompile, you may need to point the Open FPGA Ref node to the new bitfile. With this approach you don't really need to have the two FPGA Targets in the project; just keep one as the master and that should be it (in case the FPGA Targets are of the same type)

Hope this helps.

JMota
0 Kudos
Message 2 of 6
(5,494 Views)

I came across the same issue. How do you connect your Host PC and the 2 cRIOs - USB or through network?

0 Kudos
Message 3 of 6
(2,227 Views)

Wow, blast from the past.  NI project files where never designed to support more than 1 target with the same exact code in both.  Its still an issue with the version of Labview RT I'm using.  There aren't any good solutions or workarounds that I know about.  I'm constantly changing the IP address target and never have both connected to the project at the same time.

0 Kudos
Message 4 of 6
(2,216 Views)

Has anyone tried the Replication and Deployment Utility?

    https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019QTLSA2&l=en-US

 

Once you get the code working on cRIO, you should be able to clone the system image to as many other cRIOs as you want.

0 Kudos
Message 5 of 6
(821 Views)

@dwisti wrote:

Wow, blast from the past.  NI project files where never designed to support more than 1 target with the same exact code in both.  Its still an issue with the version of Labview RT I'm using.  There aren't any good solutions or workarounds that I know about.  I'm constantly changing the IP address target and never have both connected to the project at the same time.


I've had projects with multiple cRIO targets each with their own IP address, both same and different models, quite a few times. The one difficulty is that if you have a target connected and running it will lock all VIs and you can't make any changes to them if they are referenced in another target.

 

Other than that I haven't really run into serious difficulties with that. I have currently a project in LabVIEW 2018 (because it uses the old obsolete VxWorks cRIOs) and one in 2020 that use this. I do use FPGA Open with a configured bitfile instead of a direct main VI referenced. This decouples some dependencies but requires you to be a bit diligent about what actual bitfile you reference.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(709 Views)