Programming Instructions For the XP2i Digital Test Gauge
Contents Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Communication Format. . . . . . . . . . . . . . . . . . . . . . . . . . .
—— Overview 1 Overview Introduction Thank you for choosing the XP2i Digital Test Gauge from Crystal Engineering Corporation. Your XP2i is a combination of leading edge technology and rugged industrial design. Your XP2i can be configured through the use of ConfigXP™ software available from Crystal Engineering. Your personal computer can disable, enable, or logo for programmable features, like: modify a variety of features of your XP2i.
—— —— Overview 2 Communication Format Input is case-sensitive; all instructions should be sent in UPPERCASE. Instructions must be terminated with a single carriage return (CR) character followed by an optional linefeed (LF) character. Note that while the XP2i expects either CR or CR/LF as command termination on its input, it always appends a CR/LF pair to its output. For reference, CR is ASCII value 13 decimal, while LF is ASCII character 10 decimal. You have 30 seconds to complete an instruction.
Overview 3 Pressure (one line) ?PRE ���������������Returns data and units on one line, and separates the reading and units with a comma. Example: 2.01,PSI Pressure, High ?P,H ���������������Pressure, High returns the stored peak pressure value, in whatever pressure units are currently being displayed. 91.3 mmH2O Pressure, Low ?P,L ���������������Pressure, Low returns the peak low, or “valley” measurement, in the pressure units currently being displayed. -10.
Overview 4 Serial Number ?SN# ��������������� The serial number is returned in two strings. A typical example is shown below: 3 12659 Version ?VER �����������Version returns the XP2i’s firmware version as a 4 digit number preceded by the letter “R”. This number is for factory use only. Example version number: R0101 Water Density ?H2O ���������������Applies only to models that include inches of water.
Commands 5 —— Commands The following are commands. All commands start with an exclamation mark (!). General Commands Clear Peaks !CLR ���������������Clear high and peak low values by setting them to the current live reading (which might not be zero). For instance, if the current live reading were 253 PSI, then both high and low peak registers would contain 253. Disable/Enable Peak Display Prevent peak pressure readings from being displayed and disables peak button operation.
Commands 6 Reset !RST ���������������This command schedules a reset. There will be a three second pause before the XP2i resets; during this time, no commands or queries should be sent to the unit. When the unit resets, a product identification string, called the Boot Signature, is sent. (See the Programming Tips on page 9 for more information.) Some communication noise, including a serial framing error, is possible on reset.
—— Commands 7 Acknowledgment of a Command The XP2i always returns some indication to let you know a command or query was received and acted on. For queries, the return of the measurement data is the acknowledgment. For commands, possible acknowledgments are “A”, “N” or “X”, followed by a comma then a single digit. The digit indicates whether there were any reception errors. The combination is left justified. A �������������������������The XP2i understood the command and acted on it.
—— Support 8 Support Troubleshooting the Digital Interface The following section gives possible reasons for various error codes. N,Ø �����������������The “Ø” indicates there were no overrun or framing errors, so the command was properly received. However, the “N” means the XP2i could not match it to any allowed command. This means the syntax must have been wrong. The command is rejected and nothing is done.
—— —— Support 9 Effects of Password Protection on Commands If the XP2i is password protected, the following commands will have no effect and return “X,0”: !_4C, !60F, !68F, !NPK, !PKS, !MSG, !RAS, and !AVS. Programming Tips The XP2i is a very straightforward device to communicate with, provided you follow these tips. This advice is derived from our own experiences automating systems based on the XP2i, as well as the experiences of our users; following these tips will help save you some time.
—— Support 10 Bootloader Signature A quick note about the Bootloader Signature: This string contains a 19 character, product-specific string (whose contents may vary with product revision), followed by a carriage return (CR), making the total string length 20 bytes. However, a reset turns the RS-232 interface on and off, so it may be subject to noise; a NULL may be received before the signature is sent, and the first character or so of the Bootloader Signature may be corrupted.
© 2013 Crystal Engineering Corporation 708 Fiero Lane, Suite 9, San Luis Obispo, California 93401-8701 3984.