OPC XML DA

In addition to the OPC DA Server, the Function TF6120 also contains an OPC XML-DA Server, which will be automatically installed by Setup. Depending on the used Windows Operating System, you may need to perform additional settings to setup XML-DA in the IIS webserver. Please consult the chapter "Installation" to see how to do that.

OPC XML-DA provides a remote OPC communication via Web Service, therfore you do not need to configure any DCOM settings. By default, the OPC XML-DA Server is being pre-configured and you only need to specify the TPY-File of the corresponding PLC project.

The configuration file is located in the directory "...\wwwroot\TcOpcXmlDa\TcOpcXmlSvrCfg.xml" and contains a list of all ADS devices which should be made accessible via the OPC XML-DA interface. By default, this file already contains an ADS device for the first PLC runtime of the local system and its corresponding TPY-File C:\TwinCAT\Boot\CurrentPlc_1.tpy.

<?xml version="1.0"
encoding="utf-8" standalone="no"?>
<TcOpcXmlSvrConfiguration>

<Namespace>
    
<Devices>    
    <Device>
            
     <Name>PLC1</Name>
            
     <AdsNetId>0.0.0.0.0.0</AdsNetId>
            
     <AdsPort>801</AdsPort>
            
     <AdsTimeout>2000</AdsTimeout>
    
    
    
<AdsTimeSuspend>20000</AdsTimeSuspend>
            
     <AutoCfg>7</AutoCfg>
            
    
<AutoCfgSymFile>C:\TwinCAT\Boot\CurrentPlc_1.tpy</AutoCfgSymFile>

            

     <Disabled>0</Disabled>
        
    </Device>
</Devices>

</Namespace>
</TcOpcXmlSvrConfiguration>

The TPY-File will be automatically generated during the PLC compilation process and is located in the same directory as the PLC-project. You need to reference the correct TPY file in the configuration so that the symbol information can be properly read from the ADS device. The OPC XML-DA Server automatically reads this file during startup.

You can always adapt the above configuration file to your needs, for example if you want to make additional ADS devices accessible via OPC XML-DA. You only need to create a new area <Device>...</Device> and fill it with the corresponding settings of your ADS device.