LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Some suggestions on how to go about?

I am developing an electro retino gram software that requires me to sample data from two channels at 10000 scans/sec for one second. I also need to generate a pulse 100ms after the vi starts acquiring data. At 1s, I need to stop all this and plot the data as amplitude vs time in ms. I have a working model but it doesn't sample at the required rate because it requires some time to plot the data and store in in a spreadsheet file.

Any suggestions would be welcome.
Thanks
0 Kudos
Message 1 of 2
(2,579 Views)
Hrm...I posted an answer to this a couple of days ago, but it hasn't made it.

I see a couple of problems with your VI.

1) You open a spreadsheet file, but you don't have any data wired to it for it to write.

2) You wish to take a seconds' worth of data at 10K samples per second, but you only have your buffer set to 1000 samples; this is only .1 seconds of data.

3) Your AI Read VI is set to read the entire buffer.

Item #3 is your real problem. When you call the AI Read, it halts the data acquisition thread until the entire buffer (in this case, 1000 scans) is full. So, in your VI, the analog input starts, the AI Read waits for .1 seconds until the buffer is full and then reads the buffer, THEN your analog output occurs.

If you change you
r buffer (in AI config VI) to 10K, I think you'll see that your analog output will now occur at 1 second AFTER the analog input occurs, which isn't what you want, either.

Therefore, you have two choices. You'll definitely need to set your buffer to 10K. After that, you can either 1) put a 1 second wait statement in before you perform your AI Read--this will allow the analog output to occur at the correct time before the AI Read is called and halts the data acquisition thread (this keeps any other data acquisition VIs from running until the AI Read is complete), or 2) use DAQ occurrences to notify the AI Read when the buffer is full.

Either will fix the problem.

Mark
0 Kudos
Message 2 of 2
(2,579 Views)