Simple VI-5 schedule

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13208
    Med_Support
    Moderator
    AlcoholLab

    Hello All,

    We’re from a small undergraduate research lab and we recently wrote our first program ever. Below is our slightly faulty VI-5 program. Any help would be appreciated. Our operant chambers are functioning correctly as we were able to run other programs (i.e. FRs), but we can’t seem to get the post-interval response to bring in the bottles. Any suggestions?

    \ This program is called LongTrainLeftVI.MPC
    
     
    
    \Outputs
    ^Houselight=7
    ^LeftLever=2
    ^LeftBottle=6
    
    \Inputs
    ^LeftLeverResp=1
    ^LeftLick=4
    
    \Define Variables
    \A=Responses
    \B=Reinforcers
    \C=Data array variables
    \.1=LeftLever
    \.2=LeftReinforcer
    \.3=LeftLick
    \D=Licks
    \E=Left VI value (output array)
    \F=Time since first press
    \G=total number of events
    \L Through P= Dummy
    \T=timer, incremented in hundredths of seconds
    
     
    
    \Dimensions of arrays
    DIM C =10000
    LIST E = 2, 4, 5, 6, 8 \these are possible
    interval variables
    
     
    
    S.S. 1, \instructions
    and operant chamber start
    S1,
    1": SHOW 1, LOAD, L ; SHOW 2, RAT, M ; SHOW 3, AND, N ; SHOW 4, ISSUE, O ; SHOW 5,
    START, P ---> S2
    S2,
    #START: CLEAR 1, 60 ;
    ON ^Houselight ;
    ON ^LeftLever ---> SX
    
    S.S.2, \begin session and main VI logic
    S1,
    #START: ---> S2
    S2,
    .01": RANDD X = E ; SHOW 1, VI=, X ; SET X = X*1" ---> S3
    S3,
    
    X#T: ---> S4
    S4,
    #R^LeftLeverResp: ON ^LeftBottle; Z1; Z2 ---> S5
    S5,
    10": OFF ^LeftBottle ---> S2
    
    S.S.3, \ Response count and display
    S1,
    #START: SHOW 2, RESP, A ---> S2
    S2,
    #R^Left Lever: ADD A; SHOW 2, RESP, A ---> SX
    
    S.S.4, \Reward counter and display
    S1,
    #START: SHOW 3, REINF, B ---> S2
    S2,
    #Z1: ADD B; SHOW 3, REINF, B ---> SX
    
    S.S.5, \Lick Counter
    S1,
    #START : SHOW 4, LICKS, D ---> S2
    S2,
    #R ^LeftLick : ADD D ; SHOW 4, LICKS, D --->SX
    
    S.S. 6,
    \Data array control
    S1,
    #START : ---> S2
    S2,
    #R^LeftLever : ADD G; SET C (G+100)=T+.1 ; SET C (G+101)= -987.987 --->S2
    #R^LeftLick : ADD G; SET C (G+100)=T+.3 ; SET C (G+101)= -987.987 --->S2
    #Z2: ADD G; SET C (G+100)=T+.2 ; SET C (G+101)= -987.987 --->S2
    
    S.S. 7, \Time increment in 0.1 second intervals
    S1,
    #START : ---> S2
    S2,
    .1" : SET T = T+.1 ---> SX
    
    S.S. 8, \IRT array
    S1,
    #START : ---> S2
    S2,
    #R^LeftLever : SET C(I) = T, T=0 ; ADD I ;
    SET C(I) = -987.987 ---> SX
    
     
    
    S.S. 9, \Session timer
    S1,
    #START : ---> S2
    S2,
    300' : PRINT ---> STOPABORTFLUSH
    
    #13209
    Med_Support
    Moderator
    Dave Hughes

    AlcoholLab,

    The program seems to be working fine when I tested it. The only issue I saw was that your response counter in S.S.3 was counting ^LeftLever, which is defined as an output in your program. Since it was still defined as 2, a response on the second input would increase this counter in MED-PC IV.

    I do not have your specific hardware here in my office, and I only have the SmartCTL card to rely on when checking to make sure a program is working properly. Check to make sure that output 6 is turning on (in the Interface Cabinet) when a post-interval response is made.
    – If the light comes on then the program is working fine, and I would check to make sure the hardware is working properly.
    – If the light does not come on then there could be a proplem with a bad output.

    Make this quick check and let me know what you get when trying this out.

    Dave

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