Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Get device serial number via .NET

Hi
 
I would like to get the serial number of the device in the pci slot.
I was trying to use the NationalInstruments.DAQmx.Device class and the
serialnumber property.
 

Private

NIDevice As NationalInstruments.DAQmx.Device

TheSourceID = NIDevice.SerialNumber

The problem is that I don't know how to point to the correct pci slot to get the serial number of the device. I cannot find a function which allow me to set the pci slot number before I can read the SerialNumber.

Please advice

Thanks

0 Kudos
Message 1 of 6
(5,350 Views)
Hi Chee,

The following knowledge base article should answer your question:
Programmatically Query the Serial Number of a DAQ Device

You don't need the slot number. Just provide the daq device name to the function.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 6
(5,341 Views)
The article is based on LabView. I am using .NET and  DAQmxGetDevSerialNum does not exist in .NET.

I have tried to look for it for it is not there. Please advice.
0 Kudos
Message 3 of 6
(5,340 Views)

Hi Chee,

You would say something like:

NationalInstruments.DAQmx.Device myDevice = DaqSystem.Local.LoadDevice("dev1");
long serialNum;

serialNum = myDevice.SerialNumber;

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 4 of 6
(5,334 Views)

I have a cfp-180x I have tried to use DAQmx but I have the following errors:

 

Error 3 The type or namespace name 'DAQmx' does not exist in the namespace 'NationalInstruments' (are you missing an assembly reference?)

 

Error 4 The name 'DaqSystem' does not exist in the current context 

 

Do you have sugggestion?

0 Kudos
Message 5 of 6
(3,708 Views)

@karpediemnowUSA wrote:

I have a cfp-180x I have tried to use DAQmx but I have the following errors:

 

Error 3 The type or namespace name 'DAQmx' does not exist in the namespace 'NationalInstruments' (are you missing an assembly reference?)

 

Error 4 The name 'DaqSystem' does not exist in the current context 

 

Do you have sugggestion?


Start your own thread.

0 Kudos
Message 6 of 6
(3,698 Views)