06-09-2014 02:18 PM
That sounds like some strange behavior! When both lines have the signal, are they synchronized? I have a few suggestions for you to try.
1. Try adding a DAQmx Stop Task.vi after the loop ends before the DAQmx Clear Task.vi. The Clear Task VI should be stopping the task but maybe something is happening where it is not releasing the resources correctly.
2. Try probing the error out wire right after the DAQmx Is Task Done.vi. Perhaps your loop is stopping on an error rather than stopping when the task is done.
3. What happens if you add a third line to your case structure (you will need an enum control rather than boolean)? When you switch lines, is it making all of them go at once or is a resource just being improperly closed on the previous lines?
Let me know if any of these things are helpful to you!
06-09-2014 04:34 PM
Thank you for your suggestions. I tried them all but unfortunately it did not resolve the issue. I even dropped a Channel Property Node in read mode before the Start Task to see if it was remembering the old channels selected but no; it only indicated one channel. Stop Task also did not fix the problem and I read that it just takes the VI to the Start Task condition so perhaps after the channel has been configured? I am not seeing an error anywhere on the line.
To answer your questions the output looks synchronized; whatever I set the duration to be, the channels all output the same and the pulses look to be in sync.
I will keep trying what I can, hope to hear from you,
06-10-2014 01:34 PM
That sounds like strange behavior. Try adding a DAQmx Reset Device.vi at the beginning of your code. Hopefully this will get rid of any residual references to the wrong PFI line.
Is your code exiting the loop normally or do you need to click abort?
If you are still running into issues, could you send me some screenshots of your output signals and I can try to duplicate it over here?
06-13-2014 01:25 PM
Thank you for that suggestion. Adding the Reset subVI at the beginning did the trick and I am now able to control the channels independently.
I am curious why this would be necessary; I've not had to include a Reset in previous DAQmx applications and its execution adds a noticable delay. Is it this particular device model that needs it?
06-16-2014 12:33 PM
You should not usually need to add the Reset VI. It just seemed like something weird was happening with the references closing properly within your code so I thought it would be a good thing to try. Unfortunately, I am not sure exactly why you were seeing that weird behavior.
06-19-2014 12:09 AM
This is indeed strange behavior but at least the code is working. I will bring it up at the next user group meeting to heopfully get some insight.
Thank you again for all your help,