OPC Connector 

The OPC connector was originally developed to collect and act on OPC values, hence its name. Today however its functionality has been extended to include handling other data sources, such as SQL, CSV files, and data extracted from the Zumbach machine line.

The overall idea with the OPC Connector is to gather data from the data source points, write them to a database table, and then perform actions based on the values. The actions performed can be one of many, as described here, but sending mail, writing an OPC value, and starting an internal activity are a few examples.

Just like many other Balthzar-programs, the OPC connector uses a connection string defined for the company that the OPC connector is processing. As it turns out, this has proven to be impractical in certain cases, and a way to override this standard functionality has been implemented from version 16.1.52 and onwards.


By creating a textfile with an alternative connection string in a text file called balthzar_opc_connector_connection_string.txt placed in the Balthzar subfolder ~\opc_connector\
this alternative connection will be used instead of the default one.

 

Data source points

As mentioned above, the OPC Connector collects data from various sources. The link in the OPC valus refers to a form found in "Client" -> "Administration" -> "System settings" -> "Process values" -> "Process value". In version 16.1.50 these sources were:

* OPC values - fetched from an OPC server, as described
here.

* SQL both via MS T-SQL and ODBC.

* CSV-file.

Setting up CSV-file import is made by creating a file called csv_manager_setting.txt in the subfolder opc_connector. This file should only contain a path to the directory monitored.

Placing files in the patch specified in the file makes them targets for processing by the OPC connector, and by doing so, they are moved to a processing folder, and after processing, moved to a processed folder. Both of these subfolders are placed under the OPC connector-folder.

 

OPC items

As stated earlier, the OPC Connector is used to connect one or several OPC items, which can be both read and write, with Balthzar.

A vital function in the OPC Connector is how values are logged and how they can be controlled. In the help for "Client" -> "Administration" -> "System settings" -> "Process value" -> Processvalues you can read more about this.

To use the OPC Connector you must have a unit (e.g. a PLC) that supports the OPC interface on a net connected to the OPC Connector.

The OPC Connector only receives a value for an OPC Item when this value is changed but not more often than the subscription rate. This means that if the subscription rate is set to 200 ms and we have two different OPC items that update once each 50:th ms and once each 500:th ms respectively the OPC Connector will get value 1 for each 200:th ms and value 2 for each 500:th ms.

When starting the OPC Connector for the first time you can enter the subscription frequency you want to use as well as which company the OPC Connector is running at. This information will be visible in the tab called "Info" in the OPC Connector program.

 

In the lower part of the tab called "Queue", there is a checkbox in the WS queue section. Using this checkbox you can toggle if the OPC Connector should copy the values to balthzar, or not.



  

Troubleshooting/monitoring shortcuts

When the OPC connector is running, several shortcuts that can be used to troubleshoot/monitor issues that may arise with the configuration of OPC values. The ones currently implemented are :

CTRL + A

In the tab called "Info", use the shortcut CTRL + A. A new menu called "OPC Item Chooser" will appear. In that menu select the item you wish to analyze. When that is done a new menu will appear called "OPC Connector Analyzer".

   

CTRL + Q

When pressing the combo of CTRL + Q, a new menu will appear with information regarding queue status.

 

CTRL + M

When pressing the combo of CTRL + M a new menu will appear called "OPC Machine Chooser". Select a machine, and confirm with OK. A new menu called "Machine Analyzer" will appear, which will show information about the selected machine.  

 


CTRL + P

Exports data from queues to a text file, it has no graphical interface.

CTRL + Z

In the tab called "Info", in the OPC Connector program, it is possible to use the shortcut CTRL + Z, This will open up a new menu called "Zumbach". In this new menu information regarding connection attempts will be visible.

CTRL + T

In the tab called "Info", in the OPC Connector program, it is possible to use the shortcut CTRL + T. This will open up a new menu called "CSV Manager".