C# LabJack U3 Serial Number is 0 : Solved | LabJack
 

C# LabJack U3 Serial Number is 0 : Solved

2 posts / 0 new
Last post
Andrea
Andrea Eastham's picture
C# LabJack U3 Serial Number is 0 : Solved

Hello 

I have tried the code on 3 Labjack's I have, they all returned 0 as serial number, I need to identify the Labjack using the serial number 

can you please advice what I am doing wrong here is the basic code I used :

 

var DAQ = new U3(LJUD.CONNECTION.USB, "0", true);
 Console.WriteLine(DAQ.serialnumber);

Thank you   I have figured it out using the follwing command :

 var DAQ = new U3(LJUD.CONNECTION.USB, "0", true);
double  SerialNumber=0;

 U3.eGetSS(DAQ.ljhandle, "LJ_ioGET_CONFIG", "LJ_chSERIAL_NUMBER", ref SerialNumber, 0);

 

that's worked fine.  

Thank you

 

 

LabJack Support
labjack support's picture
The U3 constructor only opens

The U3 constructor only opens the device, but doesn't get the device specific info such as the serialnumber automatically. To get the device info for the U3 object, call the u3Config method and then check the serialnumber:

var DAQ = new U3(LJUD.CONNECTION.USB, "0", true);
DAQ.u3Config();
Console.WriteLine(DAQ.serialnumber);

As you resolved it, you can also read it explicitly from the device with a LJ_chSERIAL_NUMBER get request.