Click or drag to resize

12.5 Command Lists

As its name suggests, a Command List normally consists of a list of SP-ICE-3 commands, generally specifying positions for the laser beam to visit, interspersed with other commands which affect or effect laser timing, laser power levels, I/O signals, and flow-control.[Note 1]

Because the contents of a command list are all transfered to the card before the list is executed, the card can perform all the marking operations described by the List without interruption or loss of synchronism between laser and scanners. Execution can pass smoothly from one command to the next without having to wait a possibly indeterminate amount of time for the next command to arrive from the Host-PC (or some other external source.)

The Nature of Command Lists

Fundamentally, the command list is a container for SP-ICE-3 Commands and their Parameters.

The command list and its contents are represented in different, but complementary, ways by the SP-ICE-3 ClientLib and on the SP-ICE-3 Card:

Command List in the ClientLib: Client-CommandList

The ClientLib presents a local view of a command list which is designed for the programmer's comfort.

  • The Client-CommandList is defined by the CommandList class and represents a container for Commands and their Parameters.

  • Its ToString method allows the list contents to be retrieved in human-readable string format.

  • It provides a rich set of methods and functions for conveniently building and manipulating the contents of the list.

Command List on the SP-ICE-3 Card: Card-CommandList

The card firmware uses a compact binary representation of command lists which allows efficient execution.

  • Card-CommandLists are not directly visible via the ClientLib: they are instantiated automatically on the card as and when necessary.

  • The content of an Card-CommandList is not actually created/overwritten or updated/extended until the ListAPISet method is invoked by the Client, passing a Client-CommandList as an argument.

  • Each Card-CommandList is uniquely identified by a ListID (effectively, its handle).

    • The ListID values can be re-used: they are only required to be concurrently unique.

Typical Client-CommandList Operations

The ClientAPI and CommandList classes together provide the facilities for various list operations:

List Operation

Example

Create Client-CommandList instances.

new CommandList();

Build, manipulate, and serialize the contents of a Client-CommandList.

CommandListAppendJumpAbs(Point2D)

CommandListToString

Send Client-CommandList contents to the card for conversion to a Card-CommandList.

ListAPISet(Int32, CommandList, Boolean, Int32)

Start and monitor execution of the list on the card.

ListAPIExecute(Int32)

ListAPIWaitForListIdle(NullableInt32, NullableInt32)

Retrieve an existing Card-CommandList from the card, converting it to a Client-CommandList which can subsequently be manipulated in string format.

ListAPIGet(Int32)

Notes
  1. Neither the SP-ICE-3 Card nor the SP-ICE-3 ClientLib supports the notion of a Marking Job in any shape or form: the command list is already the most sophisticated structure known in the SP-ICE-3 universe.

    Indeed, a "job", however it might be described at the GUI/Client-Application level, may well be represented by more than one, only one, or even just part of one Client-CommandList in the ClientLib, or Card-CommandList on the SP-ICE-3 Card.

See Also