0% found this document useful (0 votes)
247 views

20.009 (Remote Interface Manual v3.x)

Documentation for WinLase galvo laser software

Uploaded by

Artifacture
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
247 views

20.009 (Remote Interface Manual v3.x)

Documentation for WinLase galvo laser software

Uploaded by

Artifacture
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

WinLase® Professional/LAN

Host Interface User’s Guide

20.009 2/14/13
Rev 3.9
Remote Interface User’s Guide

Lanmark Controls Inc. has prepared this document for use by its personnel, licensees, and potential licensees.
Lanmark Controls Inc. reserves the right to change any products described in this document as well as
information included herein without prior notice. Although the information presented in this document has
been tested and reviewed, this document does not convey any license or warrantee beyond the terms and
conditions set forth in the written contracts and license agreements between Lanmark Controls Inc. and its
customers.

The software described in this document is licensed from and is a trade secret of Lanmark Controls Inc. Refer
to your License Agreement for restrictions on use, duplication, or disclosure. Government users and prime
contractors are also governed by the following restricted rights legend:

RESTRICTED RIGHTS LEGEND. Use, duplication, or disclosure by the U.S. Government is subject to the
Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 © (1) (ii) (Oct. 1988) and
FAR 52.227-19 © (June 1987) or other agency provision is as applicable. Copyright Lanmark Controls Inc.

Copyright © 2013 Lanmark Controls Inc. – All rights reserved under the copyright laws of the United States
of America.

WinLase is a registered trademark of Lanmark Controls Inc. in the United States and/or other countries. Other
brands mentioned are trademarks or registered trademarks of their respective holders.

There is no implied warranty of fitness for a particular purpose, and Lanmark Controls Inc. is not responsible
for consequential damages. Individual components and/or software modules manufactured by Lanmark
Controls Inc. or others may be covered by their own warranties. Refer to the appropriate manuals for this
information.

Lanmark Controls Inc. 2


Remote Interface User’s Guide

Table of Contents
1.  Introduction .............................................................................................................................. 4 
1.1  About this Manual ............................................................................................................ 4 
1.2  Technical Support............................................................................................................. 4 
1.3  Manufacturer .................................................................................................................... 4 
2.  Principle of Operation .............................................................................................................. 5 
2.1  Remote Interface Concept ................................................................................................ 5 
2.1.1  RS-232 and TCP/IP Interface Concepts ................................................................... 5 
2.1.2  Fieldbus Interface Concepts ..................................................................................... 5 
2.2  Configuring the RS-232 Interface .................................................................................... 6 
2.3  Configuring the TCP/IP Interface .................................................................................... 8 
2.4  Configuring the Fieldbus Interface ................................................................................... 9 
2.5  Configuring the Repeat Process and External Start settings .......................................... 10 
2.6  Viewing the Host Interface Monitor ............................................................................... 12 
2.7  Enabling the Host Mode ................................................................................................. 12 
2.8  Tips on using the RS-232 and TCP/IP Remote Interface ............................................... 13 
3.  Commands and Functions ...................................................................................................... 17 
3.1  RS-232 and TCP/IP Interface ......................................................................................... 17 
3.1.1  Command Syntax ................................................................................................... 17 
3.1.2  Command Set ......................................................................................................... 17 
3.1.3  Example Program ................................................................................................... 29 
3.1.3.1  C++ Example ...................................................................................................... 29 
3.2  Fieldbus Interface ........................................................................................................... 31 
3.2.1  Data Structure Overview ........................................................................................ 34 
3.2.1.1  Master Output Structure ..................................................................................... 34 
3.2.1.2  Master Input Structure ........................................................................................ 37 
3.2.2  Processing Example ................................................................................................ 40 
4.  Warranty ................................................................................................................................. 41 
5.  Index ....................................................................................................................................... 43 
Appendix A – Return codes ........................................................................................................... 45 
Appendix B – Object Types ........................................................................................................... 47 
Appendix C – TCP/IP Test Client .................................................................................................. 49 
TCP/IP Test Client ..................................................................................................................... 49 

Lanmark Controls Inc. 3


Remote Interface User’s Guide

1. Introduction
Thank you for purchasing the Lanmark Controls Inc. WinLase Professional Laser Marker User Interface. The
following guide will assist you in using the Remote Interface services provided by WinLase Professional; either
with a direct wired RS-232 port connection, through a LAN based TCP/IP socket connection, or a Fieldbus
network connection.

1.1 About this Manual


The Remote Interface User’s Guide contains detailed information about interfacing to the Remote Interface
services provided by WinLase Professional, and is meant to be a reference tool. This manual assumes you
have a working knowledge of RS-232 port programming and/or TCP/IP socket programming, and/or Fieldbus
programming experience.

1.2 Technical Support


If you are experiencing problems installing this package and you need help, you should:
1. Retry the action, carefully following the instructions given for that task in this guide.
2. Try to determine the nature of the problem. By eliminating variables, the problem can be narrowed down.
If it appears to be hardware problems, check the documentation that came with your hardware for
maintenance or hardware-related issues. Contact your hardware representative if necessary.
3. Contact Lanmark Controls Inc. Customer Service department for additional technical support.

1.3 Manufacturer

Lanmark Controls Inc.


125 Nagog Park, Suite 305
Acton, MA 01720 USA
www.lanmarkcontrols.com

Lanmark Controls Inc. 4


Remote Interface User’s Guide

2. Principle of Operation
This chapter gives an overview of the Remote Interface services provided by WinLase Professional, and details
on configuring WinLase Professional properly to communicate with your software.

2.1 Remote Interface Concept


WinLase Professional was designed to be a full-featured laser marker interface package, with capabilities for
editing, saving, opening and running “jobs” directly from the WinLase Professional interface. Although this
interface is extremely powerful, it may not be desirable in all circumstances.

For this reason, WinLase Professional offers the Remote Interface service. This service provides a remote
program, written by the customer, the ability to take control of WinLase. In addition, the Fieldbus interface
provides a means for controlling WinLase, and reading status back from WinLase to the Master controller.

Although TCP/IP, RS-232 and Fieldbus interfaces are supported, only one may be active at a time for Remote
Control.

2.1.1 RS-232 and TCP/IP Interface Concepts


When using the RS-232 or TCP/IP interfaces, a remote program can load jobs, dynamically change the content
of marking objects, run jobs, and receive status back from WinLase Professional after every command. While
the remote program has control, the WinLase Professional User Interface is locked out, preventing the
operator from making any changes to the running process. Although jobs that contain Motor Control objects
can be loaded, the Remote Interface does not support executing motor control objects within the job.

In operation, the external program takes control of WinLase, but does not initiate the actual marking cycle.
This is done through the START PROCESS input on the Standard I/O card, or the Start Mark input on the
SPC/SPICE series of interface cards. Once the START PROCESS pin is toggled, the mark cycle begins, the
mark completes, and then WinLase Professional returns to wait for the START PROCESS pin to toggle again.

In addition to the control commands available, there are a number of status query commands that can be used
to retrieve the current status of WinLase. These queries can be made even if the remote computer has not
taken control of WinLase.

If an RS-232 COM port has been configured, WinLase will attempt to open the port when the application first
starts. If an error is encountered during startup, an error window will be displayed.

2.1.2 Fieldbus Interface Concepts


Using the Fieldbus interface, a remote Master controller can load jobs by Index number, change the contents
of two fixed memory buffers, run jobs, and receive status back from WinLase Professional after every
command. While the remote Master has control, the WinLase Professional User Interface is locked out,
preventing the operator from making any changes to the running process. Although jobs that contain Motor
Control objects can be loaded, the Remote Interface does not support executing motor control objects within
the job.

In operation, the external Master initializes WinLase with a startup sequence, and then can go on to take
control and load jobs. Once a job is loaded, the Master initiates the actual marking cycle. This is done through
the StartMark input bit.

Lanmark Controls Inc. 5


Remote Interface User’s Guide

2.2 Configuring the RS-232 Interface


To configure the RS-232 interface:
1. From the menu bar, select System > Preferences.
2. Click on the COM Ports tab. The COM Ports page appears.
3. Select the Host Interface line in the list with the mouse. The configuration settings appear.

The property values listed in the Host Interface page consist of the following:
 Make port available to Host Interface – Selecting this check box will make a COM port available to
the Host Interface. When applying this change, the port is not opened, but is only made available to
the Host Interface. This is indicated by a Status of Not Connected. Click on the Host Interface tab to
actually open the port. De-select the box to disable the COM port for the Host Interface.
 Port # – The Windows assigned COM port.
 Data Bits – COM port setting.
 Stop Bits – COM port setting.
 Baud Rate – COM port setting.
 Parity – COM port setting.
 Apply – Click this button to apply any changes made in the Host Interface page.
4. After making changes, click the Apply button. The following window is displayed, and the Status is
updated to Not Connected.

5. Click OK to close the dialog, then select the Host Interface Tab.
6. Click on  to display the Host connection types available.

Lanmark Controls Inc. 6


Remote Interface User’s Guide
7. Highlight RS-232. The RS-232 default values appear.

8. Select the Enter Run from Host mode when application starts check box if you want WinLase
Professional to automatically place itself in the Host ready mode when the application first starts.
9. Select the Show Host Monitor when application starts check box if you want WinLase Professional to
automatically show the Host Monitor window when the application first starts.
10. To disable the Remote Interface service, Click on  to display the Host connection types available, and
highlight <disabled>.

Lanmark Controls Inc. 7


Remote Interface User’s Guide

2.3 Configuring the TCP/IP Interface


To configure the TCP/IP interface:
1. Make sure you have a TCP/IP stack installed and set up in Windows 2000/XP. If you are not sure how to
do this, refer to the Windows 2000/XP documentation.
2. In WinLase Professional on the main menu, select System > Preferences… The Preferences form appears.
3. Select the Host Interface Tab.
4. Click on  to display the Host connection types available.
5. Highlight TCP/IP. The TCP/IP default values appear.

6. Edit the default values as desired. By default, WinLase Professional has been configured to listen on Port
350. You can change this port if conflicts exist on your network.
7. Select the Enter Run from Host mode when application starts box if you want WinLase Professional to
automatically place itself in the Host ready mode when the application first starts.
8. Select the Show Host Monitor when application starts check box if you want WinLase Professional to
automatically show the Host Monitor window when the application first starts.
9. To disable the Remote Interface service, Click on  to display the Host connection types available, and
highlight <disabled>.

Lanmark Controls Inc. 8


Remote Interface User’s Guide

2.4 Configuring the Fieldbus Interface


To configure the Fieldbus interface:
1. Make sure you have a WinLase compatible Fieldbus card (such as Profibus, ModBus, etc.) installed in
your Windows 2000/XP computer. If you are not sure how to do this, refer to the card manufacturer’s
documentation. For a list of compatible hardware, please consult the factory.
2. Connect a standard Fieldbus cable appropriate for your hardware between the computer running WinLase
Professional and your Fieldbus network.
3. In WinLase Professional on the main menu, select System > Preferences… The Preferences form appears.
4. Select the Host Interface Tab.
5. Click on  to display the Host connection types available.
6. Highlight Profibus. The Profibus default values appear.

7. Edit the default values as desired.


8. Select the Enter Run from Host mode when application starts check box if you want WinLase
Professional to automatically place itself in the Host ready mode when the application first starts.
9. Select the Show Host Monitor when application starts check box if you want WinLase Professional to
automatically show the Host Monitor window when the application first starts.
10. To disable the Remote Interface service, Click on  to display the Host connection types available, and
highlight <disabled>.

Lanmark Controls Inc. 9


Remote Interface User’s Guide

2.5 Configuring the Repeat Process and External Start settings

Note: This section does not apply to users of the Fieldbus interface. To use the RS-232
or TCP/IP interfaces, you must have either a Standard I/O card or an SPC/SPICE series
scan head card installed in your PC.

To configure WinLase Professional for the Remote Interface, the system must be set to continuously repeat the
job, and to poll the START PROCESS input pin on the Standard I/O card, or the START MARK pin on the
SPC/SPICE card. Note that if you do not select these settings manually, they will be set for you the first time
the Host calls “online”. If the Host calls “run”, these settings are NOT changed from the current values.
To Configure Repeat Process and External Start:
1. In WinLase, on the main menu click Job > Settings. The Job Settings form appears.
2. Select the Repeat Process tab.
3. Select the Do not prompt between cycles and run indefinitely radio button.

Lanmark Controls Inc. 10


Remote Interface User’s Guide
4. Select the External Start tab.
5. Check the Use External Start box. The External Start options appear.

6. Click on  to display the available I/O ports, and select the desired port. Ports are only available on the
Standard I/O card or the SPC/SPICE series scan head card.
7. Enter a message in the Message edit box. The message appears in the Host Process box while the system
is waiting for the START PROCESS input to toggle.
8. Enter a timeout value in the Timeout edit box. A value of zero will instruct WinLase to wait indefinitely
for a start mark signal.
9. Select the Wait for signal to deassert before triggering radio button to start marking on the trailing edge
of the START PROCESS signal input. Select the Trigger immediately when signal is asserted radio
button to start marking on the leading edge of the START PROCESS signal input.
10. Click OK to close the Job Settings form.

Lanmark Controls Inc. 11


Remote Interface User’s Guide

2.6 Viewing the Host Interface Monitor


The Host Interface Monitor is a convenient way to view the command sequences between WinLase
Professional and the Host. Note that when the Host has taken control of WinLase, the Host Interface Monitor
position on the display screen cannot be changed, so position it accordingly before the Host takes control of
WinLase.

To view the Host Interface Monitor, use the following steps:


1. In WinLase, on the main menu click View > Host Monitor. The Host Interface Monitor form appears. If
the View menu is unavailable, Click File >New Job to open a new job.

2. To close the Host Monitor, on the main menu click View > Host Monitor. The Host Interface Monitor
form closes.

2.7 Enabling the Host Mode


Before another program, computer, or Master controller can take control of WinLase, you must put WinLase
Professional into Host Mode. Host Mode is indicated when the Host Interface form is displayed. Note that
when the Host has taken control of WinLase, the Host Interface form position on the display screen cannot be
changed, so position it accordingly before the Host takes control of WinLase Professional.

To place WinLase Professional in Host Mode:


1. In WinLase, on the main menu click System > Run from Host. The Host Interface form appears.

The system is now ready to accept Remote Interface commands.

Lanmark Controls Inc. 12


Remote Interface User’s Guide

2.8 Tips on using the RS-232 and TCP/IP Remote Interface


In terms of simplicity, the RS-232 port is easier to set up than the TCP/IP interface, because the cable
connection between the two computers is direct. You can troubleshoot the connection with HyperTerminal,
and once you have verified proper operation, continue with programming the remote control interface.

TCP/IP, on the other hand, is a bit more difficult. It is a networking protocol, and has the ability to
communicate over local area networks (LANs), wide area networks (WANs), and the Internet. In order for one
program to communicate with another on a different computer, the remote program (such as WinLase) needs
to make itself available on a specified Port, and the IP address of the remote computer has to be known.

It is this IP address and Port that ensures any message sent reaches the proper destination. In other words, in
order for you to communicate with WinLase Professional over TCP/IP, you must know the IP address and
Port of the computer running WinLase Professional at your remote computer.

By default, WinLase Professional makes the Remote Interface service available on Port 350. This can be
changed in the Host Interface setup box if Port 350 conflicts with another installed port on your machine.

Determining the IP address of the computer that WinLase Professional is running on depends on how the
TCP/IP stack is configured in Windows NT/2000. Computers can either have a static IP address, or one that is
dynamically allocated when the computer signs on to the network.

To determine how TCP/IP is configured on your Windows XP computer:


1. In Windows XP, click Start > Control Panel. The Control Panel is displayed.

Lanmark Controls Inc. 13


Remote Interface User’s Guide
2. Click the Network and Internet Connections icon.
3. If your version of the Control Panel looks like the following screen image, double click the Network
Connections icon.

4. The Network connections window displays.

Lanmark Controls Inc. 14


Remote Interface User’s Guide
5. Right click on the network card used to connect to your network and select Properties. The Connection
Properties box appears.

6. Internet Protocol (TCP/IP) must appear and be checked in the list of items. If not, install TCP/IP, referring
to the Windows XP documentation as a guide.
7. Highlight Internet Protocol (TCP/IP), and then click the Properties button.

8. If the Use the following IP address radio button is selected, your computer uses a static IP address, which
is shown in the IP Address box.
9. If the Obtain an IP address automatically radio button is selected, your computer is assigned a different
IP address each time it boots up on the network.

If your computer uses a static IP address, you can use this address when communicating with WinLase
Professional over the TCP/IP port. If your computer uses a dynamically assigned address, another method has

Lanmark Controls Inc. 15


Remote Interface User’s Guide
to be used to obtain the address. The following is an example of one possible way to obtain this address, by
using the Windows API to query the network:

1. Enumerate all resources on the network.


2. If an enumerated resource is a remote workstation, try to connect to Port 350 on this workstation.
3. If a connection attempt is successful, this workstation is running WinLase.

Note: WinLase Professional is always listening on Port 350, and will always accept a
connection request on this Port.

Lanmark Controls Inc. 16


Remote Interface User’s Guide

3. Commands and Functions


The interface provided for RS-232 and TCP/IP is textual; commands are sent over either port as ASCII text
strings. These strings are interpreted by WinLase, and are executed accordingly. The Fieldbus interface,
however, uses a memory mapped technique, where specific bits and Bytes of memory are transferred from the
Master to the Slave. Because of the fundamental differences between the two interface techniques, they will be
discussed in their own section:
 RS-232 and TCP/IP Interface
 Fieldbus Interface
The following two sections will detail each specific interface specification.

3.1 RS-232 and TCP/IP Interface

3.1.1 Command Syntax


For the sake of clarity, the responses listed below each command have been listed with their descriptive error
codes. In practice, the responses are returned with numerical error codes. For example,
STATUS,IN_HOST_MODE is returned STATUS,512. See section 5.0 for a complete listing of all error codes.

3.1.2 Command Set


The following list describes all the Remote Interface commands and their intended use, and is presented in
alphabetical order. A description of the command parameters follows each command.

HOME

NOTE: WinLase MUST be under Host control to accept this command

Purpose: Commands all of the motor control axes to Home. This command is valid only if WinLase
has been configured with a compatible motor controller.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,NO_MOTOR_CONTROLLER Motor controller board not found

ERROR,MOTOR_HOME There was an error during the homing process

Lanmark Controls Inc. 17


Remote Interface User’s Guide

MODIFY,buffer,##,******

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: To store the string ‘*****’ in the internal string buffer at index ##. ## must be between 1
and 10. Text objects within the job must have their “Source” set to Get String from Memory
buffer to use the buffer contents. Calling this will clear the previous value stored in buffer.

Responses: ACK Acknowledged

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,NO_SUCH_BUFFER Buffer ## out of range

ERROR,INVALID_TEXT The length of the ***** string is zero, or does


not contain markable characters

MODIFY,field,##,******

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To modify a field of text or barcode where ## is the number of the field (object) to be
modified, and “*****” is the new text string. The field ## corresponds to the position the
object has in the Object List within the job i.e. the first object in the Object List would have
an index value of 1. If the index values are not known at run time, use MODIFY, buffer
instead. The marker must be OFFLINE. If the field does not exist, an error is returned.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The ## field was not an integer value.

ERROR,NO_SUCH_FIELD The ## field index is larger than the total


number of objects loaded.

ERROR,UNKNOWN_QUALIFIER The length of the ***** string is zero, or does


not contain markable characters

Lanmark Controls Inc. 18


Remote Interface User’s Guide

MODIFY,position,##,xoffset,yoffset

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To change the position of a marking object, where ## is the number of the object to be
modified, xoffset is the amount to move the object in bits along the x axis, and yoffset is the
amount to move the object in bits along the y axis. The field ## corresponds to the position
the object has in the Object List within the job i.e. the first object in the Object List would
have an index value of 1.The marker must be OFFLINE. If the field does not exist, an error
is returned.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The ## field was not an integer value.

ERROR,NO_SUCH_FIELD The ## field index is larger than the total


number of objects loaded.

MODIFY,rotation,##,angle

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To rotate a marking object about it’s center, where ## is the number of the field (object) to
be modified, and angle is the amount to rotate the object, in units of 0.010 degrees. A
positive angle value rotates the object clockwise. The object ## corresponds to the position
the object has in the Object List within the job i.e. the first object in the Object List would
have an index value of 1.The marker must be OFFLINE. If the field does not exist, an error
is returned.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The ## field was not an integer value.

ERROR,NO_SUCH_FIELD The ## field index is larger than the total


number of objects loaded.

Lanmark Controls Inc. 19


Remote Interface User’s Guide

MODIFY,rotationex,##,angle,xcenter,ycenter

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To rotate a marking object about an arbitrary center of rotation, where ## is the number of
the object to be modified, angle is the amount to rotate the object, in units of 0.010 degrees,
xcenter is the x-axis center of rotation, in bits and ycenter is the y-axis center of rotation in
bits. A positive angle value rotates the object clockwise. The object ## corresponds to the
position the object has in the Object List within the job i.e. the first object in the Object List
would have an index value of 1.The marker must be OFFLINE. If the field does not exist, an
error is returned.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The ## field was not an integer value.

ERROR,NO_SUCH_FIELD The ## field index is larger than the total


number of objects loaded.

MODIFY,scale,##,xscale,yscale

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To scale a marking object from it’s center, where ## is the number of the object to be
modified, xscale is the amount to scale the object in the x-axis, in percent, and yscale is the
amount to scale the object in the y-axis, in percent. For example, to decrease the size of an
object to half it’s current size, use the value 50.00 (%) for both the xscale and yscale values.
The object ## corresponds to the position the object has in the Object List within the job i.e.
the first object in the Object List would have an index value of 1.The marker must be
OFFLINE. If the field does not exist, an error is returned.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The ## field was not an integer value.

ERROR,NO_SUCH_FIELD The ## field index is larger than the total


number of objects loaded.

Lanmark Controls Inc. 20


Remote Interface User’s Guide

OFFLINE

NOTE: WinLase MUST be under Host control to accept this command

Purpose: Commands the laser to immediately stop marking, and returns the laser to the
MARKER_OFFLINE state.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,ALREADY_OFFLINE Marker is already offline

ONLINE

NOTE: WinLase MUST be under Host control to accept this command

Purpose: Commands the marker to start the marking process. System will immediately start polling
external start port, and enter MARKER_ONLINE state. This call automatically sets
the external start flag to true, and sets the repeat mode to repeat indefinitely.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,ALREADY_ONLINE Marker is marking or waiting for external


start signal.

ERROR,NO_JOB_LOADED No job loaded.

ERROR,INTERLOCKS_OPEN An interlock port on the interlock IO card is


signaled.

ERROR,NO_SCANCARD There is no scan head card installed in machine

ERROR,NO_HARDLOCK No Hardlock detected

ERROR,NO_IOCARD No I/O card installed in computer

ERROR,STEP_REPEAT_INVALID The values saved in the job for step and


repeat will result in an invalid object
position.

ERROR,TEXT_SOURCE _INVALID A text object was saved with a Source value


incompatible with the host interface

ERROR,TEXTMERGE_INVALID There was an error while processing a


TextMerge file.

ERROR,OBJECT_OUT_OF_BOUNDS There is an object in the job that is outside


the legal marking field

Lanmark Controls Inc. 21


Remote Interface User’s Guide

OPEN,file,######

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To open a file where “####” is a text string describing the file to be opened, and must be
a fully qualifed UNF file path. If the file cannot be found, or is corrupt, an error code
is returned.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,FILE_NOT_FOUND The file was not found at the indicated path


location, or there was an error while opening
the file.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The file path was less than 3 characters in


length

ERROR, NO_DEFAULT_NODE When using the LEC-1 controller, a default


node must be assigned

ERROR, DEFAULT_NODE_NOT_FOUND The default node could not be found

REQUEST,data,bits_per_mm,c#,h#

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the current value for the scan field bits/mm, where c# is the zero
based card index and h# is the zero based scan head index. An example string would be
“REQUEST,data,bits_per_mm,0,0”. The bits/mm value is the ratio of a point coordinate in
bits and the actual position of the point in millimeters.

Responses: DATA,x x is the bits/mm value.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

Lanmark Controls Inc. 22


Remote Interface User’s Guide

REQUEST,data,cyclecount

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the current cycle count. The cycle count indicates the number of
full cycles, including step and repeat.

Responses: DATA,x x is the current cycle count.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

REQUEST,data,partcount

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the current part count. The part count is the individual marks
within a cycle.

Responses: DATA,x x is the current part count.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

REQUEST,data, cycletime

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the current cycle time. The cycle time is defined as the elapsed
time to do all marks within a single cycle.

Responses: DATA,x x is the current cycle time.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

Lanmark Controls Inc. 23


Remote Interface User’s Guide

REQUEST,data, parttime

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the current part mark time. The part time is defined as the
elapsed time to do a singlemark within an overall cycle.

Responses: DATA,x x is the current part time.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

REQUEST,data, jobname

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the name of the currently loaded job.

Responses: DATA,filepath filepath is the fully qualified path to the


currently loaded job file.
ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

REQUEST,data, version

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return its Version number.

Responses: DATA,x x is the Version number

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

Lanmark Controls Inc. 24


Remote Interface User’s Guide

REQUEST,data, user

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Request WinLase to return the User currently logged on to the current Windows NT/2000
session.

Responses: DATA,username username is the currently logged on user.

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not recognized

REQUEST,field, ##

NOTE: WinLase MUST be under Host control to accept this command

Purpose: To request data from a field of text, barcode or graphic where ## is the number of the field
to be queried. The marker must be OFFLINE. If the field does not exist, an error is returned.

Responses: DATA,field#,objecttype,data field# is the field# of the object


objecttype is object type defined in Appendix B
data is the string value for text and barcodes
and the graphic file path for a graphic object

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,UNKNOWN_VERB First word in command line not recognized

ERROR,UNKNOWN_NOUN Second word in command line not


recognized

ERROR,UNKNOWN_QUALIFIER The ## field was not an integer value.

ERROR,NO_SUCH_FIELD The ## field index is larger than the total


number of objects loaded.

REQUEST,status,interface

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Returns the current status of the Host interface

Responses: STATUS,IN_HOST_MODE Host is in control of WinLase

STATUS,HOST_NOT_READY Not available for host command

STATUS,HOST_READY Available for host command

Lanmark Controls Inc. 25


Remote Interface User’s Guide

REQUEST,status,lecexecution

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Returns the current status of the job execution status of the LEC controller.

Responses: STATUS,HOST_NOT_READY Cannot get status of marker because host is


not available for host command
STATUS,INTERLOCKS_OPEN An interlock port on the interlock IO card is
signaled.
STATUS,LEC_IDLE LEC controller is idle.
STATUS,LEC_BUSY LEC is currently executing a job
STATUS,ERROR_PROCESS There was an error while in the ONLINE
mode. This error will be cleared after it is
read once, and if all OK, the next response
will be STATUS,MARKER_OFFLINE

REQUEST,status,marker

NOTE: WinLase does not need to be under Host control to accept this command

Purpose: Returns the current status of the laser marker


and WinLase software

Responses: STATUS,HOST_NOT_READY Cannot get status of marker because host is


not available for host command
STATUS,INTERLOCKS_OPEN An interlock port on the interlock IO card is
signaled.
STATUS,MARKER_ONLINE Marker is marking or waiting for external
start signal.
STATUS,MARKER_OFFLINE Job is loaded and marker is ready to accept
ONLINE command or MODIFY command
STATUS,NO_JOB_LOADED No job loaded.

STATUS,ERROR_PROCESS There was an error while in the ONLINE


mode. This error will be cleared after it is
read once, and if all OK, the next response
will be STATUS,MARKER_OFFLINE

Lanmark Controls Inc. 26


Remote Interface User’s Guide

RUN

NOTE: WinLase MUST be under Host control to accept this command

Purpose: Commands the marker to start the marking process. System will immediately execute the
currently loaded job and enter the MARKER_ONLINE state. This call does not automatically set the external
start flag to true, and does not set the repeat mode to repeat indefinitely. The current job settings will be used
for these two parameters.

Responses: ACK Acknowledged

ERROR,NOT_IN_HOST_MODE WinLase must be in host mode

ERROR,ALREADY_ONLINE Marker is marking or waiting for external


start signal.

ERROR,NO_JOB_LOADED No job loaded.

ERROR,INTERLOCKS_OPEN An interlock port on the interlock IO card is


signaled.

ERROR,NO_SCANCARD There is no scan head card installed in machine

ERROR,NO_HARDLOCK No Hardlock detected

ERROR,NO_IOCARD No I/O card installed in computer

ERROR,STEP_REPEAT_INVALID The values saved in the job for step and


repeat will result in an invalid object
position.

ERROR,TEXT_SOURCE _INVALID A text object was saved with a Source value


incompatible with the host interface

ERROR,TEXTMERGE_INVALID There was an error while processing a


TextMerge file.

ERROR,OBJECT_OUT_OF_BOUNDS There is an object in the job that is outside


the legal marking field

Lanmark Controls Inc. 27


Remote Interface User’s Guide

SET,control,host

NOTE: WinLase cannot be under Host control to accept this command

Purpose: Puts WinLase into external control mode. All user input at the console is disabled.

Responses: ACK Acknowledged

ERROR,ALREADY_IN_HOST_MODE Host is already in host mode.

ERROR,HOST_NOT_READY Host cannot go into host mode because the


“Allow Host Control” check box in WinLase
is cleared.

SET,control,local

NOTE: WinLase must be under Host control to accept this command

Purpose: Releases WinLase from the external control mode. Enables user input at the console.

Responses: ACK Acknowledged

ERROR,ALREADY_IN_LOCAL_MODE Host is already in local mode.

ERROR,MARKER_ONLINE Marker is marking or waiting for external


start signal.

Lanmark Controls Inc. 28


Remote Interface User’s Guide

3.1.3 Example Program


An example program is provided to illustrate how to initiate a session with WinLase, manipulate an object in
the loaded job, run the job, and then close the session.

3.1.3.1 C++ Example

The following pseudo-code uses an application defined function called SendToSocket(), which represents a
method of outputting text from either the RS-232 or TCP/IP ports, and receiving a response as it’s return
value.

//Aquire WinLase
SendToSocket (“SET,control,host”);
//Make sure we have control
if (SendToSocket (“REQUEST,status,interface”)!=” STATUS,512”)
return ERROR;
//Load a job
SendToSocket (“OPEN,file,c:\\test\\job\\test.wlj”);
//Make sure job has loaded properly
if (SendToSocket (“REQUEST,status,marker”)!=” STATUS,2300”)
return ERROR;
//Change the text in the object at index position 2
SendToSocket (“MODIFY,field,2,”Hello World”);
//Put WinLase into the ONLINE mode, waiting for START PROCESS to toggle
SendToSocket (“ONLINE”);
//Verify we are in ONLINE MODE
if (SendToSocket (“REQUEST,status,marker”)!=” STATUS,2301”)
return ERROR;
//Mark some parts
.
.
//Stop polling the START PROCESS input
SendToSocket (“OFFLINE”);
//Release WinLase
SendToSocket (“SET,control,local”);

Lanmark Controls Inc. 29


Remote Interface User’s Guide

Lanmark Controls Inc. 30


Remote Interface User’s Guide

3.2 Fieldbus Interface


The Fieldbus interface uses a WinLase compatible PC interface card to connect to the local Fieldbus network.
To properly coexist on a Fieldbus network, the card must be configured with the data input and output sizes,
the station address, and the CardID. WinLase Professional provides an interface to make these changes. In
addition, a method for assigning index numbers to Job files stored on disk is included as well.

To open the Fieldbus configuration window:


1. In WinLase Professional on the main menu, select System > Preferences… The Preferences form appears.

1. Click on the Fieldbus Tab. If the Fieldbus tab is not visible, try clicking the right or left arrow at the top
right on the row of tabs. If you cannot locate the Fieldbus tab, WinLase does not recognize the Fieldbus
card. Please consult the factory.
2. Click the Properties button. The following window appears:

Lanmark Controls Inc. 31


Remote Interface User’s Guide
3. Click OK to continue and open the configuration window. If the card is currently “online”, the card will
be brought “offline”, and the open connection to the card will be closed. After clicking OK, the
configuration window appears.

To configure the network settings:


1. Click on the Card settings tab.
2. Enter the PCI card name, which is assigned by the SST Direct Link application. For more information on
the PCI card name, please refer to the hardware documentation.
3. Select the Station address to assign to this slave card.
4. Select the desired Data baud rate. This setting and the setting on the Master must agree.
5. If you are using a PLC type controller, it may be necessary to swap the Unicode character Byte order after
the Bytes have been transmitted to the slave. Check the Swap HIGH and LOW Bytes in Unicode
characters check box if you need to do this. If using a PC to control the Master, the Byte swapping may
not be needed.
6. To test whether the current configuration is compatible with the Master, click the Test current settings
button.

Lanmark Controls Inc. 32


Remote Interface User’s Guide
To configure Job Mapping:
1. Click on the Job mapping tab. The Job Mapping page appears.

2. In the Job File column, select the desired Job File.


3. To clear the current selection, click the Clear button.
4. To select a new Job File, click the Browse button. Browse to the desired job file and click the Save button.

Lanmark Controls Inc. 33


Remote Interface User’s Guide

3.2.1 Data Structure Overview


WinLase Professional has been configured to use the following data sizes:

 Master Output data (to Slave) size of 85 Bytes


 Master Input data (from Slave) size of 5 Bytes

3.2.1.1 Master Output Structure


Data must be sent to the slave card in the following format:

BYTE0 Function when Bit is asserted Description Possible Error Conditions


Bit0 HOST_CONTROL Request HostControl. Sets the WINLASE_NOT_READY
HostControl flag. Clear the NO_SCANHEAD_CARD
flag to return to Local Control,
HARDLOCK_RESTRICTION
and/or to clear error.
SYSTEM_BUSY
Bit1 Future
Bit2 ABORT_MARK Stops marking immediately. ABORT_MARK
Sets the ABORT_MARK flag.
Clear the flag to clear the
ABORT_MARK error flag.
Bit3 Future
Bit4 Future
Bit5 Future
Bit6 Future
Bit7 Future

BYTE1 Function when Bit is asserted Description Possible Error Conditions


Bit0 USERIN1 Used to set the USERIN1 port
Bit1 USERIN2 Used to set the USERIN2 port
Bit2 USERIN3 Used to set the USERIN3 port
Bit3 USERIN4 Used to set the USERIN4 port
Bit4 USERIN5 Used to set the USERIN5 port
Bit5 USERIN6 Used to set the USERIN6 port
Bit6 START_MARK Starts marking process. SYSTEM_BUSY
MARK_IN_PROGRESS flag NOT_IN_HOST_CONTROL
set. When mark complete,
NO_JOB_LOADED
MARK_COMPLETE flag set.
Clear flag to clear NO_SCANHEAD_CARD
MARK_COMPLETE flag and HARDLOCK_RESTRICTION
allow further marking. INTERLOCK_OPEN
Bit7 Future

Lanmark Controls Inc. 34


Remote Interface User’s Guide

BYTE2 Function Description Range


Byte MARK_SPEED_CHANGE -20 to 20%

BYTE3 Function Range


Byte LASER_POWER_CHANGE -20 to 20%

BYTE4 Function Description


to
BYTE43
40 Bytes 20 16-bit values Save maximum of 20 Unicode characters to MemoryBuffer1

BYTE44 Function
to
BYTE83
40 Bytes 20 16-bit values Save maximum of 20 Unicode characters to MemoryBuffer2

BYTE84 Function when Bit is asserted Description Possible Error Conditions


Bit0 JOB_INDEX_BIT0 Bit0 (LSB) of 8-bit JobIndex NOT_IN_HOST_CONTROL
value. Sets the SYSTEM_BUSY
JOB_INDEX_BIT0 flag.
O_JOB_LOADED
Bit1 JOB_INDEX_BIT1 Bit1 of 8-bit JobIndex value.
Sets the JOB_INDEX_BIT1
flag.
Bit2 JOB_INDEX_BIT2 Bit2 of 8-bit JobIndex value.
Sets the JOB_INDEX_BIT2
flag..
Bit3 JOB_INDEX_BIT3 Bit3 of 8-bit JobIndex value.
Sets the JOB_INDEX_BIT3
flag.
Bit4 JOB_INDEX_BIT4 Bit4 of 8-bit JobIndex value.
Sets the JOB_INDEX_BIT4
flag.
Bit5 JOB_INDEX_BIT5 Bit5 of 8-bit JobIndex value.
Sets the JOB_INDEX_BIT5
flag.
Bit6 JOB_INDEX_BIT6 Bit6 of 8-bit JobIndex value.
Sets the JOB_INDEX_BIT6
flag.
Bit7 JOB_INDEX_BIT7 Bit7 (MSB) of 8-bit JobIndex
value. Sets the
JOB_INDEX_BIT7 flag.

Lanmark Controls Inc. 35


Remote Interface User’s Guide

3.2.1.1.1 Using the Master Output data


After the data has been sent to the slave card by the Master, WinLase is notified by the slave card if there is
new data available. If the data sent to the slave, is identical to the data currently on the slave, WinLase will not
be notified. So, in order to insure that WinLase detects a transmission from the Master to the slave, at least one
bit in the total range of bits used must have changed in some way.

After WinLase has been notified of a change in data by the slave card, WinLase does a further check on the
data to compare what was received to what WinLase has stored in its local data cache. The data is parsed by
WinLase in the following order:

1. BYTE0, bits 0, 1, 2, and 3 are scanned in order. Once the first change is detected, that change is acted on,
and the system returns without scanning for further changes.
2. If no changes are detected up to this point, BYTE1, bits 0, 1, 2, 3, 4, 5, 6, and 7 are scanned in order.
Once the first change is detected, that change is acted on, and the system returns without scanning for
further changes.
3. If no changes are detected up to this point, BYTE2, BYTE3 and BYTE4 to BYTE 43 and BYTE44 to
BYTE 83 are checked for changes in order. The first change detected is saved to the cache, and the
system returns without scanning for further changes.
4. If no changes are detected up to this point, BYTE84 is scanned, and if a change is detected, the 8-bit value
represented by the individual bits are decoded, and the appropriate job is loaded. The system then returns
without scanning for further changes.

Tips:
 If setting a bit flag in BYTE0 or BYTE1 results in an error flag being set, then the same bit flag must be
cleared to clear the error.
 When a particular function is set, the programmer should scan the Input structure on the slave to verify
the action has taken place
 JobIndex Bit0 through Bit7 (in BYTE84) are treated as a 8-bit value, yielding 256 possible JobIndex
values (0-255). JobIndex must be set to zero (0) first and each subsequent time before a new Job file can
be loaded. The JobIndex value is mapped to a filename on disk in WinLase. See the section on
configuring the Fieldbus card for more details on setting up the job mapping.
 BYTE4 to BYTE83 are used to transfer Unicode characters into the WinLase memory buffer system. Text
objects within a job can be configured to extract their string data from one of these memory buffers before
marking the string.

Lanmark Controls Inc. 36


Remote Interface User’s Guide

3.2.1.2 Master Input Structure


Data is made available to the Master in the following format:

BYTE0 Function when Bit is asserted Description


Bit0 HOST_CONTROL flag WinLase is in HostControl
Bit1 Future
Bit2 READY_HOST_CONTROL Indicates that WinLase has been put into HostMode and is
flag waiting for commands.
Bit3 Future
Bit4 Future
Bit5 Future
Bit6 Future
Bit7 Future

BYTE1 Function when Bit is asserted Description


Bit0 Future
Bit1 Future
Bit2 MARK_COMPLETE flag Indicates when marking cycle is complete. This flag is cleared
when the START_MARK flag is cleared.
Bit3 MARK_IN_PROGRESS flag Indicates when marking cycle is in process. Flag is cleared at the
completion of mark cycle.
Bit4 Future
Bit5 Future
Bit6 Future
Bit7 Future

BYTE2 ERROR when Bit is asserted Description


Bit0 NOT_IN_HOST_CONTROL WinLase is not in HostControl mode.
Bit1 WINLASE_NOT_READY WinLase is not in HostReady mode.
Bit2 SYSTEM_BUSY WinLase is currently marking.
Bit3 NO_JOB_LOADED An attempt to load a job failed, or there is no job currently
loaded.
Bit4 NO_SCANHEAD_CARD No scanhead card in PC.
Bit5 ABORT_MARK An ABORT_MARK was received and the current marking
process did not complete successfully.
Bit6 HARDLOCK_RESTRICTION No hardlock installed, or hardlock access denied.
Bit7 INTERLOCK_OPEN WinLase detected an interlock violation.

Lanmark Controls Inc. 37


Remote Interface User’s Guide

BYTE3 ERROR when Bit is asserted Description


Bit0 SPEED_OUT_OF_RANGE A speed change request was less than -20% or greater than +20%
Bit1 POWER_OUT_OF_RANGE A power change request was less than -20% or greater than +20%
Bit2 MEMBUFF_1_BAD_STRING The string contains characters that are not markable
Bit3 MEMBUFF_2_BAD_STRING The string contains characters that are not markable
Bit4 NOT USED
Bit5 NOT USED
Bit6 NOT USED
Bit7 NOT USED

BYTE4 Function when Bit is asserted Description


Bit0 JOB_INDEX_BIT0 flag Bit0 (LSB) of 8-bit JobIndex value
Bit1 JOB_INDEX_BIT1 flag Bit1 of 8-bit JobIndex value
Bit2 JOB_INDEX_BIT2 flag Bit2 of 8-bit JobIndex value
Bit3 JOB_INDEX_BIT3 flag Bit3 of 8-bit JobIndex value
Bit4 JOB_INDEX_BIT4 flag Bit4 of 8-bit JobIndex value
Bit5 JOB_INDEX_BIT5 flag Bit5 of 8-bit JobIndex value
Bit6 JOB_INDEX_BIT6 flag Bit6 of 8-bit JobIndex value
Bit7 JOB_INDEX_BIT7 flag Bit7 (MSB) of 8-bit JobIndex value

Lanmark Controls Inc. 38


Remote Interface User’s Guide

3.2.1.2.1 Using the Master Input Data


The Master Input data provided by the slave is of two types: Status flags (BYTE0, BYTE1 and BYTE4) and
Error flags (BYTE2 and BYTE3). When WinLase first starts, all flags are set to OFF. If WinLase encounters
any internal errors and can still communicate with the hardware, all Error flags are set to ON. Restarting
WinLase will reset all the Error flags to OFF again. Refer to the following chart for details on how to reset
individual Status and Error flags.

When clearing this These input flags/values are Comments


output flag cleared
SET_CONTROL_HOST JOB_INDEX_BIT0 Clears the JobIndex value to zero (0)
JOB_INDEX_BIT1
JOB_INDEX_BIT2
JOB_INDEX_BIT3
JOB_INDEX_BIT4
JOB_INDEX_BIT5
JOB_INDEX_BIT6
JOB_INDEX_BIT7
SET_CONTROL_LOCA BYTE0 All Master input data is cleared
L BYTE1
BYTE2
BYTE3
ABORT_MARK ABORT_MARK
JOB_INDEX_BIT0 NOT_IN_HOST_CONTROL
JOB_INDEX_BIT1 SYSTEM_BUSY
JOB_INDEX_BIT2 NO_JOB_LOADED
JOB_INDEX_BIT3 JOB_INDEX_BIT0
JOB_INDEX_BIT4 JOB_INDEX_BIT1
JOB_INDEX_BIT5 JOB_INDEX_BIT2
JOB_INDEX_BIT6 JOB_INDEX_BIT3
JOB_INDEX_BIT7 JOB_INDEX_BIT4
All set to zero JOB_INDEX_BIT5
JOB_INDEX_BIT6
JOB_INDEX_BIT7
START_MARK MARK_COMPLETE
SYSTEM_BUSY
NOT_IN_HOST_CONTROL
NO_JOB_LOADED
HARDLOCK_RESTRICTION
INTERLOCK_OPEN
SPEED_OUT_OF_RANGE
POWER_OUT_OF_RANGE
MEMBUFF_1_BAD_STRING
MEMBUFF_2_BAD_STRING

Lanmark Controls Inc. 39


Remote Interface User’s Guide
3.2.2 Processing Example
The following is an example of how to initialize the WinLase/slave connection, load a job and start the mark
cycle. These instructions are all from the Master point of view.
1. Put WinLase into the Host Mode. See Section 2.7 Enabling the Host Mode.
2. Request HostControl by setting the HOST_CONTROL bit (Bit0 of BYTE0).
3. To load Job Index 1, set the JOB_INDEX_BIT0 (Bit0 of BYTE84).
4. If a speed change, power change, or a Unicode string change is desired, assemble this data in the
appropriate memory locations. If no changes are desired, leave the data in these locations at the current
values.
5. Start the mark cycle by setting the START_MARK bit (Bit6 of BYTE1).
6. To detect a mark cycle in progress, scan the slave to verify the MARK_IN_PROGRESS bit is set (bit3 of
BYTE1)
7. To detect the end of mark, scan the slave to verify the MARK_COMPLETE bit is set (Bit2 of BYTE1)
8. To initiate another mark cycle, clear the START_MARK bit.
9. To load another job, clear the JOB_INDEX_BIT0.
10. To return to LocalControl, clear the HOST_CONTROL bit.

Lanmark Controls Inc. 40


Remote Interface User’s Guide

4. Warranty
Lanmark Controls Inc. warrants to the Customer that the product is free from defects in workmanship and
materials for a period of 12 months from the delivery date.

Lanmark Controls Inc. obligation under this warranty is limited to repair, replacement or service, at its option,
any part of the product which, within the warranty period and upon Lanmark Controls Inc. examination shall
disclose to its satisfaction not to have conformed to this Agreement or to have been defective. Defective parts
or products are to be returned to Lanmark Controls Inc. place of shipment.

The above warranties do not apply (i) to defects or failure of product or parts caused by accident, alteration,
abuse, misuse, corrosion or improper installation or operation, or (ii) to alterations or modifications made by
Customer in any way so as in Lanmark Controls Inc. judgment to affect the products reliability, or (iii) to
installation not performed pursuant to Lanmark Controls Inc. factory authorized protocol, or (iv) in the case of
custom software designed to interact with other Customer-supplied software, in the event of any change,
upgrade or reprogramming of such Customer-supplied software so as to create an incompatibility with
Lanmark Controls Inc. software.

Authorization to return products purchased from Lanmark Controls Inc. must be obtained by Customer.
Returns should always be carefully packed and sent freight prepaid. Unless otherwise agreed, return shipment
freight and duty charges shall be borne by Customer. Customer shall bear all charges for freight and handling
of products returned which are not defective.

THIS WARRANTY IS EXPRESSLY MADE IN LIEU OF ANY AND ALL OTHER WARRANTIES
EXPRESSED OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE, EXPRESSED OR IMPLIED.

Lanmark Controls Inc. 41


Remote Interface User’s Guide

Lanmark Controls Inc. 42


Remote Interface User’s Guide

5. Index

JOB_INDEX_BIT3 · 38
JOB_INDEX_BIT4 · 35
A  JOB_INDEX_BIT4 · 38
JOB_INDEX_BIT5 · 35
ABORT_MARK · 34, 37 JOB_INDEX_BIT5 · 38
JOB_INDEX_BIT6 · 35
C  JOB_INDEX_BIT6 · 38
JOB_INDEX_BIT7 · 35
Command Set · 17 JOB_INDEX_BIT7 · 38
Command Syntax · 17


LAN · 13
Descriptive Code · 45 LASER_POWER_CHANGE · 35

E  M 

Example, Fieldbus · 40 Manufacturer · 4


Example, RS-232, TCP/IP · 29 MARK_COMPLETE · 37
External Start · 10 MARK_IN_PROGRESS · 37
MARK_SPEED_CHANGE · 35
Master Input Structure · 37
F  Master Output Structure · 34
MEMBUFF_1_BAD_STRING · 38
Fieldbus · 9 MEMBUFF_2_BAD_STRING · 38
Fieldbus Interface · 31 MODIFY,buffer,****** · 18
Fieldbus Interface Concepts · 5 MODIFY,position,##,****** · 18
MODIFY,position,##,xoffset,yoffset · 19
MODIFY,rotation,##,angle · 19
H  MODIFY,rotationex,##,angle,xcenter,ycenter · 20
MODIFY,scale,##,xscale,yscale · 20
HARDLOCK_RESTRICTION · 34, 37
HOME · 17
Host Interface Monitor · 12 N 
Host Mode · 12
HOST_CONTROL · 34, 37 NO_JOB_LOADED · 34, 35, 37
NO_SCANHEAD_CARD · 34, 37
NOT_IN_HOST_CONTROL · 34, 35, 37
I  Numerical Code · 45

INTERLOCK_OPEN · 34, 37

J  OFFLINE · 21
ONLINE · 21
JOB_INDEX_BIT0 · 35 OPEN,file,###### · 22
JOB_INDEX_BIT0 · 38
JOB_INDEX_BIT1 · 35
JOB_INDEX_BIT1 · 38 P 
JOB_INDEX_BIT2 · 35
JOB_INDEX_BIT2 · 38 POWER_OUT_OF_RANGE · 38
JOB_INDEX_BIT3 · 35 Principle of Operation · 5

Lanmark Controls Inc. 43


Remote Interface User’s Guide
R  SYSTEM_BUSY · 34, 35, 37

READY_HOST_CONTROL · 37

Remote Interface Concept · 5
Repeat Process · 10
Table of Contents · 3
REQUEST,data, bits_per_mm,c#,h# · 22
TCP/IP · 8, 13
REQUEST,data, cycletime · 23
TCP/IP Test Client · 49
REQUEST,data, jobname · 24
Technical Support · 4
REQUEST,data, parttime · 24
REQUEST,data, user · 25
REQUEST,data, version · 24 U 
REQUEST,data,cyclecount · 23
REQUEST,field, ## · 25 USERIN1 · 34
REQUEST,status,interface · 25 USERIN2 · 34
REQUEST,status,lecexecution · 26 USERIN3 · 34
REQUEST,status,marker · 26 USERIN4 · 34
RS-232 · 6, 13 USERIN5 · 34
RS-232 and TCP/IP Interface Concepts · 5 USERIN6 · 34
RUN · 27 USEROUT1 · 37
USEROUT2 · 37
USEROUT3 · 37

USEROUT4 · 37
Using the Master Input Data · 39
SET,control,host · 28
SET,control,local · 28
SPEED_OUT_OF_RANGE · 38 W 
Standard I/O card · 5, 10
START PROCESS · 5 Warranty · 41
START_MARK · 34 Windows XP · 13
static IP address · 15 WINLASE_NOT_READY · 34, 37

Lanmark Controls Inc. 44


Remote Interface User’s Guide

Appendix A – Return codes


The following numerical response codes are returned by WinLase when using the RS-232 or the TCP/IP
interface:

Descriptive Code Numerical Code

UNKNOWN_VERB 204
UNKNOWN_NOUN 205
UNKNOWN_QUALIFIER 206
INVALID_STRING 209
NO_JOB_LOADED 221
NO_SUCH_OBJECT 231
NO_SUCH_FIELD 233
NO_SUCH_BUFFER 235
NOT_IN_HOST_MODE 236
ALREADY_OFFLINE 240
ALREADY_ONLINE 241
NOT_OFFLINE 242
NOT_ONLINE 243
ALREADY_IN_HOST_MODE 244
ALREADY_IN_LOCAL_MODE 245
SERVER_NOT_READY 250
INTERNAL_ERROR 400
HOST_READY 510
HOST_NOT_READY 511
IN_HOST_MODE 512
FILE_NOT_FOUND 2000
FILE_TYPE_NOT_SUPPORTED 2010
MARKER_OFFLINE 2300
MARKER_ONLINE 2301
LEC_IDLE 2320
LEC_BUSY 2321
NO_MARKER_LIBRARY 2350
INTERLOCKS_OPEN 3000
NO_SCANCARD 3010
NO_HARDLOCK 3011
NO_IOCARD 3012
NO_LASER_INIT 3013
HARDLOCK_NOT_ALLOWED 3014
INVALID_STEP_REPEAT 3020
INVALID_TEXT_SOURCE 3021
TEXTMERGE_ERROR 3022
OBJECT_OUT_OF_BOUNDS 3040
MOTOR_HOME 3050
NO_MOTOR_CONTROLLER 3051
ALIGNMENT_FILE 3052
MOTION_INITIALIZATION_FAIL 3053
NO_DEFAULT_NODE 3054
DEFAULT_NODE_NOT_FOUND 3055

Lanmark Controls Inc. 45


Remote Interface User’s Guide

Lanmark Controls Inc. 46


Remote Interface User’s Guide

Appendix B – Object Types

Note: Not all of these Object types are available through the Host Interface. They are
included here for completeness.

The following Object types are returned by WinLase Professional:

Object Description Numerical Code

MCL Graphic 7
EPS Graphic 8
DXF Graphic 9
System Line 10
System Rectangle 11
System Polygon 12
PLT Graphic 13
EMF Graphic 14
WLO Graphic 15
Text 16
System Drill 17
Barcode 39 18
Barcode CodaBar 19
Barcode 93 20
Barcode 128 21
Barcode 2 of 5 22
Barcode PostNET 23
Barcode UPC 24
Barcode EAN 25
DataMatrix 26
QRCode 27
Bitmap Graphic 28
Wait On Port I/O 29
Set Port I/O 30
Time Delay 31
Message Box 32
Generic Motor Controller 33
XY Table Controller 34
Rotary Indexer Controller 35
Laser Lift Controller 36

Lanmark Controls Inc. 47


Remote Interface User’s Guide

Lanmark Controls Inc. 48


Remote Interface User’s Guide

Appendix C – TCP/IP Test Client

TCP/IP Test Client


The TCP/IP Test Client is a tool provided for the troubleshooting of the Remote Interface functionality
included with WinLase Professional. For more information on the Remote Interface, please refer to the
Remote Interface Manual, available separately from Lanmark Controls Inc. The TCP/IP Test Client will allow
communication with WinLase Professional over its TCP/IP interface from the same computer. The TCP/IP
Test Client can also be run on a remote computer, although the IP address of the computer running WinLase
Professional needs to be known to communicate with it.
To start the TCP/IP Test Client:
1. From the Windows Task Bar, select Start > Programs > WinLase Marker Suite > TCPIP Test Client. The
application starts.

2. If the TCP/IP Test Client is running on the same computer as WinLase Professional, enter the following
IP address in the Addr (address) field:
127.0.0.1
If running the TCP/IP Test Client from a remote computer, enter the IP address of the computer running
WinLase Professional in the Addr field.
3. From the Port field, enter the following port:
350
4. Make sure WinLase Professional is running on the local computer or the remote computer.
5. Click the Connect button. The TCP/IP Test Client connects to the WinLase Professional instance. The
Status field updates with Connected to server. The status bar in WinLase Professional updates with
TCP/IP Port: Connected.

6. If the TCP/IP Test Client does not make a connection to the WinLase server, check that the IP address and
the Port is correct, and that WinLase Professional is running.

Lanmark Controls Inc. 49


Remote Interface User’s Guide
7. The TCP/IP Test Client is now ready to communicate with WinLase Professional.
Example:
NOTE: For the following example to work, WinLase Professional must be configured to accept commands
over the TCP/IP port. Please refer to the Remote Interface Manual for details on how to do this.
1. Type the string “SET,control,host” into the String field.
2. Click the Send>> button. WinLase Professional responds with ACK, and goes into Host mode.

3. Type the string “SET,control,local” into the String field.


4. WinLase Professional responds with ACK, and returns to local mode.
Click the x to close the TCP/IP Test Client.

Lanmark Controls Inc. 50

You might also like