I made mention on a reply to the other commentator but I feel the issue is due to lack of training data in the PLC/SCADA space. If an AI engine with the appropriate amount of training data was available to me I'm sure it could do the work just fine, but at the current state we have partial knowledge which is too similar to other languages. The result is agents which quickly hallucinate capabilities of the SCADA or PLC hardware and write out code that fundamentally won't work. The result of this is that I distrust AI to get it right enough that I won't kill an operator or blow up a production line. The automation world is too closed source and until the push for open standards that have begun to gain traction really takes off we're sort of stuck.
But then at the same time the code of an industrial system typically isn't the bottleneck in development. Selecting the hardware and waiting for the physical installation is a far bigger bottleneck on a project than what I do. As a result, in the end it isn't the "Correctness" of code in the sense of it is doing what it was instructed to do properly, but the correctness of matching software to hardware and that's where I've seen several failures in AI. If I tell it I have a Schneider Altavar VFD and I get code to interface with an Allen Bradley PowerFlex that's one issue. But if I get code to interface with a Altavar that expects specific parameter adjustments on the drive that haven't been set that's a separate issue and more typical for the faults I've seen within AI. If 99% of drives are configured to operate pumps and that's what AI learns for training, the moment I need it for a mill, aeration fan, or conveyor belt (which have distinct physical requirements) then we have the issues I've been seeing and it takes a trained eye to spot those deficiencies in my experience.
But then at the same time the code of an industrial system typically isn't the bottleneck in development. Selecting the hardware and waiting for the physical installation is a far bigger bottleneck on a project than what I do. As a result, in the end it isn't the "Correctness" of code in the sense of it is doing what it was instructed to do properly, but the correctness of matching software to hardware and that's where I've seen several failures in AI. If I tell it I have a Schneider Altavar VFD and I get code to interface with an Allen Bradley PowerFlex that's one issue. But if I get code to interface with a Altavar that expects specific parameter adjustments on the drive that haven't been set that's a separate issue and more typical for the faults I've seen within AI. If 99% of drives are configured to operate pumps and that's what AI learns for training, the moment I need it for a mill, aeration fan, or conveyor belt (which have distinct physical requirements) then we have the issues I've been seeing and it takes a trained eye to spot those deficiencies in my experience.