"And" operator in a state machine

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"And" operator in a state machine
#1
Hi Josh,
I want to set the input for state transition to include two events, meaning that if both conditions are met than the state machine should move to state X (like using "and" between the two inputs).
I thought of creating a dummy state with timer zero that if the first condition is met than it checks if the second also occurred and than move to the desired state, but I thought there may be a more elegant and efficient way for doing this. 
Any ideas?
Reply
#2
Hello Noa


Unfortunately, the current state machine framework requires you to use multiple states to process "and".


-Josh
Reply
#3
(09-28-2017, 05:24 AM)Josh Wrote: Hello Noa


Unfortunately, the current state machine framework requires you to use multiple states to process "and".


-Josh

Thank you Josh,
I have another two questions regarding state machine syntax-
1. Is there a way to send the state matrix to the previous state following a certain input event? (instead of a pre-defined state?)
(Specifically I would like to use it in the dummy state that detects "and" between two events, if only one occurred I want the state machine to go back to the previous state where there are multiple states that can lead to this dummy state. 
2. What is the difference between using 'exit' and 'end' for terminating a trial? 

Noa
Reply
#4
Hello Noa

The current software does not provide a syntax to go to the previous state - this is actually a great feature to have. I'll try to add it with the next update (which will also include partial support for B-control and several other improvements).

'end' shouldn't terminate a trial at all; only 'exit'. Does 'end' work?

-Josh
Reply
#5
(09-28-2017, 05:59 PM)Josh Wrote: Hello Noa

The current software does not provide a syntax to go to the previous state - this is actually a great feature to have. I'll try to add it with the next update (which will also include partial support for B-control and several other improvements).

'end' shouldn't terminate a trial at all; only 'exit'. Does 'end' work?

-Josh

Hi Josh,
Looking forward to your next update then....

Actually I haven't tried 'End', just saw it in the example in the wiki... (https://sites.google.com/site/bpoddocume...ol-writing)
I use 'exit' to terminate a trial, just wondered if I missed anything. 

Thanks,
Noa
Reply
#6
Ah, thank you for the tip - documentation corrected!
Reply
#7
FYI, the "back" feature is supported in the latest release (requires a firmware update).
Proper syntax is shown in this example.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)