06-05-2012 05:46 PM
06-06-2012 06:41 AM
Adding my Vi and Subvi again.
Thanks in advance!
06-06-2012 06:50 AM
I am rewiring it closer to your diagram now and will do a functional test and see how it works. Thanks again.
06-06-2012 09:18 AM
Seems to be much more responsive, and the functionality seems to be correct. Trying to work on cases for startup and shutdown and timeouts in the case of overtravel now.
06-06-2012 11:44 AM - edited 06-06-2012 11:46 AM
So you're good on this particular problem now?
If so, please mark a solution, whether it's the code I showed you or one of the other posters' code. That will help future users with the same problem to find the solution more quickly.
One other thing I should point out: your DAQ Assistant creates and clears your analog input task with each iteration of the loop. You'll get much better functionality if you ditch the DAQ Assistant and use the DAQmx functions instead, the same way you do with your analog output tasks...that way you can create your analog input task once, outside the loop, and clear it once, after the loop has terminated.
Hope that's helpful too!
06-06-2012 02:50 PM
Diane,
Yes, I seem to have the reciprocating functionality I need now. I might have some more questions on building in some conditions, but for the most part your solution with shift registers is the one being used.
Since you mentioned using DAQmx instead of the assistant, I have 8 thermocouple channels and two voltage like the one we've been talking about. Would using 8 DAQmx instances use any more or less resources than the assistant, and can they all run simultaneously or will I have to use the Error to sequence one after the other?
06-06-2012 04:43 PM
Look under "Find Examples...Hardware Input and Output...DAQmx...Analog Measurements" for examples on how to perform a multichannel acquisition. All of your channels will need to be contained in a single task, so you will use only 1 instance of DAQmx Read.
My example did not include any shift registers. They aren't necessary for creating an analog output pulse. You must be using one of the other posters' examples. ![]()
06-07-2012 06:40 AM
No, I meant using your example PLUS adding a shift register so the pulse didn't repeat on the next iteration of the loop if the condition was still true.
So it was a team effort. Plus side, I finally understand shift registers and the effect of creating the task outside the loop! It's been a good developmental week for me.
06-07-2012 06:41 AM
Would you feel like taking a glance at my completed program and offering suggestions/input on improvement?
06-07-2012 12:47 PM
Certainly! Post it and we'll have a look.
A team effort indeed. That's great that you took the time and effort to combine the suggestions you were given to arrive at a solution. Well done!