Call TP program from KAREL

  • I can't run TP-program from Karel. When karel program started, I get this error:

    "Cannot lock the motion grp"

    How can I run a tp program from karel?

    Code: Karel program
    PROGRAM caller
    %NOLOCKGROUP
    
    VAR
        status, prog_index : INTEGER
    
    BEGIN
        CALL_PROG('JVPMOVER', prog_index)
    END caller
    Code: TP program
    PR[10] 100mm/sec FINE
    [End]
  • I was able to build and run the program that you posted after removing the %nolockgroup.

    Where did you get the ERROR: Program must contain %nolockgroup directive? Was it during build or when you ran it?

  • I just need to run remotely… In Roboguide work this construction

    Code
    RUN_TASK( 'JVPMOVER', 0, FALSE, FALSE, 1, STATUS )

    But it not work on real robot…

  • Control robot only by changing R[12] register:

    Code: Alternate
    LBL[4]
    IF R[12]=1,JMP LBL[4]
    PR[10] 100mm/sec FINE
    JMP LBL[4]
    [End]

    But this program must be run constantly. Is it possible to call TP remotely, without having to first start the TP program?

  • Hi HawkME,


    Once again Thaks a lot, i am facing this same problem but your post helped again, as usual, now i can move the robot from positional data that is sent by another device or external pc.

    I have some confusion and doubts which need some clarifications but I will post them tomorrow as the latest because now it's too late for me and i was working since afternoon on Sunday and need some rest.

    again thanks a lot for helpful posts

  • Hi HawkME,

    I going to ask some questions similar to the discussion in this post, just to enhance my knowledge.

    In Summary,
    I am working on a task, detail can be found here (PC and FANUC robot TCP/IP Communication), in which a python application running on PC will send recent workspace pictures to an App that runs AI/ML algorithms for detection and localization of objects and send position data to the robot to pick detected object through python middleware application.


    Yesterday I was struggling to run a TP program from a KAREL program and I had no luck with it. I am running KAREL from a web browser and using the following GET-URL from POSTman for testing purposes. URL: http://192.168.1.1/KAREL/Mov_HTTP?id=100&XX=214.384&YY=-282.970&ZZ=170.502&WW=179.937&PP=.712&RR=89.751

    So KAREL program convert xyzprw values from string to REAL and stores them in a PR then calls a TP program that contains the following instruction:

    J PR[100] 100mm/sec FINE

    First I got "Cannot lock the motion grp". I searched the KAREL manual and found LOCK/UNLOCK group built-ins and used them in code as depicted in the code section I also increase time in $HTTP_CTRL.TIMEOUT from 10 to 100 but this did not help.It seems KAREL is not calling the TP program. Also, i did not get any error on the TP screen but the TP program did not run.

    Why KAREL program if run from the browser can not run a TP program that contains a motion group?

    There is an example in the KAREL manual, section B.5 in which KAREL calls two TP programs that contains motion instructions also it modifies positional data for one program before calling it.

  • I ran a test. I built the Karel example from Section B.5 that you mentioned. I ran it from the Teach Pendant and everything worked fine.

    Then I tried to run it through the browser and I got the "Cannot lock motion group" on the Teach Pendant display.

    There must be a restriction on running motion programs from a browser.

  • I ran a test. I built the Karel example from Section B.5 that you mentioned. I ran it from the Teach Pendant and everything worked fine.

    Then I tried to run it through the browser and I got the "Cannot lock motion group" on the Teach Pendant display.

    There must be a restriction on running motion programs from a browser.

    Thank you HawkME

    I thins BG logic will suffice as you mentioned

Advertising from our partners