RobotStudio event

Modify path target coordinates from app


Hello everyone!

Situation:
I have path from curve, consisting of targets. As you know - robot will follow that path, but it's constant.

Idea:
I want to send point from app, where robot starts to execute the path. For example if I recorded path from curve on upper left corner of work space, I could tell it to execute same path, but on bottom right corner this time.

Whole idea is to give robot ink pen and tell it to draw. Problem is - I want it to draw letters, so it's very important to be able to tell it what exactly (letters) and in what order.

Is this even possible?



Sisiander2012-04-29 16:53:06

Comments



  • Thumbs Up Yes it is possible. Difficult, but possible.
    Regarding starting from the other end, there you have reverse of the path. If a reverse is not enought then you need to modify the curve itself. There are plenty of functions to do that in the RobotStudio SDK. You can cut it, join, splice etc.
     
    But first is this robot going to print letters or follow a freehand draw?
     
    If letters then I'd create a "font library" of functions corresponding to each letter in use. Then when receiving the input I'd stack those functions and tell the robot to execute each letter in turn.
     
    If freehand, then I'd use a drawing frame in VS (don't remember the name right now) like in paint. Get the coordinates in the order the user draws them, recreate those as RobTarget coordinates and then have the robot go through those coordinates in the same order as drawn.
     
    Neither solution is simple and they both take a long time to set up correctly, but they will work.
  • Hello John,
    Thanks for response! It has to "print", not free draw. And hardest part - it has to do it in handwritten style (with lot of curves and practically no straight lines).

    I like your idea of stacking functions in order of given string, but won't it just draw over previous letter? I mean... if for example I record path from curve (3D model of a letter), then load another 3D model and record another path. If I will tell it to draw path1 and then path2, it will just draw path1 and over draw path2 on top of path1, right? This is most crucial thing - I need it to be able to modify starting point, so I can give each letter it's own place and form a word.

    Can you give me example? Some code snippet or similar help? I am not an experienced programmer, so it's quite a trouble to understand everything from first try.


  • John Wiberg
    John Wiberg ✭✭✭
    Sorry, we have no examples or snippets for this type of thing.

    If it's printing then this is what I would do (might not be the best way mind you, just what I would do).

    1- Look through free fonts and pick a handwriting font.
    2- Write all the letters in the alphabet you will use & save as a bitmap
    3- In RobotStudio put that bitmap as a texture on a box scaled to the robot work envelope and paper you will use
    4- Create three targets - put them into a path as a MoveJ and a MoveC
    5- Put the targets on the box, first letter and use free hand move to get the targets and thus the curve to match the curve of the letter
    6- Copy, paste & repeat until I've done all the curves in the letter etc
    7- Use as many matches for further copy paste as possible, like d and b being the same but mirrored, or h and n being the same curves etc. To minimize workload.
    8- Create a path/routine per letter.
     
    For the displacement - fonts use this as well, so a font would have thin letters like I, medium like O and wide like M. So look at how the font handles it and copy the behavior, while scaling it to whatever paper/size your robot will use.
    I'd use a charcount variable, which is then added with a value depending on character width. This could be implemented with a workobject with it's starting point at a corner of the paper.
    For instance if I is 5mm wide and O is 10mm wide, and blankspace is 8mm wide then writing "IO IO"  would be
    Call routine I
    Add +5 to charcount
    Call routine O
    Add +10 to charcount
    Call routine blank (moves the pen up from paper)
    Add +8 to charcount
    Call routine I
    Add +5 to charcount
    Call routine O
    Add +10 to charcount
     
    With a similar value for rows, so that when you do an ENTER it increases the row displacement while making the charcount value =0 since its a new line etc.
     
    Good luck.
  • Wow, thanks! This sounds promising. I will work on this and see how it goes. Thanks again!



  • thank you john for the instruction above, i would like to apply this to mine as well and hopefully it would be a hit. Sleepy









    diamondstarlight2012-12-15 18:03:22


  • [QUOTE=Sisiander]Wow, thanks! This sounds promising. I will work on this and see how it goes. Thanks again!

    [/QUOTE]

    I am also interested in learning about this matter. I am subscribing to
    this topic and will follow your post to see your progress. Please keep
    updating.

    paulcook2012-06-29 11:24:46