With Modicon M340 PLCs, it is possible to address any Modicon M340 PLC communication channel and any device directly connected to a Modicon M340 PLC communication channel.
Each device is identified by a unique address, which consists of a device number or an IP address. The addresses then differ according to the protocol:
-
Ethernet TCP/IP
-
Modbus or CANopen
-
Character Mode
Within a station, each communication entity is characterized by a topological address (access path) and a target entity.
NOTE: An address is expressed in the form of a character string. However, it can only be used in conjunction with the function ADDM, which is why the following notation will be used to describe an address: ADDM('address string').
Modicon M340 addressing uses 3 concepts:
-
The target entity depends on the communication EF and is chosen implicitly:
-
MBS for addressing a Modbus server,
-
TCP.MBS for addressing a TCP Modbus server,
-
SYS for addressing a channel server on Character mode. SYS can be ommitted.
-
The communication channel is explicit (processor’s or module’s position and communication channel number) or symbolized with the Netlink name for Ethernet communication.
-
The node address depends on the communication protocol:
-
IP address with Ethernet,
-
node address with CANopen,
-
slave address with Modbus.
Addressing a Station on a Ethernet
The address of a station on Ethernet takes the form:
-
ADDM('Netlink{hostAddr}')
-
ADDM('Netlink{hostAddr}TCP.MBS')
-
ADDM('Netlink{hostAddr}node')
-
ADDM('r.m.c{hostAddr}')
-
ADDM('r.m.c{hostAddr}TCP.MBS')
-
ADDM('r.m.c{hostAddr}node')
-
ADDM('{hostAddr}')
-
ADDM('{hostAddr}TCP.MBS')
-
ADDM('{hostAddr}node')
Where:
-
Netlink: network name set in the Net Link field of Ethernet channel
-
hostAddr: IP address of device
-
r: rack number (rack)
-
c: channel number (channel)
-
node: Modbus or CANopen node behind a gateway (gateway identified with hostAddr)
NOTE: If the netlink name is ommitted the system takes the default netlink connection which is the closest link to the processor (usually the processor Ethernet channel).
Addressing of a Device on a CANopen Bus
The address of a device on a CANopen bus takes the form ADDM('r.m.c.e'), where:
Addressing a Device on a Modbus
The address of a device on a Modbus bus takes the form ADDM('r.m.c.e.MBS'), where:
Addressing a Device on Character mode
To send or receive a character string, you can use ADDM('r.m.c') or ADDM('r.m.c.SYS'), where:
The figure below describes the address of the servodrive. The example here shows slave 14 on channel 2 (CANopen) of the module in rack 0, slot 0: