05-16-2011 05:17 PM
Hello,
Iv'e attached my labview 6 PID control VI. I was wondering if someone could help me determine why it will not work in Labview 9? Its takes the input values, but outputs weird values also ouptuts NaNs.
Thanks
05-17-2011 09:47 AM
Where is this VI being used? Are you restarting it? If so then you need to worry about the shift registers and initializing the VI. You will also need to make sure that you are passing the correct data to the vi when it is being call. Can you post your code so that we can see how you are using this VI.
Did you change anything else in the code when changing from LabVIEW 6 to LabVIEW 9?
05-17-2011 11:02 AM
05-17-2011 11:02 AM
Hey,
I've attached a screen shot of the necessary code. Its too large too attach, and would rather not attach anyways.
Thanks
05-17-2011 12:05 PM
@lakersrl wrote:
Hey,
I've attached a screen shot of the necessary code. Its too large too attach, and would rather not attach anyways.
Thanks
Is that code in a loop that runs over and over again? Can you move out a few levels ont he code so we can see what is going on? What you have shown does not allow for me to help with what might be the problem.
05-17-2011 12:25 PM
I agree. You simply are not providing enough information. What are the inputs to the subVI? For instance, I ran the VI with "set point" = 2 and "process variable" = 5 and I got an output of 10.
P.S. You may want to considering re-factoring the code. If, for example, you replace the stacked sequence with a flat sequence (right-click on the sequence) you will see that you can completely eliminate the sequence frame, and the code will be much more readable.
05-17-2011 03:11 PM
yes the code runs in a loop
05-17-2011 05:06 PM
Ive attached a screenshot of a larger portion of the code.
05-18-2011 03:18 PM
Hi lakersrl,
Could you please also let us know what the input is into your index array function and into your RMS VI? Do you have a single waveform or an array of waveforms? Also, you posted a screenshot of a small portion of your VI. Could you please recreate the error that you are having with that small portion of the VI and post that VI to the forum. It will be much easier to troubleshoot with a piece of code. Thanks!
Kim W.
05-18-2011 03:46 PM
@lakersrl wrote:
Ive attached a screenshot of a larger portion of the code.
That, unfortunately, tells us nothing. You've stated that the VI has NaN as an output. Based on what inputs? It's not like math is being calculated differently. So, clearly, either NaN is being in as one of the values (for whatever reason), or you are dividing by zero (for example) in the VI to get NaN. You must do some work yourself by using the debugging tools in LabVIEW to track this problem down. Use highlight mode to see the values of inputs and outpus. Use conditional breakpoints to catch the condition so you can see what the inputs and output are. Right now we have nothing to go on.