Click or drag to resize

9.1.2 Arcs

The MARK_ARC_xxx commands may be used to define circular arcs as (parts of) the path that the laser beam should follow over the target surface during marking operations.

Here are some details of the way these commands and their parameters are implemented and handled on the SP-ICE-3 Card.

MARK_ARC_xxx: move scanners along a circular arc.

From an arbitrary starting point S we may describe a circular arc a, with swept angle θ at the centre-point C of a circle with radius CS.

SP-ICE-3 ARC Command.svg not found.

When the card executes MARK_ARC_xxx, it calculates the length of the arc from the given parameters, and hence the number of micro-steps required, taking into account the specified marking velocity.

Relevant ClientLib API items
Example: Marking a Circular Arc.
Note  Note

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

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

        client.System.ResetToDefaults();

        // 
        // For this example, we choose to make the arc fairly small compared to the available marking field.
        // 
        // Note how we use the (pre-)configured size of the marking field:
        double sizeX = client.Scanner.GetConfig().FieldSize.X / 10;
        double sizeY = client.Scanner.GetConfig().FieldSize.Y / 10;

        // define the starting point S
        double Sx = 1 * sizeX;
        double Sy = 5 * sizeY;

        // define the centre point C
        double Cx = 3 * sizeX;
        double Cy = 1 * sizeY;

        // define the sweep angle θ (rad)
        double theta = 60 * Math.PI / 180;

        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:
        // 
        // move to the start of the arc at S
        list.AppendJumpAbs( Sx, Sy );
        // 
        // mark the circular arc about C, with swept angle theta
        list.AppendArcAbs( Cx, Cy, theta );

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

        client.Laser.ArmLaser( true );

        client.List.Execute( listID );

        // obviously, the timeout has to be appropriate for the marking speed, etc.
        int timeoutMs = 1000;

        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() );

    }
}
See Also

Other Resources

9.1.3 Ellipses