EasyManua.ls Logo

Omron NJ501-1300 - Page 183

Omron NJ501-1300
398 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8-11
8 Message Communications
NJ-series CPU Unit Built-in EtherNet/IP Port Users Manual (W506)
8-2 Using CIP Message Communications
8
8-2-5 Preparing Derivative Data Types to Use
CIP Communications Instructions
CIP communications instructions send and receive data that is stored in array variables.
z Creating Array Variables
To input a value into the array variable of a CIP communications instruction, you must create a vari-
able with the same configuration as the array variable in advance.
Example: Creating a Variable to Input Data to the CIPSend Instruction Array Variables
Use the following procedure to create a variable in the variable table.
1
Select the Array Check Box.
2
Specify the element first number, the element last number, and the data type.
Example:
Preparing Array Variables to Input and Output Service Data and
Response Data
(1) Input the service data to send.
The data to send is stored in array
variable
A. If only certain elements are spec-
ified in array variable A, specify the number
of elements in variable B.
(2) The data that is received is stored in variable
C. The byte size of the data that was actually
received is stored in variable D.
Variable D
RespSize
(Response
Data Size)
ResServiceDat
(Response Data)
Size
(Number of Elements)
ServiceDat
(Command Data)
Variable
C
Variable B
Variable A
CIP communications instruction
(1)
(2)
CIPSend
If the service data (ServiceDat) is
Array[2] and number of elements
(Size) = 2, Array[2] and Array[3]
are sent.
Array variable:
A
[0]
[1]
[2]
[3]
Number of elements: 2
[1]
[0]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
Variable
D
: 10
Array variable:
C[0..9]
Specifies the data type.
Specify the array element first
number and last number.
Data type
Array
Variable name
Variable table

Table of Contents

Related product manuals