Topic: DMD0224 RX - Do-more Network Read |
|
The Do-more Network Read (RX) instruction uses the Do-more proprietary protocol to read data over the on-board Ethernet port or a BX-P-ECOMEX POM from another Ethernet-equipped Do-more CPU. The RX instruction uses UDP (not TCP) protocol to communicate with the remote Do-more CPU. Do-more RX is the preferred way to read data from a remote Do-more CPU because it has direct access to nearly all of the memory in the remote CPU - including direct access to the PLC's I/O memory. This is In contrast to DirectLOGIC (DLRX / DLWX) and Modbus/TCP (MRX / MWX) network communication which only have access to the protocol-specific memory blocks in the remote CPUs,
Each RX instruction can contain up to 50 individual read requests for a total of up to 1000 bytes of data. The RX instruction can read from all of the built-in memory blocks, all of the built-in structures, and any user-created memory blocks from the remote CPU. RX does NOT support reading a Heap Item A Heap item and it's associated memory are not preallocated in a default Memory configuration. They are single items as opposed to one entry of a memory block. A Heap Item can be created in the Memory Configuration or be created when the instruction using it is added to the ladder diagram. from a remote Do-more CPU.
The RX instruction establishes a communication session with the remote Do-more CPU similar to Do-more Designer and C-More panels. The session is established using one of the User Accounts setup in the System Security of the remote CPU. The User Account selected will enforce any restrictions on what can be accessed by this instruction. Even if no password is selected, the session will be established using the Default User account.
This instruction uses either the on-board Ethernet port or BX-P-ECOMEX POM, both of which are shared, system resources controlled by a device driver. The device driver allows the Ethernet port to process concurrent client-side requests ( RX, WX, DLRX, DLWX, MRX, MWX, EIPMSG, EMAIL, etc. ) without the need for additional interlocking logic in the ladder program.
|
|
Element References:Note: Use the F9 key or click the 'three dot box' at the right edge of the parameter field to open the Default Element Selection Tool (the Element Picker or the Element Browser) or use the Down-Arrow key (Auto-Complete) on any parameter field to see a complete list of the memory locations that are valid for that parameter of the instruction.
Device : the only Device that can be selected $IntEthDMPPClient (Internal Ethernet Do-more Peer to Peer Client).
UDP Addressing
Remote Password : the RX instruction requires that a communication session be established with the remote Do-more CPU before the data read operations can be processed. Depending on how the remote system is configured, this may require the user to enter the password for the User Account on the target CPU to allow the session to be established.
If no remote password is selected, the connection will be established using the Default User account. If that account exists on the remote system AND that account has Read Data privilege the connection will be made and the read data operations will be processed. If the Default User does not exist a connection cannot be established and thus the RX operation will fail. If the Default User account has been changed to NOT have Read Data privilege the read data operations cannot be processed.
If a remote password is selected, the connection will be made using the password specified below. If that account exists on the remote system AND that account has Read Data privilege the connection will be made and the read data operations will be processed. If a connection cannot be made using the specified the password the connection cannot be established and the RX operation will fail. If the account specified by the password does NOT have Read Data privilege the read data operations cannot be processed.
The password for the User Account can be supplied in either of the following ways:
Enable specifies how this instruction is enabled. Select from one of the following:
The On Success and On Error parameters specify what action to perform when this instruction completes. You do not have to use the same type of selection for both On Success and On Error.
If the Set Bit selection is used for either On Success or On Error, the specified BIT location will be SET OFF when the instruction is first enabled and will remain OFF until the instruction completes. Once complete, the appropriate Success or Error bit location ON. The specified Bit location is enabled with a SET (Latch) operation meaning that it will remain ON even if the input logic for the instruction goes OFF.
If the JMP to Stage selection is used for either On Success or On Error the target Stage must be in the same Program code-block as this instruction, you cannot specify a target Stage that exists in a different Program code-block. When the operation finishes, the target Stage will be enabled the same way as a standalone Jump to Stage (JMP) instruction would do it. The JMP to Stage option will only be available if this instruction is placed in a Program code-block.
On Success selects which of the following actions to perform if the operation is successful:
On Error selects which of
the following actions to perform if the operation is unsuccessful:
If either the On Success or On Error selections are set to JMP to Stage, Automatically create the SG box for any NEW stage number will be enabled which will automatically create any target stage that does not already exist.
Enable the On Error Counter option and specify a DWord location to store the total number of times the RX failed to complete. This can be any writable DWord location.
Enable the Extended Error Information option then enter a memory location to store any error codes returned for this instruction. This can be any writable numeric location. The following lists the Extended error responses and their meaning:
-1 = Protocol Error occurred. The value in LastProtoError (DST38) contains the protocol error code as follows:
0 = No Extended Error
1 - 50 = row number of the bad read request if the Last Protocol Error Code was 20 (0x14).
|
|
Table of Read OperationsA single Do-more Network Read instruction can process up to 50 individual read data requests. The total amount of data that the 50 read data requests can read is 1000 bytes. Each of the individual read operations can read one data type and place the data that is read into a memory location that is the same type and size.
The type of data that's being read determines how many elements of each type can be read in each data request as shown below:
The buttons are for functions which manage the rows in the instruction: Edit opens the editor for the currently selected row, Insert adds an empty row before the currently selected row and opens the editor for this new row, Remove deletes the currently selected row from the table, and Move UP / Move Down shifts the currently selected row up one or down one row respectively in the table.
Both the Insert and Edit operations will open the row editor dialog which is where you construct the individual read requests that will fit within the rules for the data types stated earlier.
Be aware that because the local CPU does not have access to the memory configuration of the remote system, there is no guarantee that a read request that is correctly formed on the local CPU will work when the remote system tries to execute it. For example, you could request data from a memory location that is valid locally (D4000 - D4095) but the range of D memory locations may have been adjusted in the remote CPU to stop at D3000.
Read From Remote into Local selects the first location in the remote CPU to begin reading data:
Number of Elements is the number of consecutive elements in the memory block to read.
Into Local selects the beginning location in the local CPU to store the data from the read operation. This location must be the same data type and have the same element size as the specified Read From Remote into Local data location. For example you can read from WY (Signed Word) into N (Signed Word) but you cannot read from WY (Signed Word) into V (Unsigned Word).
The remaining fields are to help you maintain the size limitations of the instruction. These fields validate immediately as you make changes in the editor. Current is the number of bytes in the read request currently being edited, Others is the number of bytes in the read requests already in this instruction, New Size is the total number of bytes of all the read requests in this instruction (including the one currently being edited), and Bytes Remaining is the number of bytes of the 1000 byte limit remaining for read requests in this instruction.
OK closes the editor, saving any changes.
Cancel closes the editor, discarding any changes.
|
|
Status Display:
The red triangle in the upper left corner of the status display indicates this is a Fully Asynchronous instruction.
|
|
See Also:RX - Do-more Network Read
Modbus Exception Response Codes
DLRX - DirectLOGIC Network Read
DLWX - DirectLOGIC Network Write
EIPMSG - Send EtherNet/IP Message
PEERLINK - Share Data w / PLCs
|
|
Related Topics:PUBLISH - Translate from Do-more
SUBSCRIB - Translate to Do-more
|
|
Example:
|
|