Data Sheet : Weigh, Measure and Stencil Embedded System Communications


This document applies to embedded CCS controllers only.

 

Introduction


This document will describe the Communications Protocol as implemented with the Weigh, Measure and Stencil embedded  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.

 

Disclaimer

Note: This document is correct to the best knowledge of InfoSight Corporation. Individual Weigh, Measure and Stencil systems may be customized for the application and thus may differ from this document.   Consult your machine's documentation.  InfoSight Corporation reserves the right to change this document or the system it describes without notice.


Communications is established via an RS232 serial connection with the following parameters:

Baud Rate Selectable 1200 to 9600
Data Bits 7 or 8
Parity ODD, EVEN or NONE
Start Bits 1 or 2
Stop Bits 1
Three Wire RX, TX and GND


Standard Message TYPEs

The following is a list of message types which are provided with the WMS system. Note that the message types are single characters and are shown below in bold. Some message types contain data text fields and some do not. Further, those types that do have data text fields may have a sub-type as the first character of the data text field.

 

Message Type Description
0, 1 or 2 Text to Print
A Assignment a Buffer
B Query for Buffer Assignment
C Communications Link Check
D (reserved)
E (reserved)
F Force Outputs
G (reserved)
H Tally Header Download
I Tally Header Upload
J (reserved)
K (reserved)
L (reserved)
M (reserved)
N (reserved)
O (reserved)
P (reserved)
Q Query for Record Information Upload
R Download Record Information
S Query for Status
T Set Time and Date
U (reserved)
V (reserved)
W (reserved)
X (reserved)
Y (reserved)
Z (reserved)

 

In the examples provided for each message type below, numbers such as 01 indicate a hexadecimal value while text enclosed by single quotes indicate ASCII text characters.


Text to Print

1, 2, 0 - The DATA TEXT contains a text string which is a message to be printed.  Type 1 indicates the message is the Stencil Text. Type 2 indicates the message is the Stamper Text.  Type 0 indicates that the DATA TEXT contains both the Stencil and Stamper messages separated by a comma.  The response message contains no data in the DATA TEXT field.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 '1' 02 'STENCIL MESSAGE TEXT' 03 '205' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 '1' 06 02   03 '049' 0D

 

 

Assign a Buffer

A - The DATA TEXT field contains an ASCII string which represents a number (from 1 to 10) specifying the buffer number to Assign for printing. The response message contains no data in the DATA TEXT field.

				#
			#	- The message buffer to assign.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'A' 02 '1' 03 '114' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'A' 06 02   03 '065' 0D

 

Query for Buffer Assignment

B - This type is used to query the printer to determine which buffer is currently assigned. The response message will contain the currently assigned buffer number in the DATA TEXT field. Use this message to obtain the currently assigned buffer before assigning a new buffer if you will wish to restore the original setting later.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'B' 02   03 '066' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'B' 06 02 '1' 03 '115' 0D

 

 

Communication Link Check

C - This type is used to check the communications link integrity. No data is required in the message. An ACK response will indicate that the link is functioning properly.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'C' 02   03 '067' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'C' 06 02   03 '067' 0D

 

 

Force Outputs

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

				#,#

Each number is a decimal integer. A comma separates the two 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.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'F' 02 '0,1' 03 '211' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'F' 06 02   03 '070' 0D

 

 

Tally Header Download

H - This type is used to send the Tally Header information to the WMS system. The message contains the header data in the DATA TEXT field. The format of the download is shown below. The response message contains no data in the DATA TEXT field.

SHIFT,SIZE,WALL,GRADE,FINISH,PRODUCT,CLASS,LOT,HEAT,ORDER,OPER,FORE,INSP1,INSP2

The data consists of the indicated fields, each separated by a comma character.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'H' 02 'SHIFT,SIZE,WALL,GRADE,FINISH,
PRODUCT,CLASS,LOT,HEAT,
ORDER,OPER,FORE,INSP1,INSP2'
03 '238' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'H' 06 02   03 '072' 0D

 

 


Tally Header Upload 

I - This type is used to request the WMS system to upload the Tally Header.   The message contains nothing in the DATA TEXT field.   The reply message will contain the tally header fields, separated by commas as shown below.

SHIFT,SIZE,WALL,GRADE,FINISH,PRODUCT,CLASS,LOT,HEAT,ORDER,OPER,FORE,INSP1,INSP2

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'I' 02   03 '073' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'I' 06 02 'SHIFT,SIZE,WALL,GRADE,FINISH,
PRODUCT,CLASS,LOT,HEAT,
ORDER,OPER,FORE,INSP1,INSP2'
03 '239' 0D

 

 


Query for Record Information Upload

Q - This type is used to request Record information for the currently assigned data buffer. Record data is requested in packets, where each packet uses the Q message type. The first character of the DATA TEXT field must be a sub-type which identifies the packet type. Following the packet type character for some sup-types is the slot number for the request. The response message contains the requested data in the DATA TEXT field. The message sub-types are as follows:


Sub-type D - This sub-type is used to request the data fields of the currently assigned message buffer. The DATA TEXT field contains nothing. The response message DATA TEXT field contains the data fields for the currently assigned buffer.

				DSSS,#.#,#.#,#.#,#.#,#.#,#.#,#.#,#.#
			SSS	- The name of the message buffer
			#.#	- The positive tolerance value
			#.#	- The negative tolerance value
			#.#	- The weight per foot
			#.#	- The coupling weight
			#.#	- The protector weight
			#.#	- The length range low value
			#.#	- The length range high value
			#.#	- The length end adjust value

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'Q' 02 'D' 03 '149' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'Q' 06 02 'NAME,+6.5,-3.5,100.0,0.0,0.0,16.0,60.0,0.0' 03 '123' 0D

 

 

Sub-type F - This sub-type is used to request the message format strings for the stencil and stamper messages. The response message contains the format strings, each separated by a comma as shown:

				FSSS,SSS
			SSS	- The stencil format string
			SSS	- The stamper format string
        

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'Q' 02 'F' 03 '151' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'Q' 06 02 '%1O,%2O' 03 '200' 0D

 

 

 

Sub-type M - This sub-type is used to request the message text. The response message contains the message text, each one separated by a comma.

				MSSS,SSS
			SSS	- The stencil message string
			SSS	- The stamper message string

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'Q' 02 'M' 03 '158' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'Q' 06 02 'STENCIL MSG,STAMPER MSG' 03 '185' 0D

 

 

Sub-type S - This sub-type is used to request the serial number (joint number) settings. The response message contains the serial number settings, separated by commas.

				S#,#,#,#
			#	- The serial (joint) number
			#	- The lower limit
			#	- The upper limit
			#	- The increment (delta)

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'Q' 02 'S' 03 '164' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'Q' 06 02 '1,1,999,1' 03 '019' 0D

 

 

Sub-type T - This sub-type is used to request the fault message text for the system. The DATA TEXT field must contain the fault code. The fault code must be from 0 to 63. The response message DATA TEXT field will contain the fault information as shown:

				TSSS,#
			SSS	- The text message for the fault
			#	- The display attributes
 

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'Q' 02 'T0' 03 '213' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'Q' 06 02 'SYSTEM OFF,0' 03 '141' 0D

 


 

 


Download Record Information

R - This type is used to send Record information for the currently assigned data buffer. This type allows the transmission of more than just printable text strings.  Record data is sent down in packets, where each packet uses the R message type. The first character of the DATA TEXT field must be a sub-type which identifies the packet type. Following the packet type character is the data for the record. The response message contains no data in the DATA TEXT file. The message sub-types are as follows:

 

Sub-type D - This sub-type is used to send the data fields to the currently assigned message buffer. The DATA TEXT field contains the data fields as shown below. The response message DATA TEXT field is empty.

				DSSS,#.#,#.#,#.#,#.#,#.#,#.#,#.#,#.#
			SSS	- The name of the message buffer
			#.#	- The positive tolerance value
			#.#	- The negative tolerance value
			#.#	- The weight per foot
			#.#	- The coupling weight
			#.#	- The protector weight
			#.#	- The length range low value
			#.#	- The length range high value
			#.#	- The length end adjust value

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'R' 02 'DNAME,+6.5,-3.5,100.0,0.0,0.0,16.0,60.0,0.0' 03 '192' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'R' 06 02   03 '082' 0D

 

 

Sub-type F - This sub-type is used to send the message format strings for the stencil and stamper messages. The DATA TEXT field contains the format strings separated by a comma as shown below.   The response message DATA TEXT field is empty.

				FSSS,SSS
			SSS	- The stencil format string
			SSS	- The stamper format string
        

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'R' 02 'F%1O,%2O' 03 '015' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'R' 06 02   03 '082' 0D

 

 

 

Sub-type M - This sub-type is used to send the message text. The DATA TEXT field contains the message strings separated by a comma as shown below.   The response message DATA TEXT field is empty.

				MSSS,SSS
			SSS	- The stencil message string
			SSS	- The stamper message string

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'R' 02 'MSTENCIL MSG,STAMPER MSG' 03 '007' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'R' 06 02   03 '082' 0D

 

 

Sub-type S - This sub-type is used to send the serial number (joint number) settings. The DATA TEXT field contains the format settings separated by commas as shown below.   The response message DATA TEXT field is empty.

				S#,#,#,#
			#	- The serial (joint) number
			#	- The lower limit
			#	- The upper limit
			#	- The increment (delta)

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'R' 02 'S1,1,999,1' 03 '103' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'R' 06 02   03 '082' 0D

 

 

Sub-type T - This sub-type is used to send the fault message text for the system. The DATA TEXT field must contain the fault code, the fault message and the display attributes, separated by commas. The fault code must be from 0 to 63. The response message DATA TEXT field will be empty.

				T#,SSS,#
			#	- The fault code 0 - 63
			SSS	- The text message for the fault
			#	- The display attributes
 

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'R' 02 'T0,SYSTEM OFF,0' 03 '062' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'R' 06 02   03 '082' 0D

 


Query for Status

S - This type is used to query the printer for its current status. There is no DATA TEXT field for this type. The ACK response message from the printer will contain a DATA TEXT field. This field will contain three numbers separated by commas. These numbers represent the states of the three I/O ports of the printer. The numbers must be converted into binary, where each bit will represent the state of an input or output point.

				#,#,#
			#	- The value of the current state of the Output port
			#	- The value of the current state of Input port 1
			#	- The value of the current state of Input port 2

The definition of each of the I/O bits varies from system to system.  Please consult the documentation for your system for the meaning of each signal.

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'S' 02   03 '083' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'S' 06 02 '00021,00001,00200' 03 '129' 0D

 

 


Set Time and Date

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

				HH:MM,MM/DD/YY
			HH:MM		- The current time of day in 24 hour format
			MM/DD/YY	- The current date.


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

Message - Host to WMS

SOH TYPE STX DATA TEXT ETX BCC CR
01 'T' 02 '15:00,10/31/08' 03 '011' 0D

Reply - WMS to Host

SOH TYPE ACK STX DATA TEXT ETX BCC CR
01 'T' 06 02   03 '084' 0D

 

 

 


Conclusion

This concludes the description of the communications format for the InfoSight Corporation Weigh, Measure and Stencil embedded software. Please refer all questions to the factory at 740-642-3600.