[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Can Mealy Machine arcs/paths allow the same output trigger twice?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 2

File: Mealy[1].png (11KB, 169x235px) Image search: [Google]
Mealy[1].png
11KB, 169x235px
Can Mealy Machine arcs/paths allow the same output trigger twice?

I got a vending machine circuit design that accepts 50c, a 1 dollar and 2 dollar coin.
Price of drink is 1.50

What happens if a 1 dollar, and then a 2 dollar coin is put in? The total is 3 dollars, and the 1.50 state is essentially the reset condition which can only be travelled to one, so how does this work?
Can I put a "2" after the slash? How does this work in binary logic?

I'm used to only using one true or false signal for each output cycle.
>>
This is a Burmese pattern-sewing forum why do you think we'll do your homework for you?
>>
You only have one sequential output signal per state. If you want to output multiple things in sequence, you need intermediate states.
>>
Sorry, OP here again.

I thought I could add extra states to allow for a 2.0 dollar coin always being added to the current highest state, but always results in a net 50c extra in the current total, always necessitating a higher state.

>add 50c to Z=1.5 in memory, go to Z=50c, output 1
>add 1.0 to Z=1.5 in memory, go to Z=1.0, output 1
>add 2.0 to Z=1.5 in memory, go to memory state Z=2.0, output 1

>add 50c to Z=2.0 in memory, go to Z=1.0, output 1
>add 1.0 to Z=2.0 in memory, go to Z=1.5 in memory, output 1
>add 2.0 to Z=2.0 in memory, go to Z=2.5 in memory, output 1

>add 50c to Z=2.5 in memory, go to Z=1.5 in memory, output 1
>add 1.0 to Z=2.5 in memory, go to Z=2.0 in memory, output 1
>add 2.0 to Z=2.5 in memory, to to Z=3.0 in memory, output 1...

Starting to see a pattern here where adding 2.0 to the highest state will forever require a higher state and a higher state
>>
>>8885932
Ah, so

>add 2.0 to Z=1.0, go to Z=Return, output 1

>add 0 to Z=Return, go to Z=0.0, output 1
>add 50c to Z=Return, go to Z=50c, output 1
>add 1.0 to Z=Return, go to Z=1.0, output 1
>add 2.0 to Z=Return, go to Z=.....fffuck, it keeps happening.
>>
>>8885935
>>8885964
So before going any further... what do you want to HAPPEN when someone enters a 2 dollar coin after a 1 dollar coin? Nevermind how you represent this as a state machine, what behavior do you want to see?
>>
>>8885984
Ideally I would like for the machine to simply dispense two drinks one after the other without the user having the chance to insert another coin.

Does this then require another output condition that vends two drinks instead of one, a condition reached by no other input except this branch?

That is doable.
>>
>>8886021
No, just an intermediate state. There's a $3 state, which dispenses a drink then moves to the $1.50 state, which dispenses a drink then moves to the $0 state.
>>
File: 129551164590.jpg (3MB, 2560x1600px) Image search: [Google]
129551164590.jpg
3MB, 2560x1600px
>>8886021
It sounds stupid, considering we're dealing with modern electronics that can work with thousands of clock cycles a second.

Could I just ignore the input functions at the previously mentioned Z=RETURN and assume that the no-input clock cycle is too fast for any human being to cram a 2 dollar coin in, producing lost overflow, before it cycles?

>pic not related.
>>
>>8886034
>assume that the no-input clock cycle is too fast for any human being to cram a 2 dollar coin in
Not really -- because while the clock certainly moves faster than a human entering coins, that doesn't mean you can actually dispense drinks faster than I can enter coins.

If you want to do this fully correctly, you'd have to deal with the fact that I can enter coins faster than you can spit out drinks, which means the amount of accumulated money can grow indefinitely, which means you have an infinite state machine. Indeed, any realistic drinks machine will quite happily eat $70 of coins, dispense a drink, and then return $68 of change if I ask it to. So from a theoretical point of view, the lesson is "you cannot represent the behavior of this device with a finite-state Mealy machine".

To what degree you can get away with a simplified version for the sake of the assignment... I couldn't tell you.
>>
>>8886025
Can intermediary states be accounted for on state tables?
>yes anon they can
The point I'm trying to make is that intermediary states haven't been covered in class yet. We have unique states which arc to another state based on any of the possible inputs. In other words, at every state, every input is meant to be calculated.
>inb4 homework thread confirmed
No, not homework, just a personal challenge to learn for a test.

I simply havent heard of intermediary states that use no inputs/a specific input and produce an output while barring the rest. Moreover, I have no idea how one would represent that on a state table since I can't use a "dont care term" for the input.
>>
>>8886065
Its almost starting to look like a better idea is just what I said before about having it trigger the secondary output when it reaches 3.0 dollars, not the first, which dispenses two drinks and goes back to the starting state.

Oh well, thanks for the heads up anyway /sci/.
Thread posts: 12
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.