LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to rewrite different data using pci-6723

Hi,
 
I am  able to generate 24 analog ouputs with different data simultaneously but I am not able to generate updated data for all channels .
 
for example
 
AS I am using my functions like below :-
The sequence I am using is like this :-
 
1.DAQmxCreateTask("",taskHandle);
2.DAQmxCreateAOVoltageChan(*taskHandle,chan,"",min,max,DAQmx_Val_Volts,NULL);
3.DAQmxCfgSampClkTiming(*taskHandle,"",rate,DAQmx_Val_Rising,DAQmx_Val_ContSamps,1000);
5.DAQmxWriteAnalogF64(taskHandle,bufferSize,0,10.0,DAQmx_Val_GroupByChannel,data,&written,NULL);
6.DAQmxStartTask(taskHandle);
7.DAQmxIsTaskDone(taskHandle,done);
8.DAQmxStopTask(taskHandle); 
9.DAQmxClearTask(taskHandle); 
 
In first time  I am able to generate data for all channels using sampling method but for the second time I am not able to update tthe new data in DAQmxWriteAnalogF64 with out stoping the task if i do it will not write anything for second time.
 
please do the help
 
Asap
 
Regards
krishna
0 Kudos
Message 1 of 2
(3,003 Views)
Hi Krishna-
 
Because you are configuring your generation for "DAQmx_Val_ContSamps" you should actually be calling the DAQmxIsTaskDone in a loop to periodically check for task status.  Within this loop you should also be able to periodically write new data to the task.  I'm assuming you are using CVI- I have attached an example that shows how to update the analog output data "on the fly" while your application is running.  Please take a look and let me know if you have any additional questions.
 
Thanks-
Tom W
National Instruments
0 Kudos
Message 2 of 2
(2,984 Views)