12-5
12.2.3 Example of Using an Index Register
Repeatedly reading in external data
<Example> Writing the contents of input WX3 to a sequence of data registers beginning from DT0.
When R0 turns on, 0 is written to index register I0.
When the R1 turns on, the contents of input WX3 is transferred to the data register specified by
I0DT0.
Add 1 to I0.
In this case, the contents of I0 will change successively, and the destination data register will be as
follows.
Input times of R1
Contents of I0
Destination data register
1st
2nd
3rd
:
0
1
2
:
DT0
DT1
DT2
:
Inputting and outputting data based on a number specified by an input
<Example 1> Setting a timer number specified by a digital switch
Convert the BCD timer number data in WX1 to binary and set it in index register I0.
Convert the BCD timer set value in WX0 to binary and store in the timer set value area SV specified
by contents of I0.
<Example 2> Taking external output of the elapsed value in a timer number specified by a digital
switch
Convert the BCD timer number data in WX1 to binary and set it in index register I0.
Convert the elapsed value data EV in the timer specified by I0 to BCD, and output it to output relay
WY0.
Summary of Contents for FP0R Series
Page 1: ......
Page 6: ...iv ...
Page 14: ...xii ...
Page 15: ...Chapter 1 Functions and Restrictions of the Unit ...
Page 24: ...1 10 ...
Page 25: ...Chapter 2 Specifications and Functions of Control Unit ...
Page 38: ...2 14 ...
Page 39: ...Chapter 3 Expansion ...
Page 45: ...3 7 3 4 Terminal layout diagram Model No Terminal layout diagrams E8RS E8RM E16RS E16RM E8YRS ...
Page 48: ...3 10 ...
Page 49: ...Chapter 4 I O Allocation ...
Page 53: ...Chapter 5 Installation and Wiring ...
Page 73: ...Chapter 6 Preparation of USB Port ...
Page 77: ...6 5 5 Click Finish on the following screen to be displayed ...
Page 79: ...6 7 4 Double click on FP0R 5 Click Update Driver ...
Page 84: ...6 12 ...
Page 85: ...Chapter 7 Communication ...
Page 139: ...7 55 Sample program For Type II Use a program as below to directly specify a MODBUS address ...
Page 141: ...Chapter 8 High speed Counter Pulse Output and PWM Output Functions ...
Page 142: ...8 2 ...
Page 199: ...Chapter 9 Security Functions ...
Page 211: ...Chapter 10 Other Functions ...
Page 217: ...Chapter 11 Self Diagnostic and Troubleshooting ...
Page 227: ...Chapter 12 Precautions During Programming ...
Page 242: ...12 16 ...
Page 243: ...Chapter 13 Specifications ...
Page 254: ...13 12 ...
Page 255: ...Chapter 14 Dimensions and Others ...
Page 262: ...14 8 ...
Page 263: ...Chapter 15 Appendix ...
Page 344: ...15 82 15 7 ASCII Codes ...
Page 346: ......
Page 347: ......
Page 348: ......