1 Project - Multiple Connected Devices

How can I use one project on multiple tools with different PLC's?

What's a "tool"? A PLC controlled machine?

Make multiple PLC connections in your gateway, and folders of appropriate tags for each PLC, and then parameterize your views to take a root tagpath (folder). Use indirect binding everywhere to refer to the proper PLC's tags at any point.

Add a navigation view (dock, perhaps) that opens the views with the desired root folder for each PLC.

2 Likes

Before I get started I want to make sure I understand. Below is what I am thinking.

  1. Create a folder for PLC
  2. Export existing tags
  3. Change tag paths to include device connection of PLC
  4. Import tags into folder
  5. Create session variable that identifies Folder/PLC
  6. Go through project and change all paths to include indirect reference using session variable

If all the PLCs are identical, make a UDT with a parameter for the device name. Within the UDT, use that parameter within all of the OPC Item Paths.

Then make a UDT instance per PLC, setting the instance parameter for the correct device name.

For the UI, treat the UDT instance as a tag folder and use indirection for everything within them.

That would be 5 & 6.

The problem with the UDT route is I already have many UDT's and I can't add UDT's to a UDT. And some of my UDT's have parameters that I configure with a script. I think it will all become very messy.

Why not?

image

You're trying to add a UDT definition to a UDT definition, that is not possible. Instead, you create a UDT definition for the nested UDT, and then in the Parent UDT you define a member and create it as an Instance of the nested UDT.

See here for more detail

5 Likes

Thank you guys very much for the help. Saved me a lot of time. One more question, how would you identify the tool? Is there a way to read a registry key?

No, but how could reading a registry key on a PC possibly help you identify a connected PLC? Normally, PLCs are at different IP addresses and your gateway has a named device connection for each. What more do you need?

Because the PC name is not always the name we use for the tool we store name in the registry. So a lookup table with Client (Name or IP Address) and PLC Name?

How are client name and PLC related? Physically? You want only a specific client machine to operate a specific tool? If so, Perspective is a disaster, unless you have very tight control of IP addresses for clients, and there's no NAT between clients and gateway.

If you are using the client as an "on machine" HMI, you almost certainly should be using Vision, not Perspective, and you should maintain a database or other list that correlates client MAC ids with the tag folder or UDT instance appropriate to that tool.

Perhaps you should share more of your application deployment details.

Yes, there is a client on each tool and using Vision is not an option at this point. Not my decision.

Your only option will be to key on the client IP address, and hope your IT department keeps those consistent.

My condolences on being stuck with the wrong tool for the job.

2 Likes