RobotStudio event

execute movement from PC App

Options

Hi!

I'm trying to execute movement via PC application,but it seems that the PCSdk doesn't provide the function.And I wanna define a RobTarget instance ,not a reference to an existing RobTarget instance in the controller.to carry the information,which is the position the robot will go to.

How can I program to fulfill this task?

Any help will be appreciated!

Comments

  • RussD
    Options

    Direct motion contol is not supported from PCSDK for safety reasons; the robot controller is the sole agent that can control movement. The robot moves because of Move instructions defined in RAPID code, there is no supported way around that.

    In automatic mode you can enable motors on, load/unload modules and start the robot program,etc. This is pretty much the limit of what you can do to move the robot.

    Maybe if you describe in more detail what you are trying to accomplish someone can suggest a solution.

    Russell Drown
  • cookie
    Options

    Now I wanna set up a PC application to read the position of robot,I 've accomplished by read from a RobTarget variable,and the problem is I wanna give a position to instruct robot where to go,how can I  accomplish?

    Obviously,I can't program like in FP,define a RobTarget variable ,and write "Movl" instructions to control movements of robot.How can I do in a PC application to fulfill the task just like in FP?

     

  • RussD
    Options

    You should be able to modify the values of a robtarget using the FIll or FillFromString methods of the RobTarget structure, but this might not be the safest way to go about it.

    For instance, you might enter some value that the robot cannot reach, or that will cause it to crash into some obstacle. A safer approach would be to have a pre-defined path that gets the robot in the general vicinity of where you want to go and then tweak the path from there.

    In many applications where some sort of external positional adjustment (like a vision system) is offered, the robot will move to a starting point and then reference a workobject once it is near the "critical area". From this point, the exact positional requirements are calculated and then conveyed to the robot as robtaget offsets.

    There is a RAPID function called Offs that will apply X,Y,and Z offsets in mm to a robtarget. You could write offest data to RAPID variables via PCSDK and then use the same Move instruction(s) or routine repeatedly and simply adjust the offsets before executing the routine.

     

    Russell Drown
  • cookie
    Options

      Hi Russd:

         I tryed to assign value to an instance of RobTarget, the position is reachable, but there was debug error.The code is stated below:

                     try
                     {  
                         IRD = rdp1.Value;
                         aRobTarget = (RobTarget)IRD;
                         aRobTarget.Trans.X = Convert.ToSingle   (this.textBoxX.Text);
                         aRobTarget.Trans.Y = Convert.ToSingle(this.textBoxY.Text);
                         aRobTarget.Trans.Z = Convert.ToSingle(this.textBoxZ.Text);
                     }
                     catch (GeneralException ex)
                     {
                         throw new ApplicationException("Get value problem", ex);
                     }

     

    When executing the program, the GeneralException is thrown"Get value problem"

    Please help me with this problem, thank you