Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 341

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
Function
When the Shift Enable Bit (bit 14 of C) is ON,
all of the words with non-zero content within
the range of words between St and E will be
shifted one word in the direction determined
by the Shift Direction Bit (bit 13 of C)
whenever the word in the shift direction
contains all zeros. If ASFT(017) is repeated
sufficient times, all all-zero words will be
replaced by non-zero words. This will result in
all the data between St and E being divided
into zero and non-zero data.
Note When the Clear Flag (bit 15 of C) goes ON,
all bits in the shift register, from St to E, will
be reset (i.e., set to 0). The Clear Flag has
priority over the Shift Enable Bit (bit 14 of C).
ASFT(017) can be processed in the background. Refer to the SYSMAC CS/CJ/NSJ Series PLC
Programming Manual (W394) or the CJ2 CPU Unit Software Operation Manual (W473) for details.
Sample program
• Shifting Data
If the Shift Enable Bit, CIO 300.14, goes ON when CIO 0.00 is ON, all words with non-zero data
content from CIO 100 through CIO 109 will be shifted in the direction designated by the Shift
Direction Bit, CIO 300.13 (e.g., 1: Toward St) if the word to the left of the non-zero data is all zeros.
0.00
C
St
E
Non-zero data is
shifted toward St
304
i
C: 300
Shift direction
1: Non-zero data shifted toward E
Shift Enable Bit: 1
Clear
Before ASFT(017) is executed
St:
E:
St
Convert
. . .
Convert
E
St
Non-zero data
. . .
Zero data
E
After one execution
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Shift direction
Shift enabled
Clear
After two executions

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents