PC and FANUC robot TCP/IP Communication

  • Hi SkyeFire,


    Can you please give some detailed insights, how this HTTP communication is used in my case (just consider App) and how I can I send the required data from the robot to an external PC? Does it is possible to change Digital output or user output from python script?

    I pretty much already said everything. An HTTP GET command from Python (or a browser, or any language) to the correct URL on the robot can trigger a KAREL program to run once, and the KAREL program can be set up to accept arguments (up to 10) as strings built into the URL, and can build and return a string to the requesting program.


    The KAREL program can be programmed to do anything a "normal" KAREL program does. In my use case, various Flags and DOs were set in response to specific arguments embedded in the URL, and status information was passed back in the response string.

  • The KAREL program can be programmed to do anything a "normal" KAREL program does.

    Thank you SkyeFire,


    Actually, I confused myself and do not exactly figure it out how to leverage this feature, I mean to trigger a KAREL program it is ok but I need to exchange vision data which will be utilized by App2. Sorry I am stuck and it is the first time in my life I am doing something with a robot and assigned this huge task .

    n my use case, various Flags and DOs were set in response to specific arguments embedded in the URL, and status information was passed back in the response string.

    Can you provide a startup example for the above-mentioned operation?

  • Hi,


    Following is the simple KARE routine that I am calling from the TP program to run a visioning process but I am getting an error of 11715 what does it mean? Code came from KAREL programming Manual

  • Hi,


    Following is the simple KARE routine that I am calling from the TP program to run a visioning process but I am getting an error of 11715 what does it mean? Code came from KAREL programming Manual

    Hi,


    I have figured out the mistake and now that routine is working but what exactly does the V_RUN_FIND() routine does? i mean it just runs the specified vision processor or finds the actual object with in camera's field of view?

    i run that routine for not having an object in the camera's view and I got STATUS=0 from V_RUN_FIND(), the status must be something else than 0.

  • I'm not sure what that fault is. You can see for yourself by posting it to the controller by using POST_ERR(STATUS,'',0,0)


    Edit: It is a SRIO-171 error. Dictionary element not found. Very helpful error.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • I checked it with POST_ERR(STATUS,'',0,0)

    I'm not sure what that fault is. You can see for yourself by posting it to the controller by using POST_ERR(STATUS,'',0,0)


    Edit: It is a SRIO-171 error. Dictionary element not found. Very helpful error.

    I used "POST_ERR" built-in to get the reason behind status code 1171. It is related camera view index, please see the attached pic.

    i am using the same index for camera view in other vision built-ins like "V_RUN_FIND," which is working perfectly even if there are multiple objects.

  • I checked it with POST_ERR(STATUS,'',0,0)

    I used "POST_ERR" built-in to get the reason behind status code 1171. It is related camera view index, please see the attached pic.

    i am using the same index for camera view in other vision built-ins like "V_RUN_FIND," which is working perfectly even if there are multiple objects.

    The problem is resolved. I use camera_index= 1.

    Please Consider the following built-in

    V_RUN_FIND(visprocess,0,STATUS)>>> camera view=0 >>>> This is working with both camera index values 0 and1 ,Why? according to documented example (see attached picture) camera index starts from 0.

    V_SNAP_VIEW(visprocess,1,4,STATUS)>>> works only with camera view=1

    so, for vision commands that require camera view index Do i need to use index=1? We only have one camera in the robot cell.

  • 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

  • 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.

    UD1 on a real robot is the usb port on the cabinet. If you plan to have a USB stick in there at all times, you could do it. 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. Easier to do that than configure every robot for auto backup.


    Also, on a real robot, if you are logging images to UD1, it will add several seconds to the process. If you are logging only failed images, it probably won't be an issue.


    Your FRom might be full of logged images, or old backups.


    When uploads p-code files to real robot got an error: "program version too new"

    When you compile your code in roboguide, the major version number of 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.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • 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?

  • 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?

    You can use the optional /ver argument when invoking ktrans.


    Example:

    Code
    ktrans example.kl /ver V8.30-1


    If you run ktrans from the command line without any arguments, it lists out what versions it can compile to.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

  • 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.

Advertising from our partners