Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

NI ELVIS

how to give device no?
when using NI ELVIS function generator.
is thereis any way to detect device no..

Thanks in advance
Tandal
0 Kudos
Message 1 of 4
(9,268 Views)
Hello,

For assistance on programmatically determining device numbers, you may want to look at the LabVIEW Example that I have attached to this posting.

This code programmatically finds NI-DAQ devices and returns their name and device number to LabVIEW. This code would be useful in distributed applications when the programmer knows what type of hardware the user has but is unsure of the Device Number assigned to it in MAX. It could also be used as an error check in code on a computer that has its hardware configuration changed often to do different tests, or for any other purpose where the hardware configuration is unknown to the user before running the program.

It was written in LabVIEW 6.0.2, with NI-DAQ 6.9.3

Regards,

Jared A
0 Kudos
Message 2 of 4
(9,267 Views)
The only device number involved is that of the DAQ board. The FGen doesn't use a separate device number. From the attached screenshot, you'll see that the FGen Init.vi uses the DAQ device number as input, and creates an FGen Refnum as an output.
0 Kudos
Message 3 of 4
(9,267 Views)
Also, Traditional NI-DAQ VIs allow for you to obtain several pieces of information about your DAQ cards programmatically. In particular, see the VI called Get DAQ Device Information.vi. Although this will not return a device number, it might return other information that you mind find useful.

I am also attaching a sample VI to this posting that you may find useful. The purpose of this example is to determine all the device numbers numbers of your DAQ boards recognized in Measurement & Automation Explororer (MAX). It returns each of the devices in an array, along with an array of the device descriptions. You can the assign this to a ring control for the user to select which device to use. This will enhance your application because then it will not matter wh
at device number your board is. Nor do you have to have the user input figure out what device number to use. The user interface can be removed if you want to embed this into your application.

Best of luck.

Jared A
0 Kudos
Message 4 of 4
(9,267 Views)