From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

New device not detected programmatically in Labview

Hi I have a problem. I received a new DAQmx device.
There's a question I would like to ask.
The physical channel selection constant I have created in LV after the device is detected, installed and run properly
That constant shows the correct device so that I can choose input pin on the card, like dev1/ai0, dev1/ai1 and so on in MAX.

However, when the card is changed, and it is installed properly and run correctly.now it appears as dev2/ai0, dev2/ai1 in MAX. The old card ia taken out.

So when I open the program, the physical channel selection shows dev1, instead of dev2 as the card for dev is not in pc anymore.

So i am wondering if I build and created application, then there's a change of cards, how the program detect the new card  and update the constant accrodingly programmatically?

I am using labview 7.1

Clement
0 Kudos
Message 1 of 4
(2,379 Views)
Hi astroboy,

The first thing that comes to my mind, is that your program would be more flexible with a control instead of a constant connected to "physical channel". Then develop a configuration VI that let the user choose the DAQmx settings before you create the DAQmx tasks.

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 4
(2,375 Views)

3 ways to handle this

1. Force the card to be a specific device name "dev1", "dev2" ... Rigid solution places workload on user/ system configurer, but requires no software mods.

2.  Use daq channel control, this will self populate with acceptable channels, requires little work but also allows the user to unnecessarily change working channels.  If you choose this option use the filtering option to allow for the fewest choices to minimize chance for an invalid config.

3.  Scan the system using the DAQmx system property node-> devices property.  You can get an array of devices in the system,  a little logic will be able to find an appropriate (depending on the ambiguity in the config) device to use. 

 

None of these are fool proof since the permutations of possible devices in a system are endless but you can minimize the possibility. 

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 4
(2,367 Views)
Hi Paul and Titou.
Thanks for your advice

 Clement
0 Kudos
Message 4 of 4
(2,348 Views)