11-10-2009 05:05 PM
Hello,
I'm not too sure about your algorithm, but a couple things I did notice is that you are not monitoring the error on your AO task, and you do not have any error handling towards the end of it. One thing you can do to make life easier would be to combine the error lines and one stop button into a compound OR function, which should help to reduce clutter. Take a look at the screenshot below.
I also noticed that you seem to be taking multiple samples from your CI Angular Encoder task, but then you index the array and only use the first value for your PID VI. What is the reasoning for this? That is about all I can really help with, as I am not as proficient with control algorithms.
Regards,
11-16-2009 06:36 AM
hi,
thanks again for your help, i fixed everything as you suggested. The only problem is that input in the pid is an array, the process variable, so also pid gains and output range and setpoint has to be an array. But i don't want there to have an array, i want something fixed like an element, for example setpoint has to be all the time (for example) 1. Also when i run the vi for some reason it does not produce any analog voltage output. but when i turn the rotor with my hand, i measure values from the encoder
11-17-2009 12:48 PM
This seems to be more of a question for PID toolkit board. I would recommend posting there as they are likely to better be able to help you out with this.
http://forums.ni.com/ni/board?board.id=240