Section 5. Programming the Datalogger
5-15
the termination character as an ASCII code 0..255; 999 means character not
enabled.
Min. delay for floating point data = floats*3*(characters*0.26*ports).
Min. delay for strings = characters*0.26*ports.
5.2.22 Command 2305: Transmit Byte(s)
By using P113 command 2305 it is possible to transmit either one or two bytes
from the command options. If any command option is set to 999 then the byte
will not be sent. The number range for each command option is 0-255 and 999.
An example of its use is below:
1: SDM-SIO4 (P113)
1:
1
Reps.
2:
0
SDM address.
3:
1
Mode, send bytes to port 1.
4:
2305
Command.
5:
13
Decimal number that represents Carriage Ret.
6:
10
Decimal number that represents Line Feed
7:
0000
Values/Rep.
8:
0000
Start location.
9:
1
Mult.
10: 0.0
Offset.
The example will transmit the bytes ‘carriage return line feed’ (CrLf) to port
one.
Values per repetition = 0
5.3 SDM-SIO4 Configuration Examples
Although the serial port configurations can be set up using the ‘command line’,
many users may prefer to set up the ports from their program. This would
normally be done once when the program is first compiled. The instruction can
be placed within a logical block which only runs when a specified datalogger
flag is reset. The program should be written so that the flag can then be set to
prevent the instruction running after the first execution; this also enables you to
force reconfiguration by toggling the flag low.
Example CR10X Program
This program is an example of how you could set up the SDM-SIO4 serial
mode and filter type once on program compilation or if flag 1 was reset. This
works on port 1 of the SDM-SIO4.
The program will convert ASCII floating point input values into Campbell
Scientific floating point format. The datalogger will store two values in
locations 1 and 2.
NOTE
Summary of Contents for SDM-SIO4
Page 6: ...SDM SIO4 Table of Contents iv This is a blank page ...
Page 12: ...Section 1 Introduction 1 6 This is a blank page ...
Page 16: ...Section 2 Installation and Hardware Set Up 2 4 This is a blank page ...
Page 26: ...Section 3 Understanding How the SDM SIO4 Handles Data 3 10 This is a blank page ...
Page 32: ...Section 4 Programming the SDM SIO4 4 6 This is a blank page ...
Page 62: ...Section 5 Programming the Datalogger 5 30 This is a blank page ...
Page 76: ...This is a blank page ...
Page 81: ...This is a blank page ...