Word and INT their differences and conclude what can replace interoperability, which don't interoperability? - - - - - -

by:Coolmay     2020-07-05
We applied to the design of PLC controller program have not experienced this confusion: some program INT and WORD can interoperability, but some not, WORD and INT their difference and conclude what can replace interoperability, which don't interoperability? In this paper, study together!

one, the overview of difference ( Worry if it is ok to finish see this)

1, the WORD is unsigned data type; INT is a symbol of the data type ( Top 1 said negative, 0 indicates positive) 。 Usually WORD used in logic operation, INT for mathematical calculations; When using ladder diagram and SCL language distinguish more strictly. System does not detect when using programming statements table data type matches, namely WORD and INT on usage no difference ( WORD to do mathematics, also can make logical operation INT) 。

2, S7 - 300 WORD and INT scope:

WORD scope are: w # # 16 # 0000 ~ ~ ~ w # 16 FFFF


WORD: 0 65535.

INT: - 32768 - + 32767.

2, from the Angle of programming analysis ( Read this paragraph, I know, and know why)

1, the interpretation of 1

INT is a data type, is a 16-bit integer data, - 32768 - 32767

WORD said a WORD, can hold 16 bits of data, no specific requirement for the type of the data;

2, 2

data interpretation of type INT and WORD are 16 storage unit, but INT is integer stored data types, storage is an integer, the range is - 32768 to + 32767. WORD is a character data type, if the data is stored is unsigned integer 0 - 65535. In STL language programming, data type is not how to distinguish, INT and WORD data types can be interoperability, but if TNT in LAD programming language and WORD data type interoperability will be an error. Of course, you can also set in the STEP7 software in LAD programming mode does not distinguish between data types can be interoperability is not an error. But such use is not recommended.

3, explain three

give you a very good way of understanding,

is a negative number if you want to use, because it can only use the INT INT is signed, the highest level is the sign bit.

so if you do not have symbols requirements, you can use the word, of course, the sign bit is data, so the scope is bigger.

both no difference on usage, but if TNT in the LAD programming language and WORD data type interoperability will be an error.

it is also the most notable places, you when add symbol annotations to PIW these channels must pay attention to the data types, confusing the INT and WORD in call FC105 you will find an error, the many people make the mistake.

4, explain 4

INT are integers, scope - From 32768 to 32767. WORD is a WORD, the range of 0 ~ 65535.

, which is used to block if the call, pay attention to pin a specified data type, use the variable type must be consistent with the data type of the pin can be. Of course, attention should be paid to the range of storage.

Professional programmable control systems also understand that when you're working with plc controller price product, it's important to understand that quality of plc manufacturers always matters.
Shenzhen Coolmay Technology Co., Ltd. works hard to enhance continuously our reputation for accessibility, professionalism, performance, and the depth and quality of our long-term consultative relationships with clients.
Among improvements to plc manufacturers, nearly half of consumers considered quality and service as the most important change a business could make in its supply chain.
We take advantage of high technology to produce products that support safer and better quality and that enhance the using experience of plc manufacturers.
Custom message
Chat Online 编辑模式下无法使用
Chat Online inputting...