Description touch screen and PLC
are generally conducted between plastic, floating point data types such as communication, with the aid of the standard ASCII code table, touch screen and PLC can be letters, Numbers and some special symbols between a string type of data communication;
Also, with the aid of standard Chinese characters Unicode tables, each character corresponds to a Chinese character coding, can be in Chinese characters between touch screen and PLC communication string data type.
Unicode UCS - is widely accepted at present
2, which USES two bytes to encode one character at a time, such as 'Chinese characters by' coding is 0 x7ecf, pay attention to the character encoding, generally represented in hexadecimal, decimal in order to distinguish, hexadecimal begin with 0 x, 0 x7ecf is converted to a decimal 32463, UCS -
2 with two bytes to encode characters, two bytes is a 16-bit binary, 2 of 16 power equal to 65536, so the UCS -
2 at most 65536 characters.
From 0 to 127 characters with ASCII encoding of characters, such as the letter 'a' Unicode is 0 x0061, decimal number is 97, and is the ASCII code of a '0' x61, decimal is 97, the Chinese character coding, Unicode support for Chinese characters is not so good, in fact, this is no way, there were a total of LiuQiWanGe simplified and traditional Chinese characters, the UCS -
2 said up to 65536, more than sixty thousand, so the Unicode can eliminate some almost no Chinese characters, but the commonly used simplified Chinese characters, but also more than seven thousand, in order to represent all Chinese characters, UCS - Unicode
4 specification, it USES 4 bytes to coding characters, or a UCS - but it is now widely used
2, only two bytes to coding.
The main hardware and software
The experimental process description 3.
1 PLC controller
variable definition and assignment using UnityProV13 .
0 software, to define a WORD in the PLC type array, link % MW0 registers, each array element numeric value corresponding to a Chinese character, rules of corresponding reference standard Chinese characters Unicode table, for example, look-up table to learn that the Chinese character 'shi' the corresponding numerical is 65 bd, change the high and low byte (
According to the PLC brand model to decide whether to need to change the high and low byte)
Converted to a decimal value is 48485, 48485 will be one of the elements of the array assignment, along with the following application configuration of touch screen, touch screen can display the word 'shi' and 'wu' same 'han', '' resistance', 'words corresponding value respectively 26219, 18796, 4224, 46943, 3.
2 touch screen configuration program - navigation window
Graphic images -
The basic frame -
Put a string on the picture 1 shows controls, link the string variable STRING01, pay attention to show length is in compliance with your request since this function alignment, can be realized with the simulation software in this paper, at the same time enable UnityProV13 directly.
1 0 simulation and Vijeo Designer, Basic.
1 equipment simulation operation can see the results, 'schneider in wuhan' five Chinese characters respectively have different Unicode value with the matching, in PLC controller
input corresponding numerical can correspond to the touch screen display 4.
Summary with the aid of standard Chinese characters Unicode tables, each character corresponds to a Chinese character coding, can be in touch screen and PLC controller type Chinese characters in the string of data communication between, if not a lot of different characters to show that the string input function can use the touch screen for the push, get the Unicode value of the corresponding Chinese characters, if you want to show a lot of different Chinese characters, you can query to the corresponding Chinese characters from a Chinese characters Unicode table Unicode value.
Chinese characters unicode table recommended links as follows: https://blog.
Net/u010811143 / article/details / 51560246 examples in this article use the unicode table from below:
Shenzhen Coolmay Technology Co., Ltd. has created a professional team which contained with a numbers of engineers and technology experts.
Shenzhen Coolmay Technology Co., Ltd. builds value for our investors through the strength of our customers’ satisfaction and by consistently producing superior operating results.
The global market is estimated to reach a value of almost plc controller price in the next decade. have a robust position in the programmable control systems market because of its proven high potency in plc controller price.