Programming a a conjunctive FT10.39” FR1 schedule

MEDState Notation Repository Forums Coding Help Archive Programming a a conjunctive FT10.39” FR1 schedule

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

    Hi there!

    I am having problems in programming a conjunctive FT10.39” FR1 schedule in an experiment I want to run. My procedure is a MTS (matching-to-sample) and my idea is to require that the sample be presented during 10.39 seconds and that at least one response occurs during that period, so that the sample is turned off and the comparisons are turned on. If the response requirement is not met, the trial will start again.

    I have written the following code but it is not working and I think the problem is in the state S3. At this point the sample is turned on and it stays indefenitly turned on…

    S.S.2,
    
    S1,
    #START:--->S2
    
    S2,
    #Z1:--->S3 \ Z1 is activated when the sample will be the center key illuminated with red color
    
    S3,
    0.01": ON^CenterRed--->S4 \ Illuminates the center key with red color
    #R^CenterKey: ADD B--->SX \Counts the responses to the center key
    
    S4,
    10.39":IF B>0 [@True,@False] \If during a fixed time of 10.39 seconds a response has occured the go to the comparisons' presentation, Otherwise go to the ITI and the trial is reinitiated
    
    @True: SET B=0--->S5
    @False:--->S7
    
    S5,
    0.01":OFF^CenterRed; RANDD P=Q; IF P=1 [@True,@False] \ Sampling of the comparisons' position
    
    @True:ON ^LeftYellow, ^RightBlue; Z8; Show 2, Comp,P--->S6
    @False:ON ^LeftBlue, ^RightYellow; Z9; Show 2, Comp,P--->S6
    
    S6,
    #Z5:--->S2 \Correct response
    #Z6:--->S2 \Incorrect response (correct was on the left)
    #Z7:--->S2 \Incorrect response (correct was on the right)
    
    S7,
    ^ITI":--->S3
    

    Can you help me?
    What is the problem with the code? Can you suggest me another way to write what I want?

    Cheers,

    Catarina and Liane

    #13106
    Med_Support
    Moderator
    Gary Bamberger

    Hello Liane,

    In S3 you are waiting only 10ms for the animal to respond. Not much time for a response to happen. If you change the code as follows it should do what you want:

    S3,
      0.01": ON ^CenterRed ---> S4
    
    S4,
      10.39": IF B > 0 [@True, @False]
                 @True: SET B = 0 ---> S5
                 @False: ---> S7
      #R^CenterKey: ADD B ---> SX
    

    Gary

    #13109
    Med_Support
    Moderator
    lianedahas

    Thank you, Gary, now it is working.

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