03-17-2007 03:07 PM
03-17-2007 03:14 PM
03-20-2007 07:31 AM
Hi Drew,
Thank you for posting to the NI forums.
1. I think that your guess is correct regarding the exact signals used for the AI sampling. However, you can test this by comparing timestamps of the analog input and the external trigger.
2. Depending on the internal timing of the device, it may require an extra clock period to begin digital pulse generation. If this is an issue, you could increase the frequency of the external sample clock to remove the delay between the trigger and the pulse generation.
3. There isn’t a property node for the number of counters being used in a task. As a general guideline for counter tasks, if you’re performing finite pulse generation, you’ll be using two counters; if you’re performing continuous pulse generation, then you’ll only be using one counter. Otherwise, the easiest way to determine how many counters are being used is to look at the device routes in Measurement & Automation Explorer (MAX).
I hope this helps. Please post back if you have any further questions.
Ed W.
Applications Engineer
National Instruments
03-20-2007 10:00 AM
Thank you for the reply Ed W. For comparing timestamps as you mentioned in 1), I am a little unsure how the driver correlates the timing between the 2 different tasks I have configured. For instance, with a waveform read on the AI, will the start time be when the task was started or when the pause trigger signal goes high. Also, how do I get a timestamp for the external trigger?
Also, regarding 2), it shouldn't be an issue and unfortunately the sample clock can't increase in frequency. For achieving multiple hardware triggered acquisitions on S series boards, I normally configure a retriggerable counter for digital pulse train generation and use this signal for the sample clock. However, in this case, the sample clock I need is this external signal and I don't think I can use this signal for counter digital pulse generation at the same frequency. The only way to do something similar is to use the external clock as the sample clock and also the source of ticks for a single digital pulse generation which is then used as the pause trigger for the AI.
I've added the code and attached the picture from my first post since the webhosting will not work after a while
Thanks
Drew
03-22-2007 08:43 AM
Hi,
One easy way to correlate the digital signal with each analog sample is to simply add another analog channel to your AI task. Then jumper the clocking signal to this extra analog input channel, and view the results in a single waveform. From this, you will be able to test exactly which rising edge the analog input is using with only minimal modifications to your existing code.
Ed W.
Applications Engineer
National Instruments