Med_Support
Forum Replies Created
-
AuthorPosts
-
Med_Support
ModeratorGary Bamberger
I believe that this program was written for an ENV-223 Multiple Tone Generator. This device takes four inputs and can generate up to 16 different tones. The tone that is generated depends on which input is turned on.
For the ANL-926 you have to use the SetFreq, SetAmp, SetRF, SetDur, and on commands in order to get it to work.
Med_Support
ModeratorCorey Puryear
I have a question about this last bit of code and why a 2 kHz tone plays when “^White” is called?
I assume this is because the program is written for a different setup than mine. I have the ANL-926 tone generators (I think that’s the right number…I am not in front of them right now) and would like to use programs like the one above (I recently posted the “Tone Programming”). It is my understanding that the tones have to be set (i.e., frequency, duration, loudness, rise and fall times), and simply assigning ^White = 1 should not work with the ANL-926’s. For my setup, this would simply activate the left lever, since that is in slot 1 on the control box. Is my understanding correct? If so, I would greatly appreciate some pointers that would help me modify the above code to incorporate the ANL-926’s.
Thanks,
CoreyMed_Support
ModeratorGary Bamberger
There were a couple of problems with your program.
The first was in S.S.1. After the timer ran out it would go back to S2 which would force the program to wait for a #START command. This may have been what you wanted, but it is more common to use an ITI and then end the program after a certain number of trials has been reached.
In S.S.2 and S.S.3 when it received the #Z1 or #Z2 respectively the program would start looking for responses on the Lever, but it never looked for a signal to stop recording inputs.
The code below should be much closer to what you want. I also added in a ITI to show how that would work.
\ Lime.mpc \ \ Is designed to randomly emit one of two tones every 60 seconds. \ The rats will learn that a 2KHz Tone will open up a 60 sec window where if they press \ the Lever they will get a reward (Pellet). On the other hand, a 4KHz tone will open up a \ window where if they press the Lever they will receive a White Noise buzz. \ Inputs ^Lever = 1 \ Outputs ^White = 1 ^Blue = 2 ^Green = 3 ^Orange = 4 ^WhiteNoise = 5 ^Pellet = 6 ^HouseLight = 7 \ Variables \ A = Total # Pellets Delivered \ B = Total # White Noise Buzzes Delivered LIST D = 1, 2 LIST E = 60" S.S.1, S1, 0.01": ON ^HouseLight ---> S2 S2, #START: RANDI N = D; ZN ---> S3 \ Start Procedure of randomly choosing a tone S3, E(0)#T: Z3 ---> S4 \ Wait for Duration of Session then repeat random selection S4, 60": RANDI N = D; ZN ---> S3 \ Inter-Trial Interval S.S.2, S1, #Z1: ON ^White, ^Blue ---> S2 \ Emit 2KHz Tone S2, 2": OFF ^White, ^Blue ---> S3 \ Turn Tone off after 2 seconds S3, #R^Lever: ADD A; SHOW 1,Rewards,A; ON ^Pellet ---> S4 \ Show Lever Presses on Screen #Z3: ---> S1 S4, 0.15": OFF ^Pellet ---> S3 #Z3: OFF ^Pellet ---> S1 S.S.3, S1, #Z2: ON ^Green, ^White, ^Blue ---> S2 \ Emit 4KHz tone S2, 2": OFF ^Green, ^White, ^Blue ---> S3 \ Turn Tone off after 2 seconds S3, #R^Lever: ADD B; SHOW 2,Buzzes,B; ON ^WhiteNoise ---> S4 \ Show Lever Presses on Screen #Z3: ---> S1 S4, 0.15": OFF ^WhiteNoise ---> S3 #Z3: OFF ^WhiteNoise ---> S1
Med_Support
ModeratorJeni Gallagher
S.S.1, S1, .01
Med_Support
ModeratorGary Bamberger
I would need to see the entire program in order to be able to answer your questions.
Med_Support
ModeratorGary Bamberger
Re: Can’t get TRANS to locate compiler
August 05, 2008, 04:50:41 pmIn WTrans go to “Translation | Target Compiler” and make sure that Turbo Pascal is selected. If that doesn’t work open a DOS window (Go to Start | Run and type command). When the DOS window is opened, type TPCW and let me know what you get for a response. You can either post the response here or email me the response.
Med_Support
ModeratorGary Bamberger
The code below should do what you want. It will force a 4 second delay from when the animal gets a reward on one lever before they can receive the reward on the other lever.
\ Short Train Concurrent \ Created 11/28/07 \ Outputs ^RightLever = 1 ^LeftLever = 2 ^RightBottle = 5 ^LeftBottle = 6 ^Houselight = 7 \ Inputs ^RightLever = 1 ^LeftLever = 2 ^RightLick = 3 ^LeftLick = 4 \ Define Variables \ A = # of Left Lever Presses \ B = # of Left Reinforcers \ C = Data Array Variables \ .1 = LeftLever \ .2 = LeftReinforcer \ .3 = LeftLick \ .4 = RightLever \ .5 = RightReinforcer \ .6 = RightLick \ D = # of Left Licks \ E = Left VI value (output array) \ F = Right VI value (output array) \ G = # of Right Lever Presses \ H = # of Right Reinforcers \ I = # of Right Licks \ J \ K \ L \ M \ N \ O \ P \ Q = Total number of events \ R \ S \ T = Timer, incremented in hundredths of seconds \ U \ V \ W \ X = Current value of Left VI from array for that specific trial \ Y = Current value of Right VI from array for that specific trial \ Z \ Z-Pulse designations \ Z1 = Start experiment \ Z3 = Reinforcer record left \ Z5 = Reinforcer record right \ Dimensions of arrays DIM C = 10000 LIST E = 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8 \ Interval variables LIST F = 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8 \ Interval variables PRINTVARS = A, B, D, G, H, I S.S.1, \ Instructions and operant chamber start S1, 1": SHOW 1,LOAD,0, 2,RAT,0, 3,AND,0, 4,ISSUE,0, 5,START,0 ---> S2 S2, #START: CLEAR 1,60; ON ^Houselight, ^LeftLever, ^RightLever; Z1 ---> SX S.S.2, \ SessionTimer S1, #Z1: ---> S2 S2, 0.01": ADD T ---> S2 S.S.3, \ Begin session and main VI logic (Left) S1, #Z1: ---> S2 S2, 0.01": RANDD X = E; SHOW 1,LeftVI=,X*6; SET X = X * 6" ---> S3 S3, X#T: ---> S4 S4, \ Check if COD has completed #R^LeftLever: IF S.S.4 = 1 [@True, @False] @True: ON ^LeftBottle; Z3 ---> S5 @False: ---> S4 S5, 10": OFF ^LeftBottle ---> S2 S.S.4, \ COD of 4" after Right Reward S1, #Z5: ---> S2 S2, 4": ---> S1 S.S.5, \ Left Response count and display S1, #Z1: SHOW 2,LeftResp,A ---> S2 S2, #R^LeftLever: ADD A; SHOW 2,LeftResp,A ---> S2 S.S.6, \ Left Reward counter and display S1, #Z1: SHOW 3,LeftReinf,B ---> S2 S2, #Z3: ADD B; SHOW 3,LeftReinf,B ---> SX S.S.7, \ Lick Counter S1, #Z1: SHOW 4,LeftLicks,D ---> S2 S2, #R^LeftLick: ADD D; SHOW 4,LeftLicks,D ---> SX S.S.8, \ Right Data array control S1, #Z1: ---> S2 S2, #R^LeftLever: ADD Q; SET C(Q+100) = T + 0.1, C(Q+101) = -987.987 ---> S2 #R^LeftLick: ADD Q; SET C(Q+100) = T + 0.3, C(Q+101) = -987.987 ---> S2 #Z3: ADD Q; SET C(Q+100) = T + 0.2, C(Q+101) = -987.987 ---> S2 S.S.9, \ Begin session and main VI logic (Right) S1, #Z1: ---> S2 S2, 0.01": RANDD Y = F; SHOW 6,RightVI=,Y*6; SET Y = Y * 6" ---> S3 S3, Y#T: ---> S4 S4, \ Check if COD has completed #R^RightLever: IF S.S.10 = 1 [@True, @False] @True: ON ^RightBottle; Z5 ---> S5 @False: ---> S4 S5, 10": OFF ^RightBottle ---> S2 S.S.10, \ COD of 4" after Left Reward S1, #Z3: ---> S2 S2, 4": ---> S1 S.S.11, \ Right Response count and display S1, #Z1: SHOW 7,RightResp,G ---> S2 S2, #R^RightLever: ADD G; SHOW 7,RightResp,G ---> S2 S.S.12, \ Right Reward counter and display S1, #Z1: SHOW 8,RightReinf,H ---> S2 S2, #Z5: ADD H; SHOW 8,RightReinf,H ---> SX S.S.13, \ Right Lick Counter S1, #Z1: SHOW 9,RightLicks,I ---> S2 S2, #R^RightLick: ADD I; SHOW 9,RightLicks,I ---> SX S.S.14, \ Right Data array control S1, #Z1: ---> S2 S2, #R^RightLever: ADD Q; SET C(Q+100) = T + 0.4, C(Q+101) = -987.987 ---> S2 #R^RightLick: ADD Q; SET C(Q+100) = T + 0.6, C(Q+101) = -987.987 ---> S2 #Z5: ADD Q; SET C(Q+100) = T + 0.5, C(Q+101) = -987.987 ---> S2 S.S.15, \ End Session S1, #Z1: ---> S2 S2, 30': PRINT ---> STOPABORTFLUSH
Med_Support
ModeratorGary Bamberger
Could you please post what code you have or email it to me. It is easier to make suggestions on what changes to make when I can see what you already have.
Med_Support
ModeratorDave Hughes
AlcoholLab,
The program seems to be working fine when I tested it. The only issue I saw was that your response counter in S.S.3 was counting ^LeftLever, which is defined as an output in your program. Since it was still defined as 2, a response on the second input would increase this counter in MED-PC IV.
I do not have your specific hardware here in my office, and I only have the SmartCTL card to rely on when checking to make sure a program is working properly. Check to make sure that output 6 is turning on (in the Interface Cabinet) when a post-interval response is made.
– If the light comes on then the program is working fine, and I would check to make sure the hardware is working properly.
– If the light does not come on then there could be a proplem with a bad output.Make this quick check and let me know what you get when trying this out.
Dave
Med_Support
Moderatornoamygdala
I really appreciate the help. Those adjustments to my code made my life a lot easier.
Ihanks,
JamesMed_Support
ModeratorGary Bamberger
I apologize, but I think that I need more information before I can help you answer this question. The following code might help, but I’m not 100% certain what you are looking for:
S.S.1, S1, \ Wait 1 minute. \ If beam is broken animal is not in waiting area 1': ---> S3 #R1: ---> S2 S2, \ Wait for animal to return to the waiting area #R2: ---> S1
Med_Support
ModeratorGary Bamberger
Your code was a little too complex. I have tried to simplify it for you. I think the code below should do what you need:
\ Mag Train VI 10 \ Reward VI-60s Reward Present for 5s After First Head Poke \ Inputs ^HeadPoke = 3 ^House = 7 \ Outputs ^Dipper = 3 \ Defined Variables \ A = Number of HeadPokes \ B = Number of Rewards \ C() = Array for HeadPokes \ D = Reinforcer Timer Array \ E(1) = HeadPokes in First 10s \ E(2) = HeadPokes in 10-20s \ E(3) = HeadPokes in 20-30s \ E(4) = HeadPokes in 30-40s \ E(5) = HeadPokes in 40-50s \ E(6) = HeadPokes in 50-60s \ E(7) = HeadPokes in 50-70s \ E(8) = HeadPokes in 70-90s \ I = Index into Array C \ J = Index into Array L \ K = Index into Array E \ L() = Array for Dipper Presentations \ M = Max Time \ N = Session Timer \ Q = Max Reinforcer DIM C = 1000 DIM E = 1000 DIM L = 1000 LIST D = 5, 15, 1, 11, 14, 6 S.S.1, \************************************VI 60s Logic S1, #START: ON ^House; SET Q = 15, M = 90 ---> S2 S2, 0": RANDD X = D; SHOW 2,VI,X; SET X = X * 1" ---> S3 S3, X#T: ON ^Dipper; ADD B; Z2 ---> S4 S4, #R^HeadPoke: ---> S5 S5, 5": OFF ^Dipper ---> S2 S.S.2, \************************************Count Total HeadPokes S1, #START: SHOW 4,tpoke,A ---> S2 S2, #R^HeadPoke: ADD A; SHOW 4,tpoke,A; Z1 ---> SX S.S.4, \************************************Count HeadPokes in Time Blocks Where G = # seconds S1, #START: SET E(K+1) = -987.987 ---> S2 S2, 10": ADD K; SET E(K) = 0, E(K+1) = -987.987 ---> S2 #Z1: SET C(I) = N; ADD I; SET C(I) = -987.987; ADD E(K) ---> SX S.S.8, \************************************Time Stamp Dippers S1, #Z2: SET L(J) = N; ADD J; SET L(J) = -987.987 ---> SX S.S.9, \************************************Session Timer Shut Off S1, #START: SHOW 1,Session,N ---> S2 S2, 0.01": SET N = N + 0.01; SHOW 1,Session,N; IF N <= M [@True, @False] @True: IF Q <= B [@True, @False] @True: ---> S3 @False: ---> SX @False: ---> S3 S3, 0": ---> STOPABORTFLUSH
Med_Support
Moderatornoamygdala
Thanks for your reply Gary I appreciate the input. After getting the actual VI nailed down I realized that I wanted to if their magazine entries increased throughout the session. I decided to record magazine entries in 10 second blocks for a 90 second session in this case. I also needed to time stamp the magazine entries (headpokes) and dippers as the computer is randomly dippers to come up at different times. I can’t seem to get the time stamping array for my dipper to work. Recording the entries per 10 s blocks isn’t working either. I think I am missing something or maybe making things more complicated that they need to be. I have posted my code below. Any tips or maybe a more efficient way to record the things I need would be much appreciated. Note: Although it sounds redundant I want to both time stamp and record mag entries in 10 s blocks for ease of data analysis down the road.
\ Mag train VI 10 \ reward VI60s reward present for 5s after first head poke ^headpoke= 3 ^House = 7 ^Dipper = 3 \ Defined Variables \ A = Number of headpokes \ B = number of rewards \ C = Array for headpokes \ E(1) = headpokes in first 10s \ E(2) = headpokes in 10-20s \ E(3) = headpokes in 20-30s \ E(4) = headpokes in 30-40s \ E(5) = headpokes in 40-50s \ E(6) = headpokes in 50-60s \ E(7) = headpokes in 50-70s \ E(8) = headpokes in 70-90s \ R = reinforcer timer array \ D = Output Array \ M = max time \ N = Session Timer \ Q = max reinforcer Dim C = 1000 Dim E = 1000 Dim L = 1000 List D = 5, 15, 1, 11, 14, 6 S.S.1, \ ************************************VI 60s logic S1, #START: ON ^House; set Q = 15; set M = 90 ---> S2 S2, 0": Randd X = D; Show 2, VI, X; Set X = X" ---> S3 S3, X#T: On^dipper; add B; z2 ---> S4 S4, #R^headpoke: ---> s5 s5, 5": off^dipper --->S2 S.S.2 \**************************************count total headpokes S1, #start: show 4, tpoke, A ---> S2 S2, #R^headpoke: Add A; Show 4, tpoke, A; z1---> SX S.S.3 \*************************************timer S1, #Start: ---> S2 S2, 1": Add G ---> SX S.S.4 \*************************************count headpokes in time blocks where G = # seconds S1, #z1: If G<11 [@true, @false]   @ true: add E(1); ---> SX   @ false: --->S3 S3, 0": If G>10 [@true1, @false1]      @ true1: If G <= 20 [@true3, @false3]        @true3: add E(2); ---> SX        @false3: --->S4      @ false1: --->SX S4, 0": If G>20 [@true1, @false1]   @ true1: If G<=30 [@true2, @false2]     @true2: add E (3); ---> SX     @false2: --->S5   @ false1: --->SX S5, 0": If G>30 [@true1, @false1]   @ true1: If G<=40 [@true2, @false2]     @true2: add E (4); ---> SX     @false2: --->S6   @ false1: --->SX S6, 0": If G>40 [@true1, @false1]   @ true1: If G<=50 [@true2, @false2]     @true2: add E (5); ---> SX     @false2: --->S7   @ false1: --->SX S7, 0": If G>50 [@true1, @false1]   @ true1: If G<=60 [@true2, @false2]     @true2: add E (6); ---> SX     @false2: --->S8   @ false1: --->SX S8, 0": If G>60 [@true1, @false1]   @ true1: If G<=70 [@true2, @false2]     @true2: add E (7); ---> SX     @false2: --->S9   @ false1: --->SX S9, 0": If G>70 [@true1, @false1]   @ true1: add E (8); ---> SX   @ false1: --->SX S.S.6 \*************************************Time incrementsfor time stamping S1, #Start: ---> S2 S2,  1": Set T = T + 1" ---> SX S.S.7 \*************************************time stamp headpokes S1, #Start: ---> S2 S2, #R^headpoke: Set C(I) = T, T = 0; add I;        Set C(I) = -987.987 ---> SX S.S.8\**************************************timestamp dippers S1, #z2: Set L(O) = T, T = 0; add O;    Set L(O) = -987.987 ---> SX S.S.9, \ ************************************Session timer shut off S1, #START: SHOW 1,Session,N ---> S2 S2, 1": ADD N; SHOW 1,Session, N;   If N < M [@true, @false]    @true: If Q < B [@2true, @2false]     @2true: ---> S3     @2false: ---> SX   @false: ---> S3 S3, 0": ---> stopabort
Med_Support
ModeratorGary Bamberger
Try something like this:
LIST Z = 50", 55", 60", 65", 70" S.S.1, S1, \ Draw VI from List 0.01": RANDD A = Z ---> S2 S2, \ Wait VI value then turn on Dipper A#T: ON 1; Z1 ---> S3 S3, \ Wait for head entry into the Dipper #R1: ---> S4 S4, \ Turn off Dipper 10 seconds after head entry 10": OFF 1; Z2 ---> S1 S.S.2, S1, \ Count head entries when Dipper is off #R1: ADD B ---> S1 #Z1: ---> S2 S2, \ Count head entries when Dipper is on #R1: ADD C ---> S2 #Z2: ---> S1
Med_Support
ModeratorGary Bamberger
There aren’t very many posts. The forum is still just getting started. You can read all of the posts within less than an hour. The most notable thing to look at is from the main page you can view and download sample code segments. The code segments show things like how to time the length of an input, how to detect when a pellet is missing, and how to control when to turn a house light on and off.
Med_Support
ModeratorGary Bamberger
Yes. The labels are abitrary. It is the location that matters. The first one is always the true portion and the second one is always the false portion.
Med_Support
Moderatorsalvador.arrazola
Thank you so much.
Med_Support
ModeratorOn the input card (SmartCtrl, SuperPort, Standard Input) there is either a set of jumpers or red switches. You need to change this jumper/switch to Level Mode for the input in question. The default is Transition Mode. In Transition Mode when the lever is pressed you only receive one input. In Level Mode you will continue to receive an input for as long as the lever is pressed.
The sample code will send a Z3 pulse when the lever is pressed and a Z4 pulse when the lever is released. You just need to write some code to track the time difference between the two Z pulses:
S5, #Z3: SET S = 0 ---> S6 S6, 0.01": SET S = S + 0.01 ---> S6 #Z4: ---> S5
You can place this code anywhere in your program. I hope this helps.
Med_Support
Moderatorsalvador.arrazola
Thank you so much. What do you mean with “Inputs in Level Model”? If I configure that, colud I increase a variable to determinate how much time does an event take?
Thanks for your time, and sorry for my pour English (I’m from the University of Guadalajara in Mexico).
Med_Support
ModeratorGary Bamberger
Take a look at this sample source code:
\*************************************************** \ BEAM BREAK DEFINED - 20ms BREAK, 20ms RELEASE \*************************************************** S.S.2, \ Beam Break Defined - 20ms Break, 20ms Release. S1, \ Inputs in Level Mode generate an input "count" on each \ interrupt. With a 10 ms system resolution 2 counts \ will be reached in 20 ms. The Z3 pulse is used to \ signal a completed Beam Break. The second statement resets \ the counter every 20 ms so that a partial Beam Break of \ less than 20 ms will not constitute a Response. #R1: ADD Y; IF Y >= 2 [@BeamBreak, @NoBeamBreak] @Break: Z3; SET Y = 0 ---> S2 @NoBreak: ---> SX 0.02": SET Y = 0 ---> S1 S2, \ As long as the Beam is broken the second statement \ causes a re-entry to this State. This resets the \ the internal 20 ms timer so it never times out. When \ the Beam is released for 20 ms the timer times out \ and a Z4 pulse signals the release. 0.02": Z4 ---> S1 #R1: ---> S2It should do what you want. Just remember to change the inputs over to Level Mode.
Med_Support
ModeratorGary Bamberger
Re: ANL-926 Error Message
January 10, 2007, 03:35:37 pmYour ANL-926.dll is out of date. It should be dated 9/9/2003. The new software should install the correct dll. The only other question is what EPROM is on the card that is not working.
Med_Support
Moderatorsalvador.arrazola
Re: MEDPC2XL
January 09, 2007, 08:46:59 pmHi, I’m intersted in your solution to import med-pc data into excel. I’m working in a similar solution using Java wich provides chart features. I’d thank if you could share your code.Thank you.
Med_Support
Moderatortip184
Re: ANL-926 Error Message
January 08, 2007, 02:06:49 pmMed Test shows that the card is working fine. My ANL-926.dll is dated 7/15/2003. I just purchased an additional ANL-926 card, which came with software. Can I safely install it without messing up my ability to run existing programs?
Thanks!
Jeff
Med_Support
ModeratorGary Bamberger
Re: ANL-926 Error Message
January 05, 2007, 04:04:09 pmIt would be easier to give you an answer if I could see the program and the exact error messages. However, given the information that you have provided I can think of two reasons that this can happen:
1) The ANL-926 for Box 1 has become defective or its dip switches are not setup correctly. You can verifiy its functionality with MED Test.
2) You have an older version of the ANL-926.dll (latest version dated 9-9-2003) and/or EPROMS (latest rev 28) and are using the ToneOn/ToneOff commands. If this is the case, then you can safely ignore this error message. The command is actually working, but the returned checksum value just doesn’t match. However, you should seriously consider upgrading to the latest versions.
I hope that this information helps.
Gary
Med_Support
Moderatorzippy99
Re: MEDPC2XL
January 03, 2007, 04:08:39 amWell, it’s a bit of a standard that hardware companies write interfacing software which fails to save scientists time. Then charge them for the software that does.
I wrote a vba macro to import med-pc operant data into excel, and my friend wrote one in python – if anyone wants them, let us know (csmcpherson at gmail dot com).
Cam.
Med_Support
ModeratorTry this:
Var_Alias Time ON = A(0) \ Default = 1 second Var_Alias Time OFF = A(1) \ Default = 1 second Var_Alias Duration = A(2) \ Default = 5 seconds DIM A = 2 DIM B = 2 S.S.5, S1, 0.001": SET A(0) = 1, A(1) = 1, A(2) = 5 ---> S2 S2, \ 1st Statement: Convert the Time to MED Ticks. \ \ 2nd Statement: Update display with current Blink Rate \ and Duration. #START: SET B(0) = A(0) * 1", B(1) = A(1) * 1", B(2) = A(2) * 1" ---> S3 0.01": SHOW 1,Time ON,A(0), 2,Time OFF,A(1), 3,Duration,A(2) ---> S2 S3, B(1)#T: ON 1 ---> S4 #Z1: ---> S2 S4, B(0)#T: OFF 1 ---> S3 #Z1: OFF 1 ---> S2 S.S.6, S1, #START: ---> S2 S2, \ Time the Duration B(2)#T: Z1 ---> S1
Med_Support
Moderatorgdillon
Gary,
Thanks for the assistence this program is working good. If you would like to post this program the only change I made was in:S.S.2, S2 0.01": SET T(1) = T(1) + 0.01 ---> S4 should be changed to --->SX
Thanks again,
GregMed_Support
ModeratorGary Bamberger
Hi Greg,
I looked at your program and decided to rewrite the program from scratch. I haven’t tested it, but I think that it will be much closer to what you want. The only thing that I am unsure of is how I handled the variable D(5). I removed most of the Z-pulses that you used and also made it so that each State Set only does one thing. This makes things easier. When you look at a State Set you know what it does and in most cases don’t have to concern yourself over how it affects the rest of the code. Hopefully you will be able to understand my code and make any further changes that you need.
Best Regards,
Gary\ Inputs ^LeftLever = 1 ^Receptacle = 2 \ Outputs ^HouseLight = 1 ^Reward = 2 ^RewardLight = 3 ^LeftLeverOut = 4 ^RightLeverOut = 5 \ Defined Variables \ C = Criterion to Chained vs Unchained response \ D Array (Data) \ D(0) = Number of lever presses within trial \ D(1) = Total number of reinforcers \ D(2) = Unchained responses \ D(3) = Chained responses \ D(4) = Total number of lever presses \ D(5) = Total number of receptacle visits post lever response \ F = FR Value \ T Array (Timers) \ T(0) = Trial number \ T(1) = Post Response Timer \ T(2) = Session Timer \ T(3) = No response \ V = Total Visits to receptacle \ Z-pulses Used in this Experiment \ Z1 = Signal First Left Lever Response \ Z2 = Signal That Trial has Ended DIM D = 5 DIM T = 3 DISKVARS = C, D(1), D(2), D(3) D(4), D(5), F, V S.S.1, S1, 0.001": SET C = 30, F = 1 ---> S2 S2, #START: ADD T(0); ON ^HouseLight, ^LeftLeverOut, ^RightLeverOut ---> S3 S3, #R^LeftLever: SET T(3) = 0; ADD D(0), D(4); IF D(0) >= F [@FRMet, @Cont] @FRMet: ADD D(1); SET D(0) = 0; Z1 ---> S4 @Cont: ---> S3 #R^Receptacle: SET T(3) = 0; ADD V, D(2), D(5) ---> S3 S4, #Z2: ADD T(0) ---> S3 S.S.2, \ Post Response Timer S1, #Z1: SET T(1) = 0 ---> S2 S2, #R^LeftLever: SET T(3) = 0; ADD D(2), D(4) ---> S2 #R^Receptacle: SET T(3) = 0; ADD V, D(5); IF T(1) >= C [@Unchained, @Chained] @Unchained: ADD D(2); Z2 ---> S1 @Chained: ADD D(3); Z2 ---> S1 0.01": SET T(1) = T(1) + 0.01 ---> SX S.S.3, \ Reward Control S1, #Z1: ON ^Reward, ^RewardLight ---> S2 S2, 2": OFF ^Reward, ^RewardLight ---> S1 S.S.4, \ No Response Timer S1, #START: ---> S2 S2, 1': ADD T(3); IF T(3) = 15 [@End, @Cont] @End: OFF ^HouseLight ---> STOPABORTFLUSH @Cont: ---> S1 S.S.5, \ Update Display S1, #START: SHOW 2,Trial #,T(0), 3,Rewards,D(1), 4,Visits,D(5), 5,Tot Visits,V; SHOW 6,Presses,D(4), 7,Unchained,D(2), 8,Chained,D(3) ---> S2 S2, 1": SHOW 2,Trial #,T(0), 3,Rewards,D(1), 4,Visits,D(5), 5,Tot Visits,V; SHOW 6,Presses,D(4), 7,Unchained,D(2), 8,Chained,D(3) ---> S2 S.S.6, \ Session Timer S1, #START: SHOW 1,Session,T(2)/60 ---> S2 S2, 1": ADD T(2); SHOW 1,Session,T(2)/60; IF (T(2)/60 >= 60) OR (D(1) >= 60) [@End, @Cont] @End: OFF ^HouseLight ---> STOPABORTFLUSH @Cont: ---> S2
Med_Support
ModeratorFilip van den Bergh
Re: MEDPC2XL
August 15, 2006, 04:41:51 amReally? That sounds like a serious bug. Did you file a report to MED-PC? I’m sure they want to know about that. I must say I’ve never had that happen, but then I usually did a single type in a run.
Filip
Med_Support
Moderatorarun
Re: MEDPC2XL
August 14, 2006, 02:46:21 pmYa, MPC2XL works great but when you try to transfer 2 different type of files, dont forget to colse the application(MPC2XL) in between them. Otherwise it will ba garbage.
Med_Support
ModeratorFilip van den Bergh
Re: MEDPC2XL
August 14, 2006, 09:43:15 amGood! Let us know what you think please.
Med_Support
Moderatorgdillon
Ahhhh, I see
That does make sense.
Thanks for the tip.
GregMed_Support
Moderatorgdillon
Re: MEDPC2XL
August 08, 2006, 04:50:29 pmI went ahead and purchased it.
Thanks
Greg -
AuthorPosts