Support Forums
Same VTScada App, seperate installs with different PLC network IP.

I am currently involved in deployment a distributed system, with a highly restrictive radio link which I am not allowed to send VTScada data across.

Modbus communications are in place for this project.

So I have:

CentralVT and CentralPLC at the central office. CentralVT talks only to CentralPLC, which servers as a data concentrator for all remote sites.

Site1VT and Site1PLC. Site1VT is a seperate VTScada installation running on a computer at Site 1, that only talks to Site1PLC.

Note that because CentralPLC and Site1PLC talk to each other over radio, they have different IP addresses, which is my issue.

Then repeat for multiple sites.

Now the operators want to see the same graphics, so I have designated the CentralVT as my master VTScada install that will have all changes made, then the VTScada install at each site will be deployed from CentralVT.

And because of the data concentrator, the data is at the same address no matter what PLC is being talked to. So TankLevel1 is at modbus address 40001, no matter what PLC I am talking to.

But the IP address of the PLC is different at each site.

Is there a way to automatically change the Port tag, or change the IP address in the port tag, based on which computer VTScada is running on?

I can make this work with manually updating the PLC details everytime I deploy, but I would really prefer something automatic to make updating remote sites easier.

I am currently involved in deployment a distributed system, with a highly restrictive radio link which I am not allowed to send VTScada data across. Modbus communications are in place for this project. So I have: CentralVT and CentralPLC at the central office. CentralVT talks only to CentralPLC, which servers as a data concentrator for all remote sites. Site1VT and Site1PLC. Site1VT is a seperate VTScada installation running on a computer at Site 1, that only talks to Site1PLC. Note that because CentralPLC and Site1PLC talk to each other over radio, they have different IP addresses, which is my issue. Then repeat for multiple sites. Now the operators want to see the same graphics, so I have designated the CentralVT as my master VTScada install that will have all changes made, then the VTScada install at each site will be deployed from CentralVT. And because of the data concentrator, the data is at the same address no matter what PLC is being talked to. So TankLevel1 is at modbus address 40001, no matter what PLC I am talking to. But the IP address of the PLC is different at each site. Is there a way to automatically change the Port tag, or change the IP address in the port tag, based on which computer VTScada is running on? I can make this work with manually updating the PLC details everytime I deploy, but I would really prefer something automatic to make updating remote sites easier.

There are a lot of ways to handle this. You could use an expression in the Address which runs on startup, checks the machine name, and sets the value of the IP address based on the machine name. This is close to your requested solution but might not actually be the easiest things for you to do.

Since you have a central data concentrator, I assume you connect to each station from that application. You can create single tag type to represent the sites. Each site can have the IP address defined as a unique property of the type. It is also important that each site have a unique area.

From there you can use that app at any site and assign a tag area filter for specific workstations to only load the tags associated with one site. This likely makes updates the easiest but be sure to watch the server lists (if you have any) on the app to ensure that the sites are not configured to be clients only.

To get started, right click on the address to create a parameter expression and check the following from the help files:
https://www.vtscada.com/help/Content/Scripting/Expressions/ExpressionIntro.htm

Check this help info on IfElse() to learn about your options here: https://www.vtscada.com/help/Content/Pro_Functions/IfElse.htm

There are a lot of ways to handle this. You could use an expression in the Address which runs on startup, checks the machine name, and sets the value of the IP address based on the machine name. This is close to your requested solution but might not actually be the easiest things for you to do. Since you have a central data concentrator, I assume you connect to each station from that application. You can create single tag type to represent the sites. Each site can have the IP address defined as a unique property of the type. It is also important that each site have a unique area. From there you can use that app at any site and assign a tag area filter for specific workstations to only load the tags associated with one site. This likely makes updates the easiest but be sure to watch the server lists (if you have any) on the app to ensure that the sites are not configured to be clients only. To get started, right click on the address to create a parameter expression and check the following from the help files: https://www.vtscada.com/help/Content/Scripting/Expressions/ExpressionIntro.htm Check this help info on IfElse() to learn about your options here: https://www.vtscada.com/help/Content/Pro_Functions/IfElse.htm

Trihedral Engineering Ltd.

What function gets the workstation name? Would you use GetServer(…)? It seems like that would tell you a server name based on a service you specify.

What function gets the workstation name? Would you use GetServer(…)? It seems like that would tell you a server name based on a service you specify.

@ArghDave I will be going with the Address check on startup. Well, I will be starting there, this issue is my task for this week so we will see how things actually play out.

And yes, the Area filter to only load that sites tag is the plan, again, actual implementation and testing is going to be this week, we will see how smoothly it goes.

Just uncertain about your "Since you have a central data concentrator, I assume you connect to each station from that application" line. The setup I am working with has VTScada talking only to the local PLC at all sites, including Central. It is the PLC at Central (not VTScada) that is the data concentrator.

Thankfully, the modbus addresses are the same in all plcs for the same data, so as long as I can update the IP address being polled for modbus, the same VTScada app will work at all sites without other modifications required.

Along with the Area's filter on startup to ensure only the tags actually in the PLC being talked to works as expected, I have a path forward.

@cardsfan Yes, I will be using the GetServer() or GetWorkstation() (or equivalent) command somehow in the Port tag. Have not actually worked on this yet so do not have specific details.

@ArghDave I will be going with the Address check on startup. Well, I will be starting there, this issue is my task for this week so we will see how things actually play out. And yes, the Area filter to only load that sites tag is the plan, again, actual implementation and testing is going to be this week, we will see how smoothly it goes. Just uncertain about your "Since you have a central data concentrator, I assume you connect to each station from that application" line. The setup I am working with has VTScada talking only to the local PLC at all sites, including Central. It is the PLC at Central (not VTScada) that is the data concentrator. Thankfully, the modbus addresses are the same in all plcs for the same data, so as long as I can update the IP address being polled for modbus, the same VTScada app will work at all sites without other modifications required. Along with the Area's filter on startup to ensure only the tags actually in the PLC being talked to works as expected, I have a path forward. @cardsfan Yes, I will be using the GetServer() or GetWorkstation() (or equivalent) command somehow in the Port tag. Have not actually worked on this yet so do not have specific details.
40
3
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft