Using The Pointer Word In The Unit Memory Map; Writing Data To The Unit - Omron SYSMAC C Series Operation Manual

Analog i/o units
Hide thumbs Also See for SYSMAC C Series:
Table of Contents

Advertisement

User Programming Examples
5-7-3

Using the Pointer Word in the Unit Memory Map

5-7-4

Writing Data to the Unit

1, 2, 3...
The Unit has an internal memory map for storage of data and configuration
parameters. The table is 153 words in length, with both read-only and read/write
registers. The pointer word is used to set the beginning memory map location for
either the I/O READ or I/O WRITE ladder instructions. This allows the user to
access any area of the table directly without reading or writing data that is not
required. The result is faster Unit processing, and faster data transfer between
the Unit and the CPU Unit. The pointer word is memory map location 46. The
format is unsigned BCD. Valid values are 0 to 0153. The default value is
0000.The following sections explain the operation of the pointer word with both
the I/O READ and I/O WRITE ladder instructions.
This section describes the use of the pointer word with the I/O WRITE ladder
instruction. For additional information regarding the I/O WRITE instruction, refer
to the Operation Manual for your PC.
There are two rules when using the pointer word with the I/O WRITE instruction.
1. If the number of words transferred (specified in the instruction) to the Unit is
one, the following processing occurs.
• The Unit writes the value of this word to the pointer word location in the Unit
memory map (46).
• This value now becomes the first memory location to be read in subse-
quent I/O READ instructions.
• The pointer word retains this value unless another 1-word I/O write is
executed, or the system power is cycled. If the value has been saved to the
EEPROM in the Unit, then it is automatically uploaded on power up.
Example:
Execute a 1-word I/O write to the Unit. The value of the word transferred is
0022. The Unit sees the number of words is 1, and places the value 0022
into memory map location 46.
Execute an I/O READ instruction specifying the number of words to be read
as 0016.
The Unit returns 16 words to the CPU Unit, beginning with Unit memory map
location 22 through 37.
Note The I/O READ instruction can transfer a maximum of 127 words. The
Unit always prepares a table for transfer that is 127 words in length. If
the pointer word is set to a value greater than 27 (i.e., 28, 153 – 28 =
125) , and the read request is for 127 words, the Unit transfers words
28 to 153 (125 words) and fills words 126 and 127 with 0000. This is
because the pointer word is set to a value and the read is for a number
of words that goes beyond the end of the table.
2. If the number of words transferred to the Unit is greater than one, the follow-
ing processing occurs.
• The Unit interprets the first word as a temporary pointer value (which does
not replace word 46 in the Unit memory map).
• If the value of first word is 0000, then the Unit updates the memory map
beginning at location 47 with the remaining words transferred. This is the
first word of the write area in the Unit memory map.
• If the first word is greater than 0 and less than 47, the Unit turns ON the
unconfirmed data error flag because an attempt has been made to write to
a read-only area of the Unit memory map. The data sent is ignored.
Section
5-7
95

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents