12-13-2007 09:20 AM
12-13-2007 03:35 PM
12-16-2007 10:08 PM
Hello Mark,
The fact that your code worked for a long time previously and then stopped is
puzzling. In order to get to the root of what is happening, I have some
questions for you:
What is the error (and error code, if possible) you are seeing?
Has anything changed with your test setup recently? For example, adding
additional hardware, installing new drivers (even unrelated ones), or upgrading
can make changes which could cause an error.
What happens if you reset your driver in Measurement and Automation Explorer
(MAX)? If you right click on Traditional NI-DAQ (Legacy) Devices
under My System»Devices and Interfaces and select Reset Driver for
Traditional NI-DAQ, do you see any error?
Can you open a test panel in MAX? You can try this by right clicking your
device under Traditional NI-DAQ (Legacy) Devices and selecting Test
Panel.
Do you try call any calibrate functions prior to the one that causes the error?
I am unsure as to why the program runs correctly on a "freshly booted
PC" but then stops working. That behavior tells me that there may be
an issue with clearing the resources after you are done with the program.
Does the program run the first time always? Or does it only run on a PC that
was very recently restarted?
Please post back with as much information as you can, the more the
merrier.
12-19-2007 06:48 AM
When the application starts, we use two commands to verify that the board is resent and functioning. These always work.
CWDAQ1.GetDAQDeviceInfo(1, cwGetDeviceTypeCode, Info)
CWDAQ1.ResetDAQDevice(1)
Within the program, we occassionally "kick" the board. This is a rare act of desperation that occasionally works:
CWDAQ1.ResetDAQDevice(1)
CWDAQ1.CalibrateESeries(1, cwCalESeriesOpSelfCalibrate, cwCalESeriesNIDAQSet, 1#)
CWDAQ1.ResetDAQDevice(1)
The CalibrateESeries is the step that fails. And the reset function via the MAX did not fix it. (presumably, it was just doing a ResetDAQDevice anyway).
This problem never happened over the last 10+ years of using E-series boards (16 and 64 channel 12 bit ISA and PCI boards). But recently I discovered it on one machine and then on another machine.
As an aside, we used NI-DAQ 6.9.x up un til this year. We are now using 7.x traditional drivers. It is possible that the problem occured with the new drivers.
Finally, we are using Windows XP-Pro with updates.
12-20-2007 10:37 AM
Hello again Mark,
Since you are running Traditional DAQ code before the error occurs, this tells
me that this issue isn't with the driver as a whole. If the issue was an
upgrade problem, I would expect none of the Traditional DAQ functions to
work. In order to determine what is going on, I need to know what error
you are seeing. Both the error code and the error text would help significantly.
Also, have you tried to run this program with different cards? You say
that you have been using this code on many cards successfully, which tells me
that the issue may lie with the hardware.
You also mention that you found this behavior on more than one computer.
Is the code running correctly on a third computer? This would also help me
figure out if it is a code issue, a driver issue, or a hardware issue.
This information should allow me to suggest some possibilites for the cause of the error.
Merry Christmas,
12-21-2007 10:06 AM