Campbell BMP5 Technical Information

Stöbern Sie online oder laden Sie Technical Information nach Software Campbell BMP5 herunter. Campbell BMP5 System information Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken

Inhaltsverzeichnis

Seite 1 - BMP5 Transparent Commands

BMP5 Transparent CommandsRevision: 9/08Copyright © 2005-2008Campbell Scientific, Inc.Campbell Scientific Proprietary Information. Not to be distribut

Seite 2

Section 1. Introduction 1-4 1.4 Encoding and Decoding Packets Reserved characters must be acknowledged and quoted by the application before sending

Seite 3 - Table of Contents

Campbell Scientific Companies Campbell Scientific, Inc. (CSI) 815 West 1800 North Logan, Utah 84321 UNITED STATES www.campbellsci.com info@campbells

Seite 4

Section 1. Introduction 1-5 processing the packet information, the application should make the following checks: 1. Check the length of the packet.

Seite 5

Section 1. Introduction 1-6 This is a blank page.

Seite 6

2-1 Section 2. Protocols and Packet Types Packet types from three distinct protocols are described in this document. The SerPkt Protcol used to moni

Seite 7

Section 2. Protocols and Packet Types 2-2 Link-State Sub-protocol Packet Format: Name Type Description LinkState bits7..4 The packet type and the l

Seite 8 - 1.2 Packet Structure

Section 2. Protocols and Packet Types 2-3 Delivery Failure Message Format (MsgType 0x81): Name Type Description MsgType Byte Message type code (0x

Seite 9 - 1.3 PakBus Packet Headers

Section 2. Protocols and Packet Types 2-4 Name Type Description HopMetric Byte A code used to indicate the worst case interval for the speed of t

Seite 10 - 1.4.3 Signature Nullifier

Section 2. Protocols and Packet Types 2-5 Hello Request Message Format (MsgType 0x0e): Name Type Description MsgType Byte Message type code (0x0e)

Seite 11

Section 2. Protocols and Packet Types 2-6 Set Settings Command Message (MsgType 0x08): Name Type Description MsgType Byte Message type code (0x08)

Seite 12 - This is a blank page

Section 2. Protocols and Packet Types 2-7 As datalogger operating systems are revised, these settings may change or be removed. However, the datalog

Seite 14

Section 2. Protocols and Packet Types 2-8 Name Type Description MoreSettings Boolean Set to true by the datalogger when it has more settings to s

Seite 15

Section 2. Protocols and Packet Types 2-9 Name Type Description SettingsOutcome } Byte Specifies the outcome of the set attempt: 0x01: Setting va

Seite 16

Section 2. Protocols and Packet Types 2-10 DevConfig Set Setting Fragment Command (MsgType 0x12): Name Type Description MsgType Byte Message type

Seite 17 - 0x87, 0x08, 0x88)

Section 2. Protocols and Packet Types 2-11 Name Type Description Action Byte The action that should be taken by the datalogger 0x01: Commit the c

Seite 18

Section 2. Protocols and Packet Types 2-12 2.3.1 Please Wait Message (MsgType 0xa1) If the datalogger anticipates it will take more than the default

Seite 19

Section 2. Protocols and Packet Types 2-13 Clock Response Body (MsgType 0x97): Name Type Description MsgType Byte Message type code (0x97) TranNbr

Seite 20

Section 2. Protocols and Packet Types 2-14 Name Type Description FileOffset UInt4 Describes the byte offset into the file of this fragment. This

Seite 21 - 0x12 & 0x92)

Section 2. Protocols and Packet Types 2-15 Name Type Description RespCode Byte Response Code: 0x00 – Complete 0x01 – Permission denied 0x0d – Inva

Seite 22

Section 2. Protocols and Packet Types 2-16 Name Type Description FileCmd Byte Code that specifies the command to perform with the file: 0x01: Com

Seite 23

Section 2. Protocols and Packet Types 2-17 2.3.3.5 Get Programming Statistics Transaction (MsgType 0x18 & 0x98) The Get Programming Statistics t

Seite 24

i BMP5 Transparent Commands Table of Contents PDF viewers note: These page numbers refer to the printed version of this document. Use the Adobe Acrob

Seite 25

Section 2. Protocols and Packet Types 2-18 Data transaction and to describe what data should be returned when collecting data from a datalogger. 2.3.

Seite 26

Section 2. Protocols and Packet Types 2-19 In order to ensure the integrity of this table information, the application should calculate a signature o

Seite 27

Section 2. Protocols and Packet Types 2-20 When a response comes in from this command, the fields after RespCode exist only if the response indicates

Seite 28

Section 2. Protocols and Packet Types 2-21 Table definitions may be sent from the datalogger to the application prior to the first transmission of a

Seite 29 - 2.3.4.1 Table Definitions

Section 2. Protocols and Packet Types 2-22 One-Way Data Message Body (MsgType 0x14): Name Type Description MsgType Byte Message type code (0x14) T

Seite 30

Section 2. Protocols and Packet Types 2-23 2.3.5 Get/Set Values Transaction (MsgType 0x1a, 0x9a, 0x1b, & 0x9b) These transactions are used to re

Seite 31

Section 2. Protocols and Packet Types 2-24 Set Values Command Body (MsgType 0x1b): Name Type Description MsgType Byte Message type code (0x1b) Tra

Seite 32

3-1 Section 3. The CR200 Datalogger The CR200 is low-cost, rugged, and versatile measurement device. This small datalogger contains a CPU and both d

Seite 33

Section 3. The CR200 Datalogger 3-2 An example of a “Ready” response from a datalogger with an address of 1 to an application with an address of 4094

Seite 34

Section 3. The CR200 Datalogger 3-3 • PakBusAddress: The PakBus address of the datalogger If the names of the available settings are not known, all

Seite 35

BMP5 Transparent Commands Table of Contents ii 2.3.4 Data Collection and Table Control Transactions ...2-17 2.3.4.1 Table Definit

Seite 36

Section 3. The CR200 Datalogger 3-4 3.7 Creating CR200 Programs and the CR200 Compiler The CR200 datalogger must contain a valid program in order to

Seite 37 - Commands from the CR200

Section 3. The CR200 Datalogger 3-5 3.7.2 Sending a Program to the CR200 The compiled datalogger program is sent to the CR200 with the File Download

Seite 38 - BD AF FE 00 01 5A 89 BD

Section 3. The CR200 Datalogger 3-6

Seite 39 - 04 FA BD

Section 3. The CR200 Datalogger 3-7 Use the File Control Command with a FileCmd parameter of 0x08 to stop the program currently running on the datalo

Seite 40 - Compiler

Section 3. The CR200 Datalogger 3-8 latency varies across different communication mediums but the application should be aware of this variability and

Seite 41

Section 3. The CR200 Datalogger 3-9 Response packet. Calculate the signature by starting with the first byte of the FieldName parameter and ending a

Seite 42

Section 3. The CR200 Datalogger 3-10 3.10.3 Collecting Tables and Specific Records Within the Collect Data Command message there are many options f

Seite 43 - 3.7.4 Handling Rejection

Section 3. The CR200 Datalogger 3-11 3.10.4 Getting Values from Specific Records Use either the Collect Data Command or the Get Values transaction w

Seite 44 - Signatures

Section 3. The CR200 Datalogger 3-12 This is a blank page.

Seite 45 - 00 3C 00 00 C7 DF BD

4-1 Section 4. The CR1000 Type Datalogger The CR1000 type datalogger (CR1000, CR3000, and CR800) is a rugged and versatile measurement device. This

Seite 46

BMP5 Transparent Commands Table of Contents iii 4.11 Collecting Files from the Datalogger... 4-11 4.12

Seite 47

Section 4. The CR1000 Type Datalogger 4-2 BD AF FE 00 01 5A 89 BD The datalogger may not be aware that a connection has been established from the PC

Seite 48

Section 4. The CR1000 Type Datalogger 4-3 settings for this and other operating systems by reviewing the included Device Description File in Appendix

Seite 49 - Establishing a Baud Rate

Section 4. The CR1000 Type Datalogger 4-4 4.7 Sending a Program to the Datalogger The CR1000 type datalogger accepts text programs written with CRBa

Seite 50

Section 4. The CR1000 Type Datalogger 4-5 Use the File Download Command message to send the new program file to the datalogger. The new program fil

Seite 51 - 4.6 The Program Structure

Section 4. The CR1000 Type Datalogger 4-6 files, and start the new program on the datalogger. Check the File Control Response. If the RespCode retu

Seite 52

Section 4. The CR1000 Type Datalogger 4-7 4.7.4 Deleting Program Files When loading a new datalogger program to the CR1000 type datalogger, the old

Seite 53

Section 4. The CR1000 Type Datalogger 4-8 4.9 Getting Table Definitions Table definitions are retrieved from the CR1000 type datalogger with the Fil

Seite 54 - 4.7.2 Handling Rejection

Section 4. The CR1000 Type Datalogger 4-9 The response packet from the datalogger will contain data that must be parsed. The application uses table

Seite 55

Section 4. The CR1000 Type Datalogger 4-10 4.10.4 Getting Values from Specific records Use either the Collect Data Command or the Get Values transa

Seite 56 - 4.10 Retrieving Data

Section 4. The CR1000 Type Datalogger 4-11 4.11 Collecting Files from the Datalogger The CR1000 type datalogger can store files in memory for future

Seite 57

BMP5 Transparent Commands Table of Contents iv

Seite 58

Section 4. The CR1000 Type Datalogger 4-12 This is a blank page.

Seite 59

A-1 Appendix A. Data Types Summary Name Code Size Description Byte 1 1 One-byte unsigned integer UInt2 2 2 Two-byte unsigned integer (MSB first

Seite 60

Appendix A. Data Types Summary A-2 This is a blank page.

Seite 61

Appendix B. Calculating Packet Signatures and the Signature Nullifier The CSI signature algorithm, when applied to a block of data, produces a unique

Seite 62

Appendix B. Calculating Packet Signatures and the Signature Nullifier B-2 uint2 new_seed = (sig << 1)&0x1FF; byte null1; uint2 new_s

Seite 63

C-1 Appendix C. Device Description Files Applications that need to deal with device settings must reference a library of device description XML files

Seite 64

Appendix C. Device Description Files C-2 <setting id="2" name="Station Name"> <string name="Station Name&

Seite 65 - CR1000.dd

Appendix C. Device Description Files C-3 <setting id="10" name="Baud Rate SDC7"> <enumi4 name="Baud Rate SDC7

Seite 66

Appendix C. Device Description Files C-4 <setting id="23" name="Beacon Interval COM2"> <uint2 name="Beaco

Seite 67

Appendix C. Device Description Files C-5 <setting id="34" name="Verify Interval COM3"> <uint2 name="Verify I

Seite 68

1-1 Section 1. Introduction This document outlines the structure for a fundamental subset of protocols and packet types used to communicate directly

Seite 69

Appendix C. Device Description Files C-6 <setting id="55" name="IP Port"> <uint2 name="IP Port">

Seite 70

D-1 Appendix D. JAVA Example Code import java.io.*; import java.util.*; import java.net.*; /** * A simple PakBus command line application * that de

Seite 71

Appendix D. JAVA Example Code D-2 /** * Application main */ public static void main(String[] args) { try { socket = new

Seite 72

Appendix D. JAVA Example Code D-3 case (0x9d) : // Response for Upload Command System.out.println("

Seite 73

Appendix D. JAVA Example Code D-4 case '8': System.out.println("Getting 24 hour data");

Seite 74

Appendix D. JAVA Example Code D-5 //SetupDl gets the PakBusAddress by using the GetCommand procedure public static void SetupDL() { Ge

Seite 75

Appendix D. JAVA Example Code D-6 /** * Calculates the signature for a byte. */ static char calcSigForByte(byte buff, char seed) {

Seite 76

Appendix D. JAVA Example Code D-7 send_byte((byte)0xBD); // first synch byte for(int i = 0; i < frame.length; ++i)

Seite 77

Appendix D. JAVA Example Code D-8 /** * GetClock will create the packet to get a clock value from * the DL. Thecode that is commented ou

Seite 78

Appendix D. JAVA Example Code D-9 if(table != null) { // form the command message to poll the table CreateH

Seite 79

Section 1. Introduction 1-2 1.2 Packet Structure The first and last bytes are 0xbd to mark the beginning and end of a packetLink State 4 bitsDestina

Seite 80

Appendix D. JAVA Example Code D-10 catch(Exception e) { flush_io_log(e.toString());

Seite 81

Appendix D. JAVA Example Code D-11 /** * This procedure allows the clock to receive the clock from the logger * and then make the calculat

Seite 82

Appendix D. JAVA Example Code D-12 static void ParseTblDefs() { try { int logger_resp = in_packet.read_byte(); if

Seite 83

Appendix D. JAVA Example Code D-13 static void ParsePublicTbl() { try { int logger_resp = in_packet.read_byte();

Seite 84

Appendix D. JAVA Example Code D-14 table != null) { System.out.println("Querying for more data at reco

Seite 85

Appendix D. JAVA Example Code D-15 private static void log_io(byte val, boolean transmitted) { if(io_last_tx != transmitted && io

Seite 86

Appendix D. JAVA Example Code D-16 /** <!-- elapsed() --> * Returns milliseconds elapsed since start or reset. * * @

Seite 87

Appendix D. JAVA Example Code D-17 public byte link_state; public short dest_address; public byte expect_more_code; public by

Seite 88

Appendix D. JAVA Example Code D-18 // the message type and transaction number may not be present. // We will set them to 0 and then look for them

Seite 89

Appendix D. JAVA Example Code D-19 public void add_short(Short val) { byte[] temp = new byte[2]; temp[0] = (byte)((val

Seite 90

Section 1. Introduction 1-3 To ensure that a SerSyncByte doesn’t appear inadvertently within the message data, it must be recognized and quoted withi

Seite 91

Appendix D. JAVA Example Code D-20 public int read_int() throws Exception { byte[] temp = read_bytes(4); int rtn = (((i

Seite 92

Appendix D. JAVA Example Code D-21 public byte[] to_link_state_packet() { // form the packet header + body (less the framing cha

Seite 93

Appendix D. JAVA Example Code D-22 read_only = false; column_name = msg.read_string(); System.out.println("Reading

Seite 94

Appendix D. JAVA Example Code D-23 columns = new Vector(); while(field_type != 0) { ColumnDef column = new Col

Seite 95

Appendix D. JAVA Example Code D-24 switch(column.field_type) { case type_uint1:

Seite 96

Appendix D. JAVA Example Code D-25 case type_ascii: { // we need to read off all of the possible bytes for the //

Seite 97 - Glossary

Appendix D. JAVA Example Code D-26 // csitype codes public static final byte type_uint1 = 1; public static final byte type_uint2 =

Seite 98

Glossary ASCII: Acronym for the American Standard Code for Information Interchange that represents the English characters as numbers, with each chara

Seite 99

This is a blank page

Seite 100

This is a blank page.

Kommentare zu diesen Handbüchern

Keine Kommentare