3-7
3 Data Exchange with the CPU Unit
CJ-series DeviceNet Units Operation Manual for NJ-series CPU Unit(W497)
3-1 Data Exchange with the CPU Unit
3
3-1-2 Accessing From the User Program
The user-defined variables and I/O data of each slave are allocated as follows:
The user program accesses the slave with WORD-type variables.
When the user program accesses the slave only with BOOL type, use the BOOL-type user-defined vari-
ables Slave1_OutData_B defined in the example.
The user-defined variables and I/O data of each slave are allocated as follows:
The user program accesses the slave with BOOL-type variables.
When the user program accesses the slave with both WORD type and BOOL type, use the union-type
user-defined variables Slave1_OutData_C defined in the example.
The user-defined variables and I/O data of each slave are allocated as follows:
The user program accesses the slave with WORD-type or BOOL-type variables.
When you use the union, prepare the union data type Mem that you can access with WORD and BOOL
as shown below.
I/O Data User-defined variable name Address
OUT slave I/O data (node address 0) Slave1_OutData_A[0] 3200
:
OUT slave I/O data (node address 63)
Slave1_OutData_A[63] 3263
I/O Data User-defined variable name Address
OUT slave I/O data (node address 0)
Bit 0
Slave1_OutData_B[0,0] 3200.00
OUT slave I/O data (node address 0)
Bit 1
Slave1_OutData_B[0,1] 3200.01
:
OUT slave I/O data (node address
63) Bit 15
Slave1_OutData_B[63,15] 3263.15
I/O Data User-defined variable name Address
OUT slave I/O data (node address 0) WORD type
Slave1_OutData_C[0].w
BOOL type
Slave1_OutData_C[0].b[0] to
Slave1_OutData_C[0].b[15]
3200
3200.00
3200.15
:
OUT slave I/O data (node address
63)
WORD type
Slave1_OutData_C[63].w
BOOL type
Slave1_OutData_C[63].b[0] to
Slave1_OutData_C[63].b[15]
3263
3263.00
3263.15