# Rung Edit Matrix:

## Overview

Ladder editing takes place in a "matrix". Each matrix position provides
a location to hold one input, output, or branch instruction. Matrix locations
are divided into two types - inputs and outputs. Input matrix locations only
hold input (including branch) instructions, while output matrix locations
only hold output intructions.

## Matrix Output Instruction Classes

There are three types of instruction matrices. Single input matrices
are for output instructions which take one input per instruction. Double
input matrices are for output instructions which take two inputs per
instruction. Triple input matrices are for output instructions which
take three inputs per instruction.

Instructions from different output classes cannot be mixed together
in the same rung. When a new rung is created, at least *one*
output instruction must be added to the rung before the editing matrix
can be created. The class of the first instruction selected determines
the type of matrix created. Once a matrix has been created, the adding of
incompatible output instructions is disabled. Changing instruction classes
requires clearing the rung (erasing all the existing instructions in the
rung).

## Single Input Matrix

Most output instructions are "single input" instructions. The edit
matrix allows up to 8 outputs (1 column of 8) and 64 inputs (8 columns and
8 rows) and per rung.

## Double Input Matrix

Several instructions are "double input" instructions. The edit matrix
allows 1 output, and 16 inputs (2 rows of 8 columns). Each input row must be
connected independently to the associated output branch. The input matrix
locations cannot contain branch instructions.

## Triple Input Matrix

"Triple input" instructions are similar to "double input" instructions.
The edit matrix can only contain 1 output, but contains 24 inputs (3 rows of
8 columns).

## Selecting Matrix Locations

Individual matrix locations can be selected by clicking on them. When a
matrix location is selected, buttons appropriate to that location (input or
output) are automatically displayed.