Posts by claycamel

    Sudden change in TCP speed is probably to avoid the jerk when using a step function to cap the speed.
    try gradually lowering the speed to desired value. for example if the speed is at 100% and you want to drop to 50%
    try

    Code
    socket_open("127.0.0.1",30002)
    socket_send_line("set speed 0.80")
    sleep(0.05)
    socket_send_line("set speed 0.65")
    sleep(0.05)
    socket_send_line("set speed 0.50")
    sleep(0.05)
    socket_close()


    Hopefully this'll get rid of the error. Let me know !!

    korshun83. There is a script manual vailable on the URSupport website that you can download to learn scripting.
    http://www.universal-robots.co…option=18678#section18449
    However I recommend creating a norml .urp program on the Polyscope GUI and saving it.
    Whenevr you create and save a universal robots program file or ".urp" file it also generates a .script file.
    If you analyze this script file and correlate it to the .urp program, you will get a hang of how scripting works.
    In your example I see you havent defined the scope of the variable (local or global)
    so when creating a variable try this
    global xa = <whatever calculated value
    .
    .
    .
    var_1 = p[x,y,z,rx,ry,rz]
    movej(var_1, a= 1.4, v= 1.2, r = 0.01)
    all values need to be in meters or radians or kilograms or newtons etc. the controller understand on SI units.
    Hope this helps.

    The transfer from PC to VM is most likely a settings issue. Usually you can simply copy a file from your PC onto the simulator like any other file.
    As far as referencing different features when scripting, if you can define the feature plane as a "pose" with respect to the base-frame then you can move w.r.t that plane using the pose_trans script function.
    e.g

    Code
    feature_wrt_base  = p[0.3,0.3,0.3,3.14,0,0]                                     " where is your feature with respect to the base
        pose_wrt_feature  = p[0.1,0.1,0,0,0,1.57]                                       " where is the point with respect to your custom feature/frame
        pose_wrt_base  = pose_trans(feature_wrt_base, pose_wrt_feature)                 " returns pose with respect to base-frame
        movel(pose_wrt_base)                                                            " script line


    Hope this helps. Good luck!

    It should be similar to most CNC machines, it should only require a few digital I/O's. I would recommend hard-wiring the two together using digital signals. As far as I can tell, it shouldn't be difficult setting up communication to a Fanuc CNC. Most installations with robots and CNC machines, are usually controlled via digital I/Os. Fanuc CNC distributors or usually the machine operators have knowledge of the machine program, how it is organized, which signals are required/available, etc.The important thing is to figure out which signals to use, what order to set them, etc. Hope this helps you get started!

    Hey gradyturner86,
    Try adding and event with the exact opposite condition on your loop. And within this event add a stopl(5) command.


    i.e if your looping condition is digital_input[0] = True, then your event condition should be digital_input[0] = False
    so something like :-

    Code
    Robot Program
        Loop digital_input[0] = True
               MovJ
                   Waypoint_1
                   Waypoint_2
                   Waypoint_3
    Event digital_input[0] = False
        stopl(5)


    This should work. good luck.

    Unfortunately none of the Features are rewriteable or updateable from within a program.
    The best way to go about this would be to write a function to generate a plane using the 3 points you record, which should be fairly easy math.
    (Planes, similar to waypoints are represented as a pose with respect to the Base frame of the robot and represent a infinite XY plane)
    After that you can use the pose_trans function to move with respect to the new custom plane you have created.

    You can use the script function get_inverse_kin(x) where x is a pose to get the joint angles
    See example below (not actual code) e.g

    Code
    list = get_inverse_kin(pose)     " Use the assigments option on the advanced tab
        list[2] = list[2] + d2r(30)         " add 30 degrees to the elbow angle. d2r converts degrees to radians, this line would be a script
        MoveJ
            list                                        "change waypoint to variable to move to list



    in "cp = Tool" is not script you create cp using the assigments option and set to to the Tool pose.
    You do not necessarily have to base them off of the base frame. If you can define the camera grid plane as a pose w.r.t the base feature then you can move w.r.t that plane using the pose_trans script function.e.g

    Code
    plane_wrt_base  = p[0.3,0.3,0.3,3.14,0,0]
        pose_wrt_plane  = p[0.1,0.1,0,0,0,1.57]
        pose_wrt_base  = pose_trans(plane_wrt_base, pose_wrt_plane)  "returns pose w.r.t base frame
        movel(pose_wrt_base)         " script line



    Hope this helps. Good luck!