OPC DataHub™

Version 6.4

November 04, 2010

A memory resident real-time database that acts as a hub, providing fast and efficient concentration and distribution of data for OPC and other Windows applications.

Go to the OPC DataHub Web Site.

Copyright, trademark, and software license information.

Table of Contents


1. Getting Started
1.1. Overview and Installation
1.1.1. What is OPC?
1.1.2. Install
1.1.3. Run
1.1.4. Pop-up Help
1.1.5. Exit
1.1.6. Uninstall
1.2. Test with simulated data
1.3. Connect to an OPC server
1.4. Connect from an OPC client
1.5. Test the Web Server
1.6. View Your Data on the Web
1.7. Test with Excel
1.8. Connect to remote data

2. OPC Tunnelling
2.1. Introduction
2.2. Configuring the DataHub for the server
2.3. Configuring the OPC DataHub for the client
2.4. Testing the connection
2.5. Tunnelling part of the data set
2.6. Extended applications
2.6.1. Tunnelling and Bridging
2.6.2. Tunnelling and Aggregation

3. OPC Aggregation
3.1. Introduction
3.2. Configuring the DataHub
3.3. Extended applications
3.3.1. Aggregation and Bridging
3.3.2. Aggregation and Tunnelling

4. OPC Bridging
4.1. Introduction
4.2. Configuring Bridges
4.2.1. Point-to-point configuration
4.2.2. Making transformations
4.3. Creating New Points
4.4. Bridging Scenarios
4.4.1. Bridging Local Servers
4.4.2. Bridging Remote Servers
4.4.3. Creating Data Sets
4.4.4. Bridging to Excel

5. OPC to Email and SMS
5.1. Introduction
5.1.1. How it works
5.1.2. A note about SMS text messages
5.2. Configuring the Mail Server
5.3. Sending a Test Message
5.4. Defining the Email Message
5.5. Assigning a Trigger
5.6. Setting Trigger Conditions
5.7. Configured Actions
5.8. HTML Message Examples
5.8.1. An HTML Message with Embedded Data Points
5.8.2. An HTML Message with a Table Created in Code
5.9. How to Send SSL-encrypted Email

6. Data Logging
6.1. Introduction
6.1.1. Database Terminology and Concepts
6.1.2. Connecting to a Database: ODBC
6.1.3. Accessing Data: SQL
6.2. Quick Start
6.3. Setting up the DSN (Data Source Name)
6.4. Configuring a Database Table
6.5. Key Columns
6.6. Assigning a Trigger
6.7. Setting Trigger Conditions
6.8. Configured Actions

7. System Monitor
7.1. Introduction
7.2. Configuring the System Monitor

8. OPC to Web
8.1. Introduction
8.2. Configuring the Web Server
8.3. Viewing the Web Demos
8.4. Viewing Your Own Data
8.4.1. DataHub Browser
8.4.2. DataHub Table View
8.5. Modifying the ASP and AJAX Demo Files
8.6. Using ASP to Query a Database and Display Results
8.7. Creating Passwords
8.8. Generating XML output from the OPC DataHub
8.8.1. Streaming XML How-To
8.8.2. Polling XML How-To

9. OPC to Excel
9.1. Getting Data into Excel
9.1.1. Method 1 - Drag and Drop using DDEAdvise
9.1.2. Method 2 - Excel Macros using DDERequest
9.2. Getting Data out of Excel
9.2.1. Method 1 - Configuring DDEAdvise loops in the OPC DataHub
9.2.2. Method 2 - Writing Excel macros that use the DDEPoke command
9.3. Example
9.4. Working with Ranges
9.4.1. Getting a Range out of Excel
9.4.2. Getting a Range into Excel
9.4.3. Sample Excel Macros for Arrays

10. OPC to MES/ERP

11. OPC to Linux
11.1. Configuring the OPC DataHub in Windows
11.2. Configuring the Cascade DataHub on Linux

12. OPC to QNX
12.1. Configuring the OPC DataHub in Windows
12.2. Configuring the Cascade DataHub on QNX

13. OPC to InTouch
13.1. Getting data into InTouch
13.2. Getting data out of InTouch
13.3. Reading and writing data in both directions
13.4. Error message displayed when starting InTouch WindowViewer

14. OPC to MATLAB

15. DataHub Scripting
15.1. Tools
15.2. DataHub ODBC (Open Database Connectivity) Scripting
15.3. DataHub Windows Scripting
15.4. DataHub MATLAB Support

16. Security
16.1. SSL and Firewalls
16.2. User Authentication
16.3. Authorization and User Permissions
16.4. How To Configure a Common Scenario
16.5. Passwords

17. Working With Data
17.1. Data Points
17.1.1. Creating New Points
17.1.2. Deleting Points
17.1.3. Viewing Data Points
17.1.4. Point Size Limits
17.2. Data Communication Concepts
17.2.1. Send and Receive Data
17.2.2. Client - Server
17.2.3. Synchronous and Asynchronous Communication
17.3. Data Exchange Protocols
17.3.1. OPC Protocol
17.3.2. OPC Items and Properties
17.3.3. DDE Protocol
17.3.4. TCP and Tunnelling
17.3.5. The DataHub API
17.4. Data Organization
17.4.1. Data Domains
17.4.2. Assemblies, Subassemblies, Attributes, and Properties
17.4.3. Attributes and Types
17.4.4. Example 1: Attributes and Types
17.4.5. Example 2: Private Attributes

18. Optimizing Data Throughput
18.1. Binary Mode Tunnel/Mirror (TCP) Connections
18.2. Tunnel/Mirror (TCP) Connections for Slow Networks
18.3. Old Value Queuing
18.4. Un-Buffered Delivery
18.5. Screen Output
18.6. CPU Saturation
18.7. How to Optimize
18.7.1. Tunnel/Mirror (TCP) connections
18.7.2. DataHub C++ API
18.7.3. Gamma scripts

19. Properties Window
19.1. General
19.2. OPC
19.3. Tunnel/Mirror
19.4. Bridging
19.5. DDE
19.6. Email
19.7. Data Logging
19.8. System Monitor
19.9. Web Server
19.10. Scripting
19.11. Security
19.12. Licenses
19.12.1. Working with Licenses
19.12.2. License Information

20. Other Windows and Programs
20.1. Data Browser
20.2. Connection Viewer
20.3. Event Log
20.4. Script Editor
20.5. Script Log
20.6. DataSim - a data simulation program
20.7. DataPid - a PID loop data simulation program

21. Using DataHub Commands
21.1. Command Syntax
21.2. Return Syntax
21.3. Sending Commands by TCP

22. Troubleshooting

A. Command Line Options
B. Configuration Files
C. Running the DataHub as a Windows Service
C.1. Windows XP, 2003, NT and 2000
C.2. Windows Vista, 7 and 2008
D. Performing a Silent (Unattended) Install of the DataHub
E. Excel Macro Library
E.1. Configure Excel to receive data from the OPC DataHub (using DDEAdvise)
E.2. Write data from Excel - User initiated (using DDEPoke)
E.3. Write data from Excel - Automatically on value change (using DDEPoke)
E.4. Other Useful Macros
F. Windows Services File
G. DDE Overview
H. Error Messages
H.1. Windows Error Numbers
H.2. Windows TCP Error Numbers
H.3. Windows DDE Error Numbers
I. Third-Party Source Licenses
J. GNU General Public License
K. GNU Lesser General Public License

I. OPC DataHub Command Set
acksuccess - tells the DataHub to return success messages.
add - adds a value to a point.
alias - creates an alias point for an existing point.
alive - tells the Cascade DataHub that the client is running.
append - appends a string to the value of a point.
assembly - creates an assembly.
asyncsocket - sets up asynchronous communication on a socket.
attribute - creates an attribute.
auth - requests authentication for a client.
authgroup - creates a new authentication group.
authuser - creates a new user.
auto_create_domains - automatically adds domains requested by clients.
auto_timestamp - adds timestamps to unstamped changes.
bridge - creates a bridge between two points.
bridge_remove - deletes a bridge.
bridge_remove_pattern - deletes all bridges that match a pattern.
bridge_transform - modifies an existing bridge.
cforce - creates a point and forces a value to be written to it.
cread - creates and reads a point.
create - creates a new point.
create_domain - creates a new domain.
creport - creates a point and requests notification of changes.
cset - creates a point and assigns it a value.
cwrite - creates a point and writes information to it.
DDEAdvise - sets up the item for a DDEAdvise connection.
DDEConnect - makes a connection to a DDE service and topic.
DDEDisconnect - disconnects and discards a DDE connection.
DDEInit - initializes the DataHub to act as a DDE server.
DDEService - assigns a DDE service name.
DDEUnadvise - removes an item from a DDE connection.
DDEUnadvisePattern - removes multiple items from a DDE connection.
DDEUnadvisePoint - removes an item from a DDE connection, by its point name.
debug - sets the debug level.
defaultprop - sets a default type for a property.
delete - deletes a point—use with caution.
deleted - checks if a point has been deleted.
div - does division on the value of a point.
domain - identifies the client domain name.
domains - lists all domains in the DataHub.
dump - writes the entire content of the DataHub to a file.
enable_bridging - enables or disables bridging capabilities
enable_dde_client - enables or disables DDE client capabilities.
enable_dde_server - enables or disables DDE server capabilities.
enable_mirror_master - enables or disables mirror master capabilities.
enable_mirror_slave - enables or disables mirror slave capabilities.
enable_opc_client - enables or disables OPC client capabilities.
enable_opc_server - enables or disables OPC server capabilities.
enable_scripting - enables or disables scripting capabilities
enable_tcp_server - enables or disables TCP server capabilities.
error - sends an error with an error string.
execute_plugin - executes a plugin. (experimental)
exit - shuts down the DataHub.
flush - flushes output to a terminal (Linux).
flush_log - forces an immediate update of the Script Log (Windows).
force - forces a write to a point.
format - is an efficiency enhancement for Linux.
heartbeat - establishes a heartbeat message.
ignore - ignores a given point.
ignore_old_data - ignores changes with an old timestamp.
include - includes a file in with configuration files.
instance - creates an instance of a data organization model.
load_config_files - loads configuration files.
load_plugin - loads a specified plugin. (experimental)
load_scripts - loads scripts.
lock - locks and unlocks points.
log_file - sets up a log file.
log_to_file - starts or stops logging to a file.
mirror_master - sets up a tunnelling (mirroring) master.
mirror_master_2 - sets up a secure tunnelling (mirroring) master.
mult - multiplies the value of a point.
OPCActivate - activates or deactivates an OPC group.
OPCAddItem - adds OPC items to a connection.
OPCApply - applies changes to an outgoing connection.
OPCAttach2 - sets up an OPC connection.
OPCConnect - connects or disconnects from the OPC server.
OPCDetach - removes an outgoing OPC connection.
OPCEnable - enables or disables outgoing OPC connections.
OPCEnableClient - enables or disables all OPC clients.
OPCEnableServer - enables or disables DataHub OPC server behavior.
OPCMinimumSecurity - overrides DCOM security settings.
OPCModify - modifies an existing OPC connection.
OPCRefresh - sends a Refresh2 command to the OPC server.
OPCReload - reloads the data set from an OPC server.
OPCRemoveItem - removes an item based on its OPC DataHub point name.
private_attribute - creates a private attribute.
property - creates a property for an assembly.
quality - assigns a quality to a point.
read - reads a complete point definition.
report - requests notification of changes to a data point.
report_domain - registers points and requests information on a whole domain.
report_errors - controls the reporting of errors.
request_initial_data - gets current data when client connection is made.
save_config - forces the DataHub to save its configuration.
secure - adjusts the security level of a point.
set - sets the value of a point.
set_canonical - sets the type of a point.
show_data - displays the Data Browser.
show_debug_messages - show or hide debugging messages in the Data Browser.
show_event_log - displays the Event Log.
show_icon - displays the system tray icon.
show_properties - displays the Properties window.
show_script_log - displays the Script Log.
subassembly - creates a subassembly.
success - sets up a success message.
tcp_service - sets a TCP service name or port number for incoming slave connections.
timeout - suspends data flow.
transmit_insignificant - permits transmission of insignificant changes.
type - creates a type.
unload_plugin - unloads a plugin. (experimental)
unreport - allows a client to stop receiving data value changes to a point.
version - returns the current version number.
write - writes information to a point.

II. Obsolete and Unused Commands
bandwidth_reduce - is for internal use only.
drop_license - is for internal use only.
echo - is for internal use.
enable_connect_server - is deprecated.
EnableDDEServer - is for internal use only.
exception_buffer - is deprecated.
failed_license - is for internal use only.
master_host - is deprecated in favor of mirror_master.
master_service - is deprecated in favor of mirror_master.
on_change - is for internal use only.
OPCAttach - is deprecated in favor of OPCAttach2.
OPCInit - is deprecated.
point - is used internally.
qnx_name_attach - does nothing.
qnx_receiver - does nothing.
readid - should not be used.
register_datahub - replaced by report_domain.
report_all - replaced by report_domain.
report_datahubs - does nothing.
request - replaced by report_domain.
run - does nothing.
script_register - is for internal use only.
script_symbol - is for internal use only.
slave - is for internal use only.
sync - is for internal use only.
taskdied - is for internal use.
taskstarted - is for internal use.
using_license - is for internal use only.
warn_of_license_expiry - is deprecated.
Index