Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Cont Acq&Graph Voltage-Analog SW Trigger.vi increase the acquisition time?

The NI example Cont Acq&Graph Voltage-Analog SW Trigger.vi takes one second of data. I need to take much more and can't figure out how to increase the acquisition time.

Is this something that has to be adjusted in one of the DAQmx task sub VIs?
0 Kudos
Message 1 of 10
(3,571 Views)
Richard,

The acquisition time per iteration is determined by the Sample Rate and the Samples to Read Per Iteration controls on the front panel in this example.  For example, by default the rate is set to 1000 Hz and the number of samples to read is set to 1000. This is why you are getting the 1 second of data acquired. If you set the number of Samples to Read at 5000 and acquire at 1000 Hz, then you will be getting 5 seconds of data every iteration of your while loop.  If you are acquiring more than 10 seconds of data, please keep in mind the timeout value input to the DAQmx Read VI, that is set to 10s by default.  You might need to increase this value.  If you look at the block diagram of this VI, one of the conditions to stop the while loop is the Trigger Out output from the Analog Software Trigger VI.  You can also play around with this output to figure out when you want to stop your acquisition.

Hope that helps.

Regards,

Message Edited by Raajit L on 07-12-2007 04:09 AM

Raajit L
National Instruments
0 Kudos
Message 2 of 10
(3,560 Views)
Thanks. My confusion was thinking the time out was only for waiting for a trigger. Since the waveform does not show data as it is being acquired I didn't think anything was happening. I am able to take bigger data files now. How can I set the waveform to display data as it comes in?
0 Kudos
Message 3 of 10
(3,549 Views)
Hi Richard,

What type of hardware are you using and what is your ultimate goal for this application? I think that there might be a better example program to work with for what you are looking to do.
Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 4 of 10
(3,536 Views)
Jordan,
 
I am using a NI PCI-6071E to acquire the data. It's connected to a NI SCB-100 which we have connected to a NI CB-68LPR. This connects to a amplifier and high density multi-electrode array made by Multi-Channel Systems.
We need to take up to 60 channels of data for about 30s. The current Vi I have based my application on only updates the waveform once per iteration. So for a 30s I cannot tell what is going on. It doesn't even indicate that its been triggered. Can you recommend something better?

 
Rich
0 Kudos
Message 5 of 10
(3,509 Views)

Hi Rich,

If you are trying to use software triggering to start the acquisition and you would like to have the waveform graph update more frequently you could try reducing the "Samples to Read per Iteration." If you believe that the acquisition is stopping short, you can try disconnecting the top Boolean line from the "compound arithmetic" VI connected to the stop condition of the while loop and then shrinking the "compound arithmetic" VI to a two input VI. I hope this helps.

Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 6 of 10
(3,480 Views)
Jordan,

If I reduce my "Samples to Read per Iteration" I get less data. I need to be able to take 30 seconds of data at 1000hz Sample Rate. I don't think it is stopping short, I just can't tell what is going on since the waveform does not update for 30 seconds.

I have tried adding a second Analog 2D DBL NChan Nsamp with a smaller
"Samples to Read per Iteration" value but this is still very slow. What else can I try?

Also where could I put and indicator to tell me if the trigger has occured?

Thanks

Rich
0 Kudos
Message 7 of 10
(3,437 Views)

Hi Richard,

When you start seeing data, it means that the trigger has occurred. If you follow the instructions in my previous post you should be able to get a graph with a very fast update rate. If you are not seeing any data, or it takes a while before any data shows up in the first place, perhaps your signal isn't meeting your triggering conditions quick enough.

Best regards,

Jordan D
Applications Engineering
National Instruments
0 Kudos
Message 8 of 10
(3,427 Views)
Jordan,

I have followed your suggestion in the previous post.

As I said in my previous post - If I reduce my 'Samples to Read per Iteration" I get less data. I need to be able to take 30 seconds of data at 1000hz Sample Rate.'

Yes, if I follow your instructions I get a very fast update rate - but I do not get 30 seconds of data, I get just a small fraction of a second.

The reason I asked for a place to put a indicator for the trigger is not because my trigger is slow but because if I have a large number of samples per iteration to achieve 30 seconds of data the update is slow - on the order of 30 seconds. It would be helpful to know if the trigger was acknowledged by Labview with out waiting for 30 seconds after the event.

Is there a better way to take 30 seconds of data then
Cont Acq&Graph Voltage-Analog SW Trigger.vi ?

Richard
0 Kudos
Message 9 of 10
(3,399 Views)
The example you mention takes data until the stop button is pressed so it is capable of much more that acquiring 30 seconds worth od data. If you set the number of samples to be equal to the sample rate, it will take 1 second to acquire and graph the data. What is happening though, is that each time the DAQmx Read returns a new set of samples, the graph is completely updated and the previous display is overwritten. If you want to display more data, keep the old data in a shift register and append the new results to that. Below is a simple example.
0 Kudos
Message 10 of 10
(3,395 Views)