Welcome, Guest Login


Call 805-383-9711 M-F from 7am to 4pm PT

Or for help after hours call 800-621-7237

Using OPC with SAFER One

Last Updated: Jul 12, 2017 02:57PM PDT
General Info
The SAFER One DAQ OPC implementation is based on the "OPC DA 2.0" standard.  DAQ uses "Synchronous Read" from "Device" to request current data for the configured tags every 5 seconds.  DAQ is able to read tags with these canonical numeric data types: I1, I2, I4, UI1, UI2, UI4, R4, R8. Tags may be read-only or read/write but DAQ has no provision to write data.  DAQ is not sensitive to the "Quality" code returned with the data for a tag.  DAQ requests only current data; there is no provision for historical data access (HDA).  DAQ does not use "OPCEnum".  DAQ does not browse for OPC servers or browse for tags on a given server.  The hostname and CLSID of the target OPC server and the tag names to be read are manually entered in the SAFER One user interface.
Important Notes
** Be careful when editing the DCOM (Component Services) settings!  The current permission Limit which allows Local Access for “Everyone” must be left in place or login will no longer be possible on this machine and it may need to be restored from backup or reinstalled.
** Note that changes made to DCOM settings that apply to currently running applications will not be effective until those applications are restarted.
** Be advised that changes to a user’s group membership are not effective until that user logs off and logs in again.
** Note that Windows default security policy causes non-domain user accounts, which are members of the Administrators group, when connecting remotely, to not be considered members of the Administrators group.  (This policy does not affect domain administered accounts.)  Because of the potential for confusion and the general security risk, it is recommended that the account used by SAFER One to access the OPC server not be a member of the Administrators group on the OPC server host.
System configuration requirements
On the DAQ host machine, after installing the DAQ software, there are no additional configuration steps necessary to use OPC.
At the OPC server host, most required configuration steps may already have been completed by the OPC server installation such that it may only be necessary to grant access to the designated SAFER OPC user account that will be used to connect to the OPC server from the DAQ application.
Verify the following at the OPC server host:
Firewall - Need to allow inbound TCP connections from the DAQ host to port 135 (EPMAP) for the "Remote Procedure Call (RPCSS)" service. Also need to allow inbound TCP connections from the DAQ host to "RPC Dynamic Ports" for the OPC server application.  "RPC Dynamic Ports" is a special designation that indicates only the specific ports currently in use by the RPC application.  If this setting is unavailable, the alternative is to allow All ports for inbound TCP connection from the DAQ host to the OPC server application.
DCOM settings - Run command "dcomcnfg".  A window titled "Component Services" appears.  Ensure that the user account designated for SAFER One OPC access effectively has Permissions and Limits allowed for Access and Activation, and where appropriate, Launch.  The choice of Local vs. Remote for each of these settings depends on whether the DAQ and OPC server are located on the same or different hosts, respectively.  Launch permission is needed if it is appropriate for DAQ to start the OPC server when it is not running.
Note that "Limits" are always configured at the properties for "My Computer" in Component Services.  "Permissions" are configured at the properties for the individual COM application, located within the DCOM Config branch in Component Services.  If the setting there refers to "Use Default", then the Default Permissions at the "My Computer" properties will be used for this COM application.
The "Authentication Level" for an OPC server application is typically set to "Connect" on the General tab of the individual application properties, or if set to "Default", on the Default Properties tab of the My Computer properties.  Note that if the Authentication Level is set to "None", then no authentication of the connecting user is performed.  That user will then be considered "Anonymous" and will not be able to connect and use the OPC server unless the Permissions and Limits described above are configured to allow "Anonymous".  This is usually not a good idea.  Note also that if the Authentication Level is set higher than "Connect", DAQ and other OPC clients may not be able to connect and read data from OPC server.
Configuring SAFER One Met / Sen for OPC
  Type = DCOM
  Host Name or IP Address = the OPC server host
  Read Timeout = 5000 ms (default)
Met station or Sensor interface:
  Type = OPC
  Port = the OPC server port
  CLSID = the CLSID of the OPC server application, including the curly braces {}.  See notes below for how to obtain it.
  Username = the account name that will be used to login to the OPC server host and access the OPC server application.  Include the domain formatted as "user@DOMAIN".  If no domain is included, the account will be assumed to belong to the OPC server host.  The account name and domain for OPC are not case sensitive.
  Password = the corresponding password
Met station Meteo parameters / Sensor detail:
  Channel Tag = the full path OPC "tag" name or alias for the desired data item, as configured in the OPC server.  Note that OPC tag names are case sensitive.  Also, the characters & < > ' " are not allowed in the Channel Tag field.  If a valid OPC tag name includes these characters, then it will be necessary to create an alias name for that tag in the OPC server which omits these characters.
Locating the OPC server CLSID
The OPC server CLSID is a GUID which uniquely identifies the OPC server application.  A GUID is composed of 32 hexadecimal digits separated by hyphens and enclosed in curly braces, as in this example:  {B3AF0BF6-4C0C-4804-A122-6F3B160F4397}
To locate the CLSID, try asking your OPC administrator for it.  If you are the OPC administrator or don't have any easier method to locate the CLSID, you can find it by searching the Windows Registry on the OPC server host.  Within the HKEY_CLASSES_ROOT hive, search for Keys named "OPC", using "Match whole string only".  When you find a match, verify the application name in the parent key.  If it matches the OPC server application that you are looking for, then select the CLSID key for that application and note the data of the "(Default)" value within that key.  This is the CLSID that will need to be entered on the SAFER One Met station or Sensor interface configuration form.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found