LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared variables vs. the world -- communicating with multiple target SVE's from a single host UI

I have developed an automation application that has been deployed to various sites. To date, this application uses a couple shared variables to transport information and commands from one device to another. I created the network topology to use a link-local IP scheme since everything is there together and doesn't communicate to the outside world. That is now changing -- operators need to wirelessly operate the systems, the systems need to update databases, etc.

 

I created a site diagram, attached, showing the current configuration and the intended configuration. What I'm still unsure of is how to implement the communication process using shared variables, between a host and a controller. I would like the laptops to be able to access either "Unit" in the diagram, and it would be nice to allow the TPC's from one Unit to possibly subscribe/monitor data from the other "Unit" on the local network. Ideally, we'd like to build a unified application that can monitor both "Units," which use the same application and shared variable definitions (identical project deployments.) 

 

I understand the SVE uses the .aliases files to give reference to where the engine runs, but what if I want to monitor more than one target, or change my reference target on the fly? 

 

The best approach I have thus far to receive data onto a laptop from multiple target cRIOs is as follows:

1.) UDP broadcast to discover targets and gather IPs

2.) Populate a drop down with these IPs in the GUI and the user selects it

3.) The .aliases file on the host application is modified to reference that IP

4.) (redeploy the SVE?) 

 

The best approach I have thus far to do this "concurrently" is:

1.) Do above

2.) Iterate through n targets and update each target's GUI data in sequence

 

Am I way off on this, or am I severely underestimating the SVE/PSP's capabilities here?

 

Thanks

Site_Diagram.png 

0 Kudos
Message 1 of 6
(2,998 Views)

Are you planning to use LabVIEW for this development?

0 Kudos
Message 2 of 6
(2,937 Views)

Well, yes, preferably. Smiley Happy

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

Have you considered using Datasockets to access the SV's?

 

You can adjust the URL at run time to point where ever you need to point.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 6
(2,927 Views)

@Ben wrote:

Have you considered using Datasockets to access the SV's?

 

You can adjust the URL at run time to point where ever you need to point.

 

Ben


or very similar, there is a whole palette for programmatic and dynamic access to shared variables:

grafik.png

The shared variable refnums can be replaced by strings (very similar to VISA refnums), which gives you a great flexibity during run time since you can create a reference to a shared variable by using string functions.

 

Regards, Jens

Kudos are welcome...
Message 5 of 6
(2,923 Views)

Thank you for the tips and sorry for the delay. 

 

I have since implemented an IP settings page that programmatically calculates the IP of the equipment that is entered by an operator (it is systematic) and writes to the .aliases file within the application install directory to re-point to a different cRIO-9068 controller. A couple issues there:

- It works, but I have to close and re-open the application. Any idea if this is actually needed, or is there something simpler I can do programmatically after changing the IP?

- I also have to deal with file properties within Windows in the application install directory and ensuring those files are not read-only pending the user's account priveleges, which pitches a good case to the DataSocket / programmatic SV access that Ben and JensG69 point out. I will try this next. 

0 Kudos
Message 6 of 6
(2,832 Views)