AN60 How to integrate PLC SIEMENS LOGO! with NETIO PDU using Modbus/TCP | NETIO products: Smart power sockets controlled over LAN and WiFi
Tags: 
M2M API
3rd party HW-SW

AN60 Application Note describes how to measure and control outputs of NETIO devices from Siemens LOGO! using Modbus/TCP. NETIO PDU can be located outside of an electric switchboard and the PLC controls it over LAN.

 

Do you have any questions?

Siemens LOGO! is a small PLC (programmable logic controller) with a display and several control buttons. LOGO! 8 Basic has 8 digital inputs, 4 outputs, Ethernet port and power terminal blocks.

We did our testing on Siemens LOGO! 24CE.

 

The PLC can be expanded with additional input, output and analog signal modules up to a memory and addressing limit, such as 20 digital outputs. Current LOGO! is version 8.3 and also 8.2.
 

LOGO! 8 Basic modules are available in low voltage versions 24V AC/DC and for 240V AC. All LOGO! modules support Modbus/TCP protocol on LAN port, which makes it a very useful hardware, as setting up and communication with this protocol is one of the simpler tasks and even novice users can handle it with a little help.

 

The LOGO! Soft Comfort software tool is used for programming, currently (Q3/2021) in version 8.3. Different versions of this software are easily installed side by side, so the user can have both previous and current versions of the PLC program available. There is no need to convert anything to higher versions. However, there is a possibility of conversion, so an older PLC program in a newer LOGO! module can be used.

 

Following sources were used for this guide:

 

 

 

 

 

 

 

 

 

 

Connecting PLC Siemens LOGO! & NETIO PDU

1) IP address setting

It is necessary to set IP addresses of both devices - LOGO! and NETIO PDU.
Type of communication is Client (PDU) – Server (PLC).

 

Static IP address in NETIO device is configured via web server.

In LOGO! you can set the IP address through display menu -> Network -> IP address.

 

2) Enabling Modbus/TCP protocol in NETIO PDU

Modbus/TCP protocol is disabled in most NETIO devices by default. It must be enabled in the product's web interface.

Port number for Modbus/TCP must be the same as in LOGO! Soft Control. Default = 502.

 

 

3) Modbus/TCP protocol details for controlling NETIO PDUs

Table with ranges of addresses and registers in NETIO device with function description.
E.g. 0x04 = 0 = frequency

 Download the NETIO Modbus/TCP protocol description

4) Setting of Modbus/TCP communication in PLC

In LOGO! Soft Control menu: Tools -> create Ethernet connection to NETIO (Client).

 

Definition of custom variables in Ethernet connection properties (Modbus/TCP protocol). Port number is the same as in NETIO device. Frequency is on line 1 in LOGO! memory area at VW30. Addressing from NETIO is shifted by offset +1.

Other variables can be added at will. See table with ranges of addresses and registers.

 

5) Using the PLC software

Reading network frequency, electrical consumption and other variables from the device in PLC program LOGO! (see previous Ethernet connection data table for details)

 

Example of controlling (SWITCH ON/OFF) the electrical output (230V sockets) with the C4 key on LOGO! and reading the status of the socket. (see previous Ethernet connection data table for details).

 

Socket control via "Action" function by writing a 16-bit variable (0 = off, 1 = on, 2 = short OFF, 3 = short ON, 4 = toggle, 5 = nothing). On the LOGO! display. We set the variable value (B015) as well as time value (B016).

The Action value allows the output to be switched on for a short time, or the output to be simply switched to the opposite state (equivalent to a control button).

 

 

6) PLC display configuration

Variables on LOGO! display in LOGO!Soft Comfort software.

 

Same variables online on LOGO! display.

 

NETIO PowerBOX 4KE and PLC Siemens LOGO! connection detail

 

 

FAQ

1) Can one output control multiple PLC units?
Yes. Modbus/TCP protocol allows that.

 

2) Can I use NETIO Cloud and connection to PLC at the same time?
Yes. NETIO Cloud works in parallel to Modbus/TCP protocol in NETIO PDU.

 

3) Can I use NETIO Mobile App and connection to PLC at the same time?
Yes. NETIO Mobile App works in parallel to Modbus/TCP protocol in NETIO PDU.

 

4) Will the software work for NETIO devices with 4 or 8 outputs as well?
Yes. Modbus/TCP protocol is equivalent for all NETIO devices.

 

5) Some NETIO devices also have DI (Digital Inputs) with S0 pulses counter. Can I use them in PLC as well?
Yes. Details are provided in Modbus/TCP protocol description.

 

Supported FW versions for NETIO devices

Note: NETIO PowerPDU 4C needs firmware version 3.1.0 and higher. Other devices firmware 2.4.4 and higher

 

Ask for a price or technical parameters

For device testing use name/password demo/demo