Low-Level Code Problem | LabJack

Wednesday June 3rd 2020
 Support: ✔ LabJack engineers available through email and chat. Shipping: ✔ We are processing and shipping all orders. Stock: ✔ 51 of 56 products are in stock. More details. Supply Chain: ✔ Minor impacts. More details.

# Low-Level Code Problem

2 posts / 0 new
RGrunwell
Low-Level Code Problem

Hi-

I have been trying to use low-level commands to communicate with a U3 and am running into something I cannot understand.

I am attempting to send the AIN command for measuring the internal temperature. The data sent is:
0x39 F8 02 00 3E 00 00 01 1E 1F

The first byte is the 8-bit checksum

This translates to Command sequence F8 02 00 (Destination=1, Cmd Num=15 -> F, DataWords/Ext=0 -> 1 1111 000 -> F8; Number of Data Words = 2;ExtCmdNum = 0)

The next two bytes (3E 00) are the 16-bit checksum

The next 00 is the Echo number

IOType = 01

The next two bytes specify the channel and sampling options. 30 decimal (0x1E) is the internal temperature sensor, and 31 decimal (0x1F) is the internal reference.

This is sent, and the response is:
0xB8 F8 03 00 BC 00 00 00 00 60 5C 00

The first is again the 8-bit checksum (which checks out)

The next three bytes are the Command sequence F8 03 00 (Destination=1, Cmd Num=15 -> F, DataWords/Ext=0 -> 1 1111 000 -> F8; Number of Data Words = 3;ExtCmdNum = 0)

The next is unused = 0x00

The next two bytes (BC 00) are the 16-bit checksum (which checks out)

The ErrorCode is 00

The ErrorFrame is 00

The Echo is 00 (I have verified other numbers as well)

Data: 0x60 5C 00

This is where I'm having troubles. Although warm where I am, I cannot believe the temperature is 0x5C60 on any scale!

What am I doing wrong?

Thanks!

LabJack Support