InfoSight Logo InfoSight Corporation

LabeLase® Producer
Host Communications



Host Communications

Many tag-printing applications require that the data printed on the tags come from another computer called a host. The host computer must be connected to the tag printing computer via some type of communications medium and using some type of communications protocol. The LabeLase® Printer software allows you to connect to another computer or network to facilitate the download of data to the printer.

 

Connection Type

You must select the physical medium to be used to connect the tag printer's PC to your host. You can select from network file transfer, RS232-C serial port or TCP/IP.

Network Configuration - Modern personal computers often have an additional mechanism for connecting to other computers and that is a network interface.   Today, the Ethernet network medium is arguably the most common form of network interface, but others include Token Ring, Arcnet, etc.  If your PC does not have a network interface, one can easily be added by inserting a Network Interface Card (NIC) into an expansion slot in the computer.   The Windows operating system has drivers for most common cards, and supplies the low-level network "stack" of protocols to establish communications between your PC and the network.   If you connect to the PC over a network, you then have two options for how the data is transferred: File Transfer or TCP/IP.

File Transfer - When the printer's PC is connected to your host computer via a network interface the file transfer connection type is the simplest and most reliable method of transferring the data and is recommended by InfoSight.   When enabled, there is no actual protocol used to transfer the data.   The host computer simply writes a file containing the data (one or more records separated by CR/LF) to a specific location on the printer's PC.   The Producer program will check for this file once every second and when it finds it, it will read its contents and then delete it.   The host must recreate the file the next time it wishes to send data.    Each record in the file is in the Standard Message Format and applies to one or more tags as needed.   A tutorial is available to help you configure Producer for the File Transfer method of data download.

TCP/IP - When connecting to the host via a network, the TCP/IP protocols are used. The Producer program will act as a server and will listen at a specific TCP port number for connection requests from the host. You must specify the port number at which the Producer is to listen. Note that the type of network (Ethernet, Token Ring, etc.) is not important to the software since TCP/IP is being used as the low-level protocol.

RS232-C Serial Port - Most personal computers have a communications port called an RS232-C port.   This port provides a serial link to other computers, modems and printers that also have this type of port.   A serial port provides a one-to-one connection path between two devices only.  It is simple to connect and configure, but has limitations on the speed at which the devices may communicate.   The PC's operating system does not provide any low-level communications protocols or "stacks" for serial ports.   All of the communications must be implemented by the application software.

 

RS232-C Serial Port Settings

If you decide to use RS232-C as your connection type, you must provide a cable to connect your host system to the COM port on the PC.   You must also configure the port's settings to match those of the port on your host system.   This configuration is performed using the Producer program's Host Communications Setup form.

Using this form, you must choose a port on your PC that is not used for any other purpose.  The Producer program will open this port and keep it open for as long as it is running, so no other programs can have access to the port.   Also, since the Producer program uses a COM port to communicate to the tag printer itself, you must have at least two free COM ports on your PC to use the RS232-C host communication type.

The Port pull-down will provide a list of COM ports available on your PC.   The list will not include the port that is currently assigned to communicating with the tag printer, because that port is not available.   The Producer program has no way of knowing if other programs on your PC will need access to the other ports, so it shows all ports that are installed, rather than ports that are available.

The Baud Rate, Data Bits, Stop Bits and Parity drop-down lists allow you to match the ports settings to that of your host system.   It is critical that both devices have the same port settings to avoid communications errors.

 

Network Configuration

If you decide to use the network connection type, you are responsible for ensuring that you have a network interface card installed in your PC, that the device drivers for this card are loaded and properly configured, and that the TCP/IP protocol stack is bound to the card.

Once the network interface card is properly installed and working, you must tell the Producer program what TCP port number it is to use to listen for connection request from your host system.  All port numbers less than 1025 are reserved, so pick a number between 1025 and 65535.   The program will default to 4000 and this is a good place to start.

Before you can make a connection to the Producer program, you must know the IP address of the computer.   An IP address can be static (that is, it is assigned to the computer by a network administrator and never changes) or it can by dynamic (it gets its IP address each time it boots up by asking a special server for one.)   For the network communications to function correctly, it is usually necessary to use a static IP address in your computer.   That way, your host system will know what the IP address is, and that it will never change.   You must see your network administrator before statically configuring an IP address in your computer.   Failure to follow this rule can result in duplicate address on the network and that is a BAD THING.

On your host system, you must write software that makes a call into the operating system to open a TCP connection.   You must specify the IP address of the PC as well as the port number you set in the Producer program's host setup form.   Once the connection is made, you must send data to the PC over that connection with another call into the OS.   The format of the data sent/received is as required by the application layer protocol that you have chosen (see below).   When the communications is completed, you can close the connection by another call into the OS.

 

File Transfer

If you select the File Transfer connection, you must ensure that you have a valid network connection to the printer's PC, and that files on the PC can be shared on the network.

You must chose a folder on the PC where you intend to write the data file, and you must also select the name of the file.   This pathname (which may include wildcard characters to specify groups of files) must be entered into the File Transfer field of the Host Communications Setup form.   Although it is not required that the file path be on the local PC, it is recommended since network problems would otherwise cause problems with the program's execution.

As the Producer program executes, it will check for this file's existence once each second.   The host must create this file in the proper folder (path) when it wishes to transfer data to the printer.   When the file is created, the Producer program will detect it and read its contents.   After reading all of the records from the file, the file will be deleted.   The host must recreate the file the next time it wishes to transfer data.

If the Producer program tries to read the file's contents while it is being written by the host, it will back off and try again a second later.   The host must ensure that the file is opened for exclusive write access while it is being created.

The file must be organized as a list of records, each in the Standard Message Format.   Each record is separated from the next with a carriage return / line feed (CR/LF) pair.   Each record is read from the file and added to the message buffer (queue) for printing.

There is no imposed limit on the number of records that the host can put in the file.   However, the Producer program will read each entry into memory for processing, so the amount of available system memory may impose a practical limit.

 

Miscellaneous Settings

The Producer program has two additional settings that effect the way communications takes place.

Automatically Print on Message Receipt - When checked, the printer will begin printing whenever it receives the proper message from your host system.   No additional command is required from you, nor will the operator be required to initiate the print.   When the data arrives, it is printed.

 

Message Format Settings

Data Field Separator - This field specifies what character is used to separate the data fields in the download message.   Since one download message contains multiple fields of information, a character (or sequence of characters) is required to separate them.   The default for this field separator is the comma character and that will be sufficient for most applications.   However, if it is possible that one of your data fields can contain a comma character within it, then you must select a different character to use as the separator.

New in Version 1.20

Exclude Fixed Fields - The Standard Message Format (below) begins with three fields for filename, quantity and copy count.   If your download does not have these fields, and cannot substitute the empty placeholders for these fields to use the default settings, you may exclude them from the message with these settings.   Each of the three fields can be independently excluded by checking its associated checkbox.   If a field is excluded, be sure not to include it, even if it is blank, in your download.

Include Extra Fields - If your download has more data fields in it than there are operator entry fields in the layout, the extra fields were ignored in versions prior to V1.20.   In later versions of the software, these fields can be extracted from your download and included in the layout.   Any text field in the download beyond the last operator entry field is assigned to the remaining layout text fields in the order of their Field ID, starting at one.

For example, let's say your layout has 8 text fields, but only 4 operator entry fields.   If your download contains 6 data fields, the first 4 will be assigned to the operator entry fields.  The fifth field of the download will be assigned to the text field whose ID is set to '1', and the sixth field will go to the text field whose ID is '2'.

Be careful that you assign the ID numbers of these "extra" text fields correctly, or you may overwrite text fields inadvertently.   In the above example, the text fields that reference the operator entry fields should have ID numbers '3', '4', '5', and '6', with the remaining two fields being '7' and '8'.

 

 

Standard Message Format

You can use one of several different communications protocols (described below) to communicate with the Producer program, but the format of the data that is encapsulated by the protocol is generally the same (note that this does not apply for the PPE and LDL protocols, or the Programmable protocol with fixed fields selected.)   We call this the Standard Message Format and it is defined as follows.

The Standard Message Format consists of several fields of information, each separated from the others by a separator character (or sequence of characters) that you specify in the Data Field Separator in the Host Communications form.   This separator is typically the comma character.  The format is defined below:

<FILENAME>,<QUANTITY>,<COPIES>,<FIELD1>,<FIELD2>,...<FIELD N>

The first field of the message specifies the layout file name.   This filename can be a fully qualified path name specifying a tag layout file on the local disk drive, a floppy drive, or any network path.  The filename can also be just the file name portion, without the path information.   In this case, the program will first look for the file in the folder that was last used by the operator to open a file.  If the file cannot be found there, it will then look in the folder that contains the Producer program.   If you do not want to specify a layout file to open, and instead want to use whatever layout is already open in the program, simply omit the filename field (you must still include the separator character.)

The second field is the quantity of tags to print.   This is the same value that the operator can enter on the main form.   You may omit this field and the quantity will default to one (you must still include the separator character.)

The third field is the number of copies of each tag.   This is the same value that the operator can enter on the main form.   You may omit this field and the copy count will default to one (you must still include the separator character.)

The remaining fields are text data that will be placed into the operator data entry fields for the layout.   You may send as many fields as there are operator data entry fields in the layout.   If you wish to clear a particular field, simply omit the data (you must still include the separator character.) 

An example of the Standard Message Format is shown below.   The Data Separator character is set to the comma.

stainlesslayout.itl,1,1,A2398,123,Stainless

This message will cause the Producer program to load the layout called "stainlesslayout.itl" from the most recently used folder or from the program launch folder.   It will set the quantity and copy count both to 1.   It will set the first operator data entry field to "A2398", the second field to "123" and the third field to "Stainless".   If there are additional operator data entry fields in the layout, these will be unaffected.

One advantage of the Standard Message Format is that all messages received are buffered in the program's message buffer (queue.)   The printer will print messages in the order in which they are received.   See Data Buffering below for more details.

New in Version 1.20

LabeLase Producer V1.20 introduces some additional functionality that makes dealing with the Standard Message Format even easier.   The following new features are available beginning in V1.20:

Binary Values in the Data Separator - It may be necessary to specify a binary or control code value as part of the data separator field.  For example, the download may use a TAB character, record separator (RS), carriage return (CR) or other non-printable ASCII character between the data fields. To include these values, you may specify the value in one of the following ways:

  • Specify the hexadecimal value directly using the following format:  \x09 
  • Use a common "escape" sequence: \r = carriage return, \n = line feed,  \t = tab.
  • Use the standard ASCII control code name: \<TAB>   \<CR>   <\RS>

Skip Fields - It may be desirable to have the host download part of the marking data with the operator entering the remainder.   In such a situation, you would want to have the data be retained for the operator rather than requiring him/her to re-enter it each time.   In previous versions, all fields not included by the host were cleared to null strings.   If the host left one of its fields blank ( e.g. just the separator ,, was included) then the data for that field was cleared.  In V1.20 and up, the field can be "skipped" if the host includes a single TAB character (0x09) between the separators.  Note that if the TAB character is not included, the field will be cleared as in previous versions.

Include Extra Data - In previous versions, the data from the host was exclusively assigned to Operator Entry fields.   If there were no operator entry fields, or there were more data fields in the download than there were operator fields, then the extra data was ignored.   In V1.20 and up, you can optionally include these extra fields in the host download.   For every field in the host beyond the number of operator entry fields, the field is identified as Field 1, Field 2, etc.   Field 1 will be assigned to the layout text field that has 1 as its Link ID.   Field 2 will be assigned to layout text link ID 2, etc.  Note that if these layout fields contain % flags for automatic data, these flags will be replaced by the download which may not be the desired behavior.   You can skip these fields too by using a TAB character in place of the data.

 

Communications Protocol

Regardless of whether you are using a Serial COM port or an Ethernet network as your means of connecting to the tag printer PC, you must still use a communications protocol to communicate.  Although TCP/IP provides the basic connection level protocol, the application protocol "rides on top of" TCP.

LabeLase® Producer provides several application protocols that you can use to connect your host system to the tag printer.    Each of these protocols have their own advantages and disadvantages in areas such as ease of implementation, reliability, security, etc.

Below, we will discuss each of these protocols and how they may be used.

InfoSight Extended

The Extended protocol is unique to products from InfoSight Corporation and is available in all of its marking products.   The protocol is a master-slave interface, with your host system acting in the role of master.  This means that all transactions are initiated by your system, and the printer will only respond "when spoken to".   You will never receive an unexpected message from the printer.   Details of the Extended Protocol are available in this document on the InfoSight website.

The Extended Protocol uses a message type field to identify the contents of each message.   Several message types are defined for the LabeLase® Producer program, but the most important one is the "Download" message.

The Download message is identified by message type 'D'.   The data text field of the message consists of the Standard Message Format.   An example is shown below:

<SOH> D <STX>stainlesslayout.itl,1,1,A2398,123,Stainless<ETX><BCC><CR>

(note that the block check, BCC, is shown symbolically here.)

The Producer program will reply with the following message

<SOH> D <STX><ETX><BCC><CR>

Each time you send a message of this type, the data will be added to the data queue (see Data Buffering below.)

Other message types are also available:

Type 'C' - Communications check.  There is no data in the reply message.

Type 'G' - Print a tag

Type 'A' - Load a tag layout.  The data field of your message must contain the filename.

Type 'H' - Feed a tag

Types '1' through '0' - The data field contains text for the operator data entry field specified by the message type.   Type '0' indicates the tenth field.

Please note that types 'G', 'H', 'A', and '1' through '0' act asynchronously to the message buffer.  You should not mix these message types with the 'D' message type unless the message queue is disabled in setup or unpredictable behavior will result.

New in Version 1.41

Message type 'S' has been added in V1.41 to allow the host to query the printer for its status.  Producer will reply to this message with the status codes in the data text field.   The format of the reply message is:

#,#,#,#,#

where each number represents a printer status field.   The fields are defined as

MODE, STATE, FAULT, PRINTER COM, TAGS

 

MODE Value
Unknown 0
Estop 1
Online 2

 

STATE Value
Idle 0
Printing 1
Feeding 2
Loading 3
Test Print 4
Aborted 5
Paused 6
Done 7

 

FAULT Value
No Fault 0
Feed Fault 1
Printer COM Fault 2
Estop Abort 3
reserved 4
Command (Operator) Abort 5
Timeout Abort 6
Reset (from printer) Abort 7
Abort Input 8

 

PRINTER COM Value
OK 0
NAK 1
SOH Error 2
TYPE Error 3
Message ID Error 4
STX Error 5
ETX Error 6
BCC Error 7
Timeout 8
Message Length Error 9
Generic COM Error 10
COM Disabled 11

 

TAGS Value
Out of Tags 0
Tags Loaded 1

 

New in Version 1.44

Several new message types have been added in V1.44 to allow the host to better control the operation of the tag printer.   These messages and their formats are shown below:

Type 'M' - Move the tag.   The data text field of this message contains a signed floating point value that indicates the direction and distance to move the tag material.   Negative numbers move the tag material back into the printer, while positive numbers move the tag out of the printer.

Type 'R' - Reverse Feed the tag.   This message will cause the tag to be reverse fed back into the printer.

Type 'T' - Feed to Tearoff.   This message will cause the tag material to be fed until the tag's notch is at the tearoff location.

Type 'X' - Disable Auto Tearoff After Print.  This message will temporarily disable the printers automatic feed to the tearoff location after printing the tag.   Note that this setting is not saved when the Producer program terminates, so it is recommended that you send it before each print cycle.

Type 'Y' - Enable Auto Tearoff After Print.  This is the opposite to message type 'X' and is used to re-enable the automatic feed to tearoff after printing.

Please note that types 'M', 'R', 'T', 'X' and 'Y' act asynchronously to the message buffer.  You should not mix these message types with the 'D' message type unless the message queue is disabled in setup or unpredictable behavior will result.

 

 

Siemens 3964R / RK512

This protocol is the standard communications protocol for the Siemens family of Programmable Logic Controllers (PLC).   All Siemens PLC's have the ability to add a communications module that can implement this protocol.   Many installations that use Siemens automation products have the ability to communicate to these devices from their host systems.

The Producer program allows you to perform Send 'A' and Fetch 'E' operations to Data Block 'D'  memory.   You must send the message to the Data Block and Data Word address specified in the Host Communications form under the Siemens tab.

The actual data you send must conform to the Standard Message Format.   Each time you send a message (telegram) to the specified address, the data will be added to the data queue (see Data Buffering below.)

 

Allen Bradley DF1

This protocol is the standard communications protocol for the Allen Bradley (Rockwell Automation) family of Programmable Logic Controllers (PLC).   All Allen Bradley PLC's have the ability to communicate via this protocol.   Many installations that use AB automation products have the ability to communicate to these devices from their host systems.   Note that there are two selections for the Allen Bradley protocol: PLC5 and SLC500.   Please select the appropriate setting to match the PLC you are using.

The Producer program allows you to perform Write and Read operations to 'N' register  memory.   You must send the message to the N Register and Data Word address specified in the Host Communications form under the Allen Bradley tab.

The actual data you send must conform to the Standard Message Format.   Each time you send a message to the specified address, the data will be added to the data queue (see Data Buffering below.)

 

GE CCM

This protocol is the standard communications protocol for the General Electric family of Programmable Logic Controllers (PLC).   All GE PLC's have the ability to add a communications module (CCM) that can implement this protocol.   Many installations that use GE automation products have the ability to communicate to these devices from their host systems.

The Producer program allows you to perform Write and Read operations to register memory.   You must send the message to the Address specified in the Host Communications form under the GE tab.

The actual data you send must conform to the Standard Message Format.   Each time you send a message (telegram) to the specified address, the data will be added to the data queue (see Data Buffering below.)

 

Programmable

The "programmable" protocol is not really a protocol as such.   It is instead a mechanism for implementing simple communications between your host system and the Producer program.   You have the ability to customize the message format, reply, etc.

There are actually two ways to use the programmable protocol:  Fixed fields, and Standard Message Format.

Fixed Fields - When you enable this feature, you must download the data in a rigid format where all the data fields are always the exact same length and in the same order.   You may still include the filename, quantity and copies data in the download, but they must always be the same length and in the same position.   The program extracts the fields by counting characters as you specify in the Fixed Field Positions table of the setup form.   This method is most useful when you are replacing an existing printer from another manufacturer and you don't want to change your download format.

Standard Message Format - When Fixed Fields is disabled, you must send the message data in the Standard Message Format as previously described.

Regardless of whether you select Fixed Fields or Standard Message Format, each time you send a message the data will be added to the data queue (see Data Buffering below.)

 

PPE

The Pannier Protocol Emulator is designed to emulate the communications protocol of printers from the Pannier Corporation.   This protocol should allow you to connect the LabeLase® tag printer to the same download as a Pannier printer without modification.

Note that the Pannier protocol uses a special command to signify a "buffer" or layout change.  This command is the letter O (oh) followed by a single digit that is the buffer number.   When the emulator encounters this sequence, it will attempt to load a layout whose name is that single digit (e.g. 1.itl)

Note also that you cannot specify a quantity or count value with this emulator.

Please note that the emulator works for many Pannier installations, but it is not foolproof.   Your Pannier printer may have custom software that implements non-standard commands that our emulator cannot decode.   If this is the case, contact the factory to investigate custom software for your LabeLase® printer to implement these non-standard features.

Each time you send a message the data will be added to the data queue (see Data Buffering below.)

 

LDL

The Label Design Language protocol (LDL) is the primary communications protocol used by Microcom printers.

Please note that the implementation of LDL for the LabeLase® printer does not recognize the label layout information.   Only the buffer number, tag quantity, copy and text fields are decoded and used.  Like the PPE protocol, the buffer number is used to load a tag layout file with a name like 1.itl.

Each time you send a message the data will be added to the data queue (see Data Buffering below.)

 

New in Version 1.30

IPL

The Intermec Programming Language is used by thermal label printers manufactured by the Intermec Technologies Corporation.   Selecting this protocol allows the LabeLase® Producer software to accept a data stream intended for an Intermec printer.   Note that only the data fields are extracted from the download and not the label format information.

 

ZPL

The Zebra Programming Language is used by thermal label printers manufactured by the Zebra Technologies. Selecting this protocol allows the LabeLase® Producer software to accept a data stream intended for a Zebra printer.   Note that only the data fields are extracted from the download and not the label format information.

 

Data Buffering

Any message sent in the Standard Message Format, plus messages sent using Programmable, PPE or LDL protocols (these are converted to standard format internally) are buffered in a message queue for printing.   Messages are printed in the order in which they are received.

There is no limit placed on the number of entries in the queue, but there is a practical limit imposed by the amount of memory installed on the PC.   Each entry in the buffer is in Standard Message Format, so it can optionally contain a layout filename, quantity and copy count.   Thus, each message has the ability to load a new layout, set multiple copies, and the quantity of tags to print.

 

 

Table of Contents

Copyright © 2010 InfoSight Corporation All Rights Reserved
InfoSight ® is a registered trademark of InfoSight Corporation
LabeLase® is a registered trademark of InfoSight Corporation