2 Instruction Descriptions
2-698
NJ-series Instructions Reference Manual (W502)
Refer to the following manuals for details on CIP communications.
• NJ-series CPU Unit Built-in EtherNet/IP Port User’s Manual (Cat. No. W506)
• 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.
• Execute the CIPOpen instruction to obtain the value for Handle before you execute this instruction.
Size of variable name of
DstDat
• The size of the variable name is calculated as the total bytes for the ASCII charac-
ters in all structure levels plus two times the number of levels.
• If the number of bytes of ASCII characters in a level is an odd number, add 1.
• If a level in the structure is an array, add four times the number of dimensions in the
array.
• Periods and commas in the structure and arrays are not included in the variable
name size.
Example 1: When the Variable Name of DstDat Is aaa.bbbbb[1,2,3].cc
• The text string “aaa” in the first level is 3 bytes. It is an odd number, so 1 is added
to make 4 bytes.
• The text string “bbbbb[1,2,3]” in the second level is 5 bytes. It is an odd number,
so 1 is added to make 6 bytes.
• Also bbbbb[1,2,3] is a three-dimensional array, so 3 times 4, or 12, is added to
make 18 bytes.
• The text string “cc” in the third level is 2 bytes. It is an even number, so 2 bytes is
used in the calculation.
• If we add the number of levels 3 times 2, or 6, to 4 bytes for the first level, 18 bytes
for the second level, and 2 bytes for the third level, the size of the variable name
come to 30 bytes.
Example 2: When the Variable Name of DstDat Is val
• The text string “val” in the first level is 3 bytes. It is an odd number, so 1 is added
to make 4 bytes.
• If we then add the number of levels 1 times 2, or 2, the size of the variable name
is 6 bytes.
Example 3: When the Variable Name of DstDat Is array[8].
• The text string “array” in the first level is 5 bytes. It is an odd number, so 1 is
added to make 6 bytes.
• It is a one-dimensional array. Therefore, 1 times 4, or 4, is added.
• If we then add the number of levels 1 times 2, or 2, the size of the variable name
is 12 bytes.
Related System-defined Variables
Name Meaning
Data
type
Description
_EIP_EtnOnlineSta Online BOOL Status of built-in EtherNet/IP port communications
TRUE: Can be used.
FALSE: Cannot be used.
Additional Information
Precautions for Correct Use
Item in above formula Meaning