Campbell BMP5 Informações Técnicas Página 1

Consulte online ou descarregue Informações Técnicas para Software Campbell BMP5. Campbell BMP5 System information Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir

Resumo do Conteúdo

Página 1 - BMP5 Transparent Commands

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

Página 2

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

Página 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

Página 4

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

Página 5

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

Página 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

Página 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

Página 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

Página 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

Página 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)

Página 11

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

Página 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

Página 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

Página 15

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

Página 16

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

Página 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

Página 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

Página 19

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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.

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 38 - BD AF FE 00 01 5A 89 BD

Section 3. The CR200 Datalogger 3-6

Página 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

Página 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

Página 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

Página 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

Página 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

Página 44 - Signatures

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

Página 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

Página 46

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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 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

Página 57

BMP5 Transparent Commands Table of Contents iv

Página 58

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

Página 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

Página 60

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

Página 61

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

Página 62

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

Página 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

Página 64

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

Página 65 - CR1000.dd

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

Página 66

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

Página 67

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

Página 68

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

Página 69

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

Página 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

Página 71

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

Página 72

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

Página 73

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

Página 74

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

Página 75

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

Página 76

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

Página 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

Página 78

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

Página 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

Página 80

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

Página 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

Página 82

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

Página 83

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

Página 84

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

Página 85

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

Página 86

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

Página 87

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

Página 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

Página 89

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

Página 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

Página 91

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

Página 92

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

Página 93

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

Página 94

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

Página 95

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

Página 96

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

Página 97 - Glossary

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

Página 98

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

Página 99

This is a blank page

Página 100

This is a blank page.

Comentários a estes Manuais

Sem comentários