发布于 2010-11-09 11:27:35
5楼
For selecting a CPU, you have to estimate the calculation time and memory requirements for your program. A PID controller takes about 0.8 ms in an S7-416 CPU and needs about 6K of storage + 600 bytes for every instance. If you use a cycle of 1 second this means that you could get a maximum of 500/0.8 = 625 controllers in this cycle (without any other logic!!!). If you go for a 5 second cycle, this would of course be 5 times more. The memory required for this 625 controllers would be 6K + 625*600 = 372K, again without any other program parts. If you take a slower CPU, the execution time of the PID block is bigger, so less would fit in the same cycle. If you are going to automate a process plant with the CPU, I would opt for the PCS7 engineering toolkit, as this offers more convenient ways to design process automation programs with CFC,SFC and SCL programming languages and PID controllers ready made with more options than the bare PID algorithm of the FB41 (auto/manual, internal/external setpoints, engineering units, alarm limits, etc...).