11-16-2007 04:27 PM
11-16-2007 04:41 PM
11-16-2007 04:44 PM
11-16-2007 04:49 PM
11-16-2007 05:07 PM
03-21-2011 07:12 PM
Since this numeric_slider VI uses an event structure, it only outputs a value when the slider or the numeric control are modified. I need it to continuously output the numeric and slider control value, even if no changes are currently being made to the control value.
My while loop just pauses until I move the slider back and forth. I've tried a lot of things and worked on this for hours and I'm still stuck.
Any help or insight would be appreciated beyond measure!
Thanks,
-Adam
03-22-2011 04:31 PM
Adam, this is Paul with Applications Engineering at NI.
I was unable to open your attached VI because it was missing simplepid.vi. I glanced at the rest of your code, but it looks like that might be the meat and potatoes of what you're trying to accomplish. Try putting your files into a project, then zipping them up and posting them, and we can see what we can do for you.
Paul
03-22-2011 04:46 PM
@AdamKrzy16 wrote:
Any help or insight would be appreciated beyond measure!
Well, since the event structure only executes when one of the controls changes, it is blocking the loop. Dataflow in action!
A quick solution would be to make the event structure "transparent" by adding a short and empty timeout case. Now just use a feedback node to retain the existing value if the controls did not change.
There are probably definitely better ways to do this, but they would require more fundamental changes to your code.
03-22-2011 06:17 PM
Thanks! Works like a charm and makes good sense...
One last thing, there's one slider and TWO numeric controls to set the P-term. I would like to delete one of those numeric controls to avoid redundancy, but they seem interdependent.
I can't remove one of them without causing errors I can't figure out how to resolve...
Thanks again for the help on this,
-Adam
03-22-2011 06:32 PM
You need to remove the one on the right, the other one belongs to the slide. since there is now only one source, you don't even need the event structure.
Makes sense?