03-29-2011 12:36 AM
Hello,
I've written two tasks, namely Task A and Task B as shown in the attachment.
My program works this way:
1. Firstly the 1st iteration in Task A executes. Upon completion, it waits for 0.5s and the data from the 1st iteration in Task A will be passed to Task B to be executed.
2. Upon completion of the 1st iteration in Task B, it waits for 0.5s and the data from the 1st iteration in Task B will be passed back to Task A to be used in iterarion no.2.
3. The number of iteration continues and stops until N = 600.
I'm not quite sure as to how I should proceed to wire both Task A and Task B to complete my programming. Does it help that I use the Timed Loop.vi to combine these two tasks? Or are there any better suggestions to my problem?
Really appreciate your help in advance. Thank you ![]()
03-29-2011 01:01 AM
Since the total number of iterations is known from the beginning, you might want to use a FOR loop. Place task A and task B is two cases of a case structure and execute case A in even iterations and case B on odd iterations. Keep the result in a shift register to be fed to the task in the next iteration. Are the tasks much faster than 500ms or longer?
You also need to define what kind of input task A should get on the first call and what should happen with the last output of task B.
See how far you get and show us some real code once you have something wired up. 😉
03-29-2011 05:52 AM
Ah! Thanks. I'm all set out to try it. ![]()