OPC historical data access > OPCHDAClient.exe sample input scripts

OpcHdaAttr.xml script

The OpcHdaAttr.xml sample script provides an example of how to obtain attribute data from the DeltaV OPC History Server. In the following example,  the goal is to read current data type and exception deviation of "FIC-101/PID1/SP.CV". The attribute data is to be read from a remote server machine called PROPLUS, with output to XML files named FIC-101_CurrentType.XML and FIC-101_ExecDev.XML. T

The script file (OpcHdaAttr.xml) contains the following:

<DeltaVOpcHdaClient>
  <Configuration>
    <OutputFileName>FIC-101</OutputFileName>
    <HostName>PROPLUS</HostName>
  </Configuration>
  <Execution>
    <Steps>
      <Step>
        <Interface>IOPCHDA_SyncRead</Interface>
        <Method>ReadAttribute</Method>
        <ItemID>FIC-101/PID1/SP.CV</ItemID>
        <StartTime>NOW</StartTime>
        <EndTime></EndTime>
        <AttributeID>0x01</AttributeID>
        <FileSuffix>_CurrentType</FileSuffix>
      </Step>
      <Step>
        <Interface>IOPCHDA_SyncRead</Interface>
        <Method>ReadAttribute</Method>
        <ItemID>FIC-101/PID1/SP.CV</ItemID>
        <StartTime>NOW</StartTime>
        <EndTime></EndTime>
        <AttributeID>OPCHDA_EXCEPTION_DEV</AttributeID>
        <FileSuffix>_ExecDev</FileSuffix>
      </Step>
    </Steps>
  </Execution>
</DeltaVOpcHdaClient>