07-26-2021 06:19 AM
Hi there
This is where we are at the moment with this beast.
I have tried to make the changes you have suggested and this is the result. I have tried to tune the PID again with a new "transformation vector" and it started pushing the process variable (red line) away from the setpoint position (white line). Does anyone have any thoughts as to why this could be?
Best Wishes
Andrew
07-26-2021 07:35 AM
You might need a reverse action.
For instance if a dT has a positive error, the temperature should be increased. If a dP has a positive error, a release value should be decreased.
IIRC, you can reverse output min and output max to get that effect.
I think theoretically, negating P, I and D should do the same. There might however be checks in NI's PID implementation that check P, I or D <0...
07-26-2021 07:53 AM
Hi
Thank you for the reply.
I will try to swap the sign (+/-) on the output max and min and see what happens. What is strange is that this does not happen all of the time.
Best Wishes
Andrew
07-26-2021 08:05 AM
Hi
I just tried that and got half of them going to the setpoint and half of them were not moving towards it. All four need to go the setpoint.
Best wishes
Andrew
07-26-2021 08:30 AM
@AndrewIons01 wrote:I just tried that and got half of them going to the setpoint and half of them were not moving towards it. All four need to go the setpoint.
Then check what causes this.
See if the loops that need inverse outputs have their process values reversed, or find any other relation, find the cause, then fix it.
We don't see any of your values, so we can't comment on that.
I don't know if you know, but you can put probes on wires while the code is running. That gives you run time information (that we don't have).
07-26-2021 08:44 AM
Hi
Thank you for the reply.
I will check to see what causes this and let you know the result. Is there a way I can modify the code to enable you to run it if I send it to you?
(I apologise if that is a stupid question)
Best Wishes
Andrew
07-26-2021 08:47 AM - edited 07-26-2021 08:48 AM
Hi,
wiebe@CARYA wrote:
You might need a reverse action.
For instance if a dT has a positive error, the temperature should be increased. If a dP has a positive error, a release value should be decreased.
IIRC, you can reverse output min and output max to get that effect.
IMHO I would not swap the output min/max: you set a (logical) range for the PID output value.
To set a reverse action you "just" need to change your PID gains! And to make it even more easy: you just need to change the sign of the P gain!
It helps to learn about the "basic principle" of the PID gain parameters:
07-26-2021 09:19 AM
@AndrewIons01 wrote:I will check to see what causes this and let you know the result. Is there a way I can modify the code to enable you to run it if I send it to you?
In short, you should send something that doesn't have any dependencies to stuff we don't have.
You can replace everything that returns data with some sort of simulated values. These could be constants or controls with default values set to reasonable values...
I guess you can log values that enter and exit a VI by enabling database access on the VI (right click the VI, "Enable Database Access"). Then you can send the 'database' and the VI, and we should be able to play back the results. This option is staring in everyone's face, but it's hardly ever used (anymore). Never used it...
07-27-2021 06:12 AM
Hi
Here is a zip folder with the vis. I believe that this should be everything. If there is anything missing, please let me know. I was wondering if you would be able to try to run it and see if this helps us find a solution to the PID problem. There is probably something I have missed somewhere.
Best Wishes
Andrew
07-27-2021 08:12 AM
There is at least 1 VI missing.
More importantly however, we're missing the camera setup.
Even if we had all code, we wouldn't be able to run it.
If you suspect a VI is giving you trouble, all we need is that VI with realistic values. Everything else will just be distraction.