Campbell Scientific CR10 CR10 Measurement and Control - Page 212
FF FF
View all Campbell Scientific CR10 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 212 highlights
APPENDIX C. BINARY TELECOMMUNICATIONS User Enters K CR Datalogger Echo K CR LF Time Minutes byte 1 Time Minutes byte 2 Time Tenths byte 1 Time Tenths byte 2 Flags byte Ports byte (if requested) Datal byte 1 Datal byte 2 Datal byte 3 Datal byte 4 Data2 byte 1 Data2bg.e 2 Data2 byte 3 Data2 byte 4 DataN byte 1 DataN byte 2 DataN byte 3 DataN byte 4 Final Storage Data bytes 0111111 1 binary byte 00000000 binary byte Signature byte 1 Signature byte 2 Time Minutes byte 1 is most significant. Convert from binary to decimal. Divide by 60 to get hours, the remainder is minutes. For example, 00000001 0101 1001 (01 59 HEX) is 345 decimal minutes or 5:45. Time Tenths byte 1 is most significant. Convert from binary to decimal. Divide by 10 to get seconds and tenths of seconds. For example, 00000001 11000110 (01 C6 HEX) is 454 decimal or 45.4 seconds. Thus the datalogger time for 01 59 01 C6 HEX is 5:45:45.4. The Flags byte expresses datalogger user flag status. The most significant bit represents Flag 8, and so on to the least significant bit which represents Flag 1. lf a bit is set, the user flag is set in the datalogger. The optional ports byte (currently on return if requested by a CR10 J command) expresses the datalogger port status. The most significant bit represents Port 8, and so on to the least significant bit which represents Port 1. For each input location requested by the J command four bytes of data are returned. The bytes are coded in Campbell Scientific, lNC. Floating Point Format. The format is decoded to the following: Sign(Mantis52*2(ExPonent)1 The Data byte 1 contains the Sign and the Exponent. The most significant bit represents the Sign; if reset the Sign is positive. Subtract 40 hex from the 7 least significant bits to obtain the signed exponent. Data bytes 2lo 4 are a binary representation of the mantissa with byte 2 the most significant and 4 the least. The mantissa ranges in value from 80 00 00 HEX (.5 decimal) to FF FF FF HEX (1 bit less than 1 decimal, 1-2'2\. As an example,4180 00 00 HEX = +(.5.2(+1)) =.5*2 = 1 decimal. Note Exceptions: 00 FF 00 00 FF FF 00 HEX= 0 decimal FF HEX= -99999 lf appropriately requested by a J command, Final Storage data, if any, will immediately follow the input location data. Refer to the datalogger manual for a description of how to decode Final Storage data in CSI's binary data format. Final Storage data will be limited to not more than 1024 bytes per K command. The K command data is terminated with 7F 00 HEX (a unique binary format code) followed by two signature bytes. Refer to the datalogger manual for the meaning and calculation of the signature bytes. The signature in this case is a function of the first time byte through the 7F 00 HEX bytes. Calculate the signature of the bytes received and compare with the signature to determine the validity of the transmission. C.2 FINAL STORAGE FORMAT CR10 data is formatted as either 2 byte LO Resolution or 4 byte Hl Resolution values. The first two bytes of an Output Array contain a code (FC Hex) noting the start of the Output and the Output Array lD, followed by the 2 or 4 byte data values. At the end of the data sent in response to the telecommunications F 2 byte signature is sent (see below). c-2