Fast communication between tasks

Hello,
I'm doing an application in which I have 2 tasks: the motion one and the secondary one. The secondary task is a semistatic one and it's used to continuously computing the current robot position (this is done to show on the PLC panel the position of the robot in "real time" but also to check when the robot is in a certain position). About the latter purpose, I have defined a shared PERS robtarget called "CurrentPos" in order to compute the position in task 2 using Crobt and to access this robtarget even in task 1 because sometimes I have to perform some movements only if I'm inside a certain range (for example only if coordinate CurrentPos.trans.y > 900 ). When the robot moves slowly there is no problem about this, it perfectly works; but problems arise when the robot moves fast. Indeed it seems like the value of CurrentPos in task 1 is updated with a considerable delay (with respect to the robot motion) which actually makes not reliable the checks on position in task 1. Is there a way to get a faster communication among tasks?

Comments

  • EricH
    EricH Germany
    edited May 5
    I guess CRobT is not a fast function. Try CPos instead. Do you have any delay (for example WaitTime or TPWrite) in the semistatic task? If you have other tasks in parallel, then try to higher the priority of the task.
  • dragolollo
    dragolollo Italy
    To try CPos could be an idea but I'm not sure it will be so much faster. Yes, I have a WaitTime 0.1 to avoid overload of the cpu.
  • EricH
    EricH Germany
    Is the delay bigger than 0.1? It's a long time for the cpu to wait. Should be better to lower it to 0.01
  • Newman
    Newman Sweden
    Try lower the waittime. Rather split it into several smaller waittimes and spread them out if you have cpu load issues. I did a test once, no waittime = 100 % cpu, and waittime 0.0001 =0% cpu. 
    -----------------
    David
    Swedish freelance ABB robot programmer
  • dragolollo
    dragolollo Italy
    Thank you for your answers! At the end I've found out that it was an issue of the zone of the MoveJ that is before to read the CurrentPos value: even if the position to reach is at y=0 and the zone is z200, it reads the current position when y is > 900 (crazy to think but it's like that). So the solution is to put a smaller zone.
  • Newman
    Newman Sweden
    edited May 6
    As far as I know both robots and CNC controller do this, they "look ahead" and execute the code on the fly. That's why the rapid code doesn't need to be compiled before executed. Correct me if I'm wrong.
    -----------------
    David
    Swedish freelance ABB robot programmer
Sign In or Register to comment.