EasyManuals Logo

Crystal XP2 User Manual

Crystal XP2
24 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #15 background imageLoading...
Page #15 background image
PN: 2975 Rev F, 3/2004
Page 15 of 24
C R Y S T A L
engineering corporation
Programming Tips
The XP2 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
XP2, as well as the experiences of our users; following it will probably save you some time.
Anytime you establish (or re-establish) communications with the unit, you should use the
following initialization sequence, which will help you deal with possible noise due to reset,
etc.:
1. Reset the unit (unless you must preserve tare, peak values, etc.) by sending the
!RST” command.
2. Wait 15 seconds.
3. Read the Bootloader Signature, even if you ignore it, to clear it from the PC’s input
buffer; see below for more details.
4. Send a carriage return to clear any noise in the XP2s input buffer.
5. An error code, either “N,Ø” or “N,4” will be returned; this is normal (you have sent an
empty command); read it to clear it. The buffers are now reset.
6. Use the “?P,U” and “!I,P” commands to select the pressure unit you want to use.
7. IF APPROPRIATE, zero the XP2 by sending the “!ZER” command, since the tare
value will be clear.
8. IF APPROPRIATE, clear the high and low peak values to the current pressure (zero, if
you followed step 6) by sending the “!CLR” command.
9. If you are logging data, you should log the serial number of the unit for traceability
purposes by using the “?SN#” command. You should also log the product code,
hardware revision and firmware version with the “?VER” command.
10. Disable automatic shutdown with the “!NAO” command.
A quick note about the Bootloader Signature: This string contains a ten-character,
product-specific string (whose contents may vary with product revision), followed by a
carriage return and line feed (CR-LF), making the total string length 12 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. A framing error is also possible. The procedure above will
deal with this situation properly. Should you want to parse the bootloader signature, it has
the following format: “=XP2 BLxy=” where x and y will vary with product revision. The
bootloader signature is used by the firmware upgrade tool, but should NOT be used to
identify the firmware version; use the “?VER” command for that purpose. If you have a
system that may have Crystal DTG or XP2 units attached, you can use this signature to
determine which device is in use.
NOTE: Any time you detect the Bootloader Signature, the unit has been reset, or
disconnected from and reconnected to power; turning the unit on and off with the button will
not send the Bootloader Signature. You can use this behavior to detect a battery change, or
a problem with the XP2.
Some commands may take up to 500 milliseconds to return a reply. You should always wait
at least 50 milliseconds after each reply is received before sending the next command if you
are not using hardware flow control. After a reset command it may take up to 15 seconds
before the gauge resumes normal operation.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Crystal XP2 and is the answer not in the manual?

Crystal XP2 Specifications

General IconGeneral
Accuracy±0.25% FS
DisplayLCD
Pressure mediaNon-corrosive gases
Operating temperature32°F to 122°F (0°C to 50°C)
Measurement Range0 to 15 psi
Operating Humidity90% RH (non-condensing)

Related product manuals