castile3
Hello everyone, I currently have a random interval program with each trial being 8 seconds long.
Z6 indicates the start of the trial. The problem I have is keeping track of how long the animal is in the food cup (R5) during the trial. Browsing around I came across a sample code by Gary Bamberg (thank you), and altered it to fit my program. However it did not work for me. Any help would be greatly appreciated
S.S.13,
S1,
#Z6: --->S2
S2,
#R5: ADD G; IF G >= 2 [@RESPONSE, @NORESPONSE]
@RESPONSE: SET G=0 ; Z9 ---> S3
@NORESPONSE: ---> SX
0.02":SET G = 0 --->S2
S3,
0.02": Z10 --->S2
#R5: --->S3
\\******RESPONSE TIMER
S.S.14,
S1,\ wait for a signal that the input has been released.
#Z9: SET A(7)= 0 ---> S2
S2,
0.01": SET A(7) = A(7)+ 0.01 --->S2
#Z10: SET H(J) = A(7); ADD J;SET H(J)= -987.987 ---> S1