Adjust FR code to allow for Intermittent Access
MEDState Notation Repository › Forums › Coding Help Archive › Adjust FR code to allow for Intermittent Access
- This topic has 0 replies, 1 voice, and was last updated 6 years, 1 month ago by
matb6b.
-
AuthorPosts
-
June 12, 2020 at 2:34 pm #16005
matb6b
ParticipantI have an existing code that is being used in the laboratory for self-administration on an FR schedule of reinforcement. I am looking to alter the code in order to have animals respond on an intermittent access schedule (i.e. can respond for 5 minutes, followed by a 25 minute “off period,” and repeating the pattern.)
I believe I need to adjust the List Z but was unsure how to do so without disrupting the entire code.
\***************************************************
\ Drug Self Infusion Schedule
\ S1 – Set Default Values
\ Session Length (120 minutes)
\ Correct Lever (2-Right)
\ Maximum Number of Infusions (100)
\ Fixed Ratio Value (1)
\ Infusion Time (2 seconds)
\ Time Out Following Infusion (0 seconds)
\ SoftCR Data Array (1-Yes)
\***************************************************
S.S.1,
S1,
0.01″: SET A(^Session) = 120, A(^CorrectLev) = 2, A(^MaxRewards) = 100;
SET A(^FRVal) = 1, A(^RewardTime) = 2, A(^TimeOut) = 0;
SET A(^SoftCR) = 1, A(^StimTime) = 2;
SET C(I) = -987.987 —> S2 \ Seal ArrayS2, \ First Statement: Wait for START signal, turn HouseLight ON
\ and extend Levers
\
\ Second Statement: Update screen display with default values
\ for Control Variables. This will show any changes made via
\ the “Configure | Change Variables” Window prior to START.
#START: CLEAR 1,200;
SET A(^RewardTicks) = A(^RewardTime) * 1″;
SET A(^TimeOutTicks) = A(^TimeOut) * 1″;
SET A(^StimTime) = A(^StimTime) * 1″;
ON ^HouseLight, ^LeftLeverOut, ^RightLeverOut —> S3
1″: SHOW 1,Session Length,A(^Session), 2,Correct Lever,A(^CorrectLev), 3,Max Infusions,A(^MaxRewards);
SHOW 4,FR Value,A(^FRVal), 5,Infusion Time,A(^RewardTime), 6,Time Out,A(^TimeOut);
SHOW 7,SoftCR Code,A(^SoftCR) —> SXS3, \ Time Session Length
\ Issue End of Session Signal unless Pump On
0.01″: SET S = S + 0.01;
SHOW 1,Session,S/120;
IF S/120 >= A(^Session) [@EndUnlessInfusionOn, @Continue]
@EndUnless: IF S.S.2 = 4 [@Wait, @EndSession]
@Wait: —> S4
@End: Z^Z_End —> S5
@Continue: —> SX
#Z^Z_End: —> S5S4, \ Wait for End of Last Infusion and Time out Following Infusion
\ Issue End of Session Signal
#Z^Z_FR: Z^Z_End —> S5S5, \ Calculate Responses/Minute in FR
0.01″: IF A(^CorrectLev) = 1 [@Left, @Right]
@Left: SET B(8) = B(3) / (B(6) / 60);
SHOW 15,Resp/Min,B(8) —> S6
@Right: SET B(8) = B(0) / (B(6) / 60);
SHOW 15,Resp/Min,B(8) —> S6S6, \ Set a Pen Reset Code (.30) in the SoftCR array, if enabled
0.01″: IF A(^SoftCR) > 0 [@SoftCR, @NoSoftCR]
@SoftCR: IF I <= ^CArraySize [@True, @False]
@True: SET C(I) = T + 0.30; ADD I;
IF I <= ^CArraySize [@True, @False]
@True: SET C(I) = -987.987—> S7
@False: —> S7
@False: —> S7
@NoSoftCR: —> S7S7, \ Wait for Screen Update and end with
\ STOPABORTFLUSH for Automatic Data Saving
2″: —> STOPABORTFLUSH\***************************************************
\ MAIN PROGRAM
\***************************************************
S.S.2,
S1, \ Turn associated stimulus ON
\ Issue Z^Z_FR Fixed Ratio Start Signal
#START: IF A(^CorrectLev) = 1 [@Left, @Right]
@Left: Z^Z_FR —> S2
@Right: Z^Z_FR —> S3S2, \ Left Lever Correct
\ Wait for Animal to meet Fixed Ratio
\ Turn the Pump on and issue a Z^Z_Reward Signal
A(^FRVal)#R^LeftLever: ON ^Pump, ^LeftLight; Z^Z_Stim;
Z^Z_Reward —> S4
#Z^Z_End: OFF ^LeftLight —> S6 \ End SessionS3, \ Right Lever Correct
\ Wait for Animal to meet Fixed Ratio
\ Turn the Pump on and Issue a Z^Z_Reward Signal
A(^FRVal)#R^RightLever: ON ^Pump, ^RightLight; Z^Z_Stim;
Z^Z_Reward —> S4
#Z^Z_End: OFF ^RightLight —> S6 \ End SessionS4, \ Time Infusion Length
\ Turn Pump and Stimulus OFF and issue Z^Z_TimeOut Signal
\
\ The PHM-100 Pump uses a 3.33 RPM motor and will deliver
\ 36.734 ul with a 10 cc Multifit syringe and 65.5 ul with
\ a 20 cc Multifit syringe in 2 sec. See the motor/syringe
\ table supplied with the Pump for specific flow rates for
\ your syringe and adjust this time value with any text
\ editor.
\
\ Run Trans after making any changes. Solutions may also be
\ adjusted to get the mg/kg dose per infusion desired.
A(^RewardTicks)#T: OFF ^Pump; OFF ^HouseLight;
Z^Z_TimeOut —> S5S5, \ Time Out Following Infusion
\ Turn Associates Stimulus on and issue Z^Z_FR
\ Fixed Ratio Start Signal
A(^TimeOutTicks)#T: IF A(^CorrectLev) = 1 [@Left, @Right]
@Left: ON ^LeftLight, ^HouseLight; Z^Z_FR —> S2
@Right: ON ^RightLight, ^HouseLight; Z^Z_FR —> S3
#Z^Z_End: —> S6 \ End SessionS6, \ Holding State at End of Session
5′: —> SX -
AuthorPosts
- You must be logged in to reply to this topic.