01-07-2009 01:32 PM
Hello all again,
I know that I have already gotten a lot of help on this program from some of you out there, and I hope that this is the final question I have.
I would like to have this program plot the results on a waveform chart while the VI is running, rather than when it finishes. I am sure that there is a simple way to do that, but I am now sure what it is. I have also posted a link to the previous thread in case anyone is interested in what the VI is actually doing.
Thanks!
http://forums.ni.com/ni/board/message?board.id=170&thread.id=362563&view=by_date_ascending&page=1
Solved! Go to Solution.
01-07-2009 01:39 PM - edited 01-07-2009 01:45 PM
01-07-2009 01:47 PM
Thats the strange thing, the waveform plots are in the loop, I attached a jpg if that helps.
Thanks for the quick reply.
01-07-2009 01:51 PM
01-07-2009 02:06 PM
There is a fundamental flaw with the program that should be fixed before anything. You have a true constant in the while loop ORed with the error out. That means that the loop only executes once. The only way you can get multiple samples is by using the Run Continuous button and that should NOT be used to run your program. Replace the constant with a front panel Stop button.
It's also silly to use four separate DAQmx Create Channel functions when all that you are changing is the channel. Use one and specify a channel list of 'Dev2/ai0:3'.
01-07-2009 02:24 PM
Thanks Dennis, I am still learning as I go
I changed to a front panel control and changed the create channels, but it still does not do what I want it to. I am trying to get it to display the results of a some simple calculations as the VI runs. Also, because it is running a finite number of samples, is it possible to stop the loop in some way other than a front panel control and simply finish when the last ai sample has been collected?
Thanks again
01-07-2009 02:43 PM - edited 01-07-2009 02:46 PM
01-07-2009 03:53 PM
01-07-2009 04:06 PM
Dennis
I don't seem to be getting any errors from that, even when I highlight the execution it shows as ok throughout the whole VI, whether it is on finite or continuous samples in the clock. I have attached a zip file with all of the subVI's in it, I may have missed one in my previous attachment. Thanks for the suggestion to put in the shift register, thats a good idea, Again, I don't have any trouble getting the VI to work, I am just wondering if it is possible to display the results while data is still being acquired.
Thanks
Chris
01-07-2009 10:36 PM