01-10-2008 06:02 AM
01-11-2008 04:31 PM
Hi JohnCC,
If I understand you correctly, you want to trigger your acquisition with an external signal and only acquire the data you need. You can accomplish this by using a start and pause trigger. For example, configure your start trigger to execute on a rising edge and your pause trigger to execute on the falling edge of the same signal. You can then use the returned number of samples value from niHSDIO_FetchWaveform to determine your total number of samples actually acquired.
Please post if you have any questions. Have a great day!
02-20-2008 04:11 AM
Ryan
I believe you understand me correctly, and I'd like to do what you suggest but I'm having difficulty.
I get an error message when I try to use the same signal for a start and pause trigger. Start must use an edge, and pause must use a level. So a workaround was tried.
Since I want to acquire any time that data valid is high, I tried setting the start trigger attribute to NIHSDIO_VAL_NONE. The pause trigger was configured to NIHSDIO_VAL_LOW.
Now I have a problem when niHSDIO_FetchWaveform times out before the data buffer is filled. numberOfSamplesRead is returned as zero, even though data was received. When I reduce the samplesToRead argument to a smaller number to avoid the timeout, numberOfSamplesRead is correct and the data buffer is filled properly.
If niHSDIO_FetchWaveformU16 can be made to return whatever data that's been received even though the buffer isn't full, my goal will be achieved.
thanks
02-21-2008 09:32 AM
02-27-2008 07:04 AM
Ryan
By using a polling loop that consists of a fetch waveform with timeout=0 and a getbacklog call, we are now able to collect data consistently. Thanks very much for the pause trigger idea.
One of our configurations uses a pc<=>pc connection with an Ni6561 in generation mode on one pc and another Ni6561 in acquistion mode on the other. The generation mode pc is emulating an embedded code app. Is there any way I can connect the two Ni6561 boards and use same clock without requiring an extra cable between smb connectors? The system works now but we'd like to just use a single cable. The niHsdIo docs lead me to believe that an external clock source must be either STROBE on the DDC connector or ClkIn from the SMB connector. Can you suggest some way to get around this limitation. One idea was to export the sample clock on a PFI signal line and jumper the PFI to STROBE on the acquisition end. But the cable connector wiring is very dense and we'd like to avoid that.
thanks again
02-28-2008 03:51 PM
02-29-2008 06:12 AM
Ryan
I don't mind at all taking the discussion off line
If you need additional contact info please let me know