Fluke 2620A user manual Binary Upload of Logged Data LOGBIN? 2625A only, Appendix E, Introduction

Models: 2625A 2620A

1 197
Download 197 pages 4.31 Kb
Page 181
Image 181

Appendix E

Binary Upload of Logged Data (LOG_BIN?) (2625A only)

Introduction

The LOG_BIN? <index> query can be used to quickly upload logged data from a 2625A. The response is a single ASCII string, which encodes the raw binary data stored at the specified <index> position. The logged data is also retained in the 2625A.

The measurement data returned from the 2625A is in the (binary) IEEE single-precision floating point format. Making use of this data can be difficult and is very machine dependent. A working example, using the C programming language on an IBM PC, is provided in this appendix. This example uses a pre-computed LOG_BIN?response string, and checks that the conversion process works as expected.

Two steps are required in adapting the LOG_BIN? response string for use with your computer.

First, you must decode the ASCII string into binary data. For example, one possible LOG_BIN? response string is:

LOG_BIN? 1 42@Y40BA00oo000007o0001oP000?h000 =>

This ASCII string represents the following binary (hex) data:

10 24 29 10 04 91 00 0f ff

00 00 00 00 7f c0 00 00 7f

80 00 00 3f 80 00 00 00 00

Second, you must convert this binary data into valid floating point numbers for your underlying computer architecture.

Decoding the ASCII String

The ASCII response string contains six bits of raw data for each ASCII character, offset from ASCII ’0’ (0x30 hex, 48 decimal). Therefore, the conversion process subtracts 48 from the integer value of each character, then shifts it into place. Each set of four ASCII characters form three bytes of raw data. The number of bytes of raw data depends on the number of channels for the scan. The following C code converts a LOG_BIN? response string into a byte array:

E-1

Page 181
Image 181
Fluke 2620A Binary Upload of Logged Data LOGBIN? 2625A only, Appendix E, Decoding the ASCII String, Introduction