DQ4000-HS Output Formats

Commands

Two commands are available to read sensor values from a DQ-4000-HS interface unit . The commands are case insensitive. Both commands will stream the output continuously, Simply send a carriage return (<CR>) to stop the output.

o0x0 (oh-zero-x-zero) Command

About 100 readings/sec of data output

This command outputs the load values from the 4 individual channels as well as their total. The values are separated by space characters and are specified in millipounds. These are output in decimal. The print statement for this command uses the C-language format:

%12ld %12ld %12ld %12ld %12ld

For example, the output

-193 -4731 -3430 2538 -5816

indicates load readings of -0.193 lb., -4.731 lb., -3.43 lb. and 2.538 lb. respectively for channels 1,2,3 and 4 and a total load of -5.816 lb.

A sample screen shot with 2 load cells connected to channels 1 and 2 is shown below.

o0x0 output

o0h0 (oh-zero-h-zero) Command

About 650 readings/sec of data output

This command outputs the load values from the 4 individual load cells in hexadecimal format. The total value is not printed to maintain as high a data output rate as possible. The values are separated by a single space character. To decode the hexadecimal values easily when writing your own programs,

. For each value, a print width of 7 is used

For example, the above readings will be displayed as

-0000C1 -00127B -000D66  0009EA

In Microsoft Excel, you can use the formula DEC2HEX and HEX2DEC to convert between the 2 formats. Take care to exclude the –ve sign when applying these formulas and only then to multiply the converted values by -1.

In Microsoft.NET (C# or Visual Basic.NET) you can use the following statement:

decimal_value = Convert.ToInt32(hex_value_string,16)

Note: High data output rate does not necessarily imply a high dynamic response. To improve the dynamic response, please set CPS 8, CSS 1 for each channel. This can be done by using Hyperterminal (or any other terminal program) by typing the following commands in sequence:

         S1
        CPS 8
        CSS 1
        S2
        CPS 8
        CSS 1
        S3
        CPS 8
        CSS 1
        S4
        CPS 8
        CSS 1
        SAVE
        S0
        

A sample screen shot with 2 load cells connected to channels 1 and 2 is shown below.

o0h0 output