10ć11 – Rockwell Automation 1772-LV Mini-PLC - 2/15 Programmable Controller (Series B) Programming and Operations User Manual

Page 133

Advertising
background image

Block Format Instructions

Chapter 10

10Ć11

Mask

A special programming technique called a “mask” is used with the sequencer
instructions. By masking your bits you will be able to conserve bits and use
them for storage.

Definition

A mask is a means of selectively screening out data. The purpose of the mask is
to allow unused bits in the specific instruction to be used independently. For
example, the number of output bits required for sequential operation can be any
integer up to 64. When fewer than 64 outputs are required, masking allows the
unused output terminals of the module that is controlled by the sequencer
instruction to be used to control output devices which are independent to the
sequencer operation.

A 0 in a mask bit location prevents the instruction from operating on the data in
the corresponding bit location. A 1 in a mask bit location allows the
corresponding bit to be operated. When all the output data bits are relevant to
the instruction, use a mask of all 1s.

Other instructions can control a mask in the user program. If a changing mask
is required for different steps in the sequencer operation,use a get-put or
file-to-file move.

WARNING: When choosing a mask word address, be sure that
the next 1, 2, or 3 consecutive word addresses are not already
assigned. Other data written into a mask could cause
unpredictable machine operation. This could cause damage to
your equipment and/or injury to your personnel.

Sequencer instructions are powerful tools when programming your operations.
But, like all good tools, there are some limitations:

Two events can not run simultaneously.

If one sequencer instruction is out of order, then your process stops. You

cannot continue to a different process.

The logic of a sequencer instruction is usually programmed using “AND”

logic. You can use “OR” logic but you will use more memory space.

A sequencer load instruction can be programmed alone but used only in the

incremental mode.

Programming Limitations

Advertising