Posted 19 Dec 2005 Have so interesting problem. I want to use PID inside function block. PID needs parameters area which contains internal varibales of PID. Indirect addressation in FB is not working (I tryed to write commands like MOV #1 @D0 - compiller not understand it.) Sending each parameter to FB as words is not best solution, because PID have so many parameters. But in this choice I can't make one area of words, FB compiler can make parameters in different places. Have I use internal FB arrays or there are any other solutions for that situation? Share this post Link to post Share on other sites
Posted 19 Dec 2005 Hi I am using Arrays for other instructions used in funktionsblocks. I most be the only way to addres to the controlwords. Banker Share this post Link to post Share on other sites
Posted 20 Dec 2005 ... Banker is correct, the use of arrays allows PID parameters to be set within a function block. See attached PID FB Example. (also includes scaling FB which is used by PID FB) Nibroc PID_FB.zip Share this post Link to post Share on other sites
Posted 13 Jan 2006 Hi Nibroc I tryed to open open your Funktion block PID. But my CX-programmer (Ver.5) giving me a Error: ERROR: Item key 'CXProgVer': String attribute not found WARNING: Item key 'CXProgVer': Assigning default string ERROR: Invalid file version. For the scaling funktionblock there is no problem. What can be wrong? Banker Share this post Link to post Share on other sites
Posted 13 Jan 2006 Perhaps you require CX-Programmer V6. Upgrade to CX-One, it is worth it. Share this post Link to post Share on other sites
Posted 13 Jan 2006 (edited) ... BobB may be correct, I checked by downloading the files and trying with CX-P V6.0, all OK. I have printed the FB's out as .pdf, so you can re-enter them manually. Nibroc PID.zip Edited 13 Jan 2006 by Nibroc Share this post Link to post Share on other sites
Posted 14 Jan 2006 Nibroc I can see you are using nesting in you PID funktionblock. I don't think CXP. 5 have this facility. Banker Share this post Link to post Share on other sites
Posted 16 Jan 2006 Unfortunately, true. Regards anonymous Share this post Link to post Share on other sites
Posted 16 Jan 2006 ... You will however, still be able to implement PID within a function block. There are several ways you can perform any scaling if required. eg: 1. Perform scaling outside the FB (with normal ladder or an external FB) and pass the resultants as variables. 2. Perform any scaling with ladder code directly within your PID FB. Nibroc Share this post Link to post Share on other sites
Posted 3 Feb 2006 I know this is a little older post but Nibroc I have uploaded the Scale with paramters in the download section. I should have done this earlier, but heh.. The one I uploaded will give the output as an Interger and Real value. Over and Under flag bit are also provided. The input can be clamped if desired also. Scale with Parameters Share this post Link to post Share on other sites
Posted 3 Feb 2006 .... Was the updated FB written with CX-P v6.1? It does not load on V6, comes up with a version error in the output box. Wonder when Omron NZ are going to distribute CX-One, 1.1 (downloading off the net is fine, but these files are really too large for many of us, with my internet subscription, this would be over a months traffic allowance !!) Nibroc Share this post Link to post Share on other sites
Posted 3 Feb 2006 Originally written with V6.0. Added Write portection with V6.1, mabey thats causing the error. Try this version. Heres the listing in pdf. SCL_Parameters.zip ScalewithParameters.pdf Share this post Link to post Share on other sites
Posted 27 Apr 2011 Hi Nibro, I tried to use ur PID block inside my project. Unfortunately, it's not working. Please help. Min Oo. PID test_Minoo.cxp Share this post Link to post Share on other sites
Posted 15 Jul 2011 Hi , This PID FB doesn't worked with me also , some on could post an example for using this PID in ladder program. Share this post Link to post Share on other sites