9. Design a Priority Safety Controller

Loading simulator…

Use the following one-hot assignment:

StateQ3Q2Q1Q0
IDLE0001
ACTIVE0010
COMPLETE0100
ERROR1000

The D inputs are obtained directly from the transitions entering each state:

D0 = fault'·Q0·start'
D1 = fault'·(Q0·start + Q1·complete' + Q2·start)
D2 = fault'·(Q1·complete + Q2·start')
D3 = fault·(Q0 + Q1 + Q2) + Q3

The common fault' factor disables all normal destinations when a fault occurs.

D3 then loads ERROR, so the fault path has highest priority.

In ACTIVE, D2 uses complete while the hold term in D1 uses complete'; therefore a simultaneous start = 1 cannot override completion.