Magazine Training for Aves

MEDState Notation Repository › Forums › Coding Help Archive › Magazine Training for Aves

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

    Hello I am working on my first MedPC program and am trying to modify a program I found that Gary Bamberger made in 2013.
    I need a 90 VI with non-contingent food access of 8 sec. (access not delivery as it is a scatter feeding quail feeder not a pellet dispenser).
    I need it to run 60 minutes OR until 20 food hopper entries are made.
    I need to count food hopper entries while the hopper is ON only.
    This is what I am working from, I have made some modifications.

    ...
    \Modified from Gary Bamberger, May 24th 2007; B.A., Rice, July 7th 2016
    \ Magazine Training
    \ Reward VI-90s Reward Present for 8s
    
    
    \ Inputs
    ^HeadPoke = 7
    
    
    \ Outputs
    ^hopper= 7
    
    
    \ Defined Variables
    \  A   = Number of HeadPokes
    \  B   = Number of Rewards
    \  C() = Array for HeadPokes
    \  D   = Reinforcer Timer Array
    
    \  E(1) = HeadPokes in First 10s
    \  E(2) = HeadPokes in 10-20s
    \  E(3) = HeadPokes in 20-30s
    \  E(4) = HeadPokes in 30-40s
    \  E(5) = HeadPokes in 40-50s
    \  E(6) = HeadPokes in 50-60s
    \  E(7) = HeadPokes in 50-70s
    \  E( = HeadPokes in 70-90s
    
    \  I   = Index into Array C
    \  J   = Index into Array L
    \  K   = Index into Array E
    \  L() = Array for Dipper Presentations
    \  M   = Max Time
    \  N   = Session Timer
    \  Q   = Max Reinforcer
    
    
    DIM C = 1000
    DIM E = 1000
    DIM L = 1000
    
    LIST D = 5, 15, 1, 11, 14, 6
    
    
    S.S.1,  \************************************VI 90s Logic
    S1,
    #START: ON ^ SET Q = 15, M = 90 ---> S2
    
    S2,
    0": RANDD X = D; SHOW 2,VI,X; SET X = X * 1" ---> S3
    
    S3,
    X#T: ON ^hopper; ADD B; Z2 ---> S4
    
    S4,
    #R^HeadPoke: ---> S5
    
    S5,
    5": OFF ^hopper ---> S2
    
    
    S.S.2,  \************************************Count Total HeadPokes
    S1,
    #START: SHOW 4,tpoke,A ---> S2
    
    S2,
    #R^HeadPoke: ADD A; SHOW 4,tpoke,A; Z1 ---> SX
    
    
    S.S.4,  \************************************Count HeadPokes in Time Blocks Where G = # seconds
    S1,
    #START: SET E(K+1) = -987.987 ---> S2
    
    S2,
    10": ADD K; SET E(K) = 0, E(K+1) = -987.987 ---> S2
    #Z1: SET C(I) = N; ADD I; SET C(I) = -987.987; ADD E(K) ---> SX
    
    
    S.S.8,  \************************************Time Stamp hopper
    S1,
    #Z2: SET L(J) = N; ADD J; SET L(J) = -987.987 ---> SX
    
    
    S.S.9,  \************************************Session Timer Shut Off
    S1,
    #START: SHOW 1,Session,N ---> S2
    
    S2,
    0.01": SET N = N + 0.01; SHOW 1,Session,N;
    IF N <= M [@True, @False]
    @True: IF Q <= B [@True, @False]
    @True: ---> S3
    @False: ---> SX
    @False: ---> S3
    
    S3,
    0": ---> STOPABORTFLUSH
    
    #12725
    Med_Support
    Moderator
    Jim Frei

    Hi BethAnn,

    I will reply to your email that you sent in.

    Jim

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