Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing MAX assignment errors

  This isn't really a DAQ problem, it is a problem with the Measurement & Automation Explorer (MAX), but there isn't a discussion group with that header and I figure that experts with DAQ cards will know how to handle this problem.

 

  I have a USB-6341 assigned as Dev1.  When it is not attached to the system and I start the application which talks to it, MAX assigns a virtual device named Dev1.  When I re-connect the DAQ card, it gets assigned as Dev2 (or anything other than Dev1 if Dev1 already exists, even as a virtual device).

 

  I can only fix it manually.  How can I have my application search for the actual hardware device and make sure it is assigned as Dev1?

 

Thanks in advance,

 

Jeff

 

0 Kudos
Message 1 of 10
(3,545 Views)

There are various ways to query what is connected to the controller through DAQmx driver calls. It depends on the language you are programming in but basically you find out what hardware in connected and then look for the serial number of the instrument you are trying to find.  The serial number will be a unique identifier and will not change.  Once you find it, you then set a variable to the name and use it.  You want to also try naming the peripheral something other then the default /dev1 and see if that helps it keep its name once re-connected.

0 Kudos
Message 2 of 10
(3,535 Views)

I am using LabVIEW 2010 and the software is written to reference 'Dev1'.  I know I could rename Dev1 and the references to it would change, but when the software is started without the hardware being connected, LabVIEW or MAX will create a simulated device of the same name, right?

 

What I need to do is find the hardware (by its serial number will be fine, but the ability to differentiate between real and simulated would be better) and, if necessary, delete the simulated device reference and rename the hardware device reference.

 

Jeff

 

0 Kudos
Message 3 of 10
(3,523 Views)

I don't remember MAX creating simulated devices on its own but I could be wrong (or I just never noticed). If these simulated devices are being created automatically and they are being created with the default name of /dev1, I would definitely rename the actual device to something more descriptive (DAQ1, USB6008, etc).  That would make it easier to find the correct hardware.  Also, the simulated devices have a serial number of 0x00 so you can use that to determine real from imaginary.   Can your software run  without the hardware being connected (i.e.. You can run it do do some tasks and only need the hardware to do the complete task) or is it non-functional without the hardware?  In either case, it would be good system design to add some intelligence to the hardware discovery section of your code to find the real hardware and ignore the simulated.

0 Kudos
Message 4 of 10
(3,512 Views)

@Tom Sedlack wrote:

In either case, it would be good system design to add some intelligence to the hardware discovery section of your code to find the real hardware and ignore the simulated.


  That is precisely what I want to do, and why I asked for help doing it in this forum.  I can't find anything in my two text books that addresses the issue and LV's Help section leaves a lot to be desired.

 

 

Jeff

 

0 Kudos
Message 5 of 10
(3,502 Views)

Jeff, 

 

MAX does not automatically simulate devices on its own. 

 

Also, LV can tell if a device is simulated. There is a knowledge base article on it here

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 6 of 10
(3,496 Views)

Katie:

 

The link you posted is bad.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 7 of 10
(3,489 Views)

Check here on how to read the serial numbers of DAQ devices. This should give you a good start.  I haven't tested this as I don't use NI hardware much anymore.

0 Kudos
Message 8 of 10
(3,482 Views)

  The information in that link does not work in LV 2010.  Attempting to load the supplied VI fails as the Get DAQ Device Information VI cannot be found.

 

 

0 Kudos
Message 9 of 10
(3,477 Views)

My apologies. Try this link. 

 

Katie

Katie Collette
National Instruments
0 Kudos
Message 10 of 10
(3,466 Views)