Click or drag to resize

0 Quick Start Guide

First, make sure you have the equipment:
BlankTile.svg not found.
RaylaseMan.svg not found.
BlankTile.svg not found.
SP-ICE-3-iso-sketch-small.svg not found.
1 ×
ScanHead-sketch-top-small.svg not found.
1 ×
LaserSource.svg not found.
1 ×
Desktop-PC.svg not found.
1 ×

See: Minimum Requirements.

SP-ICE-3-Software.svg not found.
1 ×
Download from www.raylase.com.
FieldCorrection-small.svg not found.
1 ×

See: 7.1.4 Correction of Marking Field Distortion

BlankTile.svg not found.
 
Computer-Cables.svg not found.
n ×
BlankTile.svg not found.
 
Then follow these simple steps:

Click on the legends for more details of each step.

BlankTile.svg not found.

1

InstallSPICE3SoftwareOnHostPC.svg not found.
Download latest SP-ICE-3 software.
BlankTile.svg not found.

2aor:

InstallSPICE3CardInt.svg not found.

Internal Installation.

2bor:

InstallSPICE3CardP2P.svg not found.

External/Peer-to-Peer Installation.

2c

InstallSPICE3CardExt.svg not found.

External/DHCP Installation.

3

UpdateFirmwareOnCard.svg not found.

Update Card Firmware, if necessary.

4

RunSPICE3Config.svg not found.

Perform System Setup.

5

InstallFieldCorrectionOnHostPC.svg not found.

Transfer Field-Correction file(s).

6

WriteClientProgram.svg not found.

Write a SP-ICE-3 client program.

7

ConnectCablesBetweenSPICE3ScanHeadAndLaserSource.svg not found.

Connect cables to Scan Head and Laser.

8

MountScanHeadAndLaserSource.svg not found.

Arrange laser source and scan head.

9

ComplyWIthLaserSafety.svg not found.

Comply with laser safety requirements!

10

ClientProgramAction.svg not found.
Run your SP-ICE-3 client program.

 

ResultsOfClientProgram.svg not found.

Admire results.

SP-ICE-3 Client Program Example

Here is a more or less complete example of a simple SP-ICE-3 Client Program.

Guidance on compiling and running the code appear in the the next section.

The program embodies four main stages:

  1. Initialisation.

  2. Command list preparation.

  3. List execution and monitoring.

  4. Error handling.

Important note  Important

Note that this example program assumes that you have already configured your SP-ICE-3 card using the SP-ICE-3 Configuration Tool (SPICE3Config.exe).

You will need to adapt this example code to the requirements of your system before attempting to run it.

  • In particular, see the comments in the example code marked with:

    // TODO:
  • Where necessary you should substitute values which are suitable for your scanners and laser.

Be aware that this example demonstrates just one way in which a client program could be structured, but that this particular structure is neither required nor recommended.

  • You should use whatever program structure is best suited for your application.

SP-ICE-3 Client Program example.
//////////////////////////////////////////////////////////////////////////
// 
// Mark a square on the XY plane,
// centered about the origin of the marking field.
// 
//////////////////////////////////////////////////////////////////////////
using RAYLASE.SPICE3;
using RAYLASE.SPICE3.ClientLib;
using System;

internal class SPICE3ClientProgram
{
    // 
    // TODO:
    // Substitute your SP-ICE-3 card's real IP address here:
    // 
    private static string CardIP = "192.168.1.1";

    private static void Main( string[] args )
    {
        //////////////////////////////////////////////////////////////////////////
        // 
        // Stage 1: Initialization.
        // 
        //////////////////////////////////////////////////////////////////////////

        // 
        // Instantiate the ClientAPI.
        // 
        using ( ClientAPI client = new ClientAPI() )
        {
            try
            {
                // Open a communications channel to the SP-ICE-3 card.
                client.Connect( CardIP );

                // Make sure the card initially uses default parameter values and settings.
                // These will normally be what you configured with
                // the SP-ICE-3 Config Tool (SPICE3Config.exe).
                client.System.ResetToDefaults();

                // Retrieve the card's current ScannerConfiguration,
                // so that we can extract some useful values
                // (such as the FieldSize, for instance).
                ScannerConfig sc = client.Scanner.GetConfig();

                // Work out a suitable size for the square we want to mark,
                // ensuring that it will fit within available marking field.
                double sizeX = ( 7 * sc.FieldSize.X ) / 8;
                double sizeY = ( 7 * sc.FieldSize.Y ) / 8;

                // Work out the extents of the square along both axes,
                // so that the square is centered on the field origin.
                double maxX = 0.5 * sizeX;
                double minX = -0.5 * sizeX;
                double maxY = 0.5 * sizeY;
                double minY = -0.5 * sizeY;

                // TODO:
                // Substitute values suitable for your system here.
                double markSpeed = 0.1;
                double jumpSpeed = 1.0;

                //////////////////////////////////////////////////////////////////////////
                // 
                // Stage 2: Command list preparation.
                // 
                //////////////////////////////////////////////////////////////////////////

                // Create a local Command List.
                CommandList list = new CommandList();

                // TODO:
                // Substitute process settings suitable for your system here.
                // Note: this list is not exhaustive: you may need more, as well as other, values.
                client.Laser.SetPowerScale( 1.0 );

                // TODO:
                // Substitute process parameter values suitable for your system here.
                // Note: this list is not exhaustive: you may need more, as well as other, values.
                // 
                // Append process parameter values to the List:
                list.AppendJumpSpeed( jumpSpeed );
                list.AppendMarkSpeed( markSpeed );
                list.AppendLmFrequency( 0.01 );
                list.AppendLmWidth( 75 );
                list.AppendPower( 32767 );

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

                // Transfer the Command List to the SP-ICE-3 card.
                // NB: the remote List ID is arbitrary, but MUST be unique.
                int listID = 0;
                client.List.Set( listID, list );

                //////////////////////////////////////////////////////////////////////////
                // 
                // Stage 3: Command list execution and monitoring.
                // 
                //////////////////////////////////////////////////////////////////////////

                // Determine a suitable timeout value for the marking process.
                // 
                // For this example, we take the expected marking time (in milliseconds)
                // for the square, and add a couple of seconds leeway:
                int timeoutMs = (int)( 1e-3 * ( ( 2 * ( maxX - minX ) ) + ( 2 * ( maxY - minY ) ) ) / markSpeed ) + 2000;

                // Allow the SP-ICE-3 card to generate LM and Gate signals,
                // and activate the ArmLaser signal on Port D/E.
                client.Laser.ArmLaser( true );

                // Execute the Command List, and then...
                client.List.Execute( listID );

                // ... wait for notification from the card that it has finished processing the List.
                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 )
            {
                //////////////////////////////////////////////////////////////////////////
                // 
                // Stage 4: Error handling.
                // 
                //////////////////////////////////////////////////////////////////////////

                // TODO:
                // Define suitable error handling for your application.
                Console.WriteLine( "Uhhh, Houston? We've had a problem...{0}", ex.ToString() );
            }
        }
    }
}
How to compile and run the example code.
  1. Launch Microsoft Visual Studio 2017 (or a newer version).

  2. Create a new project using the "Windows Desktop | Console Application (.NET Framework)" template (or equivalent).

  3. Add project References to ALL of the DLLs in the RAYLASE SP-ICE-3 Software package directory.

  4. Copy the example code, and use it to replace the entire contents of the Program.cs file.

     

  5. Important note  Important

    Adapt the example code to your system by making any necessary changes now!

  6. Caution note  Caution

    Take all necessary Laser Safety precautions before attempting to run your program.

  7. Caution note  Caution

    Click Visual Studio's Start button.

    • Verify that the SP-ICE-3 Card' Status LEDs become active.

    • Observe that marking occurs.