modelInputReactivity

Verification scenario no. 3: GP1 (input) toggles during a sleep(3600), the script must react without waiting for the end of the sleep

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Expected result: mcu.GP0.v stays low until t≈10 s then goes high shortly after (not at t=3600 s, the nominal deadline of the sleep) - the simulation log shows "woken up, GP1 = 1".

Components

TypeNameDefaultDescription
MCUmcuscriptPath = Verification/input_reactive.py
Modelica.Electrical.Analog.Basic.Groundground
Modelica.Electrical.Analog.Basic.ResistorledLoad simulating an LED on GP0
Modelica.Electrical.Analog.Sources.SignalVoltagebtnSrcDrives GP1 from outside
Modelica.Blocks.Sources.StepbtnStepToggles GP1 at t=10 s, while the script sleeps