Results for
Inspired in part by Christmas Trees, I'm curious about people's experience using AI to generate Matlab code.
1. Do you use AI to generate production code or just for experimentation/fun code?
2. Do you use the AI for a complete solution? Or is it more that the AI gets you most of the way there and you have to apply the finishing touches manually?
3. What level of quality would you consider the generated code? Does it follow "standard" Matlab coding practices? Is it well commented? Factored into modular functions? Argument checking? Memory efficient? Fast execution? Etc.?
4. Does the AI ever come up with a good or clever solution of which you wouldn't have thought or maybe of which you weren't even aware?
5. Is it easy/hard to express your requirements in a manner that the AI tool effectively translates into something useful?
6. Any other thoughts you'd care to share?
I am using simulink to generate a simple ADC sampling code. I configured ADC module in software mode, which updates the sampled value according to the sample time configured in the module. I set the sample time to 1e-4, 1e-5, 1e-6 respectively. But it seems that the sampling speed did not reach the value I set. I suspect it has something to do with the read and write operations, but I am not sure if that's the reason.
I also tried to do it using PWM event to trigger the start of conversion of ADC. Same problem happened. Because I connect a potentiometer and turn its knob slowly, the Graph on CCS is correct while when I turn it very quickly, the graph is not able to keep up with my movements. So the sampling rate is surely not enough. I wonder what I should do to successfully configure this model, thanks in advance!

Hello everyone,
Recently i started using MATLAB Real Time Code Generation Tool to generate code for 3 phase Induction motor speed control using V/F. I used the piccolo launchpad F28027 to implement this V/F technique. I used a pot to get the frequency input and computed the corresponding Voltage using V/F ratio. When i tried implement it on the board, output PWM frequency was not exactly the same which i simulated. It was 2 - 3 times higher than the actual. So i tried reducing the inputs by the same 2-3 times. It worked.
Question is, what the problem with the code and processor? why difference in PWM frequency between simulation and Realtime?