#R as an IF Condition

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12300
    Med_Support
    Moderator
    MrMindScience

    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?

    #12324
    Med_Support
    Moderator
    Jon Beyor

    No, that is not a valid IF statement.

    • This reply was modified 8 years, 9 months ago by Med_Support.
    • This reply was modified 8 years, 9 months ago by Med_Support.
    • This reply was modified 8 years, 9 months ago by Med_Support.
    • This reply was modified 8 years, 9 months ago by Med_Support.
    • This reply was modified 8 years, 9 months ago by Med_Support.
    #12327
    Med_Support
    Moderator
    Gary Bamberger
    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Software Help Archive’ is closed to new topics and replies.