Appendix B: RS232 commands
All digital information can be output via the RS232 port (9600,N,8,1). This can be
used for reading the sensor, as well as for production test and calibration
functions.
Operating modes and serial commands
The SPN1 can be interrogated from any serial port terminal program such as
Windows HyperTerminal.
Set the RS232 settings to 9600 baud, No parity, 8 Data bits, 1 stop bit., Flow
control: none.
In HyperTerminal, also set ‘Append line feeds to incoming line ends’ in Settings >
ASCII setup
A terminal screen option is also available in the SunRead software.
To access it , run the SunRead program from the command line as follows:-
Run SunRead.exe /e
(Note the space before “/e”).
Select
Test, Terminal
to open the Terminal mode
In the following tables, commands TO the sensor via RS232 are in
bold
,
responses (also via RS232) are in normal weight. All RS232 input characters are
echoed back except for the ‘R’ command.
For commands with more than one input character, a command is abandoned if
the input is not within appropriate range, or 1 minute after a key press.
Unrecognised and aborted commands return ‘?’.
Sleep mode
Processor is in its lowest power state.
If the sensor is asleep when the DL-POWER pin goes high, then the sensor will
wakeup and start to output the analogue values, as described above.
Any RS232 input will wake the sensor up for long enough to respond to the
command. The suggested procedure is to send an ‘
R
’, wait for the ‘»’ response,
then send the desired command, and wait for the terminating <CR>.
RS232 Input Response
R
» (ASCII 175)
For BF3 compatibility
S
tttt.t,dddd.d,s<CR>
Send the current reading, in comma
separated ASCII. tttt.t & dddd.d are the
Total & Diffuse readings, in W.m
-2
. s is
sunshine presence 0 or 1. A one off
reading is taken when the command is
received.
SPN1 User Manual v1.0
Appendix B: RS232 commands
z
37