Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

nidaq output 2 defferent waveforms at 2 channels

Hi,
I want to output 2 different waveforms at two analog output channels of my NiDaq 6036 board, but i receive an error -10409. I am attaching my Vi. I have use different numbers for grups so i have different task ids, but i see a triangular wave followed by a rectangular wave at both of two channels.
Is there any way to have the triangular waveform at one channel and the rectangular waveform to the other channel,
Can anybody help me please.
Download All
0 Kudos
Message 1 of 4
(3,145 Views)

Hello Eugenia,

You could have one waveform on one channel and another waveform on another channel.  Just make sure that you have them in different tasks.  You are probably getting this error because you are not clearing the task every time that you run the program.  Normally you want to create/configure the task, then read/write data and finally stop/clear the task.  This basic process should be completed entirely, every time that you run your VI. 

Respectfully,

Rob F
Test Engineer
Condition Measurements
National Instruments
0 Kudos
Message 2 of 4
(3,135 Views)
Hi Robert,
I do all of these (configure, write, start, clear) and i have different tasks, as you see in the attachements but the Vi doesn't work.
Is there any other possible reason for not working? Have you seen my VI's? Does they look correct?
Thank you,
Eugenia
0 Kudos
Message 3 of 4
(3,101 Views)

Hello Eugenia,

You need to create and configure your task every time that the VI is run.  You can accomplish this by executing these VIs outside the while loop.  You also need to stop and clear the task every time that the VI is run.  You can do this by calling these VIs after the while loop is done executing. 

Right now you are running your while loop once, which is fine.  However, you are only creating/configuring and stopping/clearing the task when the user selects a control.   I would suggest creating and configuring the task first outside of the while loop.  Then write your waveforms inside your while loop.  Finally stop and clear the task outside the while loop after you loop has finished executing.  This way create/configure as well as stop/clear the task every time your VI is executed.

Respectfully,

Rob F
Test Engineer
Condition Measurements
National Instruments
0 Kudos
Message 4 of 4
(3,084 Views)