8.4.2 "Mark-In-Progress" Signal Emulation |
A hardware signal, traditionally named Mark-In-Progress (MIP), has been made available by RAYLASE GmbH Controller Cards since time immemorial, and has been used for a variety of application dependent signalling purposes.
Very often, it was used to notify other hardware components within a system (for example: an SPS controller) of some marker-related activity:
MIP State | Activity |
---|---|
Active | a marking (or similar) operation is now in progress (or will be started "very soon") |
Inactive | the operation has ( or will presently have ) finished. |
Alternative, application specific uses for the MIP signal were not uncommon. In some cases, it was appropriate to control some piece of equipment directly - perhaps a shutter, or some kind of handling device. In others, the MIP signal could be used to indicate the beginning and end of an entire job sequence, or of each item within a sequence.
In all cases, however, there was only one MIP signal available, whatever its actual function might be in a given application context.
In its traditional form:
the MIP signal was always assigned to a single, pre-defined connector/pin.
it was exclusively under explicit software control: the signal was not controlled by the card's Marking Engine. Its current state was set by writing an appropriate bit-pattern to a particular I/O port register, either via a generic "WritePort" API function, or via the equivalent list command - there were no special "SetMIP" or ""ResetMIP" commands or functions in the API.
its significance could vary, even within a particular application.
A GPIO signal can be used to emulate MIP on the SP-ICE-3 Card.
Control Method | Typical Usage |
---|---|
By use of GPIO Commands within Command Lists. | A particular markable object is currently being processed. |
via methods of the GpioAPI. | A complete job sequence is being processed. |
Almost any available GPIO signal [Note 1] may be selected to effect whatever kind of MIP signalling seems appropriate for the application.
X907 Laser Pin 4 represents a special case, however, since it may be used either
for "traditional-MIP-style" software controlled signalling, or
for the automatically generated MEB signal: see 8.4.1 The Marking-Engine-Busy Signal.
More than one GPIO signal may be used simultaneously.
This example shows one way to implement MIP for a single markable object contained within a single CommandList.
For this illustration, we choose PortA, Pin1 (bit PA.0) to act as our MIP signal.
For the pin-out of PortA, please refer to X903 PortA.
// NB: we assume the existence of a variable called CardIP, // which contains the IP address of our card. using ( ClientAPI client = new ClientAPI( CardIP ) ) { client.System.ResetToDefaults(); //** Optional GPIO configuration. //** Only necessary if not already performed elsewhere //** (using the SPICE3Config tool, for instance). // Get the current GPIO configuration from the card: GpioConfig gpioConfig = client.Gpio.GetConfig(); // For convenience, use a reference to the port configuration for PortA: PortConfig portA = gpioConfig.Ports[IOPort.PortA]; // Make sure that Pin 1 (which is in Direction Group 0) is available as an output: portA.Directions[0] = IODirection.Output; // send the complete GPIO configuration, including the new port configuration for PortA, back to the card. client.Gpio.SetConfig( gpioConfig ); //** End of optional GPIO configuration. // Now create a CommandList to hold our "markable object": int listID = 0; // We set process parameters in the preamble to the "markable object": CommandList list = new CommandList(); list.AppendJumpSpeed( 2 ); list.AppendJumpDelay( 0 ); list.AppendMarkSpeed( 1 ); list.AppendMarkDelay( 0 ); list.AppendLmFrequency( 0.08 ); list.AppendLmWidth( 0.5 ); // Define a bit-mask which selects Pin1 on PortA: const int portA_MIP_BitMask = 0x1; // bit PA.0 // And now, the Main Event! // Switch on MIP immediately before the start of the "markable object", // using PinAction.Set: list.AppendGpioValue( IOPort.PortA, PinAction.Set, portA_MIP_BitMask ); // Define the "markable object" itself (and what a very simple one it is, too!) : list.AppendJumpAbs( 0, 0 ); for ( int i = 0; i < 5; i++ ) { list.AppendMarkAbs( 1000, 1000 ); list.AppendJumpAbs( 0, 0 ); } // Finally: switch off "MIP" straight after the end of the "markable object", // using PinAction.Clear: list.AppendGpioValue( IOPort.PortA, PinAction.Clear, portA_MIP_BitMask ); client.List.Set( listID, list ); client.List.Execute( listID ); int? listDoneID; client.List.WaitForListDone( out listDoneID ); }
Within reason, that is.