05-05-2019 09:24 AM
Hello
I am making a calculator using state machine
not an event-driven machine
but I can not run as a calculator
almost I thought that it was finished.
because string that I had clicked didn't go for wait for event to user state 1
I think it would be very easy for people who are accustomed to dealing with problems.
Thank you.
Gracias por su ayuda.
05-05-2019 10:04 AM
Some comments:
You might well have done this in your code-that-I-couldn't-read-clearly, but it looks like you were testing for the Operators and then Operating in one step -- the beauty of a State Machine is you break the problem into States, and "natural" States (in my simple model) are Parse and Operate.
Bob Schor
05-05-2019 06:35 PM
Hello
I want to ask you about the state machine
I was testing a calculator using state machine
Suppose If I click 2+3
I thought that the result should come out
But I can not connect from wait for event and state 1
How can I connect from wait to event and state 1 so that I can get the result????
It would be great help if you can find any solutions.
Thank you so much.
05-05-2019 09:38 PM
I don't understand your message.
You talk about a "wait for event", but your VI doesn't have any event structures.
And the sentence "I cannot connect from wait for event and state 1" just isn't clear what you mean.
05-07-2019 09:19 PM - edited 05-07-2019 09:20 PM
Hi kias3399,
I can understand your question. You're asking why the program is not turning to "User State 1" case from the "Wait for Event" case after you click 2+3= button right?
Well from the code that you've sent, there are a few broken wires in both cases. In the "Wait for Event", make sure you remove the next state enum indicator and try to rewire the enum to the shift register as below
And in the "User State 1" case, I recommend you to delete the enum indicator and rewire again as below:
There are still so much thing to do by your own to complete this program, but for this forum topic, this I so far that I can help.
Thank you.
05-07-2019 09:44 PM
@Sogekking091 wrote:
Hi kias3399,
Well from the code that you've sent, there are a few broken wires in both cases. In the "Wait for Event", make sure you remove the next state enum indicator and try to rewire the enum to the shift register as below
Where did you see broken wires? I didn't see any. The VI was broken because the typedef for the enum wasn't attached, but beyond that, no broken wires.
05-07-2019 09:47 PM
My bad, almost forgot about that though. You're right! RavensFan