Cocaine Yoked
MEDState Notation Repository › Forums › Coding Help Archive › Cocaine Yoked
- This topic has 3 replies, 2 voices, and was last updated 7 years, 9 months ago by
Gary Bamberger.
-
AuthorPosts
-
July 26, 2018 at 1:54 pm #14817
IOP
ParticipantHello,
Ineed help with this code. The program is just doing the first infusion at the time specified at the List K, everything works at is supposed to do (nosepoke light on, tone on, and house light off) but then the program is not picking any other numbers of the list K.
Any comment ot input is welcome!
Thanks.
IOP
\Cocaine Yoked
\2018
\The animals will get cocaine infusions from a time list, paired with a tone and right NP port yellow light both on for 5 seconds
\ House ligt is on and at the infusion time it will be off for 20 seconds (moking time out)
\ Fan is always on
\ 60-minute session\ This section is for Outputs
^Tone = 5
^Houselight = 6
^RightNPlight = 12
^Pump= 8
^Fan = 16\ Defined Variables
\ P = pump on – infusion rewards
\ K = infusions array
\ N = session timer
\ M = max time minutes
\ S = seconds
\ T = event timestamp
\ E = event identity stamp
\ 8 = Pump deliveryDIM E = 6000
DIM T = 6000LIST K = 9, 45, 60, 130, 180, 300
S.S.1 \ Session start, Infusion, Right NP light on , Tone on, House lifgt off *******************
S1,
.01″:ON^Fan —> S2S2,
#START:ON^Houselight; Z1 —>S3S3,
#Z1: LIST X = K(F); SET X = X * 1″; X —>S4S4,
X#T: ON^Pump, ^RightNPlight, ^Tone; Z2 —>S5S5,
#Z2: OFF^Houselight —>S6S6,
5″ :OFF^Pump, ^RightNPlight, ^Tone —>S7S7,
15″: ON^Houselight; Z1 —>S2S.S.2, \ Infusion counter ********************
S1,
#START: SHOW 2,infusions,P —> S2S2,
#Z2: ADD P; SHOW 2,infusions,P —> SXS.S.3, \ Session lengh ******************
S1,
#START: —> S2S2,
60′: —> STOPABORTFLUSHJuly 26, 2018 at 2:50 pm #14818Gary Bamberger
ModeratorHello Idaira,
In S.S.1, S7 you send the program back to S2. S2 is waiting for a START command. I think that you want the program to go to S3:
S7, 15": ON ^Houselight; Z1 ---> S3I hope that this information helps.
Gary
July 26, 2018 at 3:06 pm #14819IOP
ParticipantHi Gary,
Thanks for your response. When I tried your coding the program repeated the 9″ infusion over an over. I dont know if there is any other issue with my defined variables…
July 26, 2018 at 3:25 pm #14820Gary Bamberger
ModeratorI just ran it and watched it step through the values in LIST K in order. Add this SHOW statement to the program so that you can see the values change:
S3, #Z1: LIST X = K(F); SHOW 1,X=,X; SET X = X * 1" ---> S4Gary
-
AuthorPosts
- You must be logged in to reply to this topic.