Author Topic: #R as an IF Condition  (Read 173 times)

MrMindScience

  • Newbie
  • *
  • Posts: 1
    • View Profile
#R as an IF Condition
« on: November 24, 2016, 05:05:54 pm »
Can #R work as a condition for an IF statement? For instance, is IF (#R^Left Lever press) [@true, @false] a valid command? What if the program loops? Will it automatically be true if the rat pressed the left lever on the previous loop? How can I can't figure out how to get a state set to reset all together nor if I even need to.


Any thoughts?

Jon Beyor

  • Administrator
  • Newbie
  • *****
  • Posts: 7
    • View Profile
    • MED Associates, Inc.
Re: #R as an IF Condition
« Reply #1 on: November 28, 2016, 08:22:13 am »
No, that is not a valid IF statement.

Gary Bamberger

  • Administrator
  • Hero Member
  • *****
  • Posts: 640
    • View Profile
    • MED Associates, Inc.
Re: #R as an IF Condition
« Reply #2 on: December 01, 2016, 11:49:05 am »
Not certain what you are trying to accomplish here.  You can have more than one input in a State so it is possible to know if the response was a Left Lever Press or a Right Lever Press:

     S5,
       #R^LeftLever: ---> S6  \ Correct Response
       #R^RightLever: ---> S7 \ Incorrect Response


You can even have the Right Lever Press arrow back to S5 with ---> SX or ---> S5.

I hope that this information helps.  In order to give you a more specific answer I would need to know exactly what you are trying to do.

Gary