Campbell BMP5 Technické informace

Procházejte online nebo si stáhněte Technické informace pro Software Campbell BMP5. Campbell BMP5 System information Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk

Shrnutí obsahu

Strany 1 - BMP5 Transparent Commands

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

Strany 2

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

Strany 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

Strany 4

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

Strany 5

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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)

Strany 11

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

Strany 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

Strany 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

Strany 15

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

Strany 16

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

Strany 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

Strany 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

Strany 19

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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.

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

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

Section 3. The CR200 Datalogger 3-6

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 44 - Signatures

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

Strany 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

Strany 46

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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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

Strany 57

BMP5 Transparent Commands Table of Contents iv

Strany 58

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

Strany 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

Strany 60

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

Strany 61

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

Strany 62

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

Strany 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

Strany 64

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

Strany 65 - CR1000.dd

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

Strany 66

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

Strany 67

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

Strany 68

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

Strany 69

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

Strany 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

Strany 71

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

Strany 72

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

Strany 73

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

Strany 74

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

Strany 75

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

Strany 76

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

Strany 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

Strany 78

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

Strany 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

Strany 80

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

Strany 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

Strany 82

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

Strany 83

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

Strany 84

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

Strany 85

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

Strany 86

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

Strany 87

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

Strany 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

Strany 89

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

Strany 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

Strany 91

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

Strany 92

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

Strany 93

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

Strany 94

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

Strany 95

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

Strany 96

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

Strany 97 - Glossary

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

Strany 98

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

Strany 99

This is a blank page

Strany 100

This is a blank page.

Komentáře k této Příručce

Žádné komentáře