09-23-2005 10:46 AM
09-26-2005 04:04 AM
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
09-26-2005 04:59 AM
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
09-26-2005 09:50 AM
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?![]()
09-27-2005 02:45 AM - edited 09-27-2005 02:45 AM
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
09-27-2005 07:11 AM
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
09-27-2005 09:32 AM
09-28-2005 10:51 AM
Hi
Thanks. It works with some changes in the sampling info. I have attached the programme.
Mal
09-28-2005 10:53 AM