Posts by mahboobelahi93

    is there a built-in that closes a TP program? I'm using

    First of all sorry for this stupid question. I found built-in for closing a TP program but it seems it is not closing an opened TP program. Here is my code. When a new connection started for the second time from the socket client I get an uninitialized data error on TP.

    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

    Your question is hard to parse, which is why I didn't answer it.


    How are you moving to your PR point, and your P point? Via TP program, or Karel? What are the values inside of both points?


    If they have the same data, and you are moving to them the same way, they should behave identically.

    I am updating PR values from the KAREL program and setting a flag. The BG logic call a TP program to move the robot

    Here is my KAREL code

    This is normal if you create the movement to p[100] at the position of PR[100].

    thanks, Hermann,


    is there a built-in that closes a TP program? I'm using

    OPEN_TPE('ZSNDPOSDATA', TPE_RWACC, TPE_RDREJ, open_id, pSTATUS)

    for accessing frame(U and T) data from that file through sockets but when a client tries to re-connect my program ABORTS as the TP program is already open. I need to close this program after sending data to the socket client.


    Does KAREL have some built-in that read positional data of point, something like GET_REG_POS?

    can i rest or reset a flag directly from KAREL like Digital I/Os?


    I have written a socket server KAREL program and wanted to run this program in the background, how I can do this?, I already tried background logic but it seems BL does not comfortable with KAREL



    Thanks, what about this?

    Secondly, I record a position in PR[100] but mistakenly in the TP program, I use a move statement with P, not PR like J J @P[100]....Later i recognize but strangely robot moves to the position which is stored in PR with this move command and checked this point and it has similar xyzwpr values as PR[100] has.

    Does this is normal behavior for the position variables?

    Only works for local points in the passed in program. Also, the point numbers need to be in order.


    You would have to make your own program to do position register conversion.

    Hi Nation,

    I knew PR is position register and any pose when saved to PR is saved with U/T frame =F, on the other hand, the Position variable stores active U/T frames during teaching position. I was checking your position converter and thinking about doing the same for PR but could find a way how to get the correct U/T frame information that was used recording a position in PR. So how do I get U/T frame data for PR?

    Secondly, I record a position in PR[100] but mistakenly in the TP program, I use a move statement with P, not PR like J J @P[100]....Later i recognize but strangely robot moves to the position which is stored in PR with this move command and checked this point and it has similar xyzwpr values as PR[100] has.

    Does this is normal behavior for the position variables?

    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.

    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 FLrobotics,


    I am facing the same problem, can please explain a little bit more how you resolved this problem, please!

    Here is my KAREL code, I am stuck with motion groups.
    please note that I am sending positional data to the robot through an HTTP request and transforming it to xyzwpr and then calling a TP program from the KAREL program but my robot does not move and I am not getting an error on the TP screen.

    I am sending positional data to the robot as a string from the socket client in the following format:

    PR_id, X, Y, Z, W, P, R

    (20,137.8,70.4,79.8,50.3,-15.0,-180.5,0.0)

    Hi all,

    I have written a simple KAREL prog to convert xyzwpr data received through HTTP request like:

    http://192.168.1.1/KAREL/Mov_HTTP?id=100&x=214.384&y=-282.970&z=170.502&w=179.937&p=.712&r=89.751

    after compilation of the source file, I am getting the following error


    And when I run p-code file I get TP warning can not lock motion group, how to resolve this error/issue

    Here is the KAREL code:

    I'm no expert in this area, but as I understand it, for the command-line tools to work, you need to have built a virtual controller in RoboGuide that had the same software version, and all of the options, as the robot you're trying to compile code to.


    I encountered the same kind of issue, when I had only built a basic virtual controller with the right core version, but without adding the Fanuc options that the real robot had. The command-line tools would compile and decompile "generic" code, but would fail on any line that was tied to a specific Fanuc option.

    Hi SkyFire,


    Thanks for your reply,

    Actually my roboguide trial license has expired, this could be the reason for not having successful compilation. I do have a work cell with v8.30 in roboguide but the license has expired.

    Did you create a robot config?

    Hi Nation,

    Thanks for your response.

    No. and I do not know why "robot.ini" file is missing.

    I want to know about the following:

    Does the FANUC socket server support more than one socket client?

    I am sending positional data to the robot as a string from the socket client in the following format:

    PR_id, X, Y, Z, W, P, R

    (20,137.8,70.4,79.8,50.3,-15.0,-180.5,0.0)

    how to convert this string to XYZWPR. The converted value goes to PR[20] and the robot will move to that position.

    Is there an easier way to do this?

    Most places I go to that actually do scheduled backups typically hook the robot up to a plant data network and pull backups remotely via ftp.

    Thanks, Nation for your response.
    Yes, I have a USB stick that remains there all the time. I go to files --> auto backup and changed the backup dir from FRA to UD1 then I go to FRA and delete a ".dat" file (contains back of robot) then I got to FR: and press F5(next) and then F4(INSTAL)->Display Backup files then I see a bunch of files so should I remove them to free FROM space?



    When you compile your code in roboguide, the major version number of the virtual controller you are using must match what you are planning to deploy your code on. V8 must be compiled on a V8 controller, V9 for V9, etc.

    Thanks for pointing out the compiler version. Actually, I was using a trial version of Roboguide and I installed V8 to V9 controllers as the trial license has expired so I use "krans" from cmd to compile the KAREL source file, see the attached picture. Is there a way to compile KAREL source files with V8?

    Hi all (JM, Skyfire, Nation and HawkMe)


    with the guidance you all provided to me I am able to

    1. send positional data from socket server
    2. retrieve image from image register and download it from robot's FTP server

    Thanks a lot all of you.


    Now I am having FROM space issue and KAREL p-code file versions.

    1. FROM space: when I check the auto backup is enabled and FR directory was selected for backup, is it advisable to set UD1:/ for robot auto backup?, please note that I am also using UD:1/ for image logs I also delete one backup.dat file from FRA: dir but it does not help.
    2. When uploads p-code files to real robot got an error: "program version too new"

    please let me know how to resolve these issues

    thanks

Advertising from our partners