Fanuc Karel Server, MSG_CONNECT exits with status 67206 without blocking

  • Hello,


    I am trying to establish a tcp/ip connection between a Fanuc robot (with a R30iB controller) and a PC. For that purpose we are using a simple karel program, which is working fine with Roboguide. The server tag is configured as SM with status defined/started (we tried both) and the variable $HOSTS_CFG[3].$SERVER_PORT is set to 5005. Anyway if we try that on the real robot, the line with the msg_connect command is not blocking at all and exits with status 67206.



    Does anyone have an idea what the problem could be or what the status code 67206 means? I tried to find some information in the manuals and also contacted Fanuc's support. Unfortunatly I am running out of ideas what I could try, so I would be thankful for any hint!

  • 67206 is HOST-206, which means:


    SM: Bad Port Number
    Cause: The system variable $server_port in the Client tag or the host tag was invalid.
    Remedy: Set the $hosts_cfg[n].$server_port sysvar for the server tag or $hostc_cfg[n].$server_port for the client to a valid
    number."


    Edit: How I looked this up:


    Karel error codes are always setup like this: FFFEEE, where FFF is the facility code, which can range from 1 to 3 numbers, and EEE, which is the error code, which is always 3 numbers.


    You can look up the Facility code number in table 1-8 in the error code manual. In this case, the faciltiy code was 67, which according to the table is HOST.

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

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

    Edited once, last by Nation ().

  • I am having the same issue with connection on the server side. I am using a simple c# server I created. I can write the data to the server from the robot in roboguide but the robot is not reading the data. Any thoughts? I am getting 67216 fault which tells me this

    Code
    A request was received for a socket which is invalid.
  • Hello, Nation

    Where i find the Karel error codes list?

    I am trying to establish a socket-based server-client communication between robot and PC. I have a FANUC LR-Mate200Di robot but currently, I am using Roboguide for testing and I am able to successfully exchange strings between robot and PC. For this case, Robot is a server and the client is a python socket app.

    I am facing a problem when a client (py app) tries again to connect the socket server and got the following error msg on the python side."

    s.connect((HOST, PORT))

    ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it

    I do not understand why this is happening as far as I understand "socket server is configured on robot and it is started and KAREL program which is responsible for handling this communication is running which means the server is listening for a new connection from the client but my client is not able to connect again to server"


    Furthermore, according to the KAREL manual, I am using "MSG_DISCO('S3:', STATUS)" utility to close the current connection with the client after receiving data from the client and again opens new connect but client still does not connect. Following are the KAREL status code that i received:

    Disconnect: 67208

    Connect: 67215


    Thanks



Advertising from our partners