2-719
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Communications Instructions
2
CIPUCMMSend
• CJ-series EtherNet/IP Units Operation Manual for NJ-series CPU Unit (Cat. No. W495)
• Execution of this instruction is continued until processing is completed even if the value of Execute
changes to FALSE or the execution time exceeds the task period. The value of Done changes to
TRUE when processing is completed. Use this to confirm normal completion of processing.
• Refer to Using this Section on page 2-2 for a timing chart for Execute, Done, Busy, and Error.
• You can use this instruction only through a built-in EtherNet/IP port on an NJ-series CPU Unit or a
port on an EtherNet/IP Unit connected to an NJ-series CPU Unit.
• If a variable is written to an OMRON Controller, the variable must be published to the network. Pub-
lish the variable to the network in advance.
• An error occurs in the following cases. Error will change to TRUE.
• There is a setting error for the local IP address.
• The text string in RoutePath does not end in a NULL character.
• The value of TimeOut is outside of the valid range.
• The value of ServiceCode is outside of the valid range.
• The value of a member of RqPath is outside of the valid range.
• The value of Size is outside of the valid range.
This sample uses CIP UCMM messages to write a variable, read a variable, and send a message. The
Controllers are connected to an EtherNet/IP network. The IP address of the remote node is
192.168.250.2.
The following procedure is used.
1
The CIPUCMMWrite instruction is used to write the value of a variable at a remote node. The
variable name at the remote node is WritingDat and the contents of the WriteDat is written to it.
WritingDat must be defined as a global variable at the remote node and the Network Publish
attribute must be set.
2
The CIPUCMMRead instruction is used to read the value of a variable at a remote node. The
value of the variable OriginalDat at the other node is read and the read value is stored in the
ReadDat variable. OriginalDat must be defined as a global variable at the remote node and the
Network Publish attribute must be set.
3
The CIPUCMMSend instruction is used to send an explicit message to a remote node. The con-
tents of the message is to read identity information (product name). The class ID, instance ID,
attribute ID, and service code are as follows: The response data is stored in the ResDat vari-
able.
Precautions for Correct Use
Sample Programming
Item Value
Class ID 1
Instance ID 1
Attribute ID 7
Service code 16#0E