CN101320359A - Control circuit and method of serial port equipment - Google Patents
Control circuit and method of serial port equipment Download PDFInfo
- Publication number
- CN101320359A CN101320359A CNA2007101107241A CN200710110724A CN101320359A CN 101320359 A CN101320359 A CN 101320359A CN A2007101107241 A CNA2007101107241 A CN A2007101107241A CN 200710110724 A CN200710110724 A CN 200710110724A CN 101320359 A CN101320359 A CN 101320359A
- Authority
- CN
- China
- Prior art keywords
- serial equipment
- serial
- identification marking
- main frame
- bus
- 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
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The present invention provides a serial device control circuit, which comprises a host computer and at least a serial device. The common input bus and the common output bus of at least one serial device are communicated with the host computer; the input terminal of at least one serial device is respectively connected with the output bus and the output terminal is respectively connected with the input bus through a one-way guide circuit device. The present invention also provides a serial device control method. The serial device control circuit provided by the present invention is suitable for the control network consistent with RS232 standard serial device, thus achieving the monitoring of multi-serial-device network, simplifying the hardware circuit of the serial device control network, reducing the control cost of the serial device, which is stable, reliable and can be implemented easily.
Description
Technical field
The present invention relates to the basic electronic circuit field, particularly serial equipment control circuit and control method.
Background technology
For the serial equipment with a plurality of RS232 of meeting standards is connected with same main frame, generally need to set up the control circuit network.Prior art generally adopts the input of expansion that a plurality of serial equipments are selected control, makes a plurality of serial equipments share same bus and main frame exchange message.
Fig. 1 illustrates existing a kind of technical scheme, input 200 comprises processing unit 201 and IO interface 202, processing unit 201 is connected with main frame 100, IO interface 202 comprises a plurality of ports, equipment 1, equipment 2 all are the serial equipment that meets the RS232 standard until equipment N, be connected with a plurality of ports of IO interface 202 respectively, by processing unit 201 unified managements and selection control.Main frame 100 and equipment 1, the communication of equipment 2 between equipment N are controlled by processing unit 201 and are coordinated.
The mode that the employing technique scheme is built RS232 Control Network circuit is too complicated, realizes the cost height, is unfavorable for cost control.
Summary of the invention
The invention provides serial equipment control circuit and control method, realize control many serial equipments.
The invention provides a kind of serial equipment control circuit, comprise main frame and at least one serial equipment, the shared input bus of at least one serial equipment and output bus and main-machine communication, the input end of at least one serial equipment is connected with output bus respectively, and output terminal is connected with input bus by unidirectional conduction device respectively.
The present invention also provides a kind of serial equipment control method, realizes the Control on Communication of main frame and at least one serial equipment, comprising: the step of configuration serial equipment identification marking; Utilize the step of identification marking identification serial equipment; The step of main frame and serial equipment communicating.
Serial equipment control circuit provided by the invention is applicable to the Control Network of the serial equipment that meets the RS232 standard, can realize the network monitoring of many serial equipments, simplify the hardware circuit of serial equipment Control Network, reduce serial equipment and control cost, reliable and stable, easy to implement.
Description of drawings
Fig. 1 is the prior art structural representation;
Fig. 2 is the structural representation that first embodiment of the invention adopts the diode implementation;
Fig. 3 is that first embodiment of the invention is distributed identification marking process synoptic diagram;
Fig. 4 is a first embodiment of the invention equipment work process synoptic diagram;
Fig. 5 is a first embodiment of the invention host work process synoptic diagram;
Fig. 6 is the structural representation of second embodiment of the invention employing or door implementation;
Fig. 7 is the structural representation of third embodiment of the invention employing and door implementation.
The realization of the object of the invention, functional characteristics and advantage will be in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
With reference to Fig. 2, the present invention proposes first embodiment, in the serial equipment control circuit, main frame 101 is as main control system, equipment 1, equipment 2 until a plurality of serial equipments such as equipment N as controlled plant, communicate by letter with main frame 101 with RXD (input bus) with the shared one group of transfer bus TXD of parallel form (output bus), set up the serial equipment control circuit.Wherein the TXD bus is transferred to serial equipment with the control command that main frame 101 sends, and the RXD bus is given main frame 101 with the information transmission that serial equipment sends.
Because what the information transmission that the RXD bus is sent a plurality of serial equipments adopted when giving main frame 101 is positive logic.Phase mutual interference when preventing between a plurality of serial equipments to send information, present embodiment proposes to shield this interference with unidirectional conduction device.Specifically, present embodiment adopts diode to be arranged between each serial equipment and the RXD bus as unidirectional conduction device, and the positive pole of each diode is all towards the output terminal of each serial equipment.Equipment 1, equipment 2 are connected with the RXD bus until diode N through diode 301, diode 302 respectively until a plurality of serial equipments such as equipment N again, utilize the unidirectional on state characteristic of diode effectively to prevent interference between each serial equipment.
Main frame 101 is taked the form broadcasted to certain serial equipment transmitting control commands the time, a plurality of serial equipments that are connected with the TXD bus can both receive control command.For the control command that makes main frame 101 can accurately be sent to the appointment serial equipment, unlikely reception control command confusion and the execution control command of causing made mistakes, and present embodiment proposes recognition of devices mechanism.Present embodiment is provided with identification marking so that distinguish a plurality of serial equipments by software for each serial equipment; Correspondingly, in main frame 101, set up and keep a device identification table of comparisons, write down each serial equipment and corresponding identification marking thereof.Main frame 101 is found out the identification marking of specifying serial equipment from this device identification table of comparisons before certain serial equipment sends control command, be attached in the control command as header and send.Each serial equipment on the TXD bus all receives this control command, and whether the identification marking that each serial equipment compares in the control command header respectively conforms to the identification marking of this equipment, conforms to and then carries out this control command, and not conforming to then abandons this control command.
For avoiding a plurality of serial equipments to fight for bus, realize orderly management to a plurality of serial equipments, present embodiment proposes bus right to use administrative mechanism.The bus right to use is meant in serial equipment and main-machine communication process, main frame is not accepted request and the information that other serial equipments send to main frame, the host computer using recognition of devices identifies request and the information of discerning from different serial equipments, realizes that with this serial equipment uses bus in order.
When certain serial equipment connecting bus, insert the serial equipment control circuit of present embodiment after, need to distribute identification markings to main frame 101 applications earlier, detailed process as shown in Figure 3:
Step 101, the testbus state;
Step 102 if the bus free time then carry out step 103, otherwise is returned step 101 cycle detection;
Step 103 is sent solicited message to main frame 101, the application bus right to use;
Step 104 if can obtain the bus right to use, then carry out step 105, otherwise is returned the step 103 repetitive requests bus right to use;
Step 105 is sent solicited message to main frame 101, and request distributes identification marking;
Step 106, treat that main frame 101 sends identification marking after, receive identification marking;
Step 107, judging whether needs to set or preserve this identification marking, if do not need then return step 106 to receive identification marking again, need then carry out step 108;
This identification marking is set or preserved to step 108;
Step 109, end is communicated by letter with main frame 101;
Step 110, notice main frame 101 is opened bus, discharges the bus right to use, and the identification marking request process finishes.
After serial equipment obtains identification marking, adopt flow process as shown in Figure 4 to communicate by letter with main frame 101:
Step 203 is sent solicited message to main frame 101, the application bus right to use;
Step 204 if can obtain the bus right to use, then carry out step 205, otherwise is returned the step 203 repetitive requests bus right to use;
Step 205 is carried out point-to-point communication with main frame 101;
Step 206, end is communicated by letter with main frame 101;
Step 207, notice main frame 101 is opened bus, discharges the bus right to use, finishes with main frame 101 communication processs.
Flow process and serial equipment communicating that main frame 101 adopts as shown in Figure 5:
Above-mentioned identification marking can adopt multiple rule, determines according to serial equipment number, main frame actual conditions.Identification marking can adopt id number, the id number that each serial equipment is corresponding unique, and the form of id number is made up of 1 to 4 character, the scope of each character from 0 to 255.For example can be defined as:
A; (scope of A from 0 to 255)
A:B; (scope of A, B from 0 to 255)
A:B:C; (scope of A, B, C from 0 to 255)
A:B:C:D; (scope of A, B, C, D from 0 to 255)
In order to improve the utilization factor of identification marking, main frame can pass through software set, makes regular check on the serial equipment sign in the serial equipment control circuit, reclaims the identification marking of the serial equipment that has broken away from this serial equipment control circuit.
Based on a last embodiment, the present invention proposes second embodiment, and employing or door are as unidirectional conduction device.Referring to Fig. 6, or the door be separately positioned between each serial equipment and the RXD bus, form unidirectional turning circuit.Above-mentioned unidirectional conduction device can also adopt with door and realize, referring to as Fig. 7, and door is separately positioned between each serial equipment and the RXD bus, forms unidirectional turning circuit.Above-mentioned unidirectional conduction device also can adopt other equivalent circuit structures and device, and is similar with selecting for use with first embodiment of basic structure, work-based logic and the identification marking of this serial equipment control circuit that constitutes, so do not give unnecessary details.
The above only is the preferred embodiments of the present invention; be not so limit claim of the present invention; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to be done; or directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.
Claims (10)
1. serial equipment control circuit, comprise main frame and at least one serial equipment, it is characterized in that, shared input bus of described at least one serial equipment and output bus and described main-machine communication, the input end of described at least one serial equipment is connected with described output bus respectively, and output terminal is connected with described input bus by unidirectional conduction device respectively.
2. serial equipment control circuit according to claim 1 is characterized in that, described unidirectional conduction device adopt diode, with door or door, other equivalent circuit structures or device in one or more.
3. serial equipment control method, realize comprising the Control on Communication of main frame and at least one serial equipment:
The step of configuration serial equipment identification marking;
Utilize the step of described identification marking identification serial equipment;
The step of main frame and serial equipment communicating.
4. serial equipment control method as claimed in claim 3 is characterized in that, the step of described configuration serial equipment identification marking comprises:
Main frame is that serial equipment distributes identification marking;
Send corresponding identification marking to serial equipment;
The identification marking corresponding with self set or preserved to serial equipment.
5. serial equipment control method as claimed in claim 3 is characterized in that, the described step of identification marking identification serial equipment of utilizing comprises:
Main frame will specify the corresponding identification marking and the control command of serial equipment together to send;
Serial equipment compares the described identification marking that the receives identification marking corresponding with self;
Select whether to carry out control command according to comparative result.
6. serial equipment control method as claimed in claim 5, it is characterized in that, the described corresponding identification marking and the control command of serial equipment of will specifying together sent, and is to specify the corresponding identification marking of serial equipment to be attached on the described control command as header, to send with described control command.
7. serial equipment control method as claimed in claim 3 is characterized in that, the described step of identification marking identification serial equipment of utilizing comprises:
Serial equipment sends request to described main frame;
Main frame is discerned according to identification marking and is sent the serial equipment of request;
Select whether to respond described request according to recognition result.
8. serial equipment control method as claimed in claim 3 is characterized in that, the step of described main frame and serial equipment communicating comprises:
The host assignment bus right to use;
Obtain usufructuary serial equipment of bus and main-machine communication;
Main frame is regained the bus right to use.
9. serial equipment control method as claimed in claim 8 is characterized in that, the described bus right to use is in serial equipment and main-machine communication process, and main frame is not accepted request and the information that other serial equipments send to main frame.
10. as the described serial equipment control method of any claim of claim 3 to 9, it is characterized in that, also comprise the step that reclaims identification marking.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007101107241A CN101320359A (en) | 2007-06-06 | 2007-06-06 | Control circuit and method of serial port equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007101107241A CN101320359A (en) | 2007-06-06 | 2007-06-06 | Control circuit and method of serial port equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101320359A true CN101320359A (en) | 2008-12-10 |
Family
ID=40180418
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2007101107241A Pending CN101320359A (en) | 2007-06-06 | 2007-06-06 | Control circuit and method of serial port equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101320359A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103051716A (en) * | 2012-12-25 | 2013-04-17 | 中标软件有限公司 | Method and system for redirecting network-oriented serial device |
CN105608041A (en) * | 2015-12-30 | 2016-05-25 | 南京奥拓电子科技有限公司 | Class bus design method based on serial port communication |
CN105760332A (en) * | 2014-12-19 | 2016-07-13 | 青岛海尔科技有限公司 | Multi-board communication method and system |
CN112306915A (en) * | 2020-10-26 | 2021-02-02 | 英业达科技有限公司 | Communication interface control system and method thereof |
-
2007
- 2007-06-06 CN CNA2007101107241A patent/CN101320359A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103051716A (en) * | 2012-12-25 | 2013-04-17 | 中标软件有限公司 | Method and system for redirecting network-oriented serial device |
CN105760332A (en) * | 2014-12-19 | 2016-07-13 | 青岛海尔科技有限公司 | Multi-board communication method and system |
CN105760332B (en) * | 2014-12-19 | 2019-06-04 | 青岛海尔科技有限公司 | A kind of more plate means of communication and system |
CN105608041A (en) * | 2015-12-30 | 2016-05-25 | 南京奥拓电子科技有限公司 | Class bus design method based on serial port communication |
CN112306915A (en) * | 2020-10-26 | 2021-02-02 | 英业达科技有限公司 | Communication interface control system and method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105610876B (en) | Industrial control automation network communication protocol converter and communication protocol conversion method | |
CN102281254B (en) | Design system and method of server serial port | |
CN103248526B (en) | Realize signal equipment, the method for out-of-band supervision control management | |
CN101859134B (en) | Intelligent home appliance remote control system and method | |
CN201383100Y (en) | Intelligent household remote control system | |
CN107566229A (en) | The packet control process of intelligent domestic system | |
CN102932224A (en) | CAN network-based data communication system and data communication method based on same | |
CN101661535A (en) | Remote experimental system and realization method thereof | |
CN107819659B (en) | Intelligent cascade communication network based on SPI | |
CN102707696B (en) | Multi-serial-port data transmission method and transmission center system | |
CN102891796A (en) | Mining intelligent transmission gateway | |
CN102195946A (en) | Intelligent communication controller based on ARM (Advanced RISC Machines) technology | |
CN103218337A (en) | SoC (System on Chip) and method for realizing communication between master modules and between slave modules based on wishbone bus | |
CN106873541A (en) | A kind of EtherCAT Distributed Servo kinetic control systems based on DSP | |
CN101320359A (en) | Control circuit and method of serial port equipment | |
CN103823775A (en) | Serial port and Internet port smart converter | |
CN102984220A (en) | Burst data downloading communication method for spacecraft multilevel subnets | |
CN104850518A (en) | Method for remotely logging in computer | |
CN106875664A (en) | A kind of exclusive formula collecting method based on CAN | |
CN101159641B (en) | Can bus extension method | |
CN100493018C (en) | Communication method via bus interface of network and and system thereof | |
CN102739695A (en) | Remote control method for power distributor unit | |
CN106304241A (en) | A kind of data transmission method, transponder and gateway | |
CN203012478U (en) | Distributed control facility for ultra-multichannel optical fiber system of laser device | |
CN110661692A (en) | Network interconnection system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20081210 |