|
\Discrimination \This program will turn the light on and off \and a response delivers a pellet when the cue light is on. \Define constants for stimuli and responses ^RightLever=1 ^LeftLever=2 ^OmniLever=3 ^Handswitch=4 ^Houselight=1 ^RightLight=2 ^Feeder=3 ^LeftLight=4 ^RightNoise=5 ^LeftNoise=6 ^ExternalLight=7 \Z1 Starts and Stops the timer used to record latencies in S + \Z2 starts and stops the timer \Variable R is used to keep track of trial number DIM A = 121 \Keeps the latencies to respond in S + DIM B = 121 \Keeps the number of responses in S-Delta DIM D = 121 \Keeps a record of the S- Duration
s.s.1, s1, #Start:--->s2 \Start command will be issued from the keyboard s2, #R ^Handswitch:On ^Houselight;Z2;Z1;Z3 --->s3 \Handswitch turns light on \Starts an S+ trial \Z1 starts S+ timer \Z2 stops S- timer s3, #R^RightLever ! #R^Leftlever:Z1;On^Feeder--->s4 \Lever press delivers s4, \a pellet and .05":Off^Feeder, ^HouseLight;Z2--->s2 \turns off the light \Z1 Stops S + timer \Z2 Starts S - Timer \Records S+ trial latencies \ S. S. 2, S1, #Start:--->S2 s2, #Z1:Set T=0---> S3 \When the HouseLight is turned on \Start timing s3, 1":ADD T --->SX #Z1: Set A(R)= T--->s2 \Records duration of the S+ Period \Records S- Trial Duration and number responses during S-Delta S. S. 3, S1, #Start:--->S2 S2, #Z3:--->s3 \After the first time the Handswitch is pressed s3, #Z2:SET U=0, D(R)=0,B(R)=0 --->s4 \wait for the first pellet delivery to start \To start timing the S-delta period. s4, 1":ADD U --->SX #Z2:Set D(R)= U;Show 2, SDltr=,B(R),3,Splst=, A(R);ADD R; Show 1, TRIAL=, R;IF R=120 [@T,@F] \After 120 S delta trials the \Program will stop. @T:--->STOPABORTFLUSH @F:Set A(R)=-987.987,B(R)=-987.987,D(R)=-987.987--->S3 #R^RightLever ! #R^LeftLever: ADD B(R)--->sx \Issue a K99 to stop early. \Records the last S- trial latency #K99:Set D(R)=U, A(R+1)=-987.987, B(R+1)=-987.987, D(R+1)=-987.987--->stopabortflush |