EATMT – Extended finite-state automaton
Symbol blokuPotřebná licence: ADVANCED
Popis funkce
The EATMT block implements a finite automat with at most 256 states and 256 transition rules,
thus it extends the possibilities of the ATMT block.
The current state of the automat , is indicated by individual bits of the integer outputs q0, q1, …, q15. Only a single bit with index of the output is set to 1. The remaining bits of that output and the other outputs are zero. The bits are numbered from zero, least significant bit first. Note that the and operators denote integer division and remainder after integer division respectively. The current state is also indicated by the output.
The transition conditions , ) are activated by individual bits of the inputs c0, c1, …, c15. The k-th transition condition is fulfilled when the -th bit of the input is equal to 1. The transition cannot happen otherwise.
The BMHEXD or BMOCT bitwise multiplexers can be used for composition of the input signals c0, c1, …, c15 from individual Boolean signals. Similarly the output signals q0, q1, …, q15 can be decomposed using the BDHEXD or BDOCT bitwise demultiplexers.
The automat function is defined by the following table of transitions:
… | ||
Each row of this table represents one transition rule. For example the first row
has the meaning
If
(
is the current state AND transition condition
is fulfilled)
then proceed to the following state
.
The above described meaning of the table row holds for . Negation of the -th transition condition is assumed for .
The above mentioned table can be easily constructed from the automat state diagram or SFC description (Sequential Function Charts, formerly Grafcet).
The input resets the automat to the initial state . The SET input allows manual transition from the current state to the ns0 state when rising edge occurs. The R1 input overpowers the SET input. The input freezes the automat activity, the automat stays in the current state regardless of the c input signals and the tstep timer is not incremented. The TOUT output indicates that the machine remains in the given state longer than expected. The time limits for individual states are defined by the touts array. There is no time limit for the given state when is set to zero. The TOUT output is set to off whenever the automat changes its state.
It is possible to allow more state transitions in one cycle by the morestps parameter. However, this option must be thoroughly considered and tested, namely when the TOUT output is used in transition conditions. In such a case it is strongly recommended to incorporate the ksa output in the transition conditions as well.
The development tools of REXYGEN include also the SFCEditor program. You can create SFC schemes graphically using this tool. Run this editor from REXYGEN Studio by clicking the Configure button in the parameter dialog of the EATMT block.
Vstupy
R1 | Reset signal, brings the automat to the initial state S0; the R1 input overpowers the SET input | Bool |
ns0 | This state is reached when rising edge occurs at the the SET input | Long (I32) |
SET | The rising edge of this signal forces the transition to the ns0 state | Bool |
HLD | The freezes the automat, no transitions occur regardless of the input signals, tstep is not increasing | Bool |
c0…c15 | Transition conditions, each input signal contains 16 transition conditions, see details above |
|
Výstupy
q0…q15 | Output signals indicating the current state of the automat, see details above | Long (I32) |
ksa | Integer code of the active state | Long (I32) |
tstep | Time elapsed since the current state was reached; the timer is set to 0 whenever a state transition occurs | Double (F64) |
TOUT | Flag indicating that the time limit for the current state was exceeded | Bool |
Parametry
morestps | Allow multiple transitions in one cycle of the automat | Bool |
|
|
|
sfcname | Jméno souboru, kam si konfigurátor bloku ukládá data (pokud se nevyplní, zvolí se automaticky podle jména bloku) | String |
STT | State transition table (matrix) [0 0 1; 1 1 2; 2 2 3; 3 3 0] | Short (I16) |
touts | Vector of timeouts TO0, TO1, …, TO255 for the states , , …, [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] | Double (F64) |
[Předchozí] [Na začátek] [Výše] [Další]
2023 © REX Controls s.r.o., www.rexygen.com