03-22-2019 02:14 PM - edited 03-22-2019 02:40 PM
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
03-25-2019 06:10 PM
Are you planning to use LabVIEW for this development?
03-25-2019 09:40 PM
Well, yes, preferably. ![]()
03-26-2019 07:44 AM
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
03-26-2019 08:01 AM - edited 03-26-2019 08:02 AM
@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:
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
05-17-2019 01:45 PM
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.