Real-time updating coordinates from the C# code to the robot
Hello!
I'm a postgraduate major in robotic control. My subject is called “Dynamic visual servo control of robots" .It describes an integrated visual servoing system able to track and grasp industrial parts moving on a conveyer by controlling a ABB robot arm .The robot arm is controlled by the PC-based vision and robot controllers,In my C# code,Image acquisition and object recognition cycle time is 50ms,that is to say,the coordinates of workpiece in robot base-frame update in every 50ms, later,i send this two coordinates X and Y to robot with the timer event which cycle time is 100ms
//PID控制量double VarInXdir;double VarInYdir;VarInXdir = para_Kp * para_ErrorX + para_Kd *para_ErrorX;VarInYdir = para_Kp * para_ErrorY+ para_Kd *para_ErrorY;//读取当前RAPID程序中的目标点位置,并将控制量偏移修正到当前目标点中RapidData rd = ABBController.Rapid.GetRapidData("T_ROB1", "MainModule", "p10);RobTarget target = new RobTarget();if (rd.Value is RobTarget){target = (RobTarget)rd.Value;}target.Trans.X += (float)VarInXdir;target.Trans.Y += (float)VarInYdir;using (Mastership m = Mastership.Request(ABBController.Rapid)){rd.Value = target;}here is my rapid code:
PROC main()rInitialize;WHILE TRUE DO
MoveL P10 ,v30,z10,tGripper;
ENDWHILE
ENDPROC
the problem is :the robot velosity is not Smooth,always exists a standstill between two motion cycle,How could i solve this problem?
Thank you for your help!
0
Comments
-
There is a limitation as to how many (and complex) calculations the robot controller can
calculate in between move instructions with corner zones. This is mainly a problem when
calling procedures after a move instruction with a corner zone.
I think if you change this line
MoveL P10 ,v30,z10,tGripper;
with
MoveL P10 ,v30,fine,tGripper;
your problem would be solved. I hope this helps.
0 -
One other thing to consider is your while loop cause heavy CPU usage which may cause unknown circumstances. To avoid this simply have an idle time in between two cycles by adding a sleep time.ex (pseudo code):while truedo movesleep for x timeend while0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings