Table 4-1 lists errors which are specific to a request. For example, LJE_INVALID_CHANNEL_NUMBER. If this error occurs,
other requests are not affected. Table 4-2 lists errors which cause all pending requests for a particular Go() to fail with the same
error. If this type of error is received the state of any of the request is not known. For example, if requests are executed with a
single Go() to set the AIN range and read an AIN, and the read fails with an LJE_COMM_FAILURE, it is not known whether the
AIN range was set to the new value or whether it is still set at the old value.
5 - Low-level Function Reference
This section describes the low-level functions of the UE9. These are commands sent over Ethernet or USB directly to the
processors on the UE9. The Ethernet commands can all be sent using TCP, except for DiscoveryUDP. All commands, except
stream related commands, can also be sent using UDP.
The majority of Windows users will use the high-level UD driver rather than these low-level functions.
5.1 - General Protocol
Following is a description of the general UE9 low-level communication protocol. There are two types of commands:
Normal: 1 command word plus 0-7 data words.
Extended: 3 command words plus 0-125 data words.
Normal commands have a smaller packet size and can be faster in some situations. Extended commands provide more
commands, better error detection, and a larger maximum data payload.
Normal command format:
Checksum calculations:
All checksums are a “1’s complement checksum”. Both the 8-bit and 16-bit checksum are unsigned. Sum all applicable bytes in an
accumulator, 1 at a time. Each time another byte is added, check for overflow (carry bit), and if true add one to the accumulator.
In a high-level language, do the following for the 8-bit normal command checksum:
1. Get the subarray consisting of bytes 1 and up.
2. Convert bytes to U16 and sum into a U16 accumulator.
3. Divide by 2
8
and sum the quotient and remainder.
4. Divide by 2
8
and sum the quotient and remainder.
In a high-level language, do the following for an extended command 16-bit checksum: