Академический Документы
Профессиональный Документы
Культура Документы
action=kb&print=1478
The CP1L-EL/EM-type CPU units are programmable controllers with built-in Ethernet ports enabling low-cost Ethernet connection
and designed to meet a wide variety of Ethernet connectivity needs in a wide range of fields.
The ability to send and receive messages means it is possible for a host computer to monitor the status of controllers and also
receive feedback from the controllers about any onsite abnormalities they detect. The controllers also feature socket
communications capability meaning it is possible to connect them with a wide variety of Ethernet-enabled control equipment.
This article explains how to setup a Modbus TCP communication using Function Blocks.
Functional Details
Modbus TCP
Configuration Example
Program flow Example
References
Functional Details
1 de 7 17/10/2016 12:20
myOMRON Europe - myKnowledge https://www.myomron.com/index.php?action=kb&print=1478
1. Ethernet
Socket Services
The socket services allows the CP1L-E* to send and receive data using either the UDP or TCP protocol.
2. Configuration
Auto-IP
- MAC ID based identification of a new controller in CX-P and will find all of the CP1L-EL/EM PLCs physically connected within the
same network with minimal IP configuration. Displays MAC ID and IP address for further configuration.
LNK/ACT
3. Programming
Independent FB Capacity
CP1L-EL/EM series PLCs have an extra 10K steps FB capacity on top of normal program memory.
The restrictions for the Send / receive Data Address is the H Area above 511.
For the use of the Function Blocks it is needed to change the Allocation in another Area e.g. HR000 or AR448 (see Table 1 for
addresses that can be used).
2 de 7 17/10/2016 12:20
myOMRON Europe - myKnowledge https://www.myomron.com/index.php?action=kb&print=1478
NOTE:
When closing a socket the socket cannot be used for 120 seconds. This is because the timeout (2MSL) is started while changing
from state TIME WAIT to CLOSED.
Modbus TCP
Modbus TCP/IP or Modbus TCP this is a Modbus variant used for communications over TCP/IP networks, connecting over port
502. It does not require a checksum calculation as lower layers already provide checksum protection.
Configuration Example
3 de 7 17/10/2016 12:20
myOMRON Europe - myKnowledge https://www.myomron.com/index.php?action=kb&print=1478
In case of single communication the socket is opened, data is send and/or received and then the socket is closed.
NOTE: When using single communication remember the socket closing timeout of 120 seconds (see TCP Status
transition).
Continuous communication typically is used when the connected Modbus device (server) requires to be serviced periodically.
Typically the socket is opened once and data is send are received continuously. Socket is only closed in case of communication
anomalies.
The Open Socket function Block opens a Socket (1 to 3) that is available and outputs the opened Socket number. The Socket
Output can be used as Socket Input variable for all of the other Function Blocks.
The Done output of a Function Block can be used as a trigger for the next Function Block (Continue communication).
4 de 7 17/10/2016 12:20
myOMRON Europe - myKnowledge https://www.myomron.com/index.php?action=kb&print=1478
The individual Function Blocks and detailed information can be found in References.
Move the Function Block file together with the Function Block documentation file into the Library location. Then the Help is available.
5 de 7 17/10/2016 12:20
myOMRON Europe - myKnowledge https://www.myomron.com/index.php?action=kb&print=1478
References
6 de 7 17/10/2016 12:20
myOMRON Europe - myKnowledge https://www.myomron.com/index.php?action=kb&print=1478
Link:
http://www.myomron.com/index.php?action=kb&print=1478
Comments
[+]
comment
Theo [2012-05-16]
Translate:
7 de 7 17/10/2016 12:20