Trouble with (what should be a simple) FR DD program

MEDState Notation Repository Forums Coding Help Archive Trouble with (what should be a simple) FR DD program

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

    This is my first attempt at writing a program…I’m hitting some errors..I want a simple FR program where a fixed ratio on a lever results in pellet delivery and the stimulus light above that lever flashing. So far all I seem to get is the levers coming out at the start and the house light turning on….what else is wrong? The pellet does not get delivered after FR on the right lever..?

     

    
    \FR1 program mouse operant boxes
    \REWARDS FOR FR AT RIGHT LEVER
    
     
    
     
    
    \INPUTS
    ^LLVR out = 1
    ^RLVR out = 2
    
     
    
     
    
    \Outputs
    ^LLVR = 1
    ^RLVR = 2
    ^FEED = 3
    ^RSLT = 4
    ^LSLT = 5
    ^HSLT = 7
    
     
    
    \A=RUNNING COUNTER FOR RIGHT Rs TOWARDS FR
    \B=TOTAL NUMBER OF DIPPER DELIVERIES
    \C=RIGHT SIDE RESPONSE RATE
    \D=
    \I=
    \L=TOTAL LEFT LEVER RESPONSES
    \T=SESSION TIME IN SECS
    \P=FR VALUE
    \R=TOTAL RIGHT LEVER RESPONSES
    
     
    
     
    
    LIST P=1
    
     
    
     
    
    S.S.1,
    
     
    
    S1,
    #START:ON ^HSLT;ON^LLVR;ON^RLVR;SET B=0,A=0,T=0--->S2
    
     
    
    S2,
    #R1:ADD L;SET A=0--->SX
    #R2:ADD A;ADD R; IF A=P(0) [@TRUE,@FALSE]
    @TRUE:ON ^FEED,^RSLT--->S3
    @FALSE:--->S2
    
     
    
    S3,
    3":OFF ^FEED,^RSLT;ADD B;SET A=0 --->S2 \PRESENTS FEED, RESET RUNNING RESP OF FR
    #R1:ADD L--->SX
    #R2:ADD R--->SX
    
     
    
     
    
    S.S.2,
    
     
    
    S1,
    #START:--->S2
    
     
    
    S2,
    900": OFF ^RSLT;SET C=R/900;ALERTON--->STOPABORTFLUSH
    
     
    
     
    
    S.S.3,
    
     
    
    S1,
    #START:--->S3
    
     
    
    S3,
    1":ADD T--->SX
    
     
    
     
    
    S.S.4,
    
     
    
    S1,
    #START:SHOW 1,LLVR,L,2,RLVR,R,3,REIN,B,4,RATE,C,5,SECS,T--->S2
    
     
    
    S2,
    2":SET C=R/900;SHOW 1,LLEV,L,2,RLEV,R,3,REIN,B,4,RATE,C,5,SECS,T--->S3
    
     
    
    S3,
    2":SET C=R/900;SHOW 1,LLEV,L,2,RLEV,R,3,REIN,B,4,RATE,C,5,SECS,T--->S2
    
    #12980
    Med_Support
    Moderator
    Gary Bamberger

    I just ran your program and it seems to be working.  A response on the Right Lever turned on the Pellet Feeder and the Right Light for 3s.  Responses on either Lever during those 3s were counted, but had no affect.  After those 3s another response on the Right Lever turned on the Pellet Feeder and Right Light for 3s again.

    Make sure that your Inputs/Outputs are wired up correctly and/or that your MED-PC IV Hardware Configuration file is setup correctly.

    Here is how the Inputs/Outputs are defined in your program:

    \ Inputs
    ^LeftLever  = 1
    ^RightLever = 2
    
    \ Outputs
    ^LeftLever  = 1
    ^RightLever = 2
    ^Feeder     = 3
    ^RightLight = 4
    ^LeftLight  = 5
    ^HouseLight = 7
    

     

    Gary

    #12983
    Med_Support
    Moderator
    batters27
    Thanks. I’ll have to recheck the wiring!
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.