12/4/2010 12:03 AM  
Posts: 1 Rating: (0) 
Hi I seriously need help, can someone please explain what exactly an integer, double integer and real are ??? (This in relation to Siemens Simatic 300). Plus why would have I have to change an integer (int) to a double integer (dint) then to a real ????. WOuld I be right in saying that if I dont the programme will round the numbers up ??? Splitted from please help me. 
Last edited by: O_Moderator at: 12/6/2010 8:57 AMnew subject after splitting 

12/4/2010 3:42 PM  
Posts: 947 Rating: (44) 
int  figuratively speaking, is arithmetic (numerical) data type. With it's you can make all numerical operaion. word  logical data type, equivalent"unsigned int" in C.This difference used compiler for additional checking sematic error.if you look at the internal representation of a set of bits as INT identical as Word 
12/7/2010 5:57 AM  
Joined: 1/28/2009 Last visit: 11/20/2020 Posts: 6694 Rating: (1283) 
Dear memeber Integer is a 16bit fixed point number.The bits number 0 to 14 represent integer value and the bit number 15 is sign, negative value in the case of 1 in 15th bit.The value range is from 32767 to 32768. despite a int value , a DINT value has a identifier(e.g L#11), it is a 32bit fixed point number.The value range is from +2147483647 to 2147483648. Real numbers are 32bit variable (e.g. positive side from 1.175494*10^{38} to3.402823*10^{38} ). The length of a Real number is as same as a DINT number, But bit pattern of a real number is totally different from a DINT. In a real number bits 0 to 22 are considered as mantissa and bits 23 to 30 are considered as exponent. The last bit is the sign. regards 
This contribution was helpful to1 thankful Users 
12/7/2010 7:57 AM  
Joined: 5/28/2008 Last visit: 11/23/2020 Posts: 4189 Rating: (788)

Hello, Please read section (27 Appendix) of this Manual "SIMATIC Programming with STEP 7 V5.5" If you want to jump directy to INT, DINT & REAL format of Data types, then go directly to sections: 27.3.2.1 Format of the Data Type INT (16Bit Integers) 27.3.2.2 Format of the Data Type DINT (32Bit Integers) 27.3.2.3 Format of the Data Type REAL (FloatingPoint Numbers) 
Ayman Elotaify 

This contribution was helpful to3 thankful Users 
Follow us on