greml1n Posted April 21, 2015 Report Posted April 21, 2015 Just upgraded to latest Unilogic 1.13 Rev 9. After upgrading a project to the new Unilogic and trying to download, I got compilation errors of read only tags for PID Control Values and Control Value integral. Am I missing something easy or do I have to change my logic if these values are now read only?
Saragani Posted April 21, 2015 Report Posted April 21, 2015 Due to a problem with earlier versions, those tags and others had read-only members set as writable. Can you please explain why are you writing values to PID Control values and Control Value integral? We had some another customer which had the same problem, and he understood that there is no point and logic in writing to those tags.
greml1n Posted April 21, 2015 Author Report Posted April 21, 2015 I obviously would store the control value to the appropriate output but also had a manual mode that would turn off "run pid" and store a user entered manual value into control value.In regards to the control value integral, if a user entered "0" for integral, the control value integral would have to "wind down". I wanted it immediately removed from the PID algorithm, just my preference I guess. I can probably use the force error integral? Is there a way to revert to the older Unilogic or downgrade the project to the old version. This project was finished and I was just loading the new firmware etc. Kind of a bummer to have to go backs and make changes now
Saragani Posted April 22, 2015 Report Posted April 22, 2015 Hi, just a workaround that should work with version 1.13.9 (it will not work with later versions). If you create a new instances of the PID autotune struct, they have their members as writable. (On later version, the members will remain as Read-Only). So you can create new instances, and use the Find and Replace (Ctrl + H) to replace from the old PID autotune instance to the new one. Since this workaround will not work on later versions, I suggest you to fix your code, so you will not get stuck in the future. About the force error integral, I'll check that for you.
Ofir Posted April 22, 2015 Report Posted April 22, 2015 Hi, As you mentioned you can use the ladder utility Force Integral to initialize or change the error value while the application is running. You can erase wind up error by writing '0' into the function, which is written into the PID loop's Integral Value in the PID Config struct.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now