LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Traditional DAQ be used in Visual C Sharp?

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.

0 Kudos
Message 1 of 5
(2,930 Views)
You should read this: Programming NI-DAQ in Visual C# .NET.
0 Kudos
Message 2 of 5
(2,924 Views)
That looks good. I'm hoping DAQmx will magically start working, but if it doesn't, this is my backup plan.
0 Kudos
Message 3 of 5
(2,903 Views)

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.

0 Kudos
Message 4 of 5
(2,890 Views)

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.

0 Kudos
Message 5 of 5
(2,883 Views)