Delta AS Series Programming Manual page 605

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

A S S er i es Pr og r am m ing M an u a l
Example 2
1.
The instruction clears the value of the pointer D0 to 0 first. When M0 switches from OFF to ON, the instruction
writes the data in D20/D21 into D2/D3, and increments the value in D0/D1 to 1. When M0 switches from OFF to
ON again, the instruction writes the data in D20/D21 to D4/D5, and increments the value in D0/D1 to 2.
2.
The instruction shifts and writes the data in the word device as shown below.
The data in D20/21 is written into D2/D3.
The value in D0/D1 becomes 1.
_6
Source
D20
Additional remarks
1.
If the value in D is less than 0, the instruction is not executed, SM0 is ON, and the error code in SR0 is 16#2003.
2.
If D+n-1 exceeds the device range, the instruction is not executed. SM0 is ON, and the error code in SR0 is
16#2003.
3.
For 16-bit instruction, the value in the operand n must be between 2–512. For 32-bit instruction, the value in the
operand n must be between 2–256. If not, the instruction is not executed, SM0 is ON, and the error code in SR0 is
16#200B.
4.
You can use the SFWR instruction with the SFRD (API 1105) instruction to write and read the data in a first in first
out (FIFO) method.
6 - 3 2 6
n=5
D8
D 6
D4
D0=3
2
Pointer
D2
D0
1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents