Skip to main content
Skip table of contents

Identifier Parameter [LJM User's Guide]

This page describes the Identifier parameter that is used in LJM_Open and LJM_OpenS.

Common Usage

  • To Open Any Device (Ignore Identifier):

  • Use the constant LJM_idANY or the string "ANY".

  • To Open By Serial Number:

  • Specify the serial number with numbers only. For example: "470010103".

  • To Open By IP Address:

  • Specify the decimal-dot IP address numbers and periods only. For example: "192.168.1.207".

  • To open by hexadecimal IP address, see "Hex vs. Decimal IP Address" below.

  • To Open By Device Name:

  • Specify the device name with letters and numbers only. For example: "My Number 1 Favorite DAQ Device".  Device names may be up to 49 characters in length, not including the null-terminator character, and must contain at least one letter (to prevent ambiguity between device name and serial number).

Network-Specific

Specifying the Port

TCP/UDP port can be specified by appending a colon and the port number. For example, if your Identifier is the IP address 192.168.1.42 and you want to connect to port 502, your Identifier would be "192.168.1.42:502".

Most users should not need to specify the TCP/UDP port.

Hex vs. Decimal IP Address

LJM assumes IP addresses to be decimal, unless they specifically look hexadecimal. To use a hex IP address, append "0x" to the IP address and write it with a dot between each byte.

For example, for the hexadecimal IP address C0A8012A can be passed as Identifier as "0xC0.A8.01.2A". (An Identifier like "C0.A8.01.2A" would be interpreted as a hex IP address because it contains letters, but it is highly recommended to use the "0x" prefix anyway.)

Any port specified will still be interpreted as a decimal number.

USB-Specific

Specifying the Pipe

For USB, pipe can be specified by appending a colon and the pipe number. For example, if your Identifier is the serial number 470010117 and you want to connect to pipe 0, your Identifier would be "470010117:0".

Most users should not need to specify the USB pipe.

No Device

If you don't have a device available, you can use LJM_DEMO_MODE (or the string "-2") to open a fake device. For more details, see Demo Mode.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.