12-08-2010 06:08 PM
I'm unable to get this shipping example to read any AI data on a USB-6221.
Does the 6221 have some limitations not noted in the example VI's documentation? I'm using the default front panel settings, Counter Channel = ctr0, Clock Source = Ctr0InternalOutput, Trigger Source = PFI0.
12-09-2010 09:28 AM
Hi RLD,
What signal are you using to trigger the finite acquisition on PFI0? Did you check and make sure that trigger is firing? Is there any errors thrown by the example when you run it? The USB-6221 is listed as supported by this example, so no limitations exist in particular for that device and this example.
12-09-2010 10:00 AM
I'm running the example just as it loads, with all of the front panel controls in their default state. Are you saying that that the PFI0 pin must be physically connected to an external trigger signal? I was interpeting the instructions to mean that AI scans were being retriggered by an internal clock.
12-09-2010 10:42 AM
The way this example works is that the CO Frequency task creates a finite retriggerable pulse train that begins when PFI0 has a digital rising edge. If you wish to create this clock internally, I would imagine you could make an AO dummy task and use the AO timing engine to create a clock to use as the trigger source for the CO Frequency task. Otherwise, this example is initially assuming you have an external signal triggering the AI collection, whether it be asynchronous or synchronous pulses.
12-17-2010 11:18 AM
Alternatively, the Frequency Generator (FreqOut) could trigger the AI sample. Couldn't it? (Limited by the frequency range supported by the Frequency Generator function.)
12-17-2010 01:07 PM
Hello RLD,
Just to clarify, are you looking to acquire x analog samples at one rate that are seperated by some delay at another rate? See below:
If so, you can certianly do so as you described and control the delay using your Frequency Generator (FreqOut). You would simply need to create another counter task to control the frequency of your FreqOut and specify the trigger source on the counter in the example (the one that creates the clock for the analog input task) as /Dev1/FrequencyOutput, where Dev1 is your device alias in Measurement and Automation Explorer (MAX).
If you are looking to do something different, please let us know and we will be happy to help out.
Regards,
Paul C.