RobotStudio event

Creating a custom positioner

Options

I have a custom-built lathe bed whose headstock is driven by a "large"-size ABB external axis servo. On the controller, it behaves as axis number eight, and is used both in discrete positioning applictions and continuous motion lathe rotation programs.

My question is this: is there a way to map the headstock I've built in the model of the cell (.stn file) to respond to the controller's commands for axis 8? Essentially, I need the headstock to behave like a positioner-type external axis, but none of the standard positioners resemble the actual hardware, nor do I have the kinematic modeling software. Any suggestions?

-DCH

Comments

  • John Wiberg
    Options

    For your headstock to behave like an external axes you need two things:

    1. A model with kinematics.

    2. A CFG file.

    Now if you don't have the "kinematics modeler" add-in then you either have to get someone who has to do it for you or you have to create it using VBA code.
    To get the VBA code you need then in RS go to the Help menu and click on "RobotStudio API Help".
    Select the "KinematicModeler object" and look in the example.
    When pasting in that example on some systems it doesn't recognize the 'enter' so if you get red script in VBA after pasting it in, then just do an extra enter in front of every red line.

    The CFG file you create using the ConfigEdit software that comes with ProgramMaker that comes with RS.
    Start>Programs>ABB Automation>ProgramMaker>ConfigEdit.

  • dchayden
    Options

    Thanks John!

    It's a step in the right direction. What I have is a .rlb with the lathe components in it. I've created a .dll that loads with Rs and runs a routine that builds the sample mechanism from the API help example on startupComplete.

    What I'd rather be able to do is tie the kinematic model information that is currently in the example .dll to the library, so that placing the lathe in the station makes the lathe axis available for use as an external axis (as would happen with one of ABB's stock libraries).

    How do I bind the .dll to the .rlb, while also referencing elements of the geometry in the .rlb (the elements that rotate) in the kinematic information in the .dll?

    Pardon my ignorance, but I'm new to the merging of RS and VB. I can work in either one independently, but I haven't had to cross between them yet. :)

    Cheers,

    DCH

  • John Wiberg
    Options

    Hi there,

    Lets see if I read this right...

    You have actully built an add-in to run the macro example?
    image
    Yikes, that's fast moving though a little bit unecessary.
    image
    RobotStudio has VBA integrated just like MS-office. Just go to the Tools menu and select Macro then Visual Basic Editor. There are two default projects the local station and the global RS project. Just paste the code there and you can use step through or whatever when debugging.

    For your question, just dim some parts and set them to 'your' parts then use those in the macro to build the mechanism. Then when the macro is finished, right click the resulting mechanism and "save as library", this lets you save the result as a library (.rlb).

    On a sidenote libraries can also contain VBA code, just right click on it and select VBA enabled, this creates a project for the library.
    image

    Regarding learning the API between RS and VBA all objects should have an example macro in the help file, so that you can step though them to see what happens.

    Best regards

    John Wiberg

  • dchayden
    Options

    THANKS!

    It took some doing... the API help doesn't do a great job of explaining the purpose of the arguments for methods such as .AddJoint... so getting the code to do what I wanted it to required a couple days' experimentation. The result, however, is a perfectly functional lathe headstock .rlb that I can use in several variations of the cell.

    Again, thanks!

    -DCH