Project: MWOven
The project is one of several variants that are discussed on the web side in the context of Mealy and Moore models.

VFSM type: CMD(predefined vfsm)
Object name: MW:MyCmd

Properties
NameValue
Typemwoven

VFSM type: TI(predefined vfsm)
Object name: MW:Ti:CookingTime

Properties
NameValue
ConstMW:Ni:CookingTime
Clock100ms

VFSM type: DI(predefined vfsm)
Object name: MW:Di:Door
Object name: MW:Di:Run

VFSM type: DO(predefined vfsm)
Object name: MW:Do:Lamp
Object name: MW:Do:Power

VFSM type: NI(predefined vfsm)
Object name: MW:Ni:CookingTime

Properties
NameValue
Formatshort
Unitsec
ScaleModeLin
ScaleFactor1
Offset0
Threshold0

VFSM type: SWIP(predefined vfsm)
Object name: MW:Swip:Timeout

Properties
NameValue
InputMW:Ni:CookingTime
LimitLow1
LimitHigh10000

VFSM type: MWOven(user vfsm)

Prefix: MEA

Object name: MWOven

Properties
NameValue
MyCmdMW:MyCmd
TimerMW:Ti:CookingTime
Di_DoorMW:Di:Door
Di_RunMW:Di:Run
Do_LampMW:Do:Lamp
Do_PowerMW:Do:Power
Swip_TimeoutMW:Swip:Timeout

IOid name: MyCmd (type: CMD-IN)

IOid name: Timer (type: TI)
-->Virtual Input: Timer_OVER (OVER)
-->Virtual Input: Timer_RESET (RESET)
-->Virtual Output: Timer_Reset (Reset)
-->Virtual Output: Timer_Start (Start)
-->Virtual Output: Timer_Stop (Stop)

IOid name: Di_Door (type: DI)
-->Virtual Input: Door_Closed (LOW)
-->Virtual Input: Door_Open (HIGH)

IOid name: Di_Run (type: DI)
-->Virtual Input: Di_Run (HIGH)
-->Virtual Input: Di_Stop (LOW)

IOid name: Do_Lamp (type: DO)
-->Virtual Output: Do_LampOff (Low)
-->Virtual Output: Do_LampOn (High)

IOid name: Do_Power (type: DO)
-->Virtual Output: Do_PowerOff (Low)
-->Virtual Output: Do_PowerOn (High)

IOid name: Swip_Timeout (type: SWIP)
-->Virtual Input: Swip_TimeoutNotZero (IN)
-->Virtual Output: Swip_Timeout_On (On)

State transition table, state ' Init ':
Usually, the state machine goes directly to its Idle state.

Init
EntryAction:
ExitAction:
Idle
always

State transition table, state ' Idle ':
Entering the state the switchpoint is activated. Opening and closing the door switches the Lamp on and off. If the Run button becomes active and the Timeout value is not zero the state machine goes to the state Cooking.

Idle
EntryAction:
Swip_Timeout_On
ExitAction:
Door_Closed
Do_LampOff
Door_Open
Do_LampOn
Cooking
Di_Run and Door_Closed and Swip_TimeoutNotZero

State transition table, state ' Cooking ':
Entering the state the state machine switches on the Lamp and applies the Power. In addition, it starts the Timer which timeout determines the cooking time. Cooking can be interrupted at any time by opening the Door.

Cooking
EntryAction:
Do_LampOn
Do_PowerOn
Timer_Start
ExitAction:
CookingInterrupted
Door_Open
CookingCompleted
Timer_OVER

State transition table, state ' CookingInterrupted ':
Entering the state the state machine switches off the Power and stops the Timer. Cooking continues when the Door is closed.

CookingInterrupted
EntryAction:
Do_PowerOff
Timer_Stop
ExitAction:
Cooking
Door_Closed

State transition table, state ' CookingCompleted ':
Entering the state the state machine switches off the Lamp and the Power. In addition, it stops the Timer. Opening the Door switches the Lamp on. If the Run button is not active the state machine returns to the state Idle.

CookingCompleted
EntryAction:
Do_LampOff
Do_PowerOff
Timer_Reset
ExitAction:
Door_Open
Do_LampOn
Idle
Di_Stop

State transition table, state ' ResetTimer ':
ResetTimer
EntryAction:
ExitAction:
Total number of states: 6

VFSM type: DI8(unit)
Prefix: DIU

Object name: MW:DI8:Unit1

Properties
NameValue
CommPort0
PhysAddr1
Di0MW:Di:Door
Di1MW:Di:Run
Di2
Di3
Di4
Di5
Di6
Di7

IOid name: Di0 (type: DI)

IOid name: Di1 (type: DI)

IOid name: Di2 (type: DI)

IOid name: Di3 (type: DI)

IOid name: Di4 (type: DI)

IOid name: Di5 (type: DI)

IOid name: Di6 (type: DI)

IOid name: Di7 (type: DI)

VFSM type: DO8(unit)
Prefix: DOU

Object name: MW:DO8:Unit3

Properties
NameValue
CommPort0
PhysAddr3
Do0MW:Do:Lamp
Do1MW:Do:Power
Do2
Do3
Do4
Do5
Do6
Do7

IOid name: Do0 (type: DO)

IOid name: Do1 (type: DO)

IOid name: Do2 (type: DO)

IOid name: Do3 (type: DO)

IOid name: Do4 (type: DO)

IOid name: Do5 (type: DO)

IOid name: Do6 (type: DO)

IOid name: Do7 (type: DO)

VFSM type: NI4(unit)
Prefix: NI4

Object name: MW:NI4:Unit5

Properties
NameValue
CommPort0
PhysAddr5
Ni0MW:Ni:CookingTime
Ni1
Ni2
Ni3

IOid name: Ni0 (type: NI)

IOid name: Ni1 (type: NI)

IOid name: Ni2 (type: NI)

IOid name: Ni3 (type: NI)