Programme simplifying help.

  • Hi, I am having trouble figuring something out and wondering if anyone can help me.

    I'm writing a scan programme to spray a flat component face.

    To do this i have written the whole programme out and I have set every single point.

    I need to simplify it.


    Just wondering if there is a command or a way to add only 3 points;

    A start, a "scan end" and a programme end point. While also having a 2mm drop between each scan.


    I'm using a D series controller and writing the programmes in KCwin.

    I've attached a rough drawing of what I'm trying to do to this post.


    Thanks :smiling_face: :smiling_face:

  • What your looking at is some kind of 'raster scan' routine over specified distances.

    This can be implemented, but just takes time and a little bit of thought to breaking it down.


    Effectively what you are intending to do is to move the TCP either using Tool coordinate vectors, or even Base coordinate vectors whilst maintaining the same height (2D scan using X,Y vectors).

    Eg: Creating a path consisting of a repetitive frequency.


    Simplest methods I have seen is maybe utilize arc weld spec weaving function.

    This function allows to make up custom path frequencies of travel, however this means you would need to convert the robot to arc spec and create the custom frequency paths too, which do have limitations in terms as they are fixed frequency profiles, so this may not be a viable solution and could be overkill to just create the scan path.


    However, with standard AS commands, this can also be achieved using BASE or TOOL vector referenced commands.

    The thing to always be mindful of, when creating any scanning style of routine, to ensure the robot posture steers clear of any singularity, so setting and maintaining the correct posture throughout is required.


    Referencing your image from your start position you have 4 moves before you repeat the same 4 moves again.

    You have:

    1. 1x right direction travel path in a specific positive or negative direction.

    2. 1x down direction travel path in a specific positive or negative direction.

    1a. 1x left direction travel path in the opposite direction of 1.

    2a. 1x down direction travel path in the same direction of 2.


    For this there really are many variations that can be used but in principle you have 2 main fundamental concepts to start out using:


    BASE vectors X,Y referencing the start_pos:

    Code
    LMOVE SHIFT (start_pos BY -100)
    LMOVE SHIFT (start_pos BY -100,20)
    LMOVE SHIFT (start_pos BY 0,20)
    LMOVE SHIFT (start_pos BY 0,40)


    TOOL vectors X,Y referencing the start_pos:

    Code
    LMOVE start_pos+TRANS(-100)
    LMOVE start_pos+TRANS(-100,20)
    LMOVE start_pos+TRANS(0,20)
    LMOVE start_pos+TRANS(0,40)


    By manipulating the distance values (using variables and iteration mulitpliers) and wrapping them in a FOR/END loop, you can therefore create this path frequency and repeat the frequency 'x' amount of times per FOR/END iteration pass.


    However, using this type of method means there are no 'actual positions' you can revisit as each motion segment is a calculated target from a reference position (offset), unless you create the positions based on the calculation first and then visit them


    A simple working example of using a reference position and just moving to 'SHIFT' XY values is below along with a video clip demonstration.

    (This is not necessarily a solution, but a basic demonstration of implementation).

    The above is only use 2 positions, hope this helps........... :top:

Advertising from our partners