end program after trials

MEDState Notation Repository Forums Coding Help Archive end program after trials

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13055
    Med_Support
    Moderator
    Gary Bamberger

    So you want a certain number of trials and then the program will end.

    S.S.1,
    S1,
    #START: ON ^LeftLever; ADD T ---> S2
    
    S2,
    #R^LeftLever: OFF ^LeftLever; Z^Reward ---> S3
    1': OFF ^LeftLever ---> S3
    
    S3,
    30": IF T >= 60 [@Done, @Cont]
    @Done: ---> STOPABORTFLUSH
    @Cont: ON ^LeftLever; ADD T ---> S2
    

    Hopefully this example demonstrates how you can accomplish what you need for your program.

    #13054
    Med_Support
    Moderator
    labrat

    Is there a benefit to always ending a program after a fixed set of time?
    I am interested in writing code to end after 60 presentations of a lever rather than after a fixed set of time like this:

    30': ---> STOPABORTFLUSH
    

    I do not want the program to be closed after a fixed set of responses like this:

    5#R^Left Lever--->STOPABORTFLUSH :)
    

    But after 60 presentations of the left lever?

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.