LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI and DAQ drivers

A program that runs on my development PC will not run on the same machine
with a different new disk with Win 98, NI DAQ 6.7 using an at.-mio16de10.
The program Should generate a single pulse of pulseWidth1 when receiving a
trigger pulse. Onthe PC with my development drive it generates the desired
pulse, on the same PC witht the new disk actualpulseWidth1 is zero and I
dont't see a pulse on the oscilloscope.

Oddly enough I unistalled DAQ in the new disk, installed it again specifying
installation of CVI libraries and now it works.
Shouldn't that option only be used when I have the CVI compiler on a
machine? Why would an end user need to do that?


Just in case it applies, here's a sample of my code:



daqError = DelayedPulse
GenConfig (device, strCounter, pulseDelay1,
pulseWidth1,
USE_INTERNAL_TIMEBASE,
START_COUNTING_ON_FALLING_EDGE,
NEGATIVE_POLARITY, &actualDelay1,
&actualpulseWidth1, &taskID);


..
..
..
...


/* Loop until operation is done. */
do {
iStatus = GPCTR_Watch(iDevice, ulGpctrNum, ND_DONE, &ulDone);
//Watch GPCTR
ProcessSystemEvents();
} while ((ulDone == ND_NO) && (iStatus == 0));

//show Message on Window
SetCtrlVal (panelHandle,PANEL_TESTMSG, "Waiting for DAQ Completion");
do {
DaqStatus = DAQ_Check(iDevice, &iDAQstopped, &ulRetrieved);
//Watch DAQ
ProcessSystemEvents();
} while ((iDAQstopped != 1) && (DaqStatus == 0));

iRetVal = NIDAQErrorHandler(DaqStatus, "DAQ_Check", iIgnoreWarning);

SetCtrlVal (panelHandle, PANEL_ACTUAL_PULSE_DUR
1, actualpulseWidth1);



..
0 Kudos
Message 1 of 2
(3,145 Views)
You're absolutely right, your end-users shouldn't have to choose to include support for LabWindows/CVI when installing NI-DAQ on their pcs to run your application. I'm not really sure what has caused this to work on your machine but here a few possibilities.

1) Did you create a distribution kit on your development machine for your app to be installed on the other machine, or did you just move the .exe to the other machine? All CVI applications require the run-time engine on the target machine in order to run, and it is very possible that including support for CVI in your NI-DAQ installation installed the CVI RTE for you. So in short, make sure you build a distribution kit with the required options to run the app on your target machine.

2) If you did create a
valid distribution kit and it still didn't run, I would suspect that there might have been something wrong with your NI-DAQ installation on the second machine and that choosing to include support for CVI didn't really do anything, it was just the proper reinstallation that made it work. One thing you should check is that in NI-MAX via your DAQ card's test panels that the device is working properly.

3) Also, when you are developing with NI-DAQ in CVI, make sure that you use the import library installed by NI-DAQ, which is automatically used whenever you put functions into your source from the Data Acquisition selection in the library menu. If you tried to use LoadLibrary and GetProcAddress to obtain references to functions in the DAQ dll there is a multitude of things that you could have done wrong to make it work on one machine and not another. So just make sure that you use the function panels in the Data Acquisition Library as the source of your function calls.

Jason F.
Ap
plications Engineer
National Instruments
www.ni.com/ask
Message 2 of 2
(3,145 Views)