Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to distribute vb6 app without installing NIDAQmx

I must be missing some concept or something (or I'm just dense...)   This is the problem: 

1.  I installed NiDAQ 7.4 on a clean system.  The software using the CWDAQ 6 ActiveX control works fine, it reports 12 channels (I'm using PC-DIO-96).  I do not use any configuration files in the Measurement & Automation Explorer, I just installed and it works.

2.  I then installed NiDAQ 8.3 on the same system.   The software using the NiDAQmx dll works fine.  Any software that uses the CWDAQ 6 Active X control reports there are 0 ports available on the card and fails.

3.  The Measurement & Automation Explorer shows both a NiDAQmx device and a Traditional device.  Both sets of test panels work.  Again, I do not use any configuration files in the Measurement & Automation Explorer, I just installed and it works.

I do not need to convert NiDAQ Traditional to NiDAQmx because the NiDAQmx works fine.   What I need to know is if it is possible to have 1 program use the CWDAQ ActiveX control to access the card, then quit that software and run some other software that uses NiDAQmx and have it access the same card?   I don't see any functions to assign ports to the legacy card, I can't delete the NiDAQmx device, and I'm not using any config files.

Thanks for your patience

Matt

0 Kudos
Message 11 of 17
(1,589 Views)
Hi Matt,

You can have one program use both drivers but not at the same time (since your are using the same card). If you run your application first and it uses the DAQmx driver, and you now want to use the Traditional DAQ driver, you need to reset the Traditional DAQ driver. To do this, open up Measurement and Automation Explorer, navigate to your Traditional DAQ device (My System >> Devices and Interfaces >> Traditional DAQ Devices), and then right-click the device and select Reset Driver.   After doing this, you can use your Traditional program and see your device. 

If you want to do this programmatically, see the KnowledgeBase How Do I Reset My DAQ Device From A Text Based Language?

Best Regards,
Jonathan N.
National Instruments
Message 12 of 17
(1,578 Views)
There is no option to reset the device in the Traditional devices, only in the NiDAQmx devices.  Is there anything special about the PC-DIO-96?
 
Matt
 
0 Kudos
Message 13 of 17
(1,577 Views)
Hi Matt,

The Reset Driver for Traditional NI-DAQ option is located under Devices and Interfaces » Traditional NI-DAQ Devices in the right-click menu.  So, you don't right-click on the device but rather you right-click on the category Traditional NI-DAQ Devices.  Remember that after using a device in Traditional NI-DAQ, you must reset the device before you can use that device in NI-DAQmx. 

Best Regards,
Jonathan N.
National Instruments
Message 14 of 17
(1,572 Views)

Thanks for your tremendous patience.  Unfortunately, resetting the device didn't change anything.  I reset then ran the demo digital input app, no ports.  I reset then rebooted, still no ports.  FYI, I am making sure the device number in the CWDAQ control is 1.

I'm not sure how to call Init_DA_Brds (VB says its an undefined function even if I add the NiDAQmx reference), but doubt it would help anyway since it should already have been called when the control was loaded.

Thanks again

Matt

0 Kudos
Message 15 of 17
(1,563 Views)
Hey Matt,

In looking at your issue this could be related to the way that the DAQ driver is loading resources.  There were some known issues with this in the past, and there is a knowledgebase that talks a little about how to possibly resolve this.  Try the suggestions in the KB:Unusual Error Messages Loading, Executing, or Debugging an Application When Using NI-DAQ for Wind...  Hope this helps!
Pat P.
Software Engineer
National Instruments
Message 16 of 17
(1,553 Views)

Ding, ding ding!  We have a winner!   The first command in that kb article solved the problem.  Now all 12 ports show up in the CWDAQ object.  Just for posterity:  it was a clean install of W2K with all current patches, VB6 sp 6a, nidaq mx 8.3, nidaq traditional 7.4. 

Thanks to everyone for helping to solve the problem!

Matt

0 Kudos
Message 17 of 17
(1,529 Views)