Jump to content

PID: Status 9 permanently


Recommended Posts

Hello All,

I have an issue with PID control.

The process to be controlled is quite fast, so auto tune makes no sense and I approach the optimal PID parameters manually.

To get a feeling for it, I started with P = 5% and switched off I and D: P = 50, I = D = 0. Sample time is set to 50 ms.

Control is doing ok but I want to make it better, of course I want to optimize with I and D (setting I and D to non-zero values).

But then I found that PID status is 9 permanently, independent from I = D = 0 or not. The PID values for I and D read with "READ CC" are 0 permanently.

I repeat: This behaviour is independent from the values of I and D.

Setting PID status to 4 manually does not help.

There are no "PID PAUSE I & D" or "FORCE ERR INTEGRAL" blocks in the control loop.

Why do I have PID status 9 permanently, even when I = D = 0?

Any help is appreciated.

Regards - JSonne

Link to comment
Share on other sites

Hello Emil,

Thank you very much for your promp reply.

1. Hardware is a V530-53-B20B Rev. A,

2. Visilogic is 8.0.1 build 0, OS is 5.04 (13),

3. Log is attached. CV is used to control a solenoid valve. CV range is -80 to +80, valve is opened if Cv is > 0.

I have changed from I = D = 0 to I = D = 20 during logging (time set to zero 3 times: I = D = 20 after the last time). No changes as far as I can see.

With best regards,

JSonne

Link to comment
Share on other sites

Hi,

Are you sure:

You activate FB PID configuration with one scan condition (SB2)?

It's located in subroutine, which is always scanned (Main routine)?

Can you try the follow:

1. Update VisiLogic to V9.01 from our site.

2. Open yor project with the new VisiLogic version. Save it.

3. Delete FB PID.

4. Perform Build All;

5. Write again FB PID. Perform again Built All.

I'm quite not sure the way you drive the output is a good one! It seems more like ON-OFF. I'll recommend two other options:

1. Set CV range to 0-1000. Use then FB PWM to change the duty cycle and this way driving time proportional the valve.

2. Set existing HSO to relativelly high frequency - let's say 100 Hz. Then - connect the valve and change the duty cycle. In most of solenoid valves as result you will have the valve opened proprotionally to duty cycle, which in fact is CV!

Link to comment
Share on other sites

Hello Emil,

The FB PID Conf is only scanned once. It is part of a larger init subroutine, which is just scanned during power on.

I have to ask back with a colleague regarding the version change. He must have a reason for not changing the version.

Regarding our suggestion of driving a solenoid valve with a 100 Hz PWM to make it kind of a proportional valve: I think this can cause severe thermal problems and will shorten the solenoid life drastically. So this is no option, I'm afarid.

The issue is that the control is just P and I and D have no effect (status 9 permanently).

With best regards,

JSonne

Link to comment
Share on other sites

Hello,

I think I know where the problem is - at least one of them.

Config block must:

1. Be activated with one scan condition (usually SB2 - power up bit)

2. Be located in a subroutine, which is scanned continuously. Usually we recommend to put it in Main routine.

As you describe the application, it seems your PID Config module is located in subroutine, which is activated and scanned only once - during power up. This answers the first condition, but not the second.

Please try as a first step to move FB PID Config to main routine and activate it with SB2. Let's see what will be the result.

About driving solenoid valve - I know many people who use solenoid valves this way and obtain precise proportional control via relatgivelly simple hardware. But - it's up to you... At least use my first suggestion - to drive the valve time proportional via FB PWM. The way you're working is practically ON-OFF and I'm not sure working this way I can help you too much...

Link to comment
Share on other sites

Hello,

I think I know where the problem is - at least one of them.

Config block must:

1. Be activated with one scan condition (usually SB2 - power up bit)

2. Be located in a subroutine, which is scanned continuously. Usually we recommend to put it in Main routine.

As you describe the application, it seems your PID Config module is located in subroutine, which is activated and scanned only once - during power up. This answers the first condition, but not the second.

Please try as a first step to move FB PID Config to main routine and activate it with SB2. Let's see what will be the result.

About driving solenoid valve - I know many people who use solenoid valves this way and obtain precise proportional control via relatgivelly simple hardware. But - it's up to you... At least use my first suggestion - to drive the valve time proportional via FB PWM. The way you're working is practically ON-OFF and I'm not sure working this way I can help you too much...

Hello Emil,

We replaced version 8.01 by version 9.01, and it works good.

The PID config block should be scanned the first time with SB2 = Hi and then EVERY scan afterwards, is that correct?

The ON-OFF strategy is a normal nonlinear control strategy which can be run with a linear controller within certain margins... I replaced the control for two of the valves (out of 6) with a PWM at a frequency of 1 Hz. This shows the same results as the old configuration, however still we have the PID status 9 issue.

With best regards,

JSonne

Link to comment
Share on other sites

We have deleted all PID FBs completely from the project, saved it, built all, transferred to the PLC, then inserted the PID FBs again, saved again, built all, transferred to the PLC.

The PID Config FB is now in !Main Module.!Main Routine with a SB2 set condition.

We still have the PID status 9 issue, and when reading the PID values with READ CC, I and D value are 0, P is changing. Parameters are: P = 30, I = 20, D = 20.

Do you have a hint what to do?

With best regards,

JSonne

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.