CN103425312A - Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM) - Google Patents

Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM) Download PDF

Info

Publication number
CN103425312A
CN103425312A CN2012101914858A CN201210191485A CN103425312A CN 103425312 A CN103425312 A CN 103425312A CN 2012101914858 A CN2012101914858 A CN 2012101914858A CN 201210191485 A CN201210191485 A CN 201210191485A CN 103425312 A CN103425312 A CN 103425312A
Authority
CN
China
Prior art keywords
picture
decoding
address
information
compiling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012101914858A
Other languages
Chinese (zh)
Inventor
蔡锦达
秦绪祥
王亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN2012101914858A priority Critical patent/CN103425312A/en
Publication of CN103425312A publication Critical patent/CN103425312A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a touch screen file compiling and decoding method based on an advanced reduced instruction set computer machine (ARM). The method is characterized by including compiling of an upper computer program, storing of image information, decoding of system work parameters and decoding of images. The images of an upper computer can be displayed on a touch screen through compiling and decoding. File compiling and decoding of the touch screen are important links in touch screen development and are the key for deciding whether the images of the upper computer can be displayed. By means of the compiling and decoding method, touch screen image manufacture is simple, operation is simple, control and programming are convenient, and wide application of the touch screen is facilitated.

Description

A kind of compiling of touch-screen file and coding/decoding method based on ARM
Technical field
The present invention relates to the embedded development field, a kind of compiling of touch-screen file and coding/decoding method based on ARM is provided especially.
Background technology
Built-in industrial level touch screen human-computer interface, claim again the technical grade touch-screen, and it is embedded system typical case's application in industrial control process, mainly is used to the human-computer interaction device of supervision, control and the operation of support industry equipment.
Can the compiling of touch-screen file and decoding be the important steps in the touch-screen exploitation, be the key that show the host computer picture.Graphic control panel directly perceived and easy and simple to handle, control and programming convenient, in Industry Control, application is more and more extensive.
ARM(Advanced RISC Machines), both can think the name of a company, also can think the common name to microprocessor, can also think a kind of name of technology.
Arm processor is 32 bit reduced instruction set computer (RISC) processor architectures, and it uses widely in many Embedded System Design.
Summary of the invention
The object of the invention is to, provide a kind of compiling of touch-screen file and coding/decoding method based on ARM, to overcome the existing above-mentioned shortcoming and defect of prior art.The present invention in conjunction with take the touch-screen that ARM is processor, consider make host computer picture by compiling and decoding after, just can be in the touch screen display.
The technical matters that will solve required for the present invention can be achieved through the following technical solutions:
A kind of compiling of touch-screen file and coding/decoding method based on ARM, is characterized in that, comprises the following steps:
One, compiling host computer procedure;
Two, stored picture information;
Three, decode system running parameter; And
Four, decoded picture.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Described compiling host computer procedure: after utilizing configuration software to carry out picture, then the compiler directive in the calls tool menu, will generate a binary data packets in host computer, content in packet is all properties of picture, and then host computer downloads to man-machine interface to the content in packet.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Described configuration software, on host computer for editing a software of touch-screen picture.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
The all properties of described picture, be divided into two parts: system information and image information; Wherein, described system information refers to the attribute of the device in system, i.e. state area and control zone in the type of PLC in the kind of liquid crystal display, system, start picture number and PLC; Described image information comprises: (1) picture number; (2) picture background chromatic zones; (3) element number; (4) picture 1 element pointer data district; (5) attribute of each element.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Set up a bad block table, all bad pieces number are recorded in the inside, then it are write to the first page of the 0th, and later the 0th allows to wipe never.Five pages of first pages to the on the piece that is 1 at logical block number (LBN) are deposited piece number and the page number at each picture place.
The storage format of described image information comprises:
(1) physics is the 0th: the Flash bad block table;
(2) logic is the 1st: deposit the picture pointer for 0 ~ 4 page, the 5th page of storage system information;
(3) logic is the 2nd: the storage system setting comprises: baud rate, reference point setting, communication format;
(4) logic is the 3rd: all pages is write 0 monoblock as storage power down protection data use, just no longer carries out after bad piece is arranged;
(5) logic is the 4th: deposit image information.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Described system operational parameters comprises: type of touch screens, PLC model, start picture number, PLC control zone, PLC state area and 6 parts of little picture library first address.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature: described decode system running parameter comprises:
(1) decoding touch-screen system running parameter;
(2) decode little picture library first address and picture lattice information; And
(3) decoding start picture address.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Described decoding touch-screen system running parameter, according to the compiling file form, from the corresponding byte of compiling file, obtain one by one the code of touch-screen system running parameter, be reduced into the parameters such as concrete type of touch screens and PLC model, carry out the decoding of completion system running parameter.
Such as the 1st and the 2 two byte from compiling file obtains the type of touch screens code for " 0H ", the PLC model code is " 9H ", and decoding obtains the user and used 7.5 cun (640*480) monochromatic touch-screens and Schneider Nano series of PLC so.In like manner, according to the compiling file form, obtain one by one the touch-screen system running parameter, carry out the decoding of completion system running parameter.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
The little picture library first address of described decoding and picture lattice information, three bytes are deposited the first address of little picture library, first address is assigned to the picture library pointer, by little picture library first address and picture sequence numbers, calculate, obtain this picture lattice information index address and deposit the shared byte number of this picture lattice information, finding the lattice information of this picture.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Described decoding start picture address, form according to compiling file, according to start picture, number one by one the picture number in picture pointer data district is compared, picture number coupling is just from obtaining the start picture address immediately following three bytes, jump to the picture properties district according to this address and obtain the picture properties content, thereby complete picture and element decoding.
Wherein picture pointer data district is as the important evidence of decoding start picture address.
Further, a kind of compiling of touch-screen file and coding/decoding method based on ARM of the present invention can also have such feature:
Described decoded picture information is to process the attribute information of each element in picture, has following steps:
A. the image information first address that the picture pointed will be decoded;
B. decoded picture background color;
C. the decode element number of this picture;
D. the start address of index component attributes information in the element pointer district of compiling file;
E. the start address of element is assigned to the element pointer, the decode element attribute information; And
F. judge whether to have completed all elements decoding in this picture, be, reading information from compiling file no longer; Otherwise repeating step (d), (e), (f),
Wherein, the decoding of described element is according to element compiling file form reading attributes information one by one, then calls the element class object and function is set completes the setting of element object properties, finally the element object is added in the element object array.
Beneficial effect of the present invention:
The touch-screen picture making is become simply, easy and simple to handle, control and programme conveniently, be convenient to the widespread use of touch-screen.
The accompanying drawing explanation
Fig. 1 is the compiling of touch-screen file, the process flow diagram of decoding;
Fig. 2 is picture compiling data flowchart;
Fig. 3 is the picture codec data flowchart.
Embodiment
Below in conjunction with specific embodiment, the invention will be further described.Should be understood that following examples are only for the present invention is described but not for limiting scope of the present invention.
Embodiment
Fig. 1 is the compiling of touch-screen file, the process flow diagram of decoding, as shown in Figure 1, a kind of compiling of touch-screen file and coding/decoding method based on ARM, comprise: the compiling of host computer (PC) program, the coding/decoding method of the storage format of image information and the coding/decoding method of system operational parameters and picture.
One, compiling host computer (PC) program
Fig. 2 is picture compiling data flowchart, as shown in Figure 2, after the user utilizes software for editing to carry out picture, then after the compiler directive in the calls tool menu, will generate a binary data packets in host computer, content in packet is all properties of picture, and then host computer downloads to man-machine interface to the content in packet.For the ease of decoding and download, image information is divided into to two parts: system information and image information.
So-called system information refers to the attribute of some devices that comprise in system, as state area and the control zone in the type of PLC in the kind of liquid crystal display, system, start picture number and PLC.Whole file is divided into 8 parts:
(1) type of touch screens
0H means 7.5 cun (640*480) monochromatic touch-screens
1H means 5.7 cun (320*240) color touch screens
(2) model of PLC
0H means Panasonic (FP) series
1H means Schneider (Nano) series
1H means FACON(232) series
2H means Festo series
3H means Mitsubishi's (FX series)
4H means OMRON(C series)
5H means OMRON(CS1 series)
6H means OMRON(CV series)
7H means Siemens (S5) series
8H means Siemens (S7-300) series
(3) start picture number
(4) PLC control zone
The length of the 1st byte representation PLC component type, be below the character of PLC component type, next 2 byte representation PLC element sequence numbers.
(5) PLC state area
The length of the 1st byte representation PLC component type, be below the character of PLC component type, next 2 byte representation PLC element sequence numbers.
(6) bitmap warehouse compartment figure sum
(7) address of index area, bitmap storehouse
(8) picture sum
Be below system information, it has just simply configured the environment that the user applies man-machine interface.Next introduce the information format of picture.For the ease of decoding, form is decided to be as follows, image information comprises:
First: picture number
Second portion: picture background chromatic zones
Third part: element number
The 4th part: picture 1 element pointer data district
The 5th part: the attribute of each element
Two, stored picture information
There is bad piece in this piece NAND-FLASH, but manufacturer can guarantee that first of this piece storage chip is good, while therefore using, must all isolate these bad pieces.At first will set up a bad block table, all bad pieces number are recorded in the inside, then it are write to the first page of the 0th, and later the 0th allows to wipe never.Five pages of first pages to the on the piece that is 1 at logical block number (LBN) are deposited piece number and the page number at each picture place.Concrete storage organization is as follows:
(1) physics is the 0th: the Flash bad block table;
(2) the 1st of logic (0 ~ 4 page): deposit the picture pointer, the 5th page starts storage system information;
(3) logic is the 2nd: the storage system setting, as baud rate, reference point setting, communication format etc.;
(4) logic is the 3rd: all pages is write after 0(has bad piece and is just no longer carried out) monoblock uses as storage power down protection data.
(5) logic the 4th BOB(beginning of block): deposit image information
Three, decode system running parameter
Fig. 3 is the picture codec data flowchart, and as shown in Figure 3, system operational parameters comprises: 6 parts such as type of touch screens, PLC model, start picture number, PLC control zone, PLC state area and little picture library first address.In the off-line simulation program, PLC control zone and this two parts content of PLC state area are not processed.
The decoding of system operational parameters:
(1) decoding touch-screen system running parameter
The system operational parameters such as decoding type of touch screens and PLC model are exactly that type and the model code of compiling gained are reduced into to the parameters such as concrete type of touch screens and PLC model.Such as the 1st and the 2 two byte from compiling file obtains the type of touch screens code for " 0H ", the PLC model code is " 9H ", and decoding obtains the user and used 7.5 cun (640*480) monochromatic touch-screens and Schneider Nano series of PLC so.In like manner, according to the compiling file form, obtain one by one the touch-screen system running parameter, carry out the decoding of completion system running parameter.
(2) decode little picture library first address and picture lattice information
Three bytes are deposited the first address of little picture library, and first address is assigned to the picture library pointer.In different size due to every width picture, therefore the shared byte number of lattice information of every width picture is also different.At first pass through formula:
Certain picture lattice information index address=little picture library first address+certain picture sequence numbers * 6,
Can obtain this picture lattice information index address, start to have deposited 3 later bytes the first address of this picture lattice information from this index address, deposit the shared byte number of this picture lattice information in 3 bytes backward again, relied on the content in these 6 bytes just can find the lattice information of this picture.
(3) decoding start picture address
Compiling file form part had been introduced the form of compiling file in front, and wherein picture pointer data district is as the important evidence of decoding start picture address.According to start picture, number one by one the picture number in picture pointer data district is compared, if picture number coupling just can be from obtaining the start picture address immediately following three bytes, jump to the picture properties district according to this address and obtain the picture properties content, thereby complete picture and element decoding.
Four, decoded picture
The real work of decoded picture information is exactly the attribute information of processing each element in picture.Complete the decoding work of image information with the picture codec function.Concrete decoding step is:
A. the image information first address that the picture pointed will be decoded;
B. decoded picture background color, in screen, " 0H " means black, " 1H " means white; In color line screen, according to color table, obtain its background color;
C. the decode element number of this picture, be assigned to variable TotalCtrl;
D. the start address of index component attributes information in the element pointer district of compiling file;
E. the start address of element is assigned to the element pointer, the decode element attribute information;
F. judged whether to have completed the decoding of all elements in this picture.Be, reading information from compiling file no longer; Otherwise repeating step (d), (e), (f).
In decoded picture information, most workload is placed on the decode element attribute, comprises minute other decode procedure to 14 kinds of elements, 14 element decoding functions, consists of.Element decoding is exactly according to element compiling file form reading attributes information one by one, then calls the element class object and function is set completes the setting of element object properties, finally the element object is added in the element object array.
Above the specific embodiment of the present invention is illustrated, but the present invention is as limit, only otherwise break away from aim of the present invention, the present invention can also have various variations.

Claims (11)

1. the compiling of touch-screen file and the coding/decoding method based on ARM, is characterized in that, comprises the following steps:
One, compiling host computer procedure;
Two, stored picture information;
Three, decode system running parameter; And
Four, decoded picture.
2. method according to claim 1, it is characterized in that: described compiling host computer procedure: after utilizing configuration software to carry out picture, then the compiler directive in the calls tool menu, will generate a binary data packets in host computer, content in packet is all properties of picture, and then host computer downloads to man-machine interface to the content in packet.
3. method according to claim 2 is characterized in that: described configuration software, on host computer for editing a software of touch-screen picture.
4. method according to claim 2 is characterized in that:
The all properties of described picture, be divided into two parts: system information and image information;
Wherein, described system information refers to the attribute of the device in system, i.e. state area and control zone in the type of PLC in the kind of liquid crystal display, system, start picture number and PLC;
Described image information comprises: (1) picture number; (2) picture background chromatic zones; (3) element number; (4) picture 1 element pointer data district; (5) attribute of each element.
5. method according to claim 1 is characterized in that:
The storage format of described image information comprises:
(1) physics is the 0th: the Flash bad block table;
(2) logic is the 1st: deposit the picture pointer for 0 ~ 4 page, the 5th page of storage system information;
(3) logic is the 2nd: the storage system setting comprises: baud rate, reference point setting, communication format;
(4) logic is the 3rd: all pages is write 0 monoblock as storage power down protection data use, just no longer carries out after bad piece is arranged;
(5) logic is the 4th: deposit image information.
6. method according to claim 1 is characterized in that:
Described system operational parameters comprises: type of touch screens, PLC model, start picture number, PLC control zone, PLC state area and 6 parts of little picture library first address.
7. method according to claim 1 is characterized in that:
Described decode system running parameter comprises:
(1) decoding touch-screen system running parameter;
(2) decode little picture library first address and picture lattice information; And
(3) decoding start picture address.
8. method according to claim 7 is characterized in that:
Described decoding touch-screen system running parameter, according to the compiling file form, from the corresponding byte of compiling file, obtain one by one the code of touch-screen system running parameter, be reduced into concrete type of touch screens and PLC model parameter, carry out the decoding of completion system running parameter.
9. method according to claim 7 is characterized in that:
The little picture library first address of described decoding and picture lattice information, three bytes are deposited the first address of little picture library, first address is assigned to the picture library pointer, by little picture library first address and picture sequence numbers, calculate, obtain this picture lattice information index address and deposit the shared byte number of this picture lattice information, finding the lattice information of this picture.
10. method according to claim 7 is characterized in that:
Described decoding start picture address, form according to compiling file, according to start picture, number one by one the picture number in picture pointer data district is compared, picture number coupling is just from obtaining the start picture address immediately following three bytes, jump to the picture properties district according to this address and obtain the picture properties content, thereby complete picture and element decoding.
11. method according to claim 4 is characterized in that:
Described decoded picture information is to process the attribute information of each element in picture, has following steps:
A. the image information first address that the picture pointed will be decoded;
B. decoded picture background color;
C. the decode element number of this picture;
D. the start address of index component attributes information in the element pointer district of compiling file;
E. the start address of element is assigned to the element pointer, the decode element attribute information; And
F. judge whether to have completed all elements decoding in this picture, be, reading information from compiling file no longer; Otherwise repeating step (d), (e), (f),
Wherein, the decoding of described element is according to element compiling file form reading attributes information one by one, then calls the element class object and function is set completes the setting of element object properties, finally the element object is added in the element object array.
CN2012101914858A 2012-06-11 2012-06-11 Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM) Pending CN103425312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012101914858A CN103425312A (en) 2012-06-11 2012-06-11 Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012101914858A CN103425312A (en) 2012-06-11 2012-06-11 Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM)

Publications (1)

Publication Number Publication Date
CN103425312A true CN103425312A (en) 2013-12-04

Family

ID=49650166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012101914858A Pending CN103425312A (en) 2012-06-11 2012-06-11 Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM)

Country Status (1)

Country Link
CN (1) CN103425312A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800524A (en) * 2020-07-10 2020-10-20 河北科瑞达仪器科技股份有限公司 Method for analyzing original addresses of multi-channel data in Modbus message
CN112783015A (en) * 2019-11-11 2021-05-11 上海辰竹仪表有限公司 Programmable I/O security controller, programming apparatus, device, medium, and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1601415A (en) * 2004-10-15 2005-03-30 李迪 Opening rearrangeable soft digital control system
CN101214108A (en) * 2008-01-11 2008-07-09 北京海尔集成电路设计有限公司 Touch panel input information synthesizing method and digit photo frame for implementing the method
CN101713991A (en) * 2009-11-13 2010-05-26 江南大学 Embedded machine visual intelligent terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1601415A (en) * 2004-10-15 2005-03-30 李迪 Opening rearrangeable soft digital control system
CN101214108A (en) * 2008-01-11 2008-07-09 北京海尔集成电路设计有限公司 Touch panel input information synthesizing method and digit photo frame for implementing the method
CN101713991A (en) * 2009-11-13 2010-05-26 江南大学 Embedded machine visual intelligent terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
蔡锦达: "基于ARM7的触摸屏文件编译和解码", 《微计算机信息》, vol. 24, no. 102, 15 October 2008 (2008-10-15) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783015A (en) * 2019-11-11 2021-05-11 上海辰竹仪表有限公司 Programmable I/O security controller, programming apparatus, device, medium, and system
CN111800524A (en) * 2020-07-10 2020-10-20 河北科瑞达仪器科技股份有限公司 Method for analyzing original addresses of multi-channel data in Modbus message
CN111800524B (en) * 2020-07-10 2022-10-14 河北科瑞达仪器科技股份有限公司 Method for analyzing original addresses of multi-channel data in Modbus message

Similar Documents

Publication Publication Date Title
Ens et al. Ivy: Exploring spatially situated visual programming for authoring and understanding intelligent environments
CN105477854B (en) Applied to the handle control method of intelligent terminal, apparatus and system
CN109254766B (en) Mobile-terminal-based visual programming platform and two-dimensional drawing three-dimensional visualization method
CN105807966B (en) Method and device for acquiring touch screen event
CN103552071A (en) Intelligent robot programming method
CN105204756A (en) Method and device used for operating screen of touch screen device
CN107678988A (en) A kind of multifunctional serial port device and implementation method
CN104991640A (en) Material object programming system on interactive interface and method
CN103941650A (en) Logic and movement integrated controller
CN105068664A (en) Interactive system and interaction control method
CN103605476A (en) Method and device for selecting objects in display interface
CN103425312A (en) Touch screen file compiling and decoding method based on advanced reduced instruction set computer machine (ARM)
CN102621960A (en) Advanced RISC machine-Linux (ARM-Linux)-based compiled programmable automation control (PAC)
CN103034392A (en) State display and indication input device
CN110688190A (en) Control method and device of intelligent interactive panel
CN102129321A (en) Touch screen-based track recording and comparing method
CN101976190B (en) DirectUI based interface generating system and method
WO2021046718A1 (en) Quick operation method and apparatus based on floating button, and electronic device
CN103885696A (en) Information processing method and electronic device
CN201548951U (en) Analog device for set-top-box interface
CN102073415A (en) Touch system, auxiliary device and input method thereof
CN102955564B (en) The operational approach of a kind of terminal and terminal
CN113093961B (en) Window switching method, storage medium and related equipment
CN102455798B (en) The method of operating of spectrum analyzer and device
CN103853368A (en) Touch screen electronic device and control method thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20131204