
Data Transfer File Instuction
Chapter 19
19-13
This instruction duplicates and transfers the data of a word from the data
table to a specified word within your destination file. Here are some
characteristics of a Word-to-File Move:
Programmed as an output instruction; requires four words of the user
program area.
Your program must externally index the counter.
Externally Indexed Counter
An externally indexed counter must be controlled by a CTU/CTD
instruction to index through the file values. A false-to-true transition is
needed to increment the counter.
The counter address identifies the file instruction’s location in the
timer/counter area of the data table and holds the accumulated value.
The position value is the accumulated value of the counter. It points to
the current position to be used/entered in the file.
The counter’s preset value represents the maximum number of words
(length) in the file.
File A is the starting address of the source file for a File-to-Word
Move instruction.
The word address is the source (input) word of a Word-to-File Move
instruction. It is the destination (output) word of a File-to-Word
Move instruction.
File R is the destination file of a Word-to-File Move instruction.
The Counter Reset instruction (CTR) resets the file (or the file’s
counter) once the file position is the same as the file length on the
counter instruction (or the accumulated value is equal to the
preset value).
An externally indexed file instruction has a done bit. The done bit (15) is
automatically entered as part of the instruction. The address of the done
bit is automatically changed to match the counter address. It is set when
the operation is complete and remains set as long as the rung condition
is true.
When a Word-to-File Move instruction rung goes:
True
Data from the word address is transferred to the
destination file.
False
No action is taken.
WordtoFile Move Instruction