From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-11-2021 07:00 AM
Hi All
I have been trying to tune a PID by varying the gain , integral and derivative terms. I am not having a lot of luck with this so I have decided to investigate auto tuning.
The setpoint and Process variable are both a 1D array of values (X and Y Image centroids).
This will therefore make the output a 1D array too.
Are there any array instances of the auto tuning vis?
I have tried putting the PID vi into a while loop and then using auto-indexing for the inputs and have also debated having four auto-tuning PID vis but this sounded like a really inefficient way of doing this.
05-11-2021 07:13 AM
05-11-2021 07:18 AM
Hi GerdW
I have only measured the Process variable vs setpoint. The reason I did this was because the output is then used in a calculation to communicate with some picomotor mirrors. I don't have any data to send unfortunately.
I can try to send the code if this helps in any way
05-11-2021 07:40 AM
I Cannot attach the file is there another way we can solve this problem?
05-11-2021 07:44 AM
05-11-2021 08:06 AM
here is an image of the PID section (its probably painful to look at) if this is unclear please do let me know
05-11-2021 10:48 AM
@AndrewIons01 wrote:
here is an image of the PID section (its probably painful to look at) if this is unclear please do let me know
Very painful indeed! Also completely useless to answer your original question!
(did you know that index array is resizeable? How many time do you think you need to index out the same element in parallel? Wouldn't it make more sense to branch the wire afterwards? Why is there a stacked sequence at all?)
05-11-2021 11:03 AM
Hi Altenbatch
I apologise if this is painful to look at. I am still learning.
Ok so at lest I know that this way is wrong.
I did not know that the array index is resizable. How do I do this?
The Stacked sequence is there because the output of the PID goes to a vector calculation to make a set of mirrors move.
as for questions three and 4, i am unsure as to what you mean by these, can you clarify?
05-11-2021 12:15 PM
If you move your mouse over an Index Array, two little dots should appear on the top and bottom. Those are handles you can click and drag to create more outputs so you only need one Index Array that can output all the indices you're trying to use (0,1,2, and 3). I would do that and try to clean up those wires a bit because it's very hard to follow, almost impossible from an image.
I too thought you were indexing the same array twice (two index 0's, two index 1's, etc), but I see those are actually two different arrays you're indexing, one on the top of the page 4 times, and the other on the bottom 4 times. It's just so crowded it's hard to tell! It really helps to make your VI's look pretty.
05-11-2021 12:27 PM