02-23-2012 11:37 AM
Ok so I have built a function that will increase in increments that is specify and I am outputting it to a device to control it. Now this is the part i need help with I want to to hold at the setpoint that I can specify for a period of time then slowly decrease can anyone help im usisng labview 7.1
02-23-2012 12:33 PM
Can you give an example of what you would like to see for a few iterations of the vi?
02-23-2012 01:32 PM
Im sorry I don't get what you are asking.
02-23-2012 01:33 PM
It looks like you're trying to use a numeric counter in a loop as a substitute for a millisecond timer.
In my experience, this is not a good idea, because the timing is somewhat inconsistent and also because a millisecond timer is much easier to use.
What is the purpose of the inner loop? Is it supposed to work like a delay timer that runs for X number of seconds? Or is it supposed to prepare an array of Y values for the build waveform?
02-23-2012 01:47 PM
It builds the Y values of the array and the interval will give the X value spacing.
02-23-2012 02:27 PM
In that case, it can be greatly simplified.
The "Add 0" function obviously isn't doing you any good.
If you don't need it for timing, you can remove the Wait function.
The "Add 1" function and feedback node can be replaced with the "i" (iteration terminal).
A good rule of thumb for loops is: "If you know how many times it will run before it starts, use a For Loop. If the number of times it runs is uncertain, use a While Loop."
It looks to me like you want to generate an array that goes from Init+0.001 to SetPoint by steps of 0.001. The attached VI will do this.
I realize this doesn't solve your problem yet, but I think it puts us a step towards figuring out what to do next.
Can you check this out and tell us what else is needed?
02-23-2012 02:34 PM
Im using version 7.1 it wont let me open that file
02-23-2012 02:47 PM
My version, 11, will only let me save back to 8.0.
Here's a screen cap:
02-23-2012 02:53 PM
I think im going to leave it as it because I might have to change my step values to smooth out my function. I'm not going to be back in to work on this til monday morning at 8am you have been a great help hopefully you can continue helping me out that would be great.
02-23-2012 03:28 PM
You might also want to check out the Ramp Pattern VI if you have it (not in LV base).