I. Superio communication mechanism

Source: Internet
Author: User

1.1 Application Scenarios

The interaction object of communication platform includes two aspects: first, interacting with hardware products. Second, interacting with software products. Basically these two aspects, communication platform will generally be used in two scenarios:

1) Communication platform application on PC

Mainly used in the automatic station of the industrial computer, through rs485/rs232, RJ45, 4-20ma and other ways to collect data information hardware equipment. At the same time, communication platform and server-side software to interact, responsible for uploading data information, as well as receiving control commands.

2) Communication platform application on the server side

Terminal equipment to 3G/4G, cable private network, satellite and other communications platform connection, data interaction, terminal Equipment includes: PC, mobile terminal (mobile phone), monitoring equipment.



1.2 Overview of communication mechanisms

For the communication platform, the communication part is always the core of the software, which requires high real-time and high stability. Software architecture determines the stability of software operation, as well as the future extensibility, so the communication mechanism, control mode should be well designed.

The general use of communication mechanism for call answering, or called master-slave mode. The host sends the request command, verifies the integrity of the data after receiving the command from the machine, and determines whether to send its own commands, verify the success, return the specified data information, complete a complete communication.

Call answering communication mechanisms such as:




1.3 Integration of serial port and network

In the development of device driver or protocol driver, for the same driver module to support both rs485/rs232 and RJ45 communication mode, to avoid because of the protocol or the different ways of communication for multiple repetitive development. Ensure business logic is unified, minimizing workload. Therefore, in the way of communication to be logically unified interface, in order to ensure the universality of the entire communication platform.

Interface design such as:


1.4 Serial communication Mechanism

Due to the characteristic limitation of serial communication, it avoids the data confusion of multiple hardware devices connected to serial bus, and mainly adopts the call answering communication mechanism of polling mode.

(1) Polling mode

When multiple devices are connected to a communication platform, the communication platform polls the dispatch device for communication tasks. There can only be one device at a time to send the request command, waiting to receive the return data, after the device has been sent, received, the next device to do the communication task, polling device in turn. Such as:


1.5 network communication mechanism

Polling communication mechanism is to ensure the orderly transmission and reception of data, to avoid the confusion of concurrent data on the bus, but this communication mechanism is at the cost of reducing performance, applicable to the serial communication, in the Ethernet communication obviously can not fully utilize the advantages of network communication.

Ethernet is a standalone channel and can be used for full-duplex communication. In order to give full play to the advantages of Ethernet, on the basis of polling communication mechanism, the concurrent communication mode and the automatic communication mode are added. First, in order to improve the performance of communication, the second is to two times to develop more autonomous control rights.

(1) Polling mode

The Ethernet polling communication mode is consistent with the serial communication mode, such as:

(2) Concurrency mode

The concurrent communication mode is the request instruction that sends all the devices centrally, the hardware device receives the instruction to verify, after the verification succeeds returns the corresponding instruction the data, the communication platform Monitor hears the data information, carries on the reception operation, then carries on the data the dissemination, the processing and so on. Such as:


(3) Automatic control mode

The self-control communication mode is similar to the concurrent communication mode, the difference is that the instruction operation is given to the device itself, or to two developers, two times the developer can send the instruction by the event driver autonomously. After the hardware equipment receives the instruction to verify, after the verification succeeds returns the corresponding instruction the data, the communication platform Monitor hears the data information, carries on the reception operation, then carries on the data distribution, the processing and so on.

The self-control communication mode can provide two developers with precise timing request real-time data mechanism, which makes the communication mechanism more flexible. You can also use the self-control communication mode to passively receive data without sending any data. Such as:

Author qq:504547114

QQ Group: 54256083

Official website: http://www.bmpj.net

Source URL: http://www.bmpj.net/index.php?m=article&f=view&id=1

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

I. Superio communication mechanism

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.