LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write text to file not working properly

Hello!

I'm trying to make a program that sends signal to my myDAQ and then reads the signal from there and write the values to file. It works otherwise fine BUT it writes only 117 first values and stops after that. The program doesn't end it continues running but the text files has always only that amount of values. I would need more sample values cause it takes while to read a signal so there is just about constant values at first (well and ofcourse I would either way have more samples to written).

I have no idea what could cause this though I'm really new to this.

Download All
0 Kudos
Message 1 of 2
(698 Views)

You are getting a buffer overflow from your DAQ.  First of all, the AO is taking 1 second (rather, you are writing 1 second of data at a time).  Yet, you expect to be reading from the AI at every 66us.  This will not work.  So change your DAQmx Read to Analog->Multiple Channels->Multiple Samples->2D Array.  Then tell it to read 15000 samples at a time (1 second worth of data to match the AO task).  You also will not need the Array To Cluster node after doing this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(670 Views)