For both counters to start at the same time, both should be configured to use the same signal as a Start Trigger, and both tasks should be started before the start trigger pulse actually happens.
I'm not exactly sure what you mean about starting and stopping the counters with AO.
I can't read your character set, but I do see things about pixels as well as X,Y,Z labels. You might benefit by searching here for threads about "raster scanning".
Otherwise, can you describe in more detail what your app needs to accomplish? What are each of the 2 counter pulsetrains doing and what's important about starting them together? How should either or both be sync'ed or coordinated with the AO task and why?
Thank you for your reply！
As you see，I want to write a program for acomplishing three functions（Raster Scanning<in AO channel>、Pulse train Sigal counting<in CI channel> and output frequence conversion pulse train for controlling a laser emit<in CO channel>）.
So I hope when Raster Scanning program module start running,other program modules will start running at the same time.
Surely, when Raster Scanning program module stop running,other program modules will stop running at the same time.
I am really distressed how to synchronize this three function modulas.
I hope my explaination is clear enough.
I am looking forward to your advices.
I'm not sure I quite understand what you need to do, but here's my best educated guess at what the different tasks might be for, based on lots of prior threads around here:
AO - used to drive scanning mirrors to direct a laser or something
CO - used to make the laser emit a light pulse. Should be synced with AO so you
can get 1 pulse at each defined mirror position
CI - used for photon counting to see your system's response to the pulses. Should
also be synced with AO so you can correlate response with stimulus.
Is this pretty close? Please correct as needed, or if I'm not even close then please give a more detailed description. This is not a field I've ever worked in, but have been in many related threads to discuss methods of sync'ing tasks.
Thank you for your help!
Today I have solved my difficulty.The methods that I used is so easy.It is very important to understand data flow clearly！LabVIEW is a hardware programming language different to software programming language.We need to use a "hardware controlling thought" for designning program.
If you want to learn the method that I used ,please contact me through e-mail:email@example.com.
And also welcome to everyone who need this technology about AO and CO for triggerring and synchronaztion .
Thank you again！
I hope you're right that it's all solved, but experience tells me that most posters don't get this kind of stuff quite exactly right. They think they've got it all solved, but there are often some lurking issues they simply aren't aware of.
If you'd like to be sure, can you describe in detail what kind of sync and coordination you intend to happen and post the code you use to implement it? I'd rather keep it in the forum than private email if you're willing, that way it can benefit future users who find it in a search.
I am willing to publish my code.The code is below.I just think my code is so simple that examples in ni is enough for new LabVIEW learner.
This is a simple Trigger application when you understand Trigger and Synchronization in NI manual clearly.
I have a suggestion for every LabVIEW learner :If you meet a problem ,please read NI manual again and again and think the problem in hardware running way!
So honestly, that doesn't look quite right to me. I can't read any of the non-English, you didn't really describe what you *intend*, and there's no sign of the CI task you previously mentioned. All that said, here's what I can decipher:
1. Your CO task is configured to be triggered by something.
2. Your CO task appears to be based on a finite set of buffered pulse parameters, which would normally mean that you have variable pulse timing rather than regular pulse timing. Do you?
3. Your CO task is started before your AO task based on error wire dataflow.
4. Your AO task does not appear to be sync'ed in any way to your CO task. It is not triggered, it does not configure the sample clock source such that it might be using the CO pulse, it just starts and runs after the CO task is started. However, the CO task won't actually generate pulses until after its trigger condition has been met.
5. So I don't see what syncs the start of these two signal generation tasks.
6. Further, since AO will run at a constant sample rate and your CO task will apparently run at a variable rate, even once you get them to start in sync, they aren't going to stay in sync.
7. And what about the missing CI task? What is it supposed to do? Why is it not here?
Just trying to help because experience has shown that getting things exactly right is a lot rarer than getting them almost right.
Thank you for your reply!
My computer do not have LabVIEW in English version temporarily.I will try to give a explaination for you and hope my explaination is clear enough!
If you can not read labview program in non-English,you can find a example which is in NI help .
This is a simple introduction for my program.
To simplify question,I intend to synchronize AO signal with CO signal. My program purpose is that CO signal start to output signal recepting a trigger signal from AO rising edge when AO signal start to output.
For realizing all function program,I am writting and testing my program,So you didnot see the program of CI.This will consume some time ，but I think program method is the same as simple version what i have introducted.
I hope my explaination is clear engough! Thank you for you paying attention to my program.
Questions for you:
1. Is your AO sample rate equal to the CO pulse train frequency?
2. Will your intended CI task also use the same sample rate as it counts photons or whatever?
If both answers are yes, then I *think* I know what I'd advise.
1. Configure CO for the desired frequency with a high duty cycle, like maybe 0.90 (90%).
2. Configure both AO and CI to use the CO output signal as their sample clock. However, make AO sensitive to the *leading* edge (probably rising) and CI sensitive to the *trailing* edge (probably falling).
3. Write your waveform data to the AO task.
4. Start both AO and CI tasks.
5. Start the CO task.
Thank you for your advice!
answers for you :
1、My CO frequence will change with the time in a cycle time(determinded by program designer)
2、I can not know when the CI input signal come from the phontons detector,so CI is independent relative to other part of program . (ps:AO will give a trigger signal to CI).
I have a new question :I want to know how much memory space will a cluster(2 elements）consume？
eg：the size of writting cluster （high time or low time）for CO buffer equals 1 or 2? the size of writting a DBL numeric constant？the size of writting a array constant（all element is DBL numeric constant）？
How can i calculate the size of the buffer(from daq to FIFO, and from FIFO to computer memory)which I need?
Thank you for you help!
Looking forward to your reply!