beautypg.com

Programming, Using sqc – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 199

background image

Using Application Specific Instructions

11–11

The following figure indicates how the SQO instruction works.

SQO

SEQUENCER OUTPUT
File

#B3:1

Mask

0F0F

Dest

O:0

Control

R6:05

Length

4

Position

2

(EN)

(DN)

0000

0101

0000

1010

0

7

8

15

0000

1111

0000

1111

0

7

8

15

0000

0000

0000

0000

1010

0010

1111

0101

1111

0101

0100

1010

0101

0101

0101

0101

0000

1111

0000

1111

0
1
2
3
4

Step

B3:1

2
3
4
5

Word

00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15

ON

ON

ON

ON

External Outputs
Associated with O:0

Destination O:0.0

Mask Value 0F0F

Sequencer Output File #B3:1

Current Step

Using SQC

When the status of all non-masked bits in the source word match those of the
corresponding reference word, the instruction sets the found bit (FD) in the control
word. Otherwise, the found bit (FD) is cleared.

The bits mask data when reset and pass data when set.

The mask can be fixed or variable. If you enter a hexadecimal code, it is fixed. If
you enter an element address or a file address for changing the mask with each step,
it is variable.

When the rung goes from false-to-true, the instruction increments to the next step
(word) in the sequencer file. Data stored there is transferred through a mask and
compared against the source for equality. While the rung remains true, the source is
compared against the reference data for every scan. If equal, the FD bit is set in the
SQCs control counter.

Programming