Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6534 DO Waveform geneation using active x control cwdaq.ocx

Hello,

I am using the NI’s  PCI card no. 6534. I am trying to generate a waveform using the Active-x control - cwdaq.ocx.When I am calling the AxCWDAQControlsLib.AxCWDO.Configure function , then an exception is raised as :

 “Configuring handshaking – The specified operating mode is invalid, or the resources have not been configured for the specified operating mode”

The initialization and the code are placed in the attachment.

The device’s channel is configured with the proper name using Measurement & Automation explorer.

The device can be accessed using the MAX.

Regards,

Neeraj Tiwari

 

Engineer - Embedded Software Development,

Emerson Design Engineering Center,

INDIA-411001.

Tel: (020) 56025-175

0 Kudos
Message 1 of 4
(3,541 Views)

Hi Neeraj,

I could not find any attachments, so I am not sure what is causing the error at this point.  However, I found a Visual Basic example that outputs a digital waveform.  Please take a look at this and see if it helps you with your application.  Here is the path: C:\Program Files\National Instruments\MeasurementStudio\VB\Samples\DAQ\Digital\Digital Waveform.

Regards,
Hal L.

0 Kudos
Message 2 of 4
(3,528 Views)
Thanks Hal L. I have put the code attachment , which you can refer. It is in C Sharp.
0 Kudos
Message 3 of 4
(3,517 Views)

Hi,

Based on the code that you posted, it is still difficult to determine exactly what is causing the error. Could you put the axCWDO1.Configure() function at multiple points in your program?  This will act as a debugging tool which will help us find the function that is causing the error. Another thing with your programming is to make sure that you sequence your output like this:

Configure the output operation
CWDO1.Configure

Specify the data to output
CWDO1.Write data ' "data" is an array of data to output

Start the output operation
CWDO1.Start


Also, are you trying to output the waveform using handshaking or pattern i/o?  Is it important to you which method you use to output your data?

Regards,

Hal L.

0 Kudos
Message 4 of 4
(3,497 Views)