Head Entry

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12748
    Med_Support
    Moderator
    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
    
    #12747
    Med_Support
    Moderator
    Gary Bamberger

    Your code looks fine and I believe that it should work, however, in order for the code to work the input needs to be in LEVEL MODE. When the input is in level mode an input is generated every interrupt for as long as a head entry is detected.

    To change the input to level mode you need to remove the card from the interface cabinet and change either the switch (SmartCtrl cards) or the jumper (all others) from Transition (T) to Level (L) Mode for the input in question.

    Please call MED Associates if you need help with doing this.

    Gary

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