One project, multiple Configurations & PLC's


Recommended Posts

We are currently building a large brewery, this will consist of 3 separate HMI Masters.

BrewHouse 4000 Tags OPC PLC1

Cellar 3000 Tags OPC PLC2

CIP 1000 Tags OPC PLC3.

 

Plus a Common Client for out on the brewhouse floor.

The project is currently built as single project and we 'Import' the channel table before deploying on the relevant HMI Master/Server

 

We currently utilize start-up flags to indicate Master or Client and also in the case of the master its location.

Now the interesting part.

 

The remote client configuration does not need any local channel tables as it will create new connections to the BrewHouse,Cellar & CIP on the startup flag.

Ideally i would have 3 LOCAL Channel tables, with the OPC Symbols configured, LOCAL-Brewhouse, LOCAL-Cellar, LOCAL-CIP.

Then depending on the startup flags.

Client,  Disable all LOCAL Channels

Master-Brewhouse,  Disable LOCAL-Cellar and Disable LOCAL-CIP

Master-Cellar,  Disable LOCAL-BrewHouse and Disable LOCAL-CIP

Master-CIP,  Disable LOCAL-Cellar and Disable LOCAL-BrewHouse.

 

All my Channels are prefixed BH,CIP,Cellar so I am tempted to import all 3 tables into the single project and use script to disable the specific prefixed channels when needed, just not to sure if they still get passed to the OPC Channel driver.

 

Thinking there could be an easier way ??

 

 

 

Link to comment
Share on other sites

The OPC driver won't do anything with a channel until you read or write that channel.  So you can easily have script look at a startup flag and then only read the desired OPC channels.  Since most OPC is async, you only have to read the channel once to get it into the async table, but you can do this after doing other processing.  

Link to comment
Share on other sites

Just realized , I have another problem. 

Is it possible from script to import a channel table. 

 

The project has ALL tags in the local database. 

The Cellar Master will have a connection to the BrewHouse. 

So the Same tag will be both local and remote. 

 

 

Link to comment
Share on other sites

Sure.  Use channel.clearAll() to remove all channels, then channel.Add() to add new ones.  Channel.add() doesn't let you specify every parameter, but once you've created the channel with it, you can then address the channel by name to change other parameters.  Combine that with reading the file using file.open, etc. 

Link to comment
Share on other sites

Found another problem and decided to switch to a single Master. 

I tried to remove the remote tags and that worked fine.

But the graphic symbols didn’t detect that the tag was remote as it needs to be prefixed with the remote name. 

 

It was a nice idea.

Probably just finding the limits.

3 PLC’s and 16,000 tags is probably up there.

 

Will need to monitor the server load.  

 

 

Link to comment
Share on other sites

You can use the default connection to get around that problem.  The default connection defaults to "Local" so that you can just type:

myChannel[0]

and it will take from myChannel from the Local connection (which always exists).  However, if you have a remote connection with a bunch of channels with the same name as the screens you had created for Local, you can do:

system.Connection.Default("Remote")

to change the default connection to a connection named "Remote".  Of course you can name your connection whatever you want, and in fact, you can have multiple connections, and switch between them.  If they have the same channel names, the screens will just redraw with the different data.

 

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.