Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Analog Outputs in multifunction DAQ

Hi
 
I require to output two sine signals through two analog signals of M6259 DAQ card. I have attached the programme.  When seen from the oscilloscope I see only corrupted signal at the outputs. Can someone help me to see why? 
 
Thanks
 
Mal
0 Kudos
Message 1 of 9
(3,987 Views)

Morning Mal,

 

I had a look at your code for you.

The only problem I can see with your code is the physical channels you are trying to define on the front pannel.

You have only specified one output (Dev1/ao0).

You need to change this to Dev1/ao0:1 to configure 2 seperate outputs.

Hope this helps.  Post back if it does (or if you need some more help)

Thanx

 

AdamB

National Instruments

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 2 of 9
(3,960 Views)

Hi

Sorry for the ommission. I have attached the correct code. I do get outputs from both channels. But I don't get a clean sine wave. Only noise ( when seen from an oscilloscope). Is it because of the build array?

Thanks

Mal

0 Kudos
Message 3 of 9
(3,956 Views)

malkoba:

Can you post a picture of what the oscope is displaying? A picture is worth a thousand words, but even more kilobytes- how can that be?

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 9
(3,949 Views)

Hi Malkoba,

Confused me at first but I've found the answer to the problem.  You need to attempt to write to the channel before you actually start the task.

The write function changes the task ID to the specific task (in this case a multi channel, multisample waveform analog output) in it's first call.  Then it can be started correctly.

Notice I have used the "first call" function. this ensures that the task is started only once.

Hope it helps.

Post back if it does, or if you need some more help.

Thanx

AdamB

National Instruments

Message Edited by AdamB on 09-27-2005 02:46 AM

Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 5 of 9
(3,928 Views)

Hi

Thanks for the programme. When I ran the programme  it gave an error 200294 at DAQmx write vi.( Not enough samples were written to satisfy the initial data transfer request condition) Also it says to increase the buffer size to 8193. How can this be done?

 

Thanks

Mal

0 Kudos
Message 6 of 9
(3,919 Views)
I don't seem to be getting the same error on my computer as I have a different device.  But I have added a buffer configure vi before the while loop.  Also you may want to change the order of the creation of the physical channels.
Try Dev1/ao1:2.
(you may need to reorder your outputs though.
does this work?
 
AdamB
Applications Engineering Team Leader | National Instruments | UK & Ireland
0 Kudos
Message 7 of 9
(3,908 Views)

Hi

 

Thanks. It works with some changes in the sampling info. I have attached the programme.

 

Mal

0 Kudos
Message 8 of 9
(3,886 Views)
The attached programme for the previous reply.
 
Mal
Message 9 of 9
(3,885 Views)