FORM command - HMP155

HMP155 User Guide

Document code
M210912EN
Revision
G.1
Language
English
Product
HMP155
Document type
User guide

Use the serial line command FORM to change the format or select certain quantities for the output commands SEND and R.

FORM x
Parameter Description
x Formatter string

The formatter string consists of quantities and modifiers. You can only type a maximum of 73 characters after the command on the command line.

When you type the command, use the abbreviations of the quantities.

Table 1. Quantities measured by HMP155
Quantity Abbreviation Metric unit Imperial unit
Relative humidity RH %RH %RH
Temperature T °C °F
Additional T‑probe temperature Ta °C °F
Table 2. Quantities calculated from measured quantities
Quantity Abbreviation Metric unit Imperial unit
Dew point / Frost point temperature (Td/f) TDF °C °F
Dew point temperature (Td) TD °C °F
Mixing ratio (x) X g/kg gr/lb
Wet bulb temperature (Tw) TW °C °F

The modifiers are shown in the following table.

Table 3. FORM command modifiers
Modifier Description
quantity Quantity name (for example RH, T or TDF)
x.y Length modifier (number of digits and decimal places)
#t Tabulator
#r Carriage return
#n Line feed
“" String constant
#xxx Special character with decimal code "xxx"
U5 Unit field and length
ADDR Probe address with 2 characters [00 ... 99]
CS2 Modulus-256 checksum of message sent so far, hexadecimal format.
CS4 Modulus-65536 checksum of message sent so far, hexadecimal format.
ERR Error flags for T, Ta, RH, MEM; [0000 ... 1111]; 0 = no error, 1 =error

T = temperature measurement error

Ta = measurement error in the additional T-probe

RH = humidity measurement error

MEM = memory error

For a more detailed error message, use the ERRS command and see Table 1.
STAT Probe heating status in 1 character field, for example:
N = no heating
h = warmed probe active
H = purge heating active
S = purge cooling active
X = extra sensor heating active
SNUM Probe serial number
TIME Time [hh:mm:ss]
>form "Temperature=" 5.2 t #r#n
OK
>send
Temperature=   24.23
>

>form "Twet=" 6.3 tw U3 #t "T=" t U3 #r#n
OK
>send
Twet=    11.290'C       T=    24.231'C
>

>form 5.1 rh #t t #t tdf #r#n
OK
>send
   15.6    24.2    -3.1
>

FORM / command returns the default output format. The default output format depends on the device configuration. FORM command without formatter string returns the current output format of the probe.

>form /
OK
>send
 RH= 23.8 %RH T= 19.4 'C
>

Checksums are calculated as described in the following equations.

c s 2 = i = 1 n b i mod 256
c s 4 = i = 1 n b i mod 65536
c s x = b 1 b 2 ... b n
b i =    b i i f b i 36 a n d b 1 42
b i = 0 i f b i = 36 o r b 1 = 42
Table 4. Symbols in FORM checksum equations
Symbol Description
cs2 Value of CS2 checksum in the output message.
cs4 Value of CS4 checksum in the output message.
csx Value of CSX checksum in the output message.
bi Value of the byte at position i (1-based) in the output message.
n Number of bytes in the output message before the CS2, CS4, or CSX field (including earlier checksum fields, if any).
Bit-wise exclusive OR operator.
36 Byte value of ASCII $ character.
42 Byte value of ASCII * character.