03-24-2011 04:16 PM
I am using the cDAQ-9174 board with a NI-9222 analog input module and a NI-9401 digital module.
I am interested in generating a counter, and then triggering the start of the analog input off the rising edge of that counter. In effect, I am looking to create a simple delayed analog input.
So I followed these steps in SignalExpress:
1) Created a DAQmx Generate Counter Pulse Output block. High time, low time, and initial delay all at 1sec. I set it to cDAQ1Mod4_ctr0 (output terminal PFI3)
2) Created a DAQmx Acquire Analog Input Voltage block. I set it to cDAQ1Mod3_ai3. N Samples = 100.
2a) Under triggering tab. I set start trigger type to digital edge, and trigger source to /cDAQ1Mod4/PFI3 (to match step 1)
2b) Under clock source, I set it to /cDAQ1Mod4/PFI0.
When I run, I get the error: "Trigger line requested could not be reserved because it is already in use". I understand it is in use, I started it in step 1. I wanted the counter to set a pulse cycle, and the analog input to collect samples based off that pulse cycle.
Any assistance in what I am doing wrong? Is there another way to generate a pulse that can be used as a trigger for another source? I attached the SE project for reference
Thank you.
Solved! Go to Solution.
03-25-2011 02:56 PM
You may try creating a global Task in MAX that has all of the channels you want to use, and then using the signals from that task in Signal Express.
03-27-2011 05:39 PM - edited 03-27-2011 05:40 PM
03-28-2011 09:40 AM
I tried adding global tasks that includes ctr0 and ai3 (a counter and an analog input), and then tried re-running the attached file from above. Still no luck. Also, I noticed in a global task in MAX, one can only add channels of the same type to a task. e.g. If I create an analog-input task, there's no option for generating counters as an additional channel...
03-28-2011 12:59 PM
I think the problem is that you are trying to both read and write from the same counter channel in Signal Express. Is it possible that you could wire the output from the your counter into the input of another channel and read from that? It's a bit of a messy workaround, but it might be a possible solution.
Jon S
03-28-2011 01:53 PM