Wince interface-factory assembly line system control

Source: Internet
Author: User

Note: AllCodeProvideSource code(. H,. cpp file), rather than DLL or component form.

Download demoProgram
Download the related DLL (if the DLL component is missing, download this)

Development Environment: Windows XP + SP2 visual c ++ 6.0 + SP6 visual c ++ 2003/2005 evc4.0 + SP4

Running platform: Windows 95/98/2000/XP/Vista window mobile 5/6 Windows CE 4.2/5/6

I,Data Communication

1.Data collection

Use the com3 port of the Industrial Control Board to collect the data uploaded by the checkpoint device. The checkpoint device sends the collected data continuously at ten times per second. The data length is 18 bits, in the following format:

...

2. counters

The counter is the count of qualified products. The data is displayed on the screen.

The counter is composed of a PNP always-on photoelectric switch connected to gpi1. When the photoelectric switch detects the product, It outputs a 5 V High Level and checks the status of gpi1 for counting.

Ii. Comparison with upper PCCommunication

1. The COM1 port of the Work Control Board is connected to the PC;

The COM1 port of the Control Panel sorts the data received by com3 and sends it to the PC with an ascii code. The configuration of the COM1 port of the control panel is as follows: 1. baud Rate: 9600, data bit: 8, stop bit: 1, test: none;

Completed. The sent data is the 18-digit received data.

Opencom1 () sendcom1 ()

2. The COM1 port of the Work Control Board also listens to and receives commands from the PC to generate control actions, and the commands from the PC are also output in ASCII code.

3. communication interfaces between the PC and the Work Control Board:

The communication instruction (tentative) is an ascii code.ChangkaiRelay; the original output status of GPO is high after the work control board is powered on.

III. The system includes the following ready-made modules

1. gpio application development module;

2. Serial Port read/write application development module;

3. Read and Write File application development module.

As follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.