Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Data Acquisition not triggering off Counter timing

Solved!
Go to solution

Good evening, or whenever for the readers.

 

My research group is having some troubles attempting to incorporate multiple pieces of machinery together through LabVIEW. We are working in LabVIEW 2017, and are attempting to simultaneous start a function generator, a PCI-6601 Counter and a digital mirror device (a DLPC900). We want a simultaneous start because the DMD is set up so that the function generator provides the impulse for a set of patterns to start displaying, and the PCI Counter times the DAQmx Trigger so that it should theoretically take data at the very beginning of this timer, and not in a different time frame. We need the PCI to trigger our data because we need the trigger to operate for the entire set of patterns, not every single pattern.

 

So, to try and do that we've made the vi I've attached, but we receive a -200284 error for the DAQmx running. I've ran through while highlighting execution, and I cannot see any errors other than the missed data collection, as shown here:

FG+Counter Issues - Running.PNG

My question is how exactly we can adjust this to work properly? Are there instances where lines of code are running simultaneously that need to be sequential? Or is it a problem In the commands I'm using to run through the program? For reference, the data collection is from a standard photomultiplier tube detector, which I assume can be simulated, though I don't know how. Also, the subvi attached in the latter half of the vi below is merely the same program done to call on our function generator through the VISA identification that I have split up through the first 3 sections of this vi.

 

Any help would be greatly appreciated!

0 Kudos
Message 1 of 4
(1,695 Views)
Solution
Accepted by topic author wesdeeg

1. The first problem I see is that you never start the counter pulse task that you intend to use to trigger the AI task.  Without a trigger signal, the AI task never starts, so *of course* it'll timeout when you try to read data.

 

2. Even after you fix that, the AI task timeout error could also happen if you don't get enough TTL pulses at your designated "Clock source" terminal "/Dev2/PFI3" before the default 10 second timeout elapses.  Something else to make sure of.

 

3. Dunno your VISA instrument or your overall system setup but you'll only get sync if your DAQmx tasks and the instrument share the needed timing signals.  Mainly the sample clock, maybe also the trigger.

 

4. You should either move DAQmx Start inside your For Loop or (better yet), change to Continuous Sampling and move DAQmx Stop outside the loop.

 

5. This is not an exhaustive list of everything that might need attention, but it's late Friday and this is all the time I have for it now.

 

 

-Kevin P

 

 

 

 

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 2 of 4
(1,679 Views)

Thanks for the prompt response, I wasn't able to test things until Monday in either case, so it worked out well.

 

In order, I first attempted the fix of 1, placing a start task at the same locale as the start trigger. Unfortunately, the same timing error continues to appear, disallowing the data collection to proceed.

FG + Counter Issues - Trigger.PNG

 

For the second fix, the pulses we are working with are in the microsecond regime, so for every 10 seconds we should be getting thousands of results. All of our instruments are setup to be synced to the same timing signals, as we're mainly running everything off a lock-in amplifier that sets our timings together. I don't know how much a full instrument listing would help, I can provide that if it would give more information. However, even with the 'Continuous Samples' shift in your last point, I'm still seeing the same timeout error.

 

I likely adjusted the start timing improperly, but I feel like that should be fine for having the trigger begin as the AI Trigger task begins, no?

 

Thanks for the continued help!

Wes Deeg

0 Kudos
Message 3 of 4
(1,650 Views)

Apologies for the second addendum, we managed to troubleshoot some technical issues and the fixes you provided did indeed help in running this specific program. Unfortunately, we are still having issues with synchronization of the counter with the data measurements, but I believe that may be a hardware related issue, rather than Labview itself.

 

Thanks for the advice! If by chance you do have any insight on attempting to synchronize the pulses of a PCI-6601 counter with the ongoing shifting of a DMD mirror that would be helpful, but that's not the issue I technically asked about initially.

0 Kudos
Message 4 of 4
(1,645 Views)