speed of movement from socket communication

  • This is the program that I wrote for the movement of Fanuc robots by Karel program.
    Firstly, the connection was examined without any movement of the robot (the “MOVE_G” program which is related to the teach pendant program at this step was blank, So I just wrote the position register without any movement ). The results were completely satisfactory: 7000 lines were sent and received in one minute.


    For the second step, I wrote the "L @ PR [80] 250 mm/sec CNT 100" in the teach pendant inside 'MOVE_G' teach pendant program, in order to control the motion of the robot with respect to the PR [80] . The results were disappointing, and the number of lines sent and received was reduced from 7000 to less than 100 lines as soon as I wrote the above code. The test conditions were the same except that "L @ PR [80] 250 mm/sec CNT 100 " was added to the 'MOVE_G' teach pendant program. I do not know what is the reason for reducing the speed of the connection when I am activating the movement.
    I wrote both Python and Karel code as below.



  • MOM

    Approved the thread.
  • Hi MohammadReza


    Quote

    CALL_PROG('MOVE_G', prog_index)

    you are calling the program.


    So inside your loop every time you CALL the TP-Prog it will be executed!

    In your case

    "L PR [80] 250 mm/sec CNT 100"

    will be executed (move the robot).


    Afterwards(!!) the Karel-Prog will continue....



    ::: Keep in mind, that it's a good idea to do error handling.

    Like checking you status var

  • Dear PnsStarter ,

    My problem is not about occurring errors. The code that I wrote above is running perfectly without any errors. So error handling is not an issue in my code.
    The problem is that when I am writing on TP this line "L @ PR [80] 250 mm/sec CNT 100" (I attached the photo below) the speed of sending and receiving data is reduced drastically and the robot is lagging instead of continuous movement.
    u8cz9fa86

  • "L PR [80] 250 mm/sec CNT 100"

    will be executed (move the robot).


    Afterwards(!!) the Karel-Prog will continue....

    This is the answer to your question, i think.

    The code runs synchronously!!


    In this case you should run it asynchronously...

    (different tasks).7

    That means you need to adapt your two programs to asynchronous processing....


    Quote

    The code that I wrote above is running perfectly without any errors. So error handling is not an issue in my code.

    And it is always a GOOD idea to do some kind of error handling.


    best regards

Advertising from our partners