OPC XML-DA Server

This chapter describes how to configure the OPC XML DA Server on BECKHOFF PC based systems.

Summary :

The OPC-XML DA server is configured with default xml-configuration file. Just activate once a checkbox in PLC-Control to download the symbol information to target device.

With TwinCAT 2.10 Build 1240 (or higher) there is no manual configuration required. Please refer to section "Zero configuration" on this page.

With previous TwinCAT versions please refer to section "Manual or specific configurations" on this page.

Zero configuration (requires TwinCAT 2.10 on host PC)

Details :

<?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>
        <!-- NOTE: CurrentPlc_1.tpy will be downloaded from
PLC-Control -->
        <AutoCfgSymFile>C:\TwinCAT\Boot\CurrentPlc_1.tpy</AutoCfgSymFile>
        <Disabled>0</Disabled>
    </Device>
    </Devices>
</Namespace>
</TcOpcXmlSvrConfiguration>

With TwinCAT Version 2.10 Build 1240 the PLC Control allows to download the symbol file <plc-project-name>.TYP to the target TwinCAT machine. The TPY file contains information about all available PLC-variables in the PLC-project.
OPC-XML DA CE Server requires this TPY-information.

To download the current symbol information in a TPY file navigate in the PLC-Control to "Project-->Options-->TwinCAT" and check the option "Download Symbol description"

With each download of the PLC-code now also the <project-name>.TPY file is downloaded as "C:\TwinCAT\Boot\CurrentPlc_1.tpy" containing information about symbols of first run time system.
(Second runtime system would be "C:\TwinCAT\Boot\CurrentPlc_2.tpy" etc.)

OPC XML-DA Server 1:

Summary:

The OPC-XML DA server is configured with default xml-configuration file. Just activate the checkbox to download the symbol information within PLC-Control environment.

OPC XML-DA Server 2:

OPC-XML DA Server checks configuraton on startup. See notes to reload configuration today (without reboot).

Optional manual or specific configurations ?

If the default configuration is not available you have to configure the opc-xml-da configuration file "...\wwwroot\TcOpcXmlDa\TcOpcXmlSvrCfg.xml" manual.

Sample for OPC XML DA server accessing multiple ADS devices

<?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>
        <!-- NOTE: CurrentPlc_1.tpy will be downloaded from
PLC-Control -->
        <AutoCfgSymFile>C:\TwinCAT\Boot\CurrentPlc_1.tpy</AutoCfgSymFile>

        <Disabled>0</Disabled>
    </Device>
    <Device>
        <Name>PLC2</Name>
        <AdsNetId>0.0.0.0.0.0</AdsNetId>
        <AdsPort>811</AdsPort>
        <AdsTimeout>2000</AdsTimeout>
        <AdsTimeSuspend>20000</AdsTimeSuspend>
        <AutoCfg>7</AutoCfg>
        <!-- NOTE: CurrentPlc_2.tpy will be downloaded from
PLC-Control -->
        <AutoCfgSymFile>C:\TwinCAT\Boot\CurrentPlc_2.tpy</AutoCfgSymFile>
        <Disabled>0</Disabled>
    </Device>
    </Devices>
</Namespace>
</TcOpcXmlSvrConfiguration>
OPC XML-DA Server 3:

OPC-XML DA Server checks configuraton on startup. Reconfiguration might require a new start today.