Singer Instruments PIXL Client
Initialisation
This topic assumes that there is an instance of the PIXLClient object called pixl. If this is not the case, please see the Connecting To The PIXL topic.

The PIXL should be initialised before attempting to run work flows or other tasks. The initialisation process homes all motors, cleaves any PickupLine and then moves to the calibration bay and calibrates the head (depending on the Initialisation settings on PIXL). Initialisation only needs to be carried out in the following scenarios:

Initialisation can be invoked by calling the Initialise method on the PIXLClient.

Initialising the PIXL
Copy Code
pixl.Initialise();

This will asynchronously initialise the PIXLClient. The Initialise method return an instance of the ApiCommandResponse structure, which can be used to determine the result of the initialisation.

Initialising the PIXL and checking the result
Copy Code
var result = pixl.Initialise().Result;

if (result.IsSuccess)
    Console.WriteLine("Initialise Complete.");
else
    Console.WriteLine($"Initialise failed with code {result.Code}, because {result.Message}");

Alternatively, the Initialise method can be provided with a callback of type ApiCommandResponseCallback which is invoked when the result from the Initialise method is obtained.

Initialising the PIXL with a callback
Copy Code
pixl.Initialise(x => System.Console.WriteLine(x.Message));

Once the PIXL has been initialised successfully other commands can be invoked.

See Also

Getting Started

Reference