Introduction

This document describes the Extended Protocol Communications as implemented with the InfoSight KE2853 tag printer software. Extended Protocol is intended to provide secure communications with an intelligent host device. This document assumes familiarity with the ASCII character code as well as fundamental computer programming skills.

Note that this document is for InfoSight ARM based CPU cards running KE2853 firmware version 4.x.  If your tag printer uses the older 186 CPU with firmware V3.x or lower, please contact the factory.

 

Disclaimer

Note: This document is correct to the best knowledge of InfoSight Corporation. InfoSight Corporation reserves the right to change this document or the system it describes without notice.

 

Interface

Communications is established using Ethernet TCP/IP sockets. Ethernet TCP/IP communications requires the host to open a socket to the IP address of the marker, which must be configured to listen at a specific TCP port number.

Communications with the marking controller is accomplished via a Peer-to-Peer arrangement where either side can asynchronously send messages to the other.

 

Standard Message Types

The following is a list of message types which are provided with the marking system.  

Note that for most simple applications the only required message type is '0', Message File Assignment and Operator Text Fields, to send the message file name and the text to be printed.

Where applicable, <tab> refers to the ASCII TAB character (0x09).

 

Message File Assignment and Operator Text Fields

0 - The DATA TEXT contains a text string which consists of the message file assignment and all lines of text in a single transmission. Each of these fields, the message file name and up to 10 lines of text are separated by the ASCII TAB character. If the message file field is empty (the text begins with a single TAB character, the marker will use the currently assigned message file. If the DATA TEXT field of the message is entirely empty, the marker interprets this as a request for the current message file assignment and data text fields, which will be returned in the reply.

In the first example below, the message file name is included with the data fields. In the second example, the message begins with a single TAB character, omitting the message file name and resulting in the use of the current message file assignment.

[MESSAGE FILE NAME]<tab>FIELD1<tab>FIELD2<tab>FIELD3<tab>...FIELD10<tab> 

or

<tab>FIELD1<tab>FIELD2<tab>FIELD3<tab>...FIELD10<tab> 

 

Operator Text - Individual Fields

1 through 9, : - The DATA TEXT contains a text string which is a message to be placed into the Operator Text register in the field specified by the message type for the currently assigned message file. Since the string is stored in the Operator Text register, a corresponding flag must be placed into the Format text to cause this data to be printed. The response message contains the original text string in the DATA TEXT field if no errors are detected.  If an error is detected, an error message will be in the DATA TEXT field. Note that message types 1 through 9 refer to the first nine Operator Text fields, while the colon character ':' refers to the tenth Operator Text field.

 

Assign a Message File

A - The DATA TEXT field contains an ASCII string which is the name of the message file to load for printing. This message file becomes the default used for all further print cycles. The response message contains the message file name in the DATA TEXT field if no errors are detected. If an error is detected in the message the response will contain an error message.

If the DATA TEXT field is empty, the marker will reply with the name of the currently assigned message file.

 

COM Link Check

C - This type is used to check the communications link integrity. Any text in the DATA TEXT field will be returned in the response. An ACK response will indicate that the link is functioning properly.

 

Clear Message Queue

D - On systems where queueing of downloaded messages is required, this type is used to clear the message queue. Nothing will be returned in the DATA TEXT field of the response. 

 

Enqueue Message

E - On systems where queuing of downloaded messages is required, this type is used to add one item to the message queue. Nothing will be returned in the DATA TEXT field of the response. The format of the message in the DATA TEXT field is the same as message type 0 (zero) except that the message filename is required.

The printer is designed to hold up to 50 messages in its internal queue. When an print cycle is initiated, the printer will check to see if there are any messages in the print queue. If so, the next message in the queue is removed and put into the currently assigned message buffer.

Note that using the print queue with message types E and D are not compatible with sending data directly to the operator text fields using types 0, 1-9,: as the queued message data will always overwrite whatever has been sent directly to the message file.

 

Force Outputs

F - This type is used to have the marker force one of its output bits into the specified state. The DATA TEXT field must contain two integers, separated by a comma character, which represent the number of the output module and its desired state as follows:

				# , #

Each number is a decimal integer. A TAB separates the three numbers. The numbers represent the following:

			#	- Module Number	(0 - 23)
			#	- State		(0=Off, 1=On)

Note: When forcing an output, it may only stay in its forced state until the next scan of the control program. Unlike forcing an output in a PLC, this does not override the scanning logic.

CAUTION: Use of this message can cause damage to the equipment or injury to personnel.

 

Begin Marking Print Cycle (Go)

G - This type is used to cause the marker to begin printing. The print cycle will only begin if the marker is On-line. The response message contains no data in the DATA TEXT field.

 

Feed Tag

H - This message type is used to feed one tag through the printer. No text is required in the DATA TEXT field, and none will be returned in the response message.

 

Location Request

L - This message type is used to request the "location" of the tag material within the printer. No text is required in the DATA TEXT field, and none will be returned in the response message.

After receiving and acknowledging the Location Request message, the printer will send a separate communications message of type L (Motor Report) that contains the motor position in its DATA TEXT field. The motor position that is returned contains the raw integer motor step count followed by a TAB character followed by a decimal number indicating the motor position in millimeters. The host must reply to this motor report message.

 

Motor Move Command

M - This message type is a command to move the printer's stepper motor by the number of steps specified in the DATA TEXT field.  Note that the number specified should be positive to move the tag material forward within the printer, and negative to move it backward. The response message contains no data in the DATA TEXT field.

 

Marker Setup Parameters

P - This type is used to send Parameter setup information to the marker. Parameter data is sent down in packets, where each packet uses the P message type. Each packet consists of one or more groups of parameters separated by CR./LF characters.  Each group consists of TAB delimited fields where the first field is a three character Group Identifier. The individual parameters within the group contain a two-character field identifier followed by the equal sign and then the parameter value. Parameters are optional, meaning that you only need to send the parameters you wish to change.

If a group is empty, meaning that only the group identifier is present, the marker will reply with the settings for that group in the DATA TEXT field of the reply message. The format of the data in the reply is the same as described below when sending to the marker.

The message groups are as follows:

BAR - This group is used to download the barcode parameters. The DATA TEXT field must formatted as follows:

BAR<tab>MW=#<tab>BW=#<tab>CM=#<tab>NC=#<tab>FL=#<cr><lf>

The data represents the following information:

			MW	- Module Width
			BW	- Bar Width
			CM	- Checksum Modulus
			NC	- Number of Characters
			FL	- Flags

 

MKR - This sub-type indicates that the DATA TEXT field contains the marker configuration parameters. The DATA TEXT field must be formatted as follows:

MKR<tab>TW=#<tab>TL=#<tab>SO=#<tab>RL=#<tab>RC=#<tab>SR=#<tab>MR=#<tab>
LS=#<tab>GH=#<tab>GO=#<tab>GS=#<tab>GE=#<tab>GT=#<tab>NL=#<tab>LF=#<tab>LT=#<tab>
LD=#<tab>MN=#<tab>MX=#<tab>MT=#<tab>MS=#<tab>FL=#<cr><lf>

The data represents the following information:

			TW	- Tag Width			(mm)
			TL	- Tag Length			(mm)
			SO	- Shear Offset			(mm)
			RL	- Roll Length			(mm)
			RC	- Roll Consumed			(mm)
			SR	- Stepper Resolution		(mm/step)
			MR	- Mirror Resolution		(mm/step)
			LS	- Laser Speed			(mm/sec)
			GH	- Galvo Home Delay		(mSec)
			GO	- Galvo Offset			(mm)
			GS	- Galvo Start Margin		(mm)
			GE	- Galvo End Margin		(mm)
			GT	- Galvo Step Size		(DAC steps)
			NL	- Number of Lasers		
			LF	- Laser Frequency		(Hz)
			LT	- Laser Off Tickle		(mSec)
			LD	- Laser Duty Cycle		(%)
			MN	- Motor Min Frequency		(Hz)
			MX	- Motor Max Frequency		(Hz)
			MT	- Motor Reversing Takeup	(steps)
			MS	- Motor Step Count		(steps)
			FL	- Flags				

 

MSG - This group is used to download the message parameters. The DATA TEXT field must be formatted as follows:

MSG<tab>CS=#<tab>FL=#<cr><lf>

The data represents the following information:

			CS	- Character Set		(0=ISO8859-1, 1=ISO8859-5)
			FL	- Flags			(reserved, send 0)

 


NET - This sub-type is used to download the protocol and related parameters for network communications. The DATA TEXT field must be formatted as follows:

NET<tab>IP=#<tab>SM=#<tab>DR=#<tab>H1=#<tab>H2=#<tab>PL=#<tab>PP=#<tab>FL=#<cr><lf>

The data represents the following information:

			IP	- IP Address
			SM	- Subnet Mask
			DR	- Default Router
			H1	- Host 1 TCP Listen Port
			H2	- Host 2 TCP Listen Port
			PL	- PLC IP Address
			PP	- PLC TCP Listen Port
			FL	- Flags

 

PSW - This sub-type indicates that the characters in the DATA TEXT field are new password string. The DATA TEXT field must be formatted as follows:

PSW<tab>PW=#<tab>FL=#<cr><lf>

The data represents the following information:

			PW	- The new password
			FL	- Flags


USR - This sub-type indicates that the DATA TEXT field contains the user table parameters. 

The DATA TEXT field must be formatted as follows:

USR<tab>UM=#<tab>UY=#<tab>US=#<tab>S1=#<tab>S2=#<tab>S3<tab>FL=#<cr><lf>

The data represents the following information:

			UM	- User Month Table		(12 characters)
			UY	- User Year Table		(10 characters)
			US	- User Shift Table		(3 characters)
			S1	- Start time of shift 1		(HH:MM)
			S2	- Start time of shift 2		(HH:MM)
			S3	- Start time of shift 3		(HH:MM)
			FL	- Flags				(reserved, send 0)

 

Query for Status

S - This type is used to query the marker for its current status. 

There can be an optional character DATA TEXT field for this type. If you include an ASCII '1' character in the field, this will enable the automatic reporting of status information.  The marker will begin sending asynchronous 'S' messages to the host whenever there is a change in the status.  An ASCII '0' character in the field will turn off automatic status updates.  If the field is empty, then the reply will contain the status.

The ACK response message from the marker will contain a DATA TEXT field. This field will contain five numbers separated by TAB characters. These numbers represent the following values.

 The numbers must be converted into binary, where each bit will represent the state of an input or output point.

				#<tab>#<tab>#<tab>#<tab>#<tab>
			STATE	- Marker State
			#	- The value of the current state of Port 0
			#	- The value of the current state of Port 1
			#	- The value of the current state of Port 2
			#	- The value of the current state of Port 3


Set Time and Date

T - This type is used to set the time and date of the marker's built-in clock/calendar. The DATA TEXT field for this message must contain the time and date separated by a TAB character in the following format:

				HH:MM <tab> MM/DD/YY
			HH:MM		- The current time of day in military 24 hour format
			MM/DD/YY	- The current date.


There is no data in the DATA TEXT field of the response message.

 

Motor Stop

U - This message type is a command to stop the printer's stepper motor. No data is required in the DATA TEXT field.. The response message contains no data in the DATA TEXT field.

 

Version Check

V - This message type is a request for the printer's firmware version.  The response message contains a text string representing the version information in the DATA TEXT field. An example version string would be:

KE2853 <tab> 4.00 <tab> 2014-02-13

The first field of the version string is the printer model number, followed by the actual program version number, and finally the date that the version was released.

 

Reset the Printer

X - This message type is a command to reset the printer. The response message contains no data in the DATA TEXT field. Resetting the printer will stop any printing in progress.

 


Conclusion

This concludes the description of the Extended Protocol for communications with the InfoSight Corporation KE2853 Tag Printer Software. Please refer all questions to the factory.

 

Specifications are subject to change without notice.

Download the PDF datasheet.

InfoTag is a registered trademark of InfoSight Corporation.