Topic: DMD0300 PEERLINK - Share Data w/PLCs |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Share Data w/PLCs (PEERLINK) instruction is used to join a data sharing network that consists of other Do-more controllers or DirectLOGIC PLC system using ECOM100 modules.
Each member of the data sharing network receives data from all of the other Do-more controllers and ECOM100s on that data sharing network. Each member can optionally send data to the other members of the data sharing network by electing to "publish" one or more blocks of PEERLINK (PL) memory.
Setting up a PEERLINK data sharing network does not require any of the
traditional TCP/IP network configuration because the PEERLINK instruction
uses TCP/IP broadcast packets to publish the blocks of data to the network.
One caveat with the use of broadcast packets is that it does limit the
scope of the shared data network to the local broadcast domain
There can only be one PEERLINK instruction in a Do-more Designer project - and it must be in the $Main code-block. This means that a single Do-more controller can only be part of one data sharing network.
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The PEERLINK instruction works with a pre-defined section of memory named PL. The PL memory contains 256 locations named PL0 through PL255. These 256 locations are divided into 16 blocks. Each of these 16 data blocks consists of 16-Bit unsigned registers. Theses blocks provide the local storage for the data that is sent and received over the data-sharing network.
In addition to the data blocks, PL memory contains entries for some BITs and WORDs that are available for use in a ladder program to monitor the runtime status of the PEERLINK network, and to optionally control the updates to individual PEERLINK blocks.
When the input logic to the PEERLINK instruction is ON (the instruction is enabled), at a rate of 10 times per second, the instruction will publish all of the blocks that it is configured to publish, and will process any PEERLINK data blocks that it receives. When the input logic is OFF, (the instruction is disabled), it DOES NOT publish any of its blocks and DOES NOT process any PEERLINK data blocks that it receives.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Publishing and Subscribing:The Share Data w/PLCs (PEERLINK) instruction uses the verbs 'publishing' and 'subscribing' to describe how the controller's data is exchanged with other controllers and/or ECOM100s on the data sharing network.
Publishing is analogous to sending data, and is done only if the PEERLINK instruction is configured to 'publish' one or more of its own data blocks. If so configured, the Do-more controller will broadcast a packet that contains the data from the selected PL memory blocks. There are sixteen unique data blocks, and each data block can only be published by one controller. This means there can be a maximum of sixteen unique controllers configured to publish blocks of data. A single Do-more controller or ECOM100 can be configured so that it publishes none of the blocks, one block, some of the blocks, or even all 16 of the blocks.
Subscribing is analogous to receiving data, and is accomplished by 'subscribing to' the data blocks of all the other controllers on the data sharing network. Once the PEERLINK instruction is enabled, it listens to the network for PEERLINK broadcasts messages from other Do-more controllers or ECOM100s, and when it receives one, it takes the data from that packet and stores it in the designated block in the controller's local PL memory.
Subscribing to the shared data network is a passive operation in that it only receives data from the network. Simply placing a PEERLINK instruction in the project will cause it to subscribe to all of the data blocks from all of the controllers on the shared data network. Because the subscribing process always needs to run, the PEERLINK instruction must be placed in the $Main code-block (which is guaranteed to be running any time the Do-more controller is in RUN mode).
Unlike publishing in which you select which specific blocks to publish, you cannot subscribe to individual data blocks. Because subscribing is a passive operation there can be a virtually unlimited number of Do-more controllers and/or ECOM100s subscribing to the shared data blocks.
In the following graphic, the four Do-more systems are using PEERLINK instructions to participate in a data sharing network.
When the network is running all 16 blocks of PL memory in all four of the Do-more system will be synchronized.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Status Information:The red triangle in the upper left corner indicates this is a Fully Asynchronous instruction.
The status information that is displayed in the PEERLINK instruction depends on the state of the input logic.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Once the PEERLINK instruction is enabled and the network is functioning, each controller will be sending and receiving data at an approximate rate of ten packets per second, so the transfer rate of a normally operating network should be in the range of 9 to 11 transfers per second.
The status display uses the following background colors to quickly relate the quality (rate) of the communication between Controllers: |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The PEERLINK instruction also uses combinations of the following attributes to display important status information for each of the blocks:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Map of PEERLINK (PL) Memory:The following table contains entries for all of the BITs and WORDs that are available for use in a ladder program to monitor the runtime status of the PEERLINK network and to optionally control the updates to individual PEERLINK blocks.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Data View Display FormatsNote: These formats are for display purposes only, the PEERLINK variables cannot be edited when displayed using any of the formats.
Short multi-line |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Long multi-line |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Short single line |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Long single line
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
See Also:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rung Example:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|