
5Ć7Configuration Tips
Original Ć June 1990 CE4.2:CL6211
5.3.2 Scratch Registers
Setting aside two to three general registers as scratch" registers is
another method which may be used to conserve the number of registers
required to implement a control strategy. A scratch register is a register
which may be used multiple times for different purposes during an FSTs
execution. Generally the scratch register holds intermediate results for
use by subsequent FST instructions. Consider the following examples
where it is necessary to implement the boolean logic of DI 1 OR DI 2,
and have the inputs tunable for normally open/normally closed contacts:
Example 1:
DI ( 1 ),
XOR ( DI1_NOT ),
RGST ( DI1 ),
DI ( 2 ),
XOR ( DI2_NOT ),
OR ( DI1 ),
Using this technique it is necessary to use one register to store the
status of DI 1.
Example 2:
DI ( 1 ),
XOR ( DI1_NOT ),
RGST ( SCRATCH ),
DI ( 2 ),
XOR ( DI2_NOT ),
OR ( SCRATCH ),
The second method uses a scratch register. After the OR instruction, the
register SCRATCH is available to be re-used for other intermediate
results later in the FST.
5.3.3 Split Registers
Every general register in a continuous controller is made up of an analog
portion and a discrete portion. Registers are normally named and used
for one specific function, many times using only the analog portion or the
discrete portion, but not both. It is possible to take advantage of this
situation by doubling up on the usage of registers.
Example:
The analog portion of a reference register contains a fuel BTU value for
use in calculations within the FST. It is also desired to tune the discrete
logic of a discrete input. The analog portion of the register could be
used for the BTU value, and the discrete portion of the register could be
used for the discrete input logic tuning.
Comentarios a estos manuales