Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

external clock on my angular position measurement

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.

 

Error Wires.png

 

 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,

 

0 Kudos
Message 11 of 13
(1,912 Views)

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

0 Kudos
Message 12 of 13
(1,891 Views)

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

Doug Farrell
Solutions Marketing - Automotive
National Instruments

National Instruments Automotive Solutions
0 Kudos
Message 13 of 13
(1,877 Views)