beckhoff TE1000 TwinCAT 3 — 6.6.3 Creating and handling network variables

Samples | I/O ITcSmTreeItem ioDevicesItem = systemManager.LookupTreeItem("TIID"); try { ioDevicesItem.ConsumeXml( " true "); } catch (Exception ex) { Console.WriteLine("Warning: {0}", ex.Message); } // Afterwards run the regular scan via ProduceXml(false) (see above) ProduceXml(false) implicitly triggers the scan and returns the results synchronously. The devices are listed in the XML file at TreeItem/DeviceGrpDef/FoundDevices/Device . Each node contains ItemSubType for CreateChild and AddressInfo for device configuration. The ScanBoxes step loads the subordinate terminals of a device.

6.6.3 Creating and handling network variables | Creating and handling network variables This chapter explains in-depth how to create and handle network variables. The following list shows all chapters in this article:

General information about network variables Creating an EtherCAT Automation Protocol device Creating a Publisher box Creating a Subscriber box Setting parameters for a Publisher/Subscriber box Creating Publisher variables Creating Subscriber variables Linking Publisher/Subscriber variables Reading Publisher/Subscriber variable IDs Please note that the Scripting Container contains a detailed sample about how to create and configure network variables with the Automation Interface. General information about network variables Network variables can be used to exchange data between two TwinCAT devices via an IP-based network.

One device declares variables as “Publisher” (sender) and the other device receives variable values as “Subscriber”. For this reason, we also speak of Publisher/Subscriber variables. TwinCAT offers you the flexibility to configure network variables directly within a TwinCAT project so that you can map them to your PLC or I/O. TE1000 249 Version: 1.7.0