4/2/2007 12:26 PM  
Posts: 1 Rating: (2) 
I am a student and i am doing a dissertation which condists of implementing a predictive control algorithm in the PLC. In the laboratory we have a PLC S7300 with CPU 313C2DP and a PLC S7200 with CPU 222 connected with EM 277 The main idea is to implement the algorithm first in the S7300 and then in the S7200 to see the differences and the response times of each controller. The predictive control algorithms have a large amount of calculations that must be executed in each sampling period. In general,in each sampling instant 150*(a*b*c*d) additions and where a ranges from 0 to 88 have to be done The algorithm gradually increase the parameters. What i have realised is that as the parameters increase, so the accuracy of the results differ from the expected values. I also did another experiment in order to test it. MATLAB S7300 S7200 So an obvious difference in the results of S7200 can be seen.My question is,is it possible that the S7200 have a different accuracy(especially when they are dealing with floating point numbers) that can affect the result of a procedure? thank you in advance, 
4/24/2007 5:45 PM  
Joined: 3/27/2006 Last visit: 6/7/2022 Posts: 90 Rating: (13) 
I found your post to be very interesting, thank you for sharing it with the forum. I don't have an answer but my guess is the S7200 rounds the floating point numbers at some point, and this is at a different number of decimal places than the S7300. I also believe the S7200 is not as similar to the S7300 as you might think. The S7200 platform comes from Johnson City, TN while the 300 platform comes from Germany. 
"I never let a cowboy make the coffee." 

5/6/2007 9:42 PM  
Posts: 121 Rating: (15) 
Both the S7200 and the S7300 use the same methode for displaying floats (ANSI/IEEEstandard7541985). This means a 23bit number value, a 8 bit exponent and 1 bit sign. (see wiki ) I could find a remark that floating point numbers als accurate to 6 decimal places for both the S7200 and the S7300. So in theory there should not be a differece between the 2 PLC's I don't know the code you are using and what type off math's are made. But might be a limitation / bug in one off the math processing units. 
5/7/2007 9:02 AM  
Joined: 9/28/2005 Last visit: 12/1/2021 Posts: 414 Rating: (28) 
Hi, This is indeed a very interesting post. As Mojo allready said, the S7200 is a (former) TI design and it uses a different processor compared to de S7300/400 which are a Siemens design. If I'm correct and please correct me ifI'm wrong,the s7300/400series use a Motorola processor, which also explains why, compared to others fabrics, a byte swap is needed for displaying values on HMI. I believe that de processor of the S7200 is not a Motorola processor. But it's not necesarry that the difference of a processor isthe only reason for this difference,also the way a program(code) is written or the order of the code has some influence on the result. If you can do a calculation in one time, without storing the results, the result is more accurate then storing the result of the subcalculations and then use these results again. What happes with your matlab calculationwhen you use a PC with another type or make processor? 
Smurf 

Follow us on