Driver that can be used to decode various data from any OPC (Ole for Process Control) server.
The driver connects over TCP/IP to an OPC DA 2.05 or DA 3.0 compliant data server program.
A server will always publish a number of OPC items ( the data fields), all of them identified by a unique name and OLE data type.
The driver can decode from this list one or more items as defined in an XML file DrvOpcClient.xml, located in the QINSy folder.
With the use of slot names it is possible to link the data items to the systems in the template.
Data can be decoded as a Pitch/Roll sensor, USBL system, Gyro Compass, Surface Navigation System, Underwater sensor, Dredging sensor or Miscellaneous system.
Driver will only read data, it will not transmit any data.
The data communication is handled in accordance with the OPC standards.
USBL only: If either the USBL X,Y or Z value becomes higher than 99999.9 or smaller than -99999.9 then the observation will no longer be decoded!!
|Driver||OPC Interface||Interface Type||TCP-IP||Driver Class Type||FreeBase|
|UTC Driver||No||Input / Output||Input||Executable||DrvOpcClient.exe|
Currently only support is built in for OLE data types float and unsigned short. An OPC item is only transferred from the server to the driver when it actually changes.
So a figure that represents a slowly changing variable, e.g. a status switch will only be updated when the switch is toggled.
To make sure that a database gets properly populated a so-called "Maximum Age" mechanism was built in the driver that forces an update of a variable if it hasn't changed for a while.
So every observation will update at least once every Maximum age period. This is a setting in the XML Header.
The observation time is the time that the data arrived in the OPC Server and should therefore be considered an accurate timestamp.
OPC data is transmitted over the network, either a local network or the internet.
The server is identified by the IP Number of the host computer and the unique IPC server name (as entered in the XML).
Define a system, either Gyro Compass, Pitch, Roll and Heave Sensor, USBL System, Surface Navigation system, Underwater Sensor, Dredging Sensor or Miscellaneous System. Select Driver "OPC Interface". Select the IP Number of the Host computer on which the server runs. If the server runs on the same PC as QINSy then enter "127.0.0.1". You can leave the port number on zero, this is not used. On the next pages the observations are defined. Most important is that the appropriate slot strings are entered identically (case-sensitive) to the slot strings in the XML. In case multiple systems are used then make sure to select the same IP Number for all systems.
An update rate can be entered to limit the amount of data coming in.
The file "DrvOpcClient.XML" contains the OPC Server name and OPC Items that are to be decoded. The default file can be found in <QINSy install folder>\Drivers\Settings (generally, common documents can be found at c:\Users\Public\Documents). To accommodate the name of the OPC Server name, the maximum age and items you wish to use, please copy the default file to <common documents>\QPS\QINSy\Drivers\Settings (generally, common documents can be found at c:\Users\Public\Documents) and make alterations to the copied file. The file in the <common documents> sub folder will take precedence over the file in the QINSy installation folder.
The syntax of the XML OPC Item block will be explained below.
Name of the OPC Server.
|MagAge||Maximum age of an OPC value. 0 = default, max age not used.|
An example of a few Items as can be found in the XML is found below. The first two items are respectively Pitch and Roll items.
These items have to be linked to a single Pitch/Roll Sensor in Database Setup so the slot name should be identical.
The third, fourth and fifth item are respectively Usbl X, Usbl Y, Usbl Z items. These items will have to be linked to one USBL system so the slot name for these items should be identical.
The last item is a NAV type and can be linked to any other system as a single observation.
<OpcItem> <Description>CranePitch</Description> <SlotName>CRANE_MRU</SlotName> <OpcName>valAnalog5</OpcName> <DataType>PITCH</DataType> </OpcItem> <OpcItem> <Description>CraneRoll</Description> <SlotName>CRANE_MRU</SlotName> <OpcName>valAnalog6</OpcName> <DataType>ROLL</DataType> </OpcItem> <OpcItem> <Description>PontoonUsbl</Description> <SlotName>PONTOON_OFFSET</SlotName> <OpcName>valAnalog7</OpcName> <DataType>USBLX</DataType> </OpcItem> <OpcItem> <Description>PontoonUsbl</Description> <SlotName>PONTOON_OFFSET</SlotName> <OpcName>valAnalog8</OpcName> <DataType>USBLY</DataType> </OpcItem> <OpcItem> <Description>PontoonUsbl</Description> <SlotName>PONTOON_OFFSET</SlotName> <OpcName>valAnalog9</OpcName> <DataType>USBLZ</DataType> </OpcItem> <OpcItem> <Description>Encoder1</Description> <SlotName>ENCODER1</SlotName> <OpcName>valEncoder1</OpcName> <DataType>NAV</DataType> </OpcItem>
Xml Tag Explanation:
Not used, purely for administrative purposes.
Case-sensitive name that is used in Database Setup to link the OPC Item to the system and observation within QINSy. The slot name should not be longer than 10 characters.
Case-sensitive name of the OPC item as defined by the OPC Server.
Type of data, used internally in driver. This can either be "PITCH", "ROLL", "HEAVE", "USBLX", "USBLY", "USBLZ" or "NAV". The latter is used for all systems except a Pitch/Roll/Heave sensor and a USBL system.
The Slot Name is used in DbSetup to link a defined system to the OPC Item. See below for more info on Database Setup.
Drivers IO Notes
No command line options.