session timer issue

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12820
    Med_Support
    Moderator
    andersem

    Hi there,

    I am using the attached program for progressive ratio. All works great (there is a 20 second time out, the session runs for five hours or an hour without a reward being received) HOWEVER, the session run time is not in seconds or minutes but rather some arbitrary number. Do you know how I can fix this?

    Also, is there a way to code and display the time since the last pellet was received?
    Thanks!

    PR time issue.txt

    #12821
    Med_Support
    Moderator
    Jon Beyor

    andersem,

     

    The program currently runs in decimal minutes,  EXAMPLE: 1.50 = 1 minute 30 seconds.

     

    You can change it to just seconds by going to line 127 in bold below (S.S.1, S3,) and remove the /60 so that it reads SHOW 1, Session,S;

    S3,     \ Time Session Length
    0.01″: SET S = S + 0.01;
    SHOW 1,Session,S/60;

     

    Here is some code to set a reward timer (add another State Set) you could bin Y if you wanted to as well.

    
    \***************************************************
    \               LAST REWARD  TIMER
    \***************************************************
    S.S.5,
    S1,
    #ZA(^RewardDevice): ---> S2
    
     
    
    S2,
    #ZA(^RewardDevice): Set Y = 0 --->S2
    0.1": SET Y = Y + 0.1;
    SHOW 6,Last Reward,Y ---> S2
    

     

    Regards,
    Jon

    #12824
    Med_Support
    Moderator

    The time now is in seconds. I deleted the S/300 in S.S.1, S3 and I think that is what you meant. The last reward timer is not showing up in the display. I changed ^rewarddevice to ^pellet and that still did not work. I also tried changing it to 7 since 6 is softCRcode in S.S.1, S2. Any other ideas for why it may not be working? Thanks!

    #12826
    Med_Support
    Moderator
    Jim Frei

    Hi Andersem,
    Jon had to leave early today so he asked me to check in. He gave me some code but I’m not sure if it’s the same as the one you’re working from. The last reward timer shows up fine in the version I have. You need to make sure you have enough rows showing in your display. Look near the top of Med-PC and you’ll see “Summary Show Rows”, make sure you have this set to at least 2 if your reward timer is in block 7.
    If you’re still having trouble please post the code you’re working from and I’ll take a look.
    j

    #12828
    Med_Support
    Moderator
    andersem

    That’s all it needed, thanks!
    Now for a non coding question:
    Is there a specific protocol to tell how much weight it takes for the lever to consider a press? Do I set a weight on it or drop a weight from a certain height?

    #12831
    Med_Support
    Moderator
    Jim Frei

    Depends on which lever you have. Some like the ultra-sensitive levers are set at the factory and are not adjustable. Others have a little spring and nut that can be used to adjust the tension on the spring which adjusts the force needed to press the lever. With this type of user adjustable lever you could probably set (don’t drop) a small weight of the value you desire and it would be close enough. Ie: you need 2g of force, place a 2g weight on the lever and see if an input is recorded.

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