I tried that and it really doesn't work.
May be PID tuning," choosing the parameters of the PID block" use genetic algorithms one day, as GAs may be considered as an Optimization Technques.
First, PLCs have nothing to do with artificial intelligence. Artificial intelligence is a hyped up and over used term. Anyone would have a hard time convincing me that artificial intelligence exists, yet, and I won't placate some professor that wants to glorify a simple math algorithm. GAs have even less to do with intelligence and more to do with evolution. This is very inefficient as a lot of trial and error is involved.
I tried making a auto tuning program two years ago using an intelligent trial and error routine. First an evaluation routine is required. There are several techniques. ISE, IAE and ITAE. In each case the goal is to make the same change in SP and minimized the value returned by the evaluation function by changing the PID gains. With a stupid GA one would need to try many trials with different gains and you still wouldn't be sure the best gains were found.
A better way is to change a gain and see if the new evaluation is better than the last. If it is, then make another change in the same direction and repeat until the evaluation no longer get better(smaller). At this point one can choose a mid point the last good gain setting and the last gain setting and keep dividing the intervals in half until the minimum evaluation is reached. Then this procedure is repeated with the next gain. Normally you want to try the proportional gain, the integral gain and finally the differential gain. This procedure may need to be repeated.
One can see this is a much better way than using a GA. A binary search for the minimum is almost optimum.
BUT, THERE ARE FLAWS IN THE BINARY SEARCH APPROACH AS WELL AS WITH GAs!!!!
First, it takes a lot of trial and error to find the gains that return the best ( smallest ) evaluation. This may not take too long with a motion controller, but it may take a long time on a temperature control system. Second, the best (minimum) evaluation may be only barely stable and not very robust!
The first problem can be solved by finding a model of the plant and virtually tuning the model. Running the model allows one to do thousands of trials each second. BUT, if you have the model then why bother? If you have the model then ONE CAN CALCULATED THE PID GAINS. No guessing or trial and error involved.
So now the trick is to get an accurate model and calculate the PID gains. No trial and error is involved. So much for GA.
If a model is not available then use one of the evaluation techniques ( ISE, IAE or ITAE ) to find the gains. Be aware though that in the end you are moving poles and zeros around when you change the PID gains. It is the location of the poles and zeros that determine how the system is going to respond so the real trick is to place the poles ( inverse of a time constant ) at location that will give the desired response. All the gains can be calculated IF you have a model and the model is some what linear.