10-05-2005 01:22 AM
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,
INDIA-411001.
Tel: (020) 56025-175
10-05-2005 06:55 PM
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.
10-06-2005 02:00 AM
10-06-2005 03:25 PM
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.