RobotStudio event

defaccframe

Options
Is the rapid function: defaccframe(). accesable in the ADD-IN (C#) of RobotStudio?
 

If so. How does one acces it?

 

kind regards

 

 

 

 

Comments

  • Niklas Skoglund
    Options
    Hi,
     

    this function can be inserted in a path as an "Action Instruction", but it has no meaning to RobotStudio. But if you want to have this instruction in one of your paths, followed by some MoveL for example, you can sync it to the controller.

     

    Do you want to develop and Add-In which you can create a path (RsPathProcedure) with such an action instruction (RsActionsInstruction)?

     

    First you have to import this instruction using the "Instruction Template Manager" user interface, then you can export it to an xml file.

     

    Actually the RsActionInstructionConstructor takes the instruction name as a parameter so its up to you to make sure that an instruction descpription with this name exitst.

     

    Either by the user interface, or programatically. It depends on how your Add-In shall be used.

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • LALLIE
    Options
    Hello Niklas,
     

    Thank you for you're reply. I was beginning to have doubts if anybody was going to answer......Ermm

     

    But to answer you're question, I have an mobile CMM machine with can create an XYZ coordinates of any points in space. But this machine has it's own axis frame. (with is not inline with the robot)

     

    So am trying to get the result of DefAccFrame(), with is an frame (in this situation my mobile cmm machine). With the values of this frame I can create an Wobj.

    With that I can read out all the the data and put the point in their right position in relation the the Robot.

     

    So I've looked at the RSActionInstruction (in robotstudio api help). But I'am not sure in how to use him. Or if there is an equeal funtion for DefAccframe in RS API?

     

    If any of the above is possible, an C# code would be very welkom.Wink

     

    Kind Regards,

     

     

     

     

     

     
  • Hi again,
     

    can you help me a bit by describing the use case for your Add-In?

     

    Would you like to control the CMM from RobotStudio and supervise the calibration procedure?

     

    Do you have a simulation (a station) of your workcell and want to create a workobject in the sation?

     

    There is no "DefAccFrame" in the RobotStudio API.

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • Hello,

     

    And sorry for the late responce. I've been busy at work.

     

    The use case of my Add-In is to import en convert all data that comes from the CMM machine to robtargets (with the X-axis aligned to the direction vector of the measurement probe) and place them in the correct position in relation to the robot.

    To place them in this correct position we have to calculate the position and orientation of the CMM machine, something that the function DefAccFrame() is very good at.

     

    So I was hoping that the brilliant people of ABB could tell me what the inner workings of such an function is, and how I could achieve the same in an Add-In.

    Only that is the quesiton the rest is childsplay.

     

    To answer the rest of youre questions;

    Yes, I've an working RobotStudio station of the workcell

     

    with kind regards,

     

     
  • Henrik Berlin
    Options

    Do you want to do it in "production-time" on the controller when the robot is running? Then you should do it in RAPID.

    Or do you want to do it during planning and programming using the Offline part of RobotStudio? If you want to do it only once (or occasionally) then you might consider using the Coordinate File Addin (available on the RobotStudio Commity, see http://abbcontentsharing.skapawebsql.tripnet.se/Download.aspx?fileId=143&filename=CoordinateFileImport.zip).

    If you want to do it several times an add-in is the right solution. Then your add-in can import the coordinates in a similar way as the above add-in does, and the workobject can be created using the RobotStudio API.






    Henrik Berlin
    ABB
  • Hi Henkrik,
     

    The whole idee is to do this on the offline part of RobotStudio. So yes, I am using an Add-in to import the data and covert them to Robtargets and place them in a wobj. That is really not the problem. But thanks for the advice!

     

    The problem is that I have to use the fuction DefAccFrame() in a VC to calculate the position and orientation of the CMM machine (in order to correctly place the targets in relation to the robot). I would like to do this in an Add-In but such a function seems to be not avalible in the RobotStudio environment.

     

    So if anyone has an idee, feel free to share!

     

    Kind regards
  • Hi again LALLIE,


     

    I'm afriad I and Henrik were explaining something slightly different,  compared to what you asked forBig smile. Sorry.

     

    To answer your first question:

    No there is no method as DefAccFrame in the RobotStudio API.

     

    However I think you could find the source code for a best fit algorithm by Google, or from an algorithms book. Unfortunately I cannot recommend an algorithm myself. Maybe someone else here knows?? 

     

    Given this fact, there are two main paths forward:

     

    1) Find a best fit algorithm and develop an Add-In

    2) Use RAPID to call DefAccFrame, which you are already doing.
    • You can write RAPID code to handle the input of data (files from CMM etc). The resulting frame can be assigned to for example a workobject, which can be transfered to RobotStudio using RAPID Sync (either manually, or by calling RS API).
    • An alternative is to handle input data using the RobotStudio Add-In, and then pass it over to RAPID. The point of this is to avoid coding in RAPID, if you are more familiar with C#.
    • To get the result back from DefAccFrame you can read the value from a datadeclaration (for example a workobject) using PC SDK from the RobotStudio Add-In.
    • It is less complicated to have a RAPID procedure doing the "DefAccFrame stuff", which you manually start from the FlexPendant.
    • If you are more adventurous, you can try to start execution of the above mentioned RAPID procedure using PC SDK. (The point of doing this is to be able to run DefAccFrame in RAPID, but not have to leave the RobotStudio Add-In
    Hope this is closer to your ideas...

     

     

    Best Regards, Niklas Skoglund
    ABB Robotics

    Developer Center
    RobotStudio Blog
  • Thank you Niklas and Henrik. I think it will. Geek
    If I have found something interresting I will share it.

     

    Kind regards.