psych_trans2.gif (12714 bytes)
Home Up Equipment Test Pgm. Exp. 1 Pgm. Exp. 2 Pgm. Exp. 3 Pgm. Exp. 4 Pgm. Exp. 5 Pgm. Exp. 6


Bar Press Response Program

\Bar Press Training Session

\NOTE TO STUDENT: Run equipment test before beginning experiment.

\Ask TF for details, if necessary.

\This program will allow pellets to be delivered using the hand switch;

\a after a 3' baseline lever presses will also deliver a pellet.

\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

\Array C will be used to generate a cumulative record.

\Array D will be used to record the number of bar press responses

\on a minute by minute basis.

DIM C=1000

DIM D=120

\This program allows food pellets to be delivered by a Hand switch

\or a lever press. First 15 pellets will be issued by the Hand switch only.

\***************************************************************************

s.s.1,

s1,

#start:--->s2 \The start command will be issued from the keyboard by the TF.

s2,

#R ^Handswitch:on ^Houselight--->s3 \Pressing the Handswitch

\turns on houselight.

s3,

#R ^Handswitch:on ^Feeder;ADD A--->s4 \Variable A will count the number

\of pellets delivered.

s4,

.05":off ^Feeder;If A>=15 [@true,@false]

@true:Set A=0;z3 --->s5 \After 15 pellets have been delivered,

\Z3 starts array D, which will record

\lever press responses each minute

\in s.s.5.

@false:--->s3

\The next statement programs a three minute baseline. After the 3', shaping

\you can begin using the Handswitch.

s5,

3':z4--->s6 \flashes the external light. Baseline begins.

#R ^Rightlever ! #R^Leftlever: --->SX \Lever presses are recorded

\during the three min. baseline,

\but don't lead to reinforcement.

s6, \A right or left lever press

\delivers a pellet.

#R ^Leftlever ! #R ^RightLever: Add A;on ^Feeder;Z1--->s7

#R ^Handswitch:on ^Feeder --->s7 \Handswitch also delivers a pellet

\used in shaping. Z1 is used in S.S.4

\to tell the cumulative record

\to make a reinforcement pip.

s7,

.05":off ^feeder;SHOW 1, LVRPR=,A; \Checks number of reinforced bar

If A>=100[@true,@false] \presses. If 100 stops the experiment.

@true:Set C(i+1)= -987.987--->stopabortflush

@false:--->s6

\**************************************************************************

\S.S.2 serves as a clock which will be used in S.S.3 to record when

\responses occurred to generate a cumulative record.

s.s.2,

s1,

#z3:--->s2

s2,

#Z2:--->s2 \Every time there is a lever press, Z2 is issued

\and the clock goes back to zero.

0.1":ADD T--->SX

\**************************************************************************

s.s.3,

s1,

#Start:--->s2 \S2 will record how much time has passed between

\responses, generates a cumulative record,

\and will record when you used the Handswitch

\to shape your subject.

s2,

#z3:--->S3

s3, \The following statement records when each response

\occurs and will end the program after 100 responses.

\I starts at zero.

\A code will be generated to produce a pip on event

\line zero every time you use the Handswitch.

#R^Leftlever ! #R^ RightLever:SET C(I) = T+0.1,T=0;Z2;

ADD I;IF I =1000 [@true,@false]

@true:--->stopabortflush

@false:SET C (I) = -987.987--->SX

#R^Handswitch:SET C(I) = T+0.60,T=0;Z2;ADD I;

SET C(I) = 0.50;ADD I; IF I =1000 [@true,@false]

@true:--->stopabortflush

@false:SET C(I) = -987.987--->SX

\***************************************************************************

\s.s.4 logs each reinforcement as it occurs.

\This is used by the cumulative record.

s.s.4,

s1,

#Start--->s2

s2,

#Z1:SET C(I) = 0.2;ADD I;IF I = 1000 [@true,@false]

@true:--->stopabortflush

@false:SET C(I) = -987.987--->SX

\***************************************************************************

\s.s.5 records the lever presses starting with the three minute baseline

s.s.5,

s1,

#start:--->s2 \Z3 is issued in s.s.1, s4.

s2,

#z3:--->s3 \Baseline starts and responses

\will be recorded every minute.

\s3 Increments a counter each minute

\and any lever press adds a count every minute.

\The session will end automatically after 120'.

s3,

1':ADD E;Set D(E)=0,D(e+1)=-987.987;z5;IF E>=120 [@true, @false]

@true:--->STOPABORTFLUSH

@false:--->SX

#R^Leftlever ! #R ^RightLever:ADD D(E)--->sx

\***********************************************************************

\This state is used in case you need to stop the experiment early.

s.s.6,

s1,

#START:--->S2 \Tell your TF to issue a #k99 keyboard command.

s2,

#k99:SET C(I)=-987.987--->STOPABORTFLUSH

\*************************************************************************

s.s.7, \z6 flashes external lights (see ss8)

s1,

#start:--->s2

s2,

#z3:z6--->s3 \Flashes after 15th pellet (ss1,s4)

s3,

#z4:z6--->s4 \Flashes after baseline (ss1,s5)

s4,

#z5:z6--->s4 \Flashes every minute after baseline (ss5,s3)

\**************************************************************************

s.s.8, \flashes external light when receive z6

s1,

#start:--->s2

s2,

#z6:on ^ExternalLight--->s3

s3,

.1":off ^ExternalLight--->s2