Serial Line Output and Communication - GMP252

GMP252 User Guide

Document code
M211897EN
Revision
D
Language
English (United States)
Product
GMP252
Document type
User guide
Table 1. Addr Command
Syntax Description
addr<cr> Show current device address. Addresses are required for POLL mode.
addr [aaa]<cr> Set new device address. aaa = address, 0 ... 254 (default = 240)
Example (shows 0 as current address, enter 5 as the new address):
addr
Address : 0
addr 5
Address : 5
Table 2. Close Command
Syntax Description
close<cr> Close the connection that was opened with the open command.
Example:
close
line closed
Table 3. Form Command
Syntax Description
form<cr> Show the currently used measurement format.
form /<cr> Reset measurement format to default.
form [sss]<cr> Set a new measurement format.

sss = String consisting of modifiers and abbreviations for measured parameters.

See Table 19 on the facing page and Table 20 on the facing page.

Maximum length is 150 characters. Maximum length may be shorter when text strings are used.

Example (show currently used measurement format (default format shown here)):
form
6.0 "CO2=" CO2 " " U3 #r #n

Output example (continuous output from RUN mode):

CO2= 452 ppm
Example (set output format as %CO2):
form 3.1 "CO2=" CO2% " " U4 #r #n
OK

Output example (continuous output from RUN mode):

CO2= 5.1 %CO2
CO2= 5.1 %CO2
CO2= 5.0 %CO2
...
Example (set output format as CO2 ppm with Modulus-65536 checksum):
form 6.0 "CO2=" CO2 " " U3 " " CS4 #r #n
OK

Output example (continuous output from RUN mode):

CO2= 3563 ppm 9F
CO2= 3562 ppm 9E
CO2= 3559 ppm A4
...
Example (set output format as CO2 ppm, with start of text (ASCII character 002) and end of text (003) ASCII codes, and without line feed and carriage return at the end):
form #002 6.0 "CO2=" CO2 " " U3 #003
OK

Output example (continuous output from RUN mode, ASCII codes not visible here):

CO2= 866 ppm CO2= 866 ppm CO2= 867 ppm CO2= 867 ppm
CO2= 867 ppm CO2= 868 ppm CO2= 868 ppm CO2= 869 ppm
...
Table 4. Output Parameters for Form Command
Output Parameter Abbreviation in Form Command
Carbon dioxide in ppm co2
Carbon dioxide in percent co2%
Currently used temperature compensation value tcomp
Currently used pressure compensation value pcomp
Currently used oxygen concentration compensation value o2comp
Currently used relative humidity compensation value rhcomp
Table 5. Modifiers for Form Command
Modifier Description
x.y Length modifier (number of digits and decimal places).
#t Tabulator.
#r Carriage-return.
#n Line feed.
"" String constant, length 1 ... 15 characters.
#xxx ASCII code value (decimal) of a special character; for example, #027 for ESC.
addr Probe address (0 ... 254).
sn Probe serial number.
time Cumulative operating hours of the probe.
ux Name of the measurement unit using x number of characters. For example, u3 shows the name of the measurement unit with three characters.
cs4 Modulus-65536 checksum of message sent so far, ASCII encoded hexadecimal notation.
csx NMEA xor-checksum of message sent so far, ASCII encoded hexadecimal notation.
You can also use the backslash character \ instead of the hash character #.
Table 6. Intv Command
Syntax Description
intv<cr> Show the output interval of the automatically repeating measurement messages (r command and run mode).
intv [iii uuu]<cr> Set the output interval.

iii = interval, range 0 ... 255.

u = unit for interval setting:

  • s = seconds
  • min = minutes
  • h = hours
If you set the interval to 0, the output messages are output as quickly as they are generated, without additional delay.
Example:
intv 5 s
Output interval: 5 S
Table 7. Open Command
Syntax Description
open [aaa]<cr> Open a connection to a device at the specified address. Required when device is in poll mode.

aaa = address, range 0 ... 254.

Example (target probe in POLL mode, with address 52):
open 52
GMP25x: 52 Opened for operator commands
Table 8. R Command
Syntax Description
r<cr> Start the continuous outputting of measurement values as an ASCII text string to the serial line. The probe keeps outputting measurement messages at the interval that has been set with the intv command until stopped with the s command.
Example:
r
CO2= 1024 ppm
CO2= 1024 ppm
CO2= 1028 ppm
CO2= 1026 ppm
CO2= 1028 ppm
...
Table 9. S Command
Syntax Description
s<cr> Stop the continuous outputting that was started with the r command.
Example:
...
CO2= 658 ppm
CO2= 654 ppm
CO2= 655 ppm
s
Table 10. Sdelay Command
Syntax Description
sdelay<cr> Show serial line transmission delay (1 … 255). 1 unit = 4 milliseconds (for example, 5 = 0.020 second transmission delay).
sdelay [delay]<cr> Set a new serial line transmission delay.

delay = Serial line delay, range 1 … 255 (1 unit = 4 ms).

Example (set delay to 0.1 seconds = 25 units):
sdelay 25
COM transmit delay : 25
Table 11. Send Command
Syntax Description
send<cr> Output a single measurement message.
send [aaa]<cr> Output a single measurement message from a device in poll mode.

aaa = address of the probe, range range 0 ... 254

Example:
send
CO2= 1422 ppm
Example (target probe in POLL mode, with address 52):
send 52
CO2= 458 ppm
Table 12. Seri Command
Syntax Description
seri<cr> Show current serial line settings.
seri [b p d s]<cr> Set new serial line settings. The new settings will be taken into use when the probe is reset or powered up.

b = baud rate (9600, 19200, or 38400)

p = parity
  • n = none
  • e = even
  • o = odd

d = data bits (7 or 8)

s = stop bits (1 or 2)

For Modbus, baud rate must be 9600 ... 38400 and parity must be none.

Example (show current settings):
seri
Com1 Baud rate : 19200
Com1 Parity : N
Com1 Data bits : 8
Com1 Stop bits : 1
Example (set serial line to 9600 baud, even, 7 data bits, and 1 stop bit, and reset the probe to take the new settings in use):
seri 9600 e 7 1
OK
seri
Com1 Baud rate : 9600
Com1 Parity : E
Com1 Data bits : 7
Com1 Stop bits : 1
reset
GMP25x 1.0.0
Table 13. Smode Command
Syntax Description
smode<cr> Show current start-up operating mode of the serial line, and prompt to enter new mode.
smode [mode]<cr> Set serial line start-up operating mode. New mode is taken into use when the device is reset or powered up.

Available modes:

stop = No automatic output. All commands available. Default mode.

run = Automatic output of measurement messages. You can stop the output with the s command, and recontinue with the r command.

poll = No automatic output. Will respond to addressed send command and ?? command. You can use other commands after opening a connection using an addressed open command. Use with RS- 485 buses where multiple probes can share the same line.

modbus = Serial line communication uses the Modbus protocol. Serial line commands (Vaisala Industrial Protocol) are not accessible in the Modbus mode.

analog = Switches the probe from digital output to analog output (active after probe reset). Serial line commands are not accessible in the analog mode.

Example (set serial mode to "poll"):
smode poll
Serial mode : POLL