SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

SignalExpress - Triggering an analog input from a counter

Solved!
Go to solution

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.

0 Kudos
Message 1 of 6
(6,571 Views)

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.

- Regards,

Beutlich
0 Kudos
Message 2 of 6
(6,565 Views)
When you say all channels do you mean both the trigger channel (eg. cnt0) and an analog input channel (eg. ai0)? As far as I know I'm only using 2 channels. It seemed the problem was the analog input was trying to access a counter channel as a trigger but I was also using the counter signal to shape a pulse width
0 Kudos
Message 3 of 6
(6,560 Views)

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...

0 Kudos
Message 4 of 6
(6,556 Views)
Solution
Accepted by topic author tzoom84

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

Applications Engineer
National Instruments
Message 5 of 6
(6,548 Views)
Thank you. That may do and I'll give it a shot in the future.
0 Kudos
Message 6 of 6
(6,544 Views)