18 svar
280 visningar
mask134 är nöjd med hjälpen
mask134 505 – Fd. Medlem
Postad: 28 jan 2022 16:24

State Machines.

HI I have a problem and that is I need help with this: 

 

Marge wants to install an alarm that triggers as soon as somebody enters the kitchen. 
The alarm has several alert levelsLevel0: Neither Homer nor Bart is in the kitchen
Level1: Bart but not Homer is in the kitchen
Level2: Homer but not Bart is in the kitchen
Level3: Homer and Bart are in the kitchen
To detect who enters or leaves the kitchen 2 sensors S1 and S2 are installed.
The sensor emits ’1’ as soon as its reflection is interrupted, eg. someone passed three the door.
Bart only enables S2.
Homer enables both S1 and S2.
Due to the size of Homer, they cannot enter pass through the door together.
They can enter or leave the kitchen at any time, in any order.

 

The problem is that I need to create a state machine but I dont know how to solve this problem.

Laguna Online 28607
Postad: 28 jan 2022 16:53

Vilka är tillstånden? Vilka övergångar är möjliga? Vad händer med S1 och S2 vid övergångarna?

Börja så. Rita.

mask134 505 – Fd. Medlem
Postad: 28 jan 2022 17:36

Have you not read the description above. 

Laguna Online 28607
Postad: 28 jan 2022 17:52
mask134 skrev:

Have you not read the description above. 

Vad menar du? Det är din uppgift. Jag leder dig på väg.

Var fastnar du?

mask134 505 – Fd. Medlem
Postad: 28 jan 2022 18:24 Redigerad: 28 jan 2022 18:27

On how to create a state machine that contains 4. That I'm stuck on how to do it. 

Here's the feedback I got from the teacher: 

"The solution is incorrect. The machine is supposed to have 4 states (level 0-3). The answer is also incorrect.

The sensors are only detecting when Homer/Bart are moving thrue the door not continuously while they are in the kitchen". 

Laguna Online 28607
Postad: 28 jan 2022 18:28

Lärarens kommentarer kan vi ju inte bedöma om vi inte ser ditt försök.

mask134 505 – Fd. Medlem
Postad: 28 jan 2022 19:17

Here I tried: 

 

Laguna Online 28607
Postad: 28 jan 2022 21:06

Vad menar du med "S2 which is level 3 alert"?

Jag förstår inte din figur.

Varför talar du om ett fönster? Det står bara om dörren i uppgiften.

mask134 505 – Fd. Medlem
Postad: 30 jan 2022 18:30 Redigerad: 30 jan 2022 18:30

Then I dont know. 

Laguna Online 28607
Postad: 31 jan 2022 09:18

Vi kan börja från början.

Låt oss säga att köket är tomt, och sedan händer följande i tur och ordning:
Bart kommer in
Homer kommer in
Bart går ut
Homer går ut

Vad ska larmet rapportera, och vad är S1 och S2 i varje händelse?

mask134 505 – Fd. Medlem
Postad: 31 jan 2022 14:50

Here is a picture of where S1 and S2:

 

Laguna Online 28607
Postad: 31 jan 2022 15:35

Ja, det där är själva dörren.

mask134 505 – Fd. Medlem
Postad: 31 jan 2022 15:46

Ok but  I dont know what to do next.

Laguna Online 28607
Postad: 31 jan 2022 16:47

Gör det jag beskrev i inlägget från 09:18.

Använd hellre för många ord än för få.

mask134 505 – Fd. Medlem
Postad: 31 jan 2022 23:15

Still I don't know.

Estrella 2
Postad: 8 feb 2022 18:54

Did you solve the problem?

 

I have the the same problem and I dont know how to solve it

Laguna Online 28607
Postad: 8 feb 2022 19:39

Har du förstått tipsen genom tråden?

Estrella 2
Postad: 8 feb 2022 21:59

Lungt, löste det nu :)

mask134 505 – Fd. Medlem
Postad: 15 feb 2022 13:48

Löste det inte. 

Svara Avbryt
Close