LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cRIO and desktop application IP address settings

Solved!
Go to solution

Hello all,

I am deploying cRIOs to different physical locations and don't want to have to physically connect the RT application and desktop application project.

I have been setting each cRIO up to my project and changing the IP address in the project and doing builds for each cRIO. 

How does the cRIO and application know how to find each other. How can I make this generic enough that I dont have to build a RT and desktop application pair for every cRIO I have. I hope this makes sense. thanks!

 

0 Kudos
Message 1 of 8
(308 Views)

Hi Regis,

 


@regis.winniewicz wrote:

How can I make this generic enough that I dont have to build a RT and desktop application pair for every cRIO I have.


I used UDP Broadcast messages, sent by the cRIO. In the message I had a 4byte marker to let the receiver know who is talking in the network and used this to filter for the "interesting" messages…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(269 Views)

Hi Regis,

 


@regis.winniewicz wrote:

I [...] don't want to have to physically connect the RT application and desktop application project.

I have been setting each cRIO up to my project and changing the IP address in the project and doing builds for each cRIO.


It is not very clear what you mean by all of that. Are you saying that for each target, you connect your development PC to it, add the cRIO target to your LabVIEW project, add the source code, recreate the build specification, build and then deploy to the target?

Why would you rebuild for each target? The IP you configure in the target item of your project tree has nothing to do with the built RT executable, so your are essentially rebuilding the exact same .rtexe each time.

 

If you are searching for a way to deploy a built RT executable without LabVIEW, then you can follow theses guidelines:

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

 

Another option if all your cRIOs are perfectly identical, use LabVIEW to deploy and set the executable as the startup application for one cRIO, then use the RAD utility to clone and redeploy the full RT image, which includes its whole file structure, driver installations, configurations, etc... to all the other cRIOs.

 

 


@regis.winniewicz wrote:

How does the cRIO and application know how to find each other. How can I make this generic enough that I dont have to build a RT and desktop application pair for every cRIO I have.

 


They don't "find each other" by themselves, it's you who implement the communication between the 2 and it all depends on what protocol your are using, but at some point when you open a connection to your target in your code, you will likely need to give e.g. its IP address, target name, or whatever that identifies it...

 

It is hard to help further without seeing your project, especially the code that makes the communication on both the PC and cRIO sides. If you attach your project/VIs, please save for previous version, maximum 21.0.

 

Regards,

Raphaël.

0 Kudos
Message 3 of 8
(254 Views)

Its a bit hard to describe but here's the project image.

You can see I have EXE builds for all of the cRIOs I have.

As you said, the RT doesn't change.

I am using network shared variables. 

What does the application used to identify what cRIO its communicating with and can I add that to each build spec? 

 

 

regiswinniewicz_0-1735912834686.png

 

 

0 Kudos
Message 4 of 8
(247 Views)

I should say I'm using network shared variables. Found the properties of the shared variable.

would it be enough to just make every cRIO the same device name. They all have different IP address. 

 

regiswinniewicz_1-1735913957938.png

 

 

 

0 Kudos
Message 5 of 8
(241 Views)

@regis.winniewicz wrote:

Its a bit hard to describe but here's the project image.

You can see I have EXE builds for all of the cRIOs I have.

As you said, the RT doesn't change.

I am using network shared variables. 

What does the application used to identify what cRIO its communicating with and can I add that to each build spec? 

 


Am I right to assume that you didn't do the software yourself and it ran at some point and you try to get it running again?
You could use NI Distributed System Manager in order to figure out what is going on in the current setup before changing anything.


Actor Framework
0 Kudos
Message 6 of 8
(229 Views)
Solution
Accepted by topic author regis.winniewicz

OK, so you are using Network Shared Variables.

As you can see, it uses the target name in the Path to identify from which target it accesses the variables.

Making all the cRIOs the same name should do the trick (rename them using NI MAX), provided that this name is unique in the local network of each target.

 

Note: if you want to make the connection more dynamic or just more explicit on the diagram, you can also access the variable programmatically using the Data Communication > Shared Variables palette functions:

 

raphschru_0-1735923108915.png

 

Important node:

Although the NS Variables are easy to use, as far as I understand, it requires you to actually deploy them to your cRIO prior to accessing them in your code:

https://www.ni.com/docs/en-US/bundle/labview/page/making-shared-variables-available-on-a-network.htm...

 

An alternative could be to perform it automatically when starting your PC executable:

 

raphschru_1-1735924305749.png

 

Regards,

Raphaël.

0 Kudos
Message 7 of 8
(213 Views)

ok thats what I was looking for. I assume I will have to rebuild the both the RT and App after the cRIO name change. Thanks for the help on this.

 

0 Kudos
Message 8 of 8
(199 Views)