02-27-2009 09:57 AM
Has anybody used Traditional DAQ in Visual C Sharp? I'm trying to do change detection digital input and burst mode digital output with a PCI-6533 (PCI-DIO-HS32). I'd appreciate any pointers from someone who's been there.
Before you ask, "why not use DAQmx?", testing with LabVIEW shows that DAQmx fails with some PCI-6533 cards (but not all, and only on a certain model of computer), for burst writes of 20 or greater samples (-200560 error), but Traditional DAQ works correctly.
02-27-2009 10:30 AM
02-27-2009 03:34 PM
02-28-2009 02:49 PM
I'm trying to configure a digital output control as follows:
axCWDO1.AllowRegeneration = false;
axCWDO1.AutoSelectProgressInterval = false;
axCWDO1.ChannelString = "0:1";
axCWDO1.Continuous = false;
axCWDO1.Device = 1;
axCWDO1.ExceptionOnError = false;
axCWDO1.Handshake().AcknowledgeModifyAmount =
CWDAQControlsLib.CWDIOAckModifyAmounts.cwdioAckAmt500ns;
axCWDO1.Handshake().AcknowledgeModifyMode =
CWDAQControlsLib.CWDIOAckModModes.cwdioAckModeDelay;
axCWDO1.Handshake().AcknowledgePolarity =
CWDAQControlsLib.CWDIOPolarities.cwdioActiveHigh;
axCWDO1.Handshake().ClockReverse = true;
axCWDO1.Handshake().RequestPolarity =
CWDAQControlsLib.CWDIOPolarities.cwdioActiveHigh;
axCWDO1.Handshake().SignalMode =
CWDAQControlsLib.CWDIOSignalModes.cwdioSignalBurst;
axCWDO1.NPatterns = SamplesToWrite;
axCWDO1.ProgressInterval = 0;
int Err = axCWDO1.Configure();
At this point, Err is -10459 (The NI-DAQ DLL could not be called due to an interface error.)
If I comment out all the configuration stuff and just call Configure(), I get I dialog box with the following:
System.Runtime.InteropServices.COMException (0x800A28A1): Configuring handshaking
The specified device is not a National Instruments product, the driver does not support the device (for example, the driver was released before the device was supported), or the device has not been configured using the Measurement & Automation Explorer.
I get this error even if I close Visual Studio, reset the Traditional DAQ driver in MAX, and close MAX before running my program.
The card in question is a PCI-6534. In MAX, this card shows up as Device 1 under Traditional DAQ.
I'm running DAQmx 8.9.0f1, and Traditional DAQ 7.4.4f7.
I'm using Visual Studio 2008 under WinXP SP3.
02-28-2009 07:24 PM
You should post your question in the Visual Studio forum where the users of that product hang out. You're in the LabVIEW forum, and most of the readers here don't usually use Visual Studio.