ATMT – Finite-state automaton
Block SymbolLicensing group: STANDARD
Function Description
The ATMT block implements a finite state machine with at most 16 states and 16 transition
rules.
The current state of the machine , is indicated by the binary outputs Q0, Q1, …, Q15. If the state is active, the corresponding output is set to Q=on. The current state is also indicated by the ksa output ().
The transition conditions , are activated by the binary inputs C0, C1, …, C15. If the k-th transition condition is fulfilled. The transition cannot happen when .
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 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 the REXYGEN system 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 ATMT block.
Inputs
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 | The transition conditions; means that the -th condition was fulfilled and the corresponding transition rule can be executed | Bool |
Outputs
Q0…Q15 | Output signals indicating the current state of the automat; the current state is indicated by | Bool |
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 |
Parameters
morestps | Allow multiple transitions in one cycle of the automat | Bool |
|
|
|
sfcname | Filename of block configurator data file (filename is generated by system if parameter is empty) | String |
STT | State transition table (matrix) [0 0 1; 1 1 2; 2 2 3; 3 3 0] | Byte (U8) |
touts | Vector of timeouts , , …, for the states , , …, [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16] | Double (F64) |
[Previous] [Back to top] [Up] [Next]
2023 © REX Controls s.r.o., www.rexygen.com