RobotStudio event

Help communication problem, I am new

Options
Help communication problem.

I would like to use PC to control ABB robot. I have the location numbers (X,Y,Z) to control the end effector of the ABB robot.

Right now, I don't know how to set up connection between PC and ABB robot.

I have use cable to connect PC and use robot studio online to revise the rapid program. But I can't revise the data in rapid program when the robot is running.

Question: Can I real time change the value in rapid program on robotstudio online ?

or I have to send up some kind of connection to finish the task ??

Comments

  • DavidLanham
    Options
    RobotStudio Online will allow you to stop the program and make changes and then start the program again, but not change position data on the fly. It sounds like you want to change position data or robtarget data while the program is running.  In order to do this you will need your RAPID program to be waiting for the values to come in to the controller through some communication and then make the move to the new position.  There are many ways for you to send the data through communications (PC Interface option, PLC through many different protocols, DeviceNET, Remote I/O, Ethernet...etc.)  Depending on what devices you have to do this and how you want to feed the information into the controller, I would suggest you start with a PC Interface connection. 

    You will need the follow things to do this:
    1. VisualStudio VB.NET or C#.NET version 2005 or later
    2. The robot that you are trying to communicate with must have PC Interface software option 616-1 installed on it
    3. You can use the service Port but I would recommend that you configure the Network Port on the controller for Ethernet communications
    4. Write your VisualStudio VB.NET or C#.NET application to change the robtarget position data and Set a BOOL variable to true
         (There are examples in the help file for PC Interface that come with RobotStudio for how to do this)
    5. Write RAPID program to wait for the BOOL variable to be set to true, read the new robtarget value, set the BOOL variable to false and make the move to new position.

    If you cannot use PC Interface then you will need to setup some other way to get data into controller.  PLC would be the next Option.  This would require you to setup binary inputs to the robot so you can feed in the new values for X,Y,Z and data bits to let the controller know that the new values are there.

    I hope this gets you started and post back if you have questions about what I have said

  • huiyi1990
    Options
    My rapid program is here.I have define variable robotarget p10. and I have write a C#program to revise the p10. 
    Right now I can get the MessageBox show the value of p10, but I cann't put the new value equal to p10. when I run the program, unexpected error occurred: Operation not allowed due to syntax error.
    I define ABB.Robotics.Controllers.RapidDomain.String rapidString1; to express my new value of p10. I meant to define ABB.Robotics.Controllers.RapidDomain.Robotarget rapidString1; but it cannot run the program.

    Please Help me! How can I revise the p10 in rapid program ???????


    image




    rapid:

    MODULE testabb
    VAR robtarget p10:=[[1247.55,0.00,1240.60],[0.5,-6.45239E-09,0.866025,-3.72529E-09],[0,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
    VAR robtarget p20:=[[959.30,-307.43,1226.78],[0.500001,6.99294E-09,0.866025,-2.52384E-08],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
    CONST robtarget p30:=[[959.30,-307.43,1584.77],[0.500001,-2.6031E-08,0.866025,-9.00227E-09],[-1,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
    PROC main()
    MoveL p10, v1000, z50, tool0;
    MoveL p20, v1000, z50, tool0;
    MoveL p30, v1000, z50, tool0;
    ENDPROC
    ENDMODULE




    C#:
     try
                {
                    if (_controller.OperatingMode == ControllerOperatingMode.Auto)
                    {
                        using (Mastership m = Mastership.Request(_controller.Rapid))
                        {
                            RapidData rd = _controller.Rapid.GetRapidData("T_ROB1", "testabb", "p10");
                            MessageBox.Show(rd.Value.ToString());
                           
                           ABB.Robotics.Controllers.RapidDomain.String rapidString1;//string 类型的rapid数据
                           
                           rapidString1.FillFromString("[[1247.55,500,1240.6],[0.5,-6.45239E-09,0.866025,-3.72529E-09],[0,0,-1,0],[8.999999E+09,8.999999E+09,8.999999E+09,8.999999E+09,8.999999E+09,8.999999E+09]]");//将text的内容填充到rapid里面
                           
                           rd.Value = rapidString1;
  • DavidLanham
    Options
    You need to change the value as a robtarget in your C# program and not a string.  Because when you try and write back to the controller its trying to fill the variable as a string and not a robtarget.

    This is a example of VB.NET doing a robtarget variable in a program.

        Public controller As Controller = Nothing
        Dim rapidRobtarget As RapidDomain.robtarget
        Dim rd As RapidData = Nothing
        Dim sNewValue as string = ""

                  rd = controller.Rapid.GetRapidData("T_ROB1", "MainModule", "p10")
                  rapidRobtarget = DirectCast(rd.Value, RapidDomain.robtarget)
                  sNewValue = "[[1247.55,500,1240.6],[0.5,-6.45239E-09,0.866025,-3.72529E-09],[0,0,-1,0],[8.999999E+09,8.999999E+09,8.999999E+09,8.999999E+09,8.999999E+09,8.999999E+09]];"
                  rapidRobtarget.FillFromString2(sNewValue)
                  rd.Value = rapidRobtarget


    I have not tested this but it should be right...I will test it later tonight and let you know if its ok.

  • DavidLanham
    Options
    I tested this and it works as long as you have the controller instance set correct and you have write access on the controller.

  • huiyi1990
    Options
    I have finish the simulation part. Thanks for your help, I can change robotarget right now in robotstudio on my computer.

    After that I connect my PC and IRC5 by  network cable. The connection picture show below.
    image

    I open a virtual control on robotstudio and a real control connected to the PC, which means I have two robot system online.

    Then i start the PC scanner software, scan the robot avaliable, I see the information following.
    image

    according to the picture, I can find the real robot system have no controller name. And the program run into error on logon function(I have new a userinfo above). PC interface option not found show up. 
    Do you know how to handle this problem ????
    image

    I have upload the picture of two FlexPendant. I can see the virtual robot system controller have controller name in the brackets(LIUZHENYA-PC), but the real controller have nothing in the brackets.

    WHAT IS WRONG ?? Please help me.
  • DavidLanham
    DavidLanham ✭✭✭
    edited November 2013
    Options
    Even when you go through the Service Port to talk to the robot, you must have software Option "616-1 PC Interface" installed on the controller before you can communicate to it through a C# or VB.NET application.  I think when you talk to the virtual controller it lets you do this because it knows its a virtual controller or the system that you built for the virtual controller has the software option installed.  If you make a backup of the real controller and then go into the backup folder you will find a system.xml file in the root of the backup folder.  This file will tell you if you have the software option installed on the controller.  If you do not have it installed then you will have to purchase the software option for that robot. This means that you will get a new System Key for your robot that you will use in System Builder to create the new system with the software option installed.

  • huiyi1990
    huiyi1990
    edited November 2013
    Options
    It seems that I need to buy pc interface.....

    I have my backup uploaded.

    Apart from that, DO I have other free way to connect PC and robot  to realize what I  want.
  • DavidLanham
    Options
    Since you have software option 620-1 File and Serial Channel handling installed on the controller you could write a application on a PC to send over RS232 communication to the controller, but you must write a RAPID program to receive and parse the data.  If you did this then I would think that the program that was running that would receive the data would be running all the time.  To do this you would need to have the software option 623-1 Multitasking installed on the controller (Your backup shows that you do not have this) so you could create a background task that would be running all the time and receive the data.  Then when the background task had received new data it would just update your variables.  The background task is nice for this because even if you press stop on the teach pendant it is still running.

  • IRB_2600
    Options
    Thanks David your comments were really helpful 
    :)>-
  • baijun
    Options
    Thanks David ,your comments were really helpful.I am new in using PC SDK, ABB.Robotics.Controllers.Discovery.NetworkScanner initialization error,my project is set to X86, ABB.Robotics.Controllers.PC.dll version 6.3.7016.2009, Runtime version is v4.0.30319. May I ask you, what is the problem, thank you.
  • baijun
    Options
    Since you have software option 620-1 File and Serial Channel handling installed on the controller you could write a application on a PC to send over RS232 communication to the controller, but you must write a RAPID program to receive and parse the data.  If you did this then I would think that the program that was running that would receive the data would be running all the time.  To do this you would need to have the software option 623-1 Multitasking installed on the controller (Your backup shows that you do not have this) so you could create a background task that would be running all the time and receive the data.  Then when the background task had received new data it would just update your variables.  The background task is nice for this because even if you press stop on the teach pendant it is still running.
    Thanks David ,your comments were really helpful.I am new in using PC SDK, ABB.Robotics.Controllers.Discovery.NetworkScanner initialization error,my project is set to X86, ABB.Robotics.Controllers.PC.dll version 6.3.7016.2009, the same as Robot Communication Runtime. May I ask you, what is the problem, thank you.