File instructions – using the file indicator, Bit shift instructions – Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual
Page 72
Chapter 4
Data File Organization and Addressing
4–16
File instructions employ user-created files. These files are addressed with
the # sign. They store an offset value in word S:24, just as with indexed
addressing discussed in the last section.
COP
FLL
BSL
BSR
FFL
FFU
Copy File
File Fill
Bit Shift Left
Bit Shift Right
(FIFO Load)*
(FIFO Unload)*
LFL
LFU
SQO
SQC
SQL
(LIFO Load)*
(LIFO Unload)*
Sequencer Output
Sequencer Compare
Sequencer Load*
* Available in the SLC 5/02 processor only.
!
ATTENTION: SLC 5/02 processor users
If you are using file instructions and also indexed addressing,
make sure that you monitor and/or load the correct offset value
prior to using an indexed address. Otherwise, unpredictable
operation could occur, resulting in possible personal injury and/or
damage to equipment.
The following paragraphs explain user-created files as they apply to Bit Shift
instructions, Sequencer instructions, and File Copy and File Fill instructions.
Bit Shift Instructions
The figure below shows a user-defined file within bit data file 3. For this
particular user-defined file, enter the following parameters when
programming the instruction:
•
#B3:2 The address of the bit array. This defines the starting bit as bit 0
in element 2, data file 3.
•
58 This is the length of the bit array, 58 bits. Note that the bits “left
over” in element 5 are unusable.
You can program as many bit arrays as you like in a bit file. Be careful that
they do not overlap.
Address of the bit array is #B3:2
Length of the bit array is 58,
entered as a separate parameter
in the Bit Shift instruction.
0
1
2
3
4
5
6
INVALID
0
15
#B3:2
Bit Data File 3
File Instructions – Using the
File Indicator #