Robo

Q series PID control

16 posts in this topic

Has anyone had experience with the PID function in the Q series. I am unable to get this function to work. Am trying to use this function to control a VSD to maintain a pressure. The PLC goes into error after downloading. Putting a time delay in has stopped this error but the PID function refuses to work?

Both the SV and PV is scaled to 0-2000

The control data and I/O data are initialised.

I have tried both normal and differential instructions with no success. Sample program attached.

PID1.gxw

Share this post


Link to post
Share on other sites

I must admit I haven't looked in details through your sample program, but I would recommend downloading the ready-made FB from Mitsubishi's website. The FB library is called "PidQ_GW2_V100". Check it out, alternatively copy the code you want if you intend to build your own function...

Just a tip.

Share this post


Link to post
Share on other sites

Thanks kaare_t.

 

Do you have the link to the FB library as I've looked on the American and European site and still can't find it.

Share this post


Link to post
Share on other sites

Thanks. Have downloaded.

In regards Function Blocks, is there a specific area where you can view and download function blocks from a library? Mitsubishi  manuals mention a Function Block Library but my requests to my Mitsubishi rep said it was not available.

Share this post


Link to post
Share on other sites

No problem!

The Mitsubishi site is the only site you can download FB's from, and the search function is really, really bad! It's very hard to find the FB you are looking for, and/or wondering if exists... But several people on this forum knows about different kinds of FB's so feel free to ask. You are registered and able to access Mitsubishi's website, where you can download information right? There you can select to only view certain parts of the download section which helps a bit, but still they could learn a lot by looking at google's search algorithms for better search-results for the end user...

Share this post


Link to post
Share on other sites

Thank kaare_t

 

Is there any info on manually tuning the PID loop or getting software to calculate the PID parameters once we have all the log files graphed to show response etc?

Share this post


Link to post
Share on other sites

Your welcome.

  1. If you google "PID Calculator" you'll find a lot of excel sheets (note that excel sheets from untrusted sources can contain malicious code!!!!) to test parameters
  2. You can buy software for about 100 USD and up (google the same phrase as above)
  3. Using the mathematical formulas manually (point 1 and 2 are basically software using these calculations in the background)

If you have the possibility to do manual testing in the PLC without theoretical software that's a fair option. Just start with disabling the I and D parameters and use only P (note that with only P parameter the process value will stabilize above or below the set value). Then after you're satisfied with P, go on with I to get a process value that is spot on the set value (after a little time). At last do some testing with D (but D is seldom in use).

P.S. What kind of process are you regulating?

1 person likes this

Share this post


Link to post
Share on other sites

Dear Kaare_t

Hi. first thanks to you replying.we have Q12PRH which are connected to 5 R I/Os by modbus TCP/IP. we have 9 loops in our process .I've red some manuals about the pid and thought  i can follow instructions step by step and used PID but now it didn't work.I can't change the parameters(P,I,D,TS,SV)

I appreciate if you help me

best regard

Ekar

 

Share this post


Link to post
Share on other sites

@Ekar_Boy: I would recommend you to start a new topic to better handle your issues... But since you're here, why can't you change the parameters? Do you change them but they change back, or what is the problem. It doesn't sound like it's a PID problem, but rather a programming problem...

Share this post


Link to post
Share on other sites

Thanks again kaare_t.

The process is a chemical exothermic reaction and we have only 1 shot at it because the cycle time is too short. We also cannot have any major overshoot as it can start a thermal runaway reaction. In essence we can only make small changes to the PID, start the process, log the results and repeat for the next cycle. Very long winded and costly. No option to autotune either even if we had an autotune feature. I managed to get the P & I set manually to a figure that has resulted in minor oscillation but not what is needed as a completed process. I will followup on your advice as I believe this is the only option open to me.

Share this post


Link to post
Share on other sites

Sounds like you would get the funds to purchase a software since I would guess that the software expenses would qualify the expenses (and possible danger) of the process testing... Maybe also contact some specialists in PID if this is very critical. I know that universities sometimes can use students to do these kind of tasks as an assignment (at least in Norway they sometimes do, if it is related to school work).

Share this post


Link to post
Share on other sites

Do you guys have any examples of PID control in ladder? Or documentation?

Share this post


Link to post
Share on other sites

What do you want to control with the PID? There are PID function blocks available in Mitsubishi which are probably best suited to temperature control. 

For harder realtime applications I have PID programmed in simple ladder but I would have to make a generic example to share it.

Share this post


Link to post
Share on other sites

I would apreaciate a generic example. Let's assume I have a sw made in ladder. I'm not able to use function block.

I want to control a temperature in a room using a PT100. 35 degrees for example. How can I do that?

Share this post


Link to post
Share on other sites

I'm pretty sure that the manual has generic examples.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now