background image

Appendix A.  Sample Program Table Structure 

Table Number 2 – SiteVal

: The SiteVal table contains values that are stored for calculations by the 

WeatherHawk program.  Data is only stored when field “SaveSite” in the Public table is set to one. 

Field Number 

Field Name 

Units 

Notes: 

Field 1 

Altitude_m 

Meter 

 

Field 2 

Latitude 

Degrees 

 

Field 3 

Longitude 

Degrees 

 

Field 4 

BPoffset_KPa 

KPa 

 

Field 5 

Int_Timer 

Minutes 

 

 

Table Number 3 – Data1

: This table contains data ouput at the Int_timer rate from the Public table.  For example, 

if Int_timer = 15 min, this table contains 15 min data. 

Field Number 

Field Name 

Units 

Notes: 

Field 1 

BatVolt_V 

Volts 

 

Field 2 

BatVolt_V_Min 

Volts 

 

Field 3 

AirTemp_C_Avg 

Celsius 

 

Field 4 

RH_Avg 

Percent 

 

Field 5 

WindSpeed_ms_Avg 

m/s 

 

Field 6 

Solar_Avg 

W/m^2 

 

Field 7 

ETo 

mm 

 

Field 8 

AirTemp_C_Min 

Celsius 

 

Field 9 

AirTemp_C_TMn 

Time 

Example: 2004-01-25 13:49:50 

Field 10 

Max_AirTemp 

Celsius 

 

Field 11 

AirTemp_C_C_Tmx 

Time 

Example: 2004-01-25 13:49:50 

Field 12 

WindSpeed_ms_WVc(1) 

m/s 

Average Wind Speed 

Field 13 

WindSpeed_ms_WVc(2) 

Degrees 

Unit Vector Wind Direction 

Field 14 

WindSpeed_ms_Max 

m/s 

 

Field 15 

Baromete_KPa 

KPa 

 

Field 16 

RainYearly_mm 

mm 

 

 

A-5 

Summary of Contents for BMP5 Direct SDK

Page 1: ...BMP5 Direct SDK Revision 12 11 C o p y r i g h t 2 0 0 4 2 0 1 1 C a m p b e l l S c i e n t i f i c I n c ...

Page 2: ......

Page 3: ...hereby grants a license to use BMP5 Direct Binaries in accordance with the license statement above No ownership in Campbell Scientific Inc patents copyrights trade secrets trademarks or trade names is transferred by this Agreement Developer may use these BMP5 Direct Binaries to create as many applications as desired and freely distribute them Campbell Scientific Inc expects no royalties or any oth...

Page 4: ...om this Agreement will be settled in arbitration This Agreement sets forth the entire understanding of the parties and supersedes all prior agreements arrangements and communications whether oral or written pertaining to the subject matter hereof This Agreement shall not be modified or amended except by the mutual written agreement of the parties The failure of either party to enforce any of the p...

Page 5: ...edia or documentation Campbell Scientific will correct errors without charge by providing new media addenda or substitute pages If Campbell Scientific is unable to replace defective media or documentation or if it is unable to provide corrected software or corrected documentation within a reasonable time it will either replace the software with a functionally similar program or refund the purchase...

Page 6: ...which the SDK relies In no instance will Campbell Scientific be responsible for any costs or liabilities incurred by you or other third parties as a result of these changes There is no written or implied warranty provided with the SDK software other than as stated herein Developer agrees to bear all warranty responsibility of any derivative products distributed by Developer ...

Page 7: ...alogger Program Table Structure 1 1 2 SimplePB DLL Reference 2 1 2 1 OpenPort 2 1 2 2 ClosePort 2 1 2 3 OpenIPPort 2 2 2 4 CloseIPPort 2 2 2 5 GetClock 2 2 2 6 SetClock 2 3 2 7 GetValue 2 4 2 8 SetValue 2 5 2 9 GetData 2 6 2 10 GetDataHeader 2 7 2 11 GetCommaData 2 8 2 12 File_Send 2 9 2 13 GetAddress 2 10 2 14 GetStatus 2 11 2 15 GetTableNames 2 12 2 16 GetDLLVersion 2 13 2 17 GetLastResults 2 13...

Page 8: ......

Page 9: ... and to properly close the connection Starting the CORALIB3D DLL creates a working directory including log files by default in C Campbellsci SimplePB Once a connection is established additional commands can be used to access and administer the datalogger A datalogger program can be sent the clock can be checked or set values can be set and data can be collected Use a combination of the commands fo...

Page 10: ...Section 1 BMP5 Direct SDK Overview 1 2 ...

Page 11: ...munications engine to access a single datalogger The following commands are available in the SimplePB DLL 2 1 OpenPort Opens a COM port to allow a direct connection to the datalogger Syntax OpenPort com_port_no baud Parameters com_port_no Integer The COM port to open baud Integer The baud rate used by the COM port Return Codes 0 Integer Successful 1 Integer COM port failed to open or is already op...

Page 12: ...en communicating with the datalogger Return Codes 0 Successful 1 IP port failed to open or is already open 2 4 CloseIPPort Closes the previously opened IP port Syntax CloseIPPort Return Codes 0 Successful 1 IP port failed to close or was not open 2 5 GetClock Query the datalogger for its current date and time Syntax GetClock pakbus_address device_type return_data return_data_len Parameters pakbus_...

Page 13: ...turned from the datalogger Return Codes 0 Successful 1 Communication timed out 2 Port is not open Example of data returned by function call 14 12 35 04 16 2004 2 6 SetClock Sets the date and time of the datalogger to match the PC clock Syntax SetClock pakbus_address device_type return_data return_data_len Parameters pakbus_address Integer The PakBus address of the datalogger device_type Integer Th...

Page 14: ... table_name field_name 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 swath Integer The range within an indexed variable array to collect starting at the location described in the field_name parameter The requested swath must be within the...

Page 15: ...alogger Syntax SetValue pakbus_address device_type table_name field_name value 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_name String The name of the table in which the field will be set field_name String The field that will be set with the new value value ...

Page 16: ... 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 ...

Page 17: ...OfBounds 0 16 SkipScan 0 17 TrapCode 0 18 WatchDogCnt 0 19 ResetTables 0 20 BattVoltage 12 3943 2 10 GetDataHeader Query the datalogger for only the header information from one of its tables Syntax GetData pakbus_address device_type table_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 CR10XP...

Page 18: ...nteger The type of datalogger 1 CR200 2 CR10XPB CR23XPB CR510PB 3 CR1000 4 CR3000 5 CR800 CR850 table_no Integer The number for 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 a...

Page 19: ...CR1000 Std 05 050624 47178 2 12 File_Send Send a program to the datalogger Syntax File_Send pakbus_address device_type file_name 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 file_name String The path and file name of the program to be se...

Page 20: ...ture 19128 Serial Number 1031 PowerUp Progr CPU Program cr1 Compile Status Datalogger Program Running Program Name CPU Program cr1 Program Sig 32083 Compile Result Compiled in SequentialMode 2 13 GetAddress Query a datalogger for its PakBus address Syntax GetAddress device_type return_data return_data_len Parameters Device Integer Type of datalogger 1 CR200 2 CR10XPB CR23XPB CR510PB 3 CR1000 4 CR3...

Page 21: ..._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 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 Communication timed out 2 Port is not...

Page 22: ...ddress 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 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 Communication timed out 2 Cannot read t...

Page 23: ...returned from the DLL Return Codes 0 Successful Example of data returned by function call SimplePB DLL Version 2 0 2 2 3 0I 2 17 GetLastResults Retrieves the return_data results from memory for the previous function as a String This function is useful for developers that don t want to manage memory pointers Syntax GetLastResults Return Codes 0 Successful 2 18 FileControl Used to manage programs an...

Page 24: ...Compile and run 2 Run on power up 3 Make hidden 4 Delete file 5 Format device 6 Compile and run Preseve data if no table changed 7 Stop program 8 Stop program and delete 9 Make the specified file the operating system 10 Compile and run but do not change the run on power up program 11 Pause 12 Resume 13 Stop the running program delete associated files and mark as run now and on power up 14 Stop the...

Page 25: ...alogger are created and defined by the user in the datalogger program The tables in a PakBus datalogger will always contain a record number and timestamp followed by the data fields Table 1 Status Record No Time Stamp Data Field 1 Data Field 2 Data Field 3 19 Data Field 20 Table 2 User Defined RN 0 Time Stamp Data Field 1 Data Field 2 RN 1 Time Stamp Data Field 1 Data Field 2 RN 2 Time Stamp Data ...

Page 26: ...ng System Field 3 ProgName The name of the program running in the datalogger Field 4 ProgSig The signature of the running program Field 5 CalOffset Field 6 PakBusAddress The PakBus address of the datalogger 1 4094 Field 7 RfInstalled Radio Detected Field 8 RfNetAddr Valid Addresses are 0 63 Field 9 RfAddress Valid Addresses are 0 1023 Field 10 RfHopSeq Valid numbers are 0 6 Field 11 RfPwrMode RF1_...

Page 27: ...ogram Field Number Field Name Units Notes Field 1 Batt_Volt Volts Field 2 Temp Deg C CR200 Datalogger Program CR200 Series Declare Variables and Units Public Batt_Volt Temp Units Batt_Volt Volts Units Temp Deg C Define Data Tables DataTable Hourly True 1 DataInterval 0 60 Min Minimum 1 Batt_Volt False True FieldNames Battery_MIN Battery_Time Maximum 1 Temp False False Minimum 1 Temp False False En...

Page 28: ...rogram running in the datalogger Field 4 ProgSig The signature of the running program Field 5 CalOffset Field 6 PakBusAddress The PakBus address of the datalogger 1 4094 Field 7 RfInstalled Radio Detected Field 8 RfNetAddr Valid Addresses are 0 63 Field 9 RfAddress Valid Addresses are 0 1023 Field 10 RfHopSeq Valid numbers are 0 6 Field 11 RfPwrMode RF1_Sec Field 12 Rf_ForceOn Field 13 RfSignalLev...

Page 29: ...te from the Public table For example if Int_timer 15 min this table contains 15 min data Field Number Field Name Units Notes Field 1 BatVolt_V Volts Field 2 BatVolt_V_Min Volts Field 3 AirTemp_C_Avg Celsius Field 4 RH_Avg Percent Field 5 WindSpeed_ms_Avg m s Field 6 Solar_Avg W m 2 Field 7 ETo mm Field 8 AirTemp_C_Min Celsius Field 9 AirTemp_C_TMn Time Example 2004 01 25 13 49 50 Field 10 Max_AirT...

Page 30: ...SaveSite Set to one to save values to SiteVal table Field 2 Latitude Degrees Decimal format 41 deg 45 min 14 75 Field 3 Longitude Degrees Decimal format 41 deg 45 min 14 75 Field 4 Altitude_m Meter Field 5 Bpoffset_KPa KPa Field 6 Int_timer Minutes Field 7 RainReset Set to 1 to reset RainYearly_mm variable Field 8 BatVolt_V Volts Field 9 Solar W m 2 Field 10 AirTemp_C Celsius Field 11 RH Percent F...

Page 31: ......

Page 32: ...entific Canada Corp CSC 11564 149th Street NW Edmonton Alberta T5M 1W7 CANADA www campbellsci ca dataloggers campbellsci ca Campbell Scientific Centro Caribe S A CSCC 300 N Cementerio Edificio Breller Santo Domingo Heredia 40305 COSTA RICA www campbellsci cc info campbellsci cc Campbell Scientific Ltd CSL Campbell Park 80 Hathern Road Shepshed Loughborough LE12 9GX UNITED KINGDOM www campbellsci c...

Reviews: