Goal
This tutorial builds a network picture with three nodes: a central switch and two PLCs connected to it. At the end, a page shows the switch on top, the two PLCs below it, and every PLC coloured from its live connection state.
It uses the rule behind the Network Topology feature: every configured device is a node by itself. Only equipment that is not a device (the switch) and the connections between nodes (the links) are entered by hand. The tutorial takes about ten minutes and needs no hardware, because the PLCs run in Simulation mode.
Step 1: Create the two PLCs
Open the Configuration menu, expand Devices and open Modbus TCP Devices. Press Add device and create the first PLC with the values below. Repeat for the second one.
| Field | PLC1 | PLC2 |
|---|---|---|
| Enable | checked | checked |
| Name | PLC1 | PLC2 |
| IP Address | 10.10.0.11 | 10.10.0.12 |
| Port | 502 | 502 |
| UnitId | 1 | 1 |
| Simulation | checked | checked |
| Description | Line 1 PLC | Line 2 PLC |
No rows match the filter.
Simulation is switched on so the device does not open a real connection and still reports as online. On a real plant, leave Simulation off and enter the address of the PLC. Nothing else in this tutorial changes.
Step 2: Add the switch as a node
Expand Network Topology in the Configuration menu and open Network Nodes. The two PLCs are not listed here: a device is a node automatically and needs no row. The switch is not a device, so it is added as a row. Press Add and fill in the dialog.
| Field | Value |
|---|---|
| Name | SW_Core |
| Type | Switch |
| Label | Core switch |
| IpAddress | 10.10.0.2 |
| Status Variable | (empty) |
| Group | (empty) |
| Description | Central switch |
No rows match the filter.
Type decides the icon and the legend entry. Status Variable stays empty in this tutorial, so the switch is drawn with the Unknown state. Section Variations below shows how to give it a live state as well.
Step 3: Connect the PLCs to the switch
Open Network Links and press Add. A link names two nodes; the From Node and To Node fields suggest every device name and every Network Nodes name. Create the two links below.
| From Node | To Node | Label |
|---|---|---|
| SW_Core | PLC1 | port 1 |
| SW_Core | PLC2 | port 2 |
No rows match the filter.
A link without a Status Variable follows its two endpoints: it is drawn as up while both nodes are online, and as down as soon as one of them is offline.
Step 4: Place the Network Topology object
Open a page in the designer, drag the Network Topology object from the Standard Objects onto the page and set the following in the decorator.
| Section | Setting | Value |
|---|---|---|
| General | Title | Plant network |
| Layout | Layout | Hierarchical |
| Layout | Orientation | Top To Bottom |
No rows match the filter.
Save the page and switch to runtime. The object draws SW_Core on top and PLC1 and PLC2 below it, both green because their simulated connection is online. The header counts 2 Online and 1 Unknown (the switch). Click a node to see its details in the panel on the right.
Disable PLC2 on the Modbus TCP Devices page to see the picture react: the node changes to the Disabled state and its link is no longer drawn as up. Enable it again and both return to green on the next refresh.
Variations
The same three rows cover most small networks. Common changes:
- Live state for the switch: create SW_Core as an ICMP device instead of a Network Nodes row. It is then a node automatically with a ping status, and only the two links remain to be entered. Add a Network Nodes row with the same name afterwards only to change its Type to Switch, because an ICMP device is drawn as a host by default.
- Refine a PLC: a Network Nodes row with Name equal to the device name changes only the Label, Type, Group, Hidden flag or manual position of that PLC. The node itself, its address and its state keep coming from the device.
- More PLCs: add the device and one link to the switch. A device without any link is not lost: it is drawn under a virtual node for its /24 subnet, or in the Unlinked lane, until it gets a link.
- Renames and deletes: renaming a device renames its node row and links with it. Deleting a device removes its node row and every link connected to it.