The LSSEQ function block has a configurable number of states and a configurable number of outputs. By default the number of states is 16 and the number of outputs is 2. The MATRIX parameter defines a mask for each state that indicates how the outputs should be set when the block is in that state. The LSSEQ block's state can be set in two ways:
If the STATE_IN_D parameter is 1 (True) then STATE is set to the value of the STATE_IN parameter. This allows the block to be driven from another block, for example a State Transition block (LSSTD) whose STATE parameter is wired to STATE_IN of the LSSEQ block.
If the STATE_IN_D parameter is 0 (False) the block remains at its current state unless either the INCREMENT or DECREMENT parameter is set to True, thereby incrementing or decrementing STATE accordingly. If the WRAP parameter is False STATE stops incrementing when the integer value of STATE equals NUM_STATES and stops decrementing when the integer value of STATE equals 1. If the WRAP parameter is True STATE wraps around from NUM_STATES to 1 for an increment and from 1 to NUM_STATES for a decrement.
You can disable the LSSEQ block by setting the ENABLE parameter to False. This sets STATE to 0 and sets all the outputs to 0 (False). When the ENABLE parameter is changed to True and the STATE_IN_D parameter is not set, the block sets STATE to 1 and drives the outputs based on the mask for state 1.
If the STATE_IN_D parameter is 0 (False), setting RESET_SEQ to True resets STATE back to state 1. RESET_SEQ automatically resets to False after use.
In normal operation the outputs of the block are a function of the current state and the configured pattern for that state. However, the parameter OUTPUT_MASK can be manipulated to prevent one or more outputs from being True. Setting bits in OUTPUT_MASK to 1 masks the corresponding output from becoming 1 (True) regardless of what is configured for that state. In practice OUTPUT_MASK is manipulated from within the SIS module by a LSCALC block, for example, based on the current batch phase.