Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple channel sampling and write file

Hei,

I wrote a interface which is supposed to allow me to plot multiple channel and write all those datas in a file ; The problem is that :

1- not all the curves are plot in my graph (in fact just one is ploted).
2- At the same time it write in a file but after some times it stoped due to an error : buffer size...related to the offset.

I have attached the vi, I don't understand exactly where those problems are comming from and how to solve them easily.

Thanks for the help
P.
0 Kudos
Message 1 of 4
(3,251 Views)


pkleb a écrit:
Hei,

I wrote a interface which is supposed to allow me to plot multiple channel and write all those datas in a file ; The problem is that :

1- not all the curves are plot in my graph (in fact just one is ploted).
2- At the same time it write in a file but after some times it stoped due to an error : buffer size...related to the offset.

I have attached the vi, I don't understand exactly where those problems are comming from and how to solve them easily.

Thanks for the help
P.


0 Kudos
Message 2 of 4
(3,238 Views)
Hi,

We're going to need more specific information.

1) What board are you using?
2) What is the error number you are getting?
3) What VI is causing the error?
4) Run the program in hilight execution mode (click lightbulb icon on block diagram). Where does it give the error?
5) What steps have you taken to troubleshoot the issue?


From looking at your code it looks like on each execution of the loop you are pulling one sample data buffer with DAQmxRead. However, since you may be acquiring data faster than that, your buffer will fill up quickly. Try using the DAQmxRead with it set to Multiple Channels with Multiple Samples. Specify a number of samples that is about 1/2 to 1/10 of your sampling rate.

-Sal
0 Kudos
Message 3 of 4
(3,192 Views)
Hi thanks those tips. In fact I had solved those problems mentionned above ; I have alomst finish my interface except that I am trying to write all my datas in a file , in column (all channels) and create a first column at the time (maybe from the sampling time). The problem is that I don't know the output fomat of the "analog 2D DBL" vi and it seems that my way of writing datas time step per time are not right. have you already see this kind of used (analog 2D DBL)? I am using a PCI-6229, and DAQmx 7.3 Drivers

Thanks for your help

P.
0 Kudos
Message 4 of 4
(3,183 Views)