Click or drag to resize

11.2 Endless MOTF

The Endless MOTF feature allows for a continuous and seamless repetition of a pattern on a moving target without the laser turning off in between repetitions.

Example

Let's say we want to cut a very long piece of battery foil in a sort of alternating pattern.

Endless Motf Battery Example.svg not found.
Battery foil with cut marks in white

The length of the foil is not predetermined and could in theory be infinite. As a consequence the end point of our cut and thus the length of the actual pattern to be marked is also not predetermined and could be infinite.

While it is not possible to create a list containing a pattern of indefinite length we make use of the fact that the pattern in its entirety is just the repetition of a much simpler pattern.

Endless Motf Battery Example - Single Pattern.svg not found.

An additional challenge arises due to the fact that the length of the foil by far exceeds the size of our scan field. Because of that the foil is constantly moving across the scan field at a constant speed.

The Endless MOTF feature, taking the simple pattern as input, creates new commands for the card such that the pattern will not only be marked correctly considering the movement of the foil but also repeated indefinitely. The repetitions are designed to be seamless meaning that the scanner won't have to pause its movement at any point and thus the laser won't have any off times.

In addition, the Endless MOTF feature is designed to constantly adjust the scanner's marking speed to the current movement speed of the underlying target such that a seamless transition between repetitions can be maintained. With changes in marking speed the laser power is also constantly adjusted to ensure a consistent stroke width.

Restrictions

For Endless MOTF to run smoothly you need to make sure that the provided input doesn't violate any of the following restrictions.

  • The end point of the input pattern must have the same X value, for vertical repetition or the same Y value, for horizontal repetition as its start point. That's because the end point of a pattern must exactly overlap with the start point of its next repetition.

  • The input list must not contain the command STOP_MOTF or any command starting with MARK_ARC, MARK_ELLIPSE, MARK_ELLIPTIC_CURVE or MARK_BEZIER. Including any of these commands will lead to an exception being thrown.

Synchronization

The input list may contain commands such as WAIT_START, MOTF_WAIT_PART and MOTF_WAIT_DISTANCE in order to synchronize the start of marking execution with the rest of the machine, i.e. the drum.

Endless MOTF App

The entire functionality of the Endless MOTF feature is contained in the Endless MOTF App. This application is pre-installed on every SP-ICE-3 card and can be activated via the SP-ICE-3 Configuration Tool.

The Endless MOTF App provides a server interface that handles all communication. The example code below shows the common procedure of interacting with the Endless MOTF App's server.

Communication with the Endless MOTF server
string cardIP = "192.168.1.1"; // Substitute your SP-ICE-3 card's real IP address here

TcpClient tcpClient = new TcpClient();
tcpClient.Connect( IPAddress.Parse( cardIP ), 49375 );
tcpClient.ReceiveTimeout = 500;

using ( NetworkStream stream = tcpClient.GetStream() )
{
    // COMMANDS
    // version?
    // getspeedscalelimit
    // setspeedscalelimit <minimum limit> <maximum limit>
    // convertlist <source list ID> <target list ID>
    // execute <target list ID>
    // abort
    // forceex
    string command = "version?" + "\n";
    byte[] txBuffer = Encoding.Default.GetBytes( command );

    int packetCount = 1;
    int maxCount = Math.Max( 1, txBuffer.Length / packetCount );
    int offset = 0;
    while ( offset < txBuffer.Length )
    {
        int count = Math.Min( txBuffer.Length - offset, maxCount );
        stream.Write( txBuffer, offset, count );
        if ( packetCount > 1 )
            Task.Delay( 100 ).Wait();   // sleep so that partial packet is sent (otherwise, all is sent in one single packet)
        offset += count;
    }

    byte[] rxBuffer = new byte[1024];
    int bytesReceived = stream.Read( rxBuffer, 0, rxBuffer.Length );
    string answer = Encoding.Default.GetString( rxBuffer, 0, bytesReceived );
}
Speed Scale Limits

The Endless MOTF App creates a command list based on the belt speed Factor1xSpeed. The actual belt speed during execution of the list is measured and will usually deviate from Factor1xSpeed. When the actual belt speed is getting too low the laser power might be downregulated so much, as a reaction to a lower effective mark speed, that the laser fails to leave a mark on the material. When the actual belt speed surpasses Factor1xSpeed the list will still only be executed at the speed that corresponds to Factor1xSpeed and not faster. This will lead to inaccuracies in the marking result.

The setspeedscalelimit command can be used to define a lower and upper limit to deviations in belt speed. The lower limit defines how low the belt speed is allowed drop relative to Factor1xSpeed. Similarly, the upper limit defines how high the belt speed is allowed to get relative to Factor1xSpeed.

It is strongly recommended to set the upper speed scale limit to a value smaller than 1, e.g. 0.95.

The current value of Factor1xSpeed can be obtained as the return value of the convertlist command.

See Also