beautypg.com

10 command 9: flush converted data buffer, 11 command 66: send single-byte data to datalogger, 12 command 67: get return code – Campbell Scientific SDM-SIO4 4-Channel Serial I/O Interface User Manual

Page 38: 13 command 320: send byte data to sdm-sio4, 14 command 321: execute command line command

background image

Section 5. Programming the Datalogger

5-6

If any of these four digits is greater than zero then the buffer has data.

Values per repetition = 1

5.2.10 Command 9: Flush Converted Data Buffer

This command flushes the converted data buffer of data that is available for the
datalogger to collect.

Values per repetition = 0

5.2.11 Command 66: Send Single-Byte Data to Datalogger

This command requests the SDM-SIO4 to send single-byte binary data, which is
written one byte per location for all values/rep. If no data is available then the
digit 255 is stored in the input location. This command could be used, for
example, to get data from filter strings of type c (read any byte) and Nn (read ‘n’
bytes) – see Section 3.

5.2.12 Command 67: Get Return Code

This command gets the return error code and places it into a specified location.
Command 67 is used in conjunction with command 321 and provides a single
return code value which indicates if the command was successful or not. See
Section 5.6 for the return codes.

Values per repetition = 1

5.2.13 Command 320: Send Byte Data to SDM-SIO4

This command transmits bytes of data (one per input location) to the SDM-
SIO4 for retransmission. The values in the input location should be in the range
0..255.

5.2.14 Command 321: Execute Command Line Command

By using P113 command 321 it is possible to execute a command line
command from the datalogger program. This is done by loading the
datalogger’s input locations with exactly the same string of characters that you
would use to execute a real command line command, except you would have to
enter the character codes in sequential locations. The P113 command 321
would then load the string into the SDM-SIO4 and execute the command. The
321 command is useful for reconfiguring a remote SDM-SIO4 as changes can
be made by downloading programs (using the 321 command) which can change
the SDM-SIO4 setup.

The datalogger can send other commands to the SDM-SIO4 while the
command line command is executing.

Any command line command executed from the datalogger can only return a
single return code value to indicate if it was successful or not, and any other
output which that command would normally produce is lost. This means that