Downloading text strings in older versions of InfoSight's I-Dent® spray and InfoDent® dot-peen stamping systems required an RS232 serial interface. This type of interface is becoming less common in modern automation and is being replaced by Ethernet network connections. The latest iteration of the processor card in InfoSight's industrial markers uses an ARM processor with an Ethernet interface, which replaces the older serial connection. This post will describe the basic interface and communications protocols that will allow you to download the text you want to mark to either of these system types.
The CPU card in our industrial marking systems now has an on-board Ethernet port that accepts an RJ45 cable connection. The port will auto-negotiate a 10/100 MBps connection as needed by the connected switch. Use a standard Ethernet patch cable to connect the card to the switch.
The firmware on the CPU card has a TCP/IP networking stack that supports the following protocols: ARP, ICMP, IP, DHCP, UDP, TCP, HTTP and FTP.
The board can be configured to obtain a dynamic IP address if your network has a DHCP server. However, it is most likely that you will want to assign a static IP address to the marking system. Setting this address the first time requires the use of the Network Configuration Utility. This simple Windows program will scan the network to find the InfoSight marking system controller. It will then allow you to enter the IP address, subnet mask and default gateway address, which will be programmed into the CPU card. Once the card has an IP address, you can use a standard browser to configure other settings. You can download the Network Configuration utility from here.
For the purposes of downloading text strings to be marked by the system, you need to implement TCP sockets. The marking system controller acts as a server, listening on a TCP port for connection requests from your automation system. Your software will act as the client and request a connection to the listening port on the marker's IP address. The default port number is 5001, but this can be changed using the system's browser interface.
Once you have established a connection to the marker, you will use an InfoSight proprietary communications protocol called Extended Protocol.
The communications protocol used by all InfoSight industrial marking systems is a packet based command/reply messaging protocol. Simple byte sequences form commands that either send or request information. Each command packet generates a reply packet from the receiving end that includes an ACK or NAK to indicate that the command was executed successfully or that an error occurred.
A command packet has the following format:
SOH TYPE STX DATA ETX BCC CR
Where TYPE is a single ASCII character that defines the command and DATA is an optional string of characters consistent with the message type. Not all message types have an associated DATA field. The BCC is an optional three characters used as a block check code, and can be omitted. SOH, STX, ETX and CR are ASCII control codes.
The reply packet has the the following format:
SOH TYPE ACK/NAK STX DATA ETX BCC CR
The message type of the reply will always match the command. The ACK or NAK are ASCII control codes that indicate success or failure of the command. The DATA field is optional and dependent on the message type.
The basic Extended Protocol messaging format is fully described in this document: Extended Protocol Communications
Application Message Types
Each command packet contains a single byte that defines the message type. Different marking systems have different requirements for operation, and may thus have different message types and formats. The application specific messages are fully described in these documents:
Downloading Single Text Strings to be Printed
It is possible to download individual text strings for specific lines to be printed by the marker. The I-Dent® marker uses message types '1' through '5' to download to each of up to 5 spray marking heads. The InfoDent® marker uses message types '1' through '6' to send text to the six possible lines that can be marked in one cycle.
An example of sending text to line number one of either marking system type is shown below:
Command: SOH 1 STX ABC123 ETX BCC CR
Reply: SOH 1 ACK STX ABC123 ETX BCC CR
Note that the message type is an ASCII printable number 1 (0x31), and the BCC is shown here symbolically. If the message is successfully received and decoded, the marker will reply with an ACK and the DATA field of the reply will echo the original text string downloaded. You can use this echo-back of the text to confirm reception. If there is an error in the command, the marker will reply with a NAK and the DATA field of the reply will contain a textual error message that will help you diagnose the problem:
SOH 1 NAK STX Unable to save message file! ETX BCC CR
Downloading More Than One Message at a Time
While the markers can accept individual text lines as described above, it is also possible to send all the text lines simultaneously in one message packet. The message type to use to send all text lines together is type '0' (ASCII zero.)
SOH 0 STX FILENAME \t LINE1 \t LINE2 \t LINE3 \t LINE4 \t LINE5 ETX BCC CR
The DATA field consists of an optional file name followed by the individual text strings for each line. An ASCII TAB character, shown here as \t, is used to separate each field of the data. If you omit the file name you must still have the TAB character at the beginning of the data to hold its place. Omitting the file name will use the currently assigned message file.
The reply to the message, if there are no errors, will be an echo of the DATA in the command packet. If there is an error (NAK) then the DATA field will contain an error message.
Downloading and Queuing Multiple Print Messages
Some applications require the marker to queue up multiple print cycles of multiple lines each, and then to print them in sequence when the external START PRINT is received. A typical application that uses this approach would be a Plate Layout System.
Both marking system types have the ability to queue downloaded messages. There are two message types that are used when queuing messages.
Command: Clear the Queue
Before downloading any of the messages it is always a good idea to ensure that the marker has an empty queue. The command message type 'D' is used to clear the queue.
SOH D STX ETX BCC CR
The reply to the clear message doesn't have anything in the DATA field.
SOH D ACK STX ETX BCC CR
Command: Enqueue Messages
After sending the Clear the Queue command and receiving the confirming ACK reply, you can begin sending the text. The command message type 'E' will enqueue one group of messages.
SOH E STX FILENAME \t LINE1 \t LINE2 \t LINE3 \t LINE4 \t LINE5 ETX BCC CR
Notice that the DATA part of the message is exactly the same format as used when downloading more than one message as described above for message type '0'.
The reply to this message does not contain any data in the DATA field.
SOH E ACK STX ETX BCC CR
After the ACK reply is received, you may send down the next set of message lines that you want printed in the next print cycle. You can continue to send batches of message text using the 'E' type as needed for your marking application. Both markers have a limit of 50 items in the print queue. That is, you can download up to 50 groups of print messages, and then perform 50 individual marking operations.
A typical marking sequence using the queuing ability of InfoSight's marking systems would be:
1- Open a socket connection to the IP address of the marker, on the TCP port number that it is listening to.
2- Send the 'E' command to clear the download queue
3- Wait for the reply to the 'E' command
4- Send a 'D' command containing all of the text lines for a marking cycle
5- Wait for the reply to the 'E' command
6- Repeat steps 4 and 5 as needed to send all of the marking operations, up to 50.
7- Close the socket
This post hopefully gave you a basic understanding of how to download marking text to InfoSight's spray and stamp marking systems. Both of these markers have many other commands available to meet many different needs in industrial marking applications. The linked documents describe all of the available features.
Specifications are subject to change without notice
I-Dent and InfoDent are registered trademarks of InfoSight Corporation