Omron CJ1W-CORT21 Operation Manual page 77

Cj-series. user defined can unit nj-series cpu unit
Hide thumbs Also See for CJ1W-CORT21:
Table of Contents

Advertisement

How to Create User-defined Variables
Use the Sysmac Studio to register user-defined variables to the variable table. Use user-defined vari-
ables to specify the AT specification of the memory used for CJ-series Unit to which buffer and trigger
areas are allocated.
Generally, array variables are created.
Below is an example of allocation to user-defined variables. See A-2 User Program Example for more
information.
• Configuration of the User Defined CAN unit using the message command 2902
• 1 send buffer, 1 receive buffer
One send or receive buffer occupies 5 words of CPU memory (Data Length Code (DLC) and the 8
bytes of data). One send trigger or receive flag occupies one bit of CPU memory. The number of words
occupied by all triggers or flags equals the number of send or receive messages divided by 16, rounded
up. Trailing padding bits are ignored (see section 4-2-1 Configure Memory Areas (2902) for more infor-
mation).
In this case, buffer and trigger data are allocated as follows:
Words
allocated
W0000 to W0004
W100
EM Bank 0, 000000 to 000004
W110
Allocate the I/O data to the user-defined variables as shown in the example below.
This example uses the following data types.
• ARRAY[..]OF WORD
• ARRAY[..]OF BOOL
• BOOL
Use this data type or multiple data types to create user-defined variables according to the user pro-
gram.
Additional Information
For details on memory used for CJ-series Unit, variable allocation, and user-defined variable
registration, refer to the Sysmac Studio Version 1 Operation Manual (Cat. No. W504).
CJ-series User Defined CAN Unit Operation Manual for NJ-series CPU Unit (W517)
3 Data Exchange with the CPU Unit
I/O data
Send Buffer starting word
Send Trigger starting word
Receve Buffer starting word
Receive Trigger starting word
3
3-7

Advertisement

Table of Contents
loading

Table of Contents