08-14-2012 02:00 AM
Hei,
I have a NI USB-6225 DaqMx device which I have used a couple of years. When I started with LabVIEW I found the Daq Assistant the easiest way to measure voltage etc. with my Daq. Now my company has bought another NI USB-6225 DaqMx device and I have a big problem: The Daq Assistant in my old Vi's does not work with the new Daq. I understand why there is this problem, but I don't know how to solve it. I found this code on the forum that finds out which Daq is connected:
The problem is that Daq Assistant does not have an input for this, and it gives me an error if I try to run the code with a different device than the original I used when I created the code.
Is there a way to solve this, so I don't have to convert all the Daq Assistants into regular code?
Solved! Go to Solution.
08-14-2012 02:06 AM
Hi Even,
1) Create a new DAQ assistent instead of reusing the old ones. This should work (as long as your DAQmx version is supporting your device).
2) You're a active participant in this forum with quite some knowledge on LabVIEW so far. You still do all your DAQmx duties using the DAQ assistent? Good advice: Get rid of that...
08-14-2012 02:44 AM
Hei GerdW,
1) Even if I create a new Daq Assistant, it will only accept the device which was connected when I created the Daq Assistant. If I switch devices I get an error saying the Daq Assistant couldn't find the device I used when I created it.
2) Thanks for the compliment:) Well I haven't used the Daq Assistant for over a year now and I feel comfortable with creating the Daq code without the assistant. It just annoys me that I have to rewrite the old programs. Actually I find it quite weird that the Daq Assistant does not have the option for a Device Name input.
08-14-2012 02:53 AM
Hi Even,
to switch devices after the DAQ assistent was created you should use the same alias for the devices. As long as both old and new device provide the same specifications (regarding your DAQ assistent configuration) that should work...
08-14-2012 04:24 AM
That could work:) Do I change it in MAX? I have tried to rename them, but MAX tells me that they can't have the same name:
I tried to change them both to Dev1 and Dev2 with no success.
Can this be done with the .ini file or something to override MAX?
08-14-2012 04:27 AM - edited 08-14-2012 04:29 AM
08-14-2012 04:38 AM
I can do that, but I would like to use both devices. Not at the same time of course.
To clerify a bit more:
My company produce PCB cards for different customers. I use LabVIEW and the DAQmx to test the PCB cards before we send them to the customer. LabVIEW have become more and more useful for testing purposes, so we decided to buy another one. The DAQmx devices are used different places and is moved quite often due to small batches of PCB cards. I would like to use a random DAQmx at a random test without any problems, since they are the same model. But now some of my old programs don't except the new device (Dev2) because the DAQ Assistant in my old programs are created when I only had one DAQmx Device (Dev1). I would like that the DAQ Assistant could accept both devices and not only Dev1.
In my newer programs I don't use the DAQ Assistant and therefor I don't have this problem. I can always rewrite the old programs, but I would like not to.
08-14-2012 04:44 AM - edited 08-14-2012 04:45 AM
Hi Even,
two options:
1) as the old software is bound to "Dev1" you have to rename your new device to that alias and skip/rename the old (and missing) device.
2) Rewrite your old software to become not dependent on the alias name of the DAQ card...
It's your choice!
08-14-2012 04:52 AM
Hehe, well then I know what to do this week: Rewrite code!
Thanks for the help, GerdW