beautypg.com

9 getdata(), Syntax, Parameters – Campbell Scientific BMP5 Direct SDK User Manual

Page 16: Return codes

background image

Section 2. SimplePB.DLL Reference

2.9 GetData()

Query the datalogger for column names and data from one of its tables.

Syntax

GetData(pakbus_address, device_type, table_no, record_no, return_data,
return_data_len)

Parameters

pakbus_address: Integer – The PakBus address of the datalogger.

device_type: Integer – The type of datalogger:

• 1=CR200

• 2=CR10XPB, CR23XPB, CR510PB

• 3=CR1000

• 4=CR3000

• 5=CR800, CR850

table_no: Integer – The number of the table from which to collect data.

record_no: Integer – The record number where data collection will start. All
records following this record number will be included in the collection.
Therefore, if the record number is set to 0, all records in the table will be
collected. In addition, if the record number specified does not exist in the
datalogger, all existing records from the oldest to the newest will be returned.
However, if the record number is set to a negative number, only the most
recent record in the table will be collected. There is not a way to specify and
collect a single record from a table using this command unless that record is the
most recent record in the table.

return_data: Char – The location in memory where the data returned from the
datalogger exists.

return_data_len: Integer – Number of bytes in the data returned from the
datalogger.

Return Codes

0 = Successful.
1 = Success but more data to collect.
-1 = Communication timed out.
-2 = Port is not open.

2-6