Krc2 360 Problem with program

  • I am slowly trying to learn how to program this robot. I have a working program that looks for an input and then will run some motion commands then turns an out put on.


    I needed to add an if then for a 2nd input so I duplicated the program, renamed it and added the code as I understand it should work from the expert manual.


    It doesn't work. The compiler gives me something like 50 errors in the program that is identical to the working program except for the new code on lines that work in the other program.


    Could someone please look at this and help me figure out what I am doing wrong?


    TIA,

    Eric

  • Missing ENDIF right before


    Code
    FOLD LIN LAP001 Vel=0.8 m/s CPDAT1 Tool[1]:W/O PART 166W Base[0];%{PE}%R 5.6.13,%MKUKATPBASIS,%CMOVE,%VLIN,%P 1:LIN,


    maybe. Every IF needs a ENDIF. In your program are more IFs than ENDIFs. Might be wrong though. Its easier if you would say what messages you get in what lines of code. Also looking at a diff of the working program with the faulty one might be usefull.


    so I duplicated the program, renamed it a

    how? Using the HMI functions or in windows explorer.


    Fubini

  • I duplicated it on the pendant using the HMI.


    I have been looking at the 2 programs side by side and my untrained eye can't see what might be causing it. I have an endif in the program before the line you posted.

  • you did not elaborate exact steps you took, or messages involved. we cannot or don't want to guess. you are the one in need of support, so you need to be providing all relevant info.


    my guess is that you do not realize that what you posted is not a complete program module - it is only the SRC file. chances are that when you duplicated it, filter setting was om "Details" so you also only duplicated the SRC file. without DAT file program is unable to find most of the variables and there would be numerous compilation errors.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • First off, Thank you for looking and responding.


    Sorry for not posting both programs, I am a NEWB! I admit it!


    I did get some help yesterday and we have the program working now. There was a missing endif and He made some other changes to do what I need the program to do.


    I did duplicate the whole file and there is a dat and src file.


    I realize I should have posted both of the files I was talking about now after the fact.


    So for future reference, should I post both the src and dat files when asking for help?


    I know a tiny but, I guess I don't even know enough to know how to ask correctly for help yet


    I am trying to educate myself on the programming. Please be patient

  • understanding of problem often hinges on details and a lot of people do not realize how vague their descriptions are. pinned topic READ FIRST. is meat to offer some guidance

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I usually tend to "Ramble On" when talking about things.


    It's funny reading the post after the fact and seeing how little I actually wrote asking for help. I knew in my head what I was asking for but clearly didn't put enough details for anyone to even be able to help me.


    I did go through the "Read first" in the past. I will read through it again before I post for help again.


    Thank you to all who try to help the rest of us

  • Instead of


    IF($IN[17]==TRUE) THEN

    ;MONITOR MATERIAL PROX TO ENSURE MATERIAL IS PRESENT

    ;

    $OUT[10]=TRUE;TURN LIGHT ON TO SHOW MATERIAL IS PRESENT

    ELSE

    $OUT[10]=FALSE

    ENDIF


    you simply can write

    $OUT[10]=$IN[17]

Advertising from our partners