What I said above is basically correct. Bits, bytes, words, double words, etc. are storage units in computers. In the computer world, it only recognizes two numbers, 1 and 0, so they only occupy one bit. When there are 8 bits, byte is used. ) represents, 16 bits are represented by words, 32 bits are represented by double words, double words = 2 words = 4 bytes = 32 bits. Integers, double integers, real numbers, strings, etc. all refer to data types.
int integer data occupies 4 bytes, that is, 32 bits. The length of an int type data uses 4 bytes to store
short short integer occupies 2 bytes, that is, 16 bits, two byte.
long long integer occupies 4byte, that is, 32 bits, four bytes
float single-precision floating point occupies 4byte, that is, 32 bits, four bytes
Double double-precision floating point type occupies 8byte, that is, 64 bits, eight bytes
In PLC, 0-32768 can be stored in one word. The first bit indicates positive and negative. If it exceeds 32768, double words must be used. Come to store.
0/1/2/3/-1/-2/32768, etc. are integer data. 0.1 is floating point data (real number). @/#/$/%/C/A, etc. are character types
A character type occupies 1 byte, which is 8 bits, and a char type data (for example: a, #,!, etc.) uses 1 Bytes to store
A DINT (double integer) data type occupies 32 bits of storage space. If you want to use bytes to install it, it cannot be installed. Therefore, the system will force you to use 32-bit Double words to pretend.
Just like a car can seat up to 5 people, you can’t squeeze 10 people into it. On the contrary, a car can seat 5 people, and no one will say anything to you if you can only seat 1 person. Just don’t think it’s a waste.