Click or drag to resize

9.1.1 Straight Lines and Jumps

These commands are used to define (parts of) the path that the laser beam should follow over the target surface during marking operations.

JUMP: move scanners with the laser OFF

For fast mirror movements, JUMP commands are used. The focal point of the optical system "jumps" at a specified velocity from the start to the end of the vector.

During a jump the laser is off.

The jump velocity may be specified via the AppendJumpSpeed API method or the JUMP_SPEED command.

ListAPI Method

SP-ICE-3 Command

AppendJumpAbs

JUMP_ABS

AppendJumpRel

JUMP_REL

MARK: move scanners with laser ON

To move the laser beam's focal point along a vector at a constant velocity, a MARK command is used.

For an isolated MARK command, the laser is switched on at the beginning, and off again at the end of the vector. See also: POLYLINES.

The marking velocity may be specified via the AppendMarkSpeed API method or the MARK_SPEED command.

ListAPI Method

SP-ICE-3 Command

AppendMarkAbs

MARK_ABS

AppendMarkRel

MARK_REL

POLYLINE: contiguous MARK commands

Any contiguous set of MARK commands automatically defines a POLYLINE of vectors to be scanned at a specifed marking velocity.

The laser is switched on at the start of the first vector of a polyline, and off again at the end of the last vector. See also: MARK.

The marking velocity may be specified via the AppendMarkSpeed API method or the MARK_SPEED command.

JUMP, MARK, and POLYLINE illustrated

In this figure you can seen three POLYLINEs (the "R", "L", and "C") and a single isolated MARK (the "-"), separated from one another by JUMPs.

SP-ICE-3 Commands Overview JumpsMarksPolys.svg not found.
Example: Marking a Square.
Note  Note

Boilerplate code is omitted from this example for brevity: please refer to 12.3 Example Code in this Manual.

Marking a square.
using ( ClientAPI client = new ClientAPI() )
{
    try
    {
        client.Connect( CardIP );

        client.System.ResetToDefaults();

        // 
        // For this example, we choose to make the square almost 
        // as large as the available marking field.
        // 
        // Note how we use the (pre-)configured size of the marking field...
        double sizeX = ( 7 * client.Scanner.GetConfig().FieldSize.X ) / 8;
        double sizeY = ( 7 * client.Scanner.GetConfig().FieldSize.Y ) / 8;
        // ... and the place the extrema of the square symmetrically about the origin.
        double maxX = 0.5 * sizeX;
        double minX = -0.5 * sizeX;
        double maxY = 0.5 * sizeY;
        double minY = -0.5 * sizeY;

        double jumpSpeed = 1.0;
        double markSpeed = 0.1;

        CommandList list = new CommandList();

        // Append process parameter values to the List:
        list.AppendJumpSpeed( jumpSpeed );
        list.AppendMarkSpeed( markSpeed );

        // Append vectors to the List:
        list.AppendJumpAbs( minX, minY );
        list.AppendMarkAbs( maxX, minY );
        list.AppendMarkAbs( maxX, maxY );
        list.AppendMarkAbs( minX, maxY );
        list.AppendMarkAbs( minX, minY );
        list.AppendJumpAbs( 0, 0 );

        int listID = 0;
        client.List.Set( listID, list );

        // Calculate a suitable timeout value
        // by estimating the expected marking time and adding a couple of seconds leeway.
        int timeoutMs = (int)( 1e-3 * ( ( 2 * ( maxX - minX ) ) + ( 2 * ( maxY - minY ) ) ) / markSpeed ) + 2000;

        client.Laser.ArmLaser( true );

        client.List.Execute( listID );

        int? doneID;
        if ( !client.List.WaitForListDone( out doneID, timeoutMs ) )
        {
            throw new ListException( "Timed out waiting for ListDone." );
        }
        if ( doneID != listID )
        {
            throw new ListException( "Got ListDone for wrong listID!" );
        }
    }
    catch ( Exception ex )
    {
        // 
        // TODO:
        // Define suitable error handling for your application.
        // 

        Console.WriteLine( "Uhhh, Houston? We've had a problem...{0}", ex.ToString() );

    }
}