Omron CJ1W-SCU32 Operation Manual page 87

Machine automation controller, cj / nj-series, serial communications units, cpu unit
Table of Contents

Advertisement

How to Create User-defined Variables
User-defined variables are required in the following situations.
• To specify the send/receive data of Serial Port I/O instructions in No-protocol Mode
• To specify the send/receive data with a Protocol Macro instruction in Protocol Macro Mode
• To specify the allocation area in Modbus-RTU Slave Mode
In general, user-defined variables create array variables.
An example of allocation to a user-defined variable is explained below.
Example) The Holding Registers allocation area is set in DM within the memory area for the CJ-series
Unit in the Modbus-RTU Slave Mode, and allocated to the array variable, RegData, to update
the 10 words, DM1000 to DM1009. Each of these 10 words can be updated separately.
The user can use any desired name for the array variable names.
Set the starting
address to D1000
Set the array data type to WORD as it is set for each word.
Array elements are required for 10 words. Therefore, the array variable will be WORD RegData [10].
Allocate this array to the area starting from D1000 by using Sysmac Studio.
RegData [0]
RegData [1]
RegData [8]
RegData [9]
How to Specify System-defined Variables
Use the variables that are pre-defined.
For details, refer to 2-4 System-defined Variable.
CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit(W494)
2 Initial Settings and Allocations of Device Variable for CJ-series Unit
Word address 15 bits
+0
+1
+2
:
+9
D1000
AAA status
BBB status
:
:
:
:
YYY status
ZZZ status
D1009
0 bit
RegData [0]
RegData [1]
RegData [2]
:
RegData [9]
10 words
For 10 words
2-13
2

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cj1w-scu22Cj1w-scu42

Table of Contents