Translator Errors

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #12887
    Med_Support
    Moderator
    batters27

    Hi,

     

    I’m having trouble with a program I have written. I have a training program where only one lever comes out for the purposes of training. The left lever program works fine, the right lever program does not and I can’t figure out why. The right and left programs should be exactly the same. When the session starts the right lever does come out and the house light goes on, however no presses of the lever result in food pellet delivery. Everything works absolutely correctly with the Left Lever Program. What am I missing? I have copied below the translator error file ( i tried to translate a copy of the working left lever program but now get there errors..)

     

    Translator error file-

     

    Source: testPright Line: 64
    ERROR # 1
    @ratioyes:on^FEED;ON^RSLT;addU;addl;sety=0--->s3
    Offending text: ^RSLT
    A constant is missing '^' or undeclared constant
    
     
    
    Source: testPright Line: 66
    ERROR # 25
    s3,
    Offending text: Missing IF statement alternatives in preceding IF statement.
    Error unknown or as described in above message
    
     
    
    Source: testPright Line: 67
    ERROR # 1
    .1":OFF^FEED;OFF^RSLT--->s2
    Offending text: ^RSLT
    A constant is missing '^' or undeclared constant
    

     

     

    And here is a copy of the program which works perfectly when it is set up for the left lever…

     

    \\\INPUTS, OUTPUTS
    
     
    
     
    
    \R1: RIGHT LEVER
    \L1: LEFT LEVER
    \
    \ 1: LEFT LEVER ^LLVR
    \ 2: RIGHT LEVER ^RLVR
    \ 3: FEEDER ^FEED
    \ 4: RIGHT STIM LIGHT ^RSLT
    \ 5: LEFT STIM LIGHT ^LSLT
    \ 7: HOUSE LIGHT ^HSLT
    \
    \
    ^LLVR=1
    ^RLVR=2
    ^FEED=3
    ^LSLT=4
    ^HSLT=7
    \
    s.s.1, \session length
    s1,
    #start : --->s2
    s2,
    .1": if T = X [@T, @F]
    @T:on^HSLT;ON^RLVR --->s3
    @F: --->s2
    s3,
    .1": if T = W [@end, @go]
    @end: ---> S4
    @go: ---> s3
    s4,
    .1": OFF^HSLT; OFF^LLVR; OFF^RLVR; OFF^FEED ---> stopabortflush
    s.s.2, \contingency state and data display left lever
    s1,
    #start : --->s2
    s2,
    .1": if T = X [@T, @F]
    @T:on^HSLT;ON^RLVR --->s3
    @F: --->s3
    s3,
    .1": if U = B [@true, @false]
    @true: OFF^HSLT; OFF^RLVR; OFF^FEED ---> stopabortflush
    @false: ---> s2
    s.s.3,
    s1,
    #start : set r = f;
    show 1, FR, f---> s2
    s2,
    #r1: add y;add a; show 3, ltot, a;z1;
    if y = r [@ratioyes, @rationo]
    @ratioyes: on^FEED;ON^RSLT; add U; add l; set y = 0 ---> s3
    @rationo: --->sx
    s3,
    .1" : OFF^FEED; OFF^RSLT ---> s2
    
     
    
    s.s.4, \elapsed time
    s1,
    #start --->s2
    s2,
    1" : add t; show 5, secs, t --->sx
    

     

     

    Thanks for any help, this is driving me nuts.

    #12886
    Med_Support
    Moderator
    Gary Bamberger

    Let’s take a look at the first error message:

     

    Source: testPright Line: 64
    ERROR # 1
    @ratioyes:on^FEED;ON^RSLT;addU;addl;sety=0--->s3
    Offending text: ^RSLT
    A constant is missing '^' or undeclared constant
    

     

    The first line tells us the name of the program and the line number where it thinks the problem exists. NOTE: This may not necessarily be the program that you have open and are currently working on. Also frequently the problem is one or two lines before the listed line number.

    The third line list the code that Trans IV thinks is the cause of the problem.

    The last two lines try give a more detailed explanation of the problem. The problem in this case is you are trying to use a constant “^RSLT” that has not been previously declared.

     

    Here is a list of the constants that is declared in the program:

    ^LLVR=1
    ^RLVR=2
    ^FEED=3
    ^LSLT=4
    ^HSLT=7

    The constant ^RSLT is not in this list. When I add the following constant to the list:

    ^RSLT=5

    then the program compiles just fine.

    I’m guessing that the Right Stim Light is on output 5. If it is not, then make sure to use the correct output number when you declare the missing constant.

     

    I hope that this information helps.
    Gary

    #12890
    Med_Support
    Moderator
    batters27

    I corrected this on my computer but it still doesn’t work for the right lever. none of the 8 boxes will release a food pellet when the right lever is pressed. I am assuming this is a program issue but maybe it isn’t? none of my programs will work for the right lever. All the programs allow the right lever to come out at the start of the session but pressing on the right lever does not seem to connect with the food hopper releasing a food pellet.

     

    Is this a program issue or a hard wire issue? I have checked and checked and all the wires seem to be connected to the correct Input/Output connectors.

     

    I don’t know what else to try?

    #12893
    Med_Support
    Moderator
    Gary Bamberger

    In S.S.3, S2 you are looking for an input on #R1.

    I’m guessing that your Right Lever is on input 2 so you need to change the program to look for an input on #R2.

    Gary

    #12895
    Med_Support
    Moderator
    batters27

    Thanks Gary for your help. I don’t think that is the issue either- Ive copied below the program I have for the right lever training and everything looks as you suggest. I have other programs too where everything seems fine but the pellet is not released upon the correct number of presses on the right lever…

    \To run this program, set "F" equal to the FR value you want
    \and set "B" to the number of reinforcers you want. (for example
    \set "B" to 500 when you are shaping and to 40 when the rat is
    \pressing by itself for the entire session. The session will end
    \when the specified number of pellets is reached. If you need
    \to decrease the FR value when the program has already started change
    \not only the value of "F", but also set the value of "Y" back to zero.
    \("Y" keeps tabs on the number of responses the rat has made toward the
    \FR requirement)
    \
    \
    \\\INPUTS, OUTPUTS
    \R1: RIGHT LEVER
    \L1: LEFT LEVER
    \
    \ 1: LEFT LEVER ^LLVR
    \ 2: RIGHT LEVER ^RLVR
    \ 3: FEEDER ^FEED
    \ 4: LEFT STIM LIGHT ^LSLT
    \ 5: RIGHT STIM LIGHT ^RSLT
    \ 7: HOUSE LIGHT ^HSLT
    \
    \
    ^LLVR=1
    ^RLVR=2
    ^FEED=3
    ^RSLT=5
    ^HSLT=7
    \
    s.s.1, \session length
    s1,
    #start : --->s2
    s2,
    .1": if T = X [@T, @F]
    @T:on^HSLT;ON^RLVR --->s3
    @F: --->s2
    s3,
    .1": if T = W [@end, @go]
    @end: ---> S4
    @go: ---> s3
    s4,
    .1": OFF^HSLT; OFF^RLVR; OFF^FEED ---> stopabortflush
    s.s.2,
    s1,
    #start : --->s2
    s2,
    .1": if T = X [@T, @F]
    @T:on^HSLT;ON^RLVR --->s3
    @F: --->s3
    s3,
    .1": if U = B [@true, @false]
    @true: OFF^HSLT; OFF^RLVR; OFF^FEED ---> stopabortflush
    @false: ---> s2
    s.s.3, \contingency state and data display right lever
    s1,
    #start : set r = f;
    show 1, FR, f---> s2
    s2,
    #r2: add y;add a; show 3, rtot, a;z1;
    if y = r [@ratioyes, @rationo]
    @ratioyes: on^FEED;ON^RSLT; add U; add l; set y = 0 ---> s3
    @rationo: --->sx
    s3,
    .1" : OFF^FEED; OFF^RSLT ---> s2
    
     
    
    s.s.4, \elapsed time
    s1,
    #start --->s2
    s2,
    1" : add t; show 5, secs, t --->sx
    
    #12897
    Med_Support
    Moderator
    Gary Bamberger

    What values are you using for the variables B, F, W, and X?

    I want to try running the program so I can see for myself what is happening.

    Gary

    #12899
    Med_Support
    Moderator
    batters27

    B is the number of reinforcers (50), W is time of the session (I’ve been using 900) and F is the Fixed Ratio (just setting it at 1 for right now). I don’t have anything for X…..

    Im wondering if the Right levers are wired correctly? They come out and retract on cue I just can’t seem to get the food hopper to release a pellet when the right lever is pressed. The Right Cue light also does not come on regardless of number of presses on the right. I see in the back of the levers they have 3 connections, is it possible the wires are going to the wrong places?

     

    I’m wondering if it is a wiring issue since NONE of the programs I am running will allow a pellet to be released but the left lever pressing works just fine?

     

    Thanks again for all your help, this is driving me nuts.

    #12901
    Med_Support
    Moderator
    Gary Bamberger

    I just ran the program using the values that you provided and it seems to be working perfectly.

    When I press the Right Lever (Input 2), Output 3 and 5 turn on for 0.1″.

    If you run MED Test do you see an input when you press the Right Lever?
    Which input do you see in MED Test?

    If you go to Configure | Signals and Simulate a Response on Input 2, does the program turn on Outputs 3 and 5?

    If you connect the Left Lever to input 2 does the program work?

    Do you have the program TestInOut.mpc?
    If you run that program do you see an input when you press the Right Lever?

    The problem is most likely one of two things:
    1) The right lever is not working and possibly need to be returned for repair.
    2) The MED-PC Hardware Configuration File is not setup correctly and/or does not have Input 2 configured.

     

    Please let me know if this helps solve your problem.
    Gary

    #12903
    Med_Support
    Moderator
    batters27

    Hi Gary,

     

    When I go to configure/signals and stimulate a response on input 2 the program DOES turn on outputs 3 and 5 (right stimulus light and feeder releases a pellet).

     

    Connecting the left lever and the responses do not seem to work.

     

    Does this mean input 2 is not configured correctly?

     

    I do not have the Testinout program. I also am not sure how to run MED Test- should this be installed with my software?

     

    Also, I understand the boxes are all Daisy chained. Since none of the boxes are working with the right lever, does this mean and issue with box 1 is causing none of them to work?

     

    Thanks again

    #12905
    Med_Support
    Moderator
    Gary Bamberger

    You clearly have a hardware problem.  Either the hardware is not wired together/setup correctly or the MED-PC Configuration file is not setup correctly.  Unfortunately this is not something that can be solved easily through the forum.  It would be best if you called MED Associates Support 1-802-527-2343 when you can be in front of the hardware.  They will help you troubleshoot the problem further and assist with the return of any equipment that proves to be defective.

    Gary

    #12907
    Med_Support
    Moderator
    batters27

    Ok thanks. This actually makes me feel better that it’s not a programming issue..!

     

    Thanks again.

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