JP5534605B2 - Asynchronous serial communication method - Google Patents

Asynchronous serial communication method Download PDF

Info

Publication number
JP5534605B2
JP5534605B2 JP2010245075A JP2010245075A JP5534605B2 JP 5534605 B2 JP5534605 B2 JP 5534605B2 JP 2010245075 A JP2010245075 A JP 2010245075A JP 2010245075 A JP2010245075 A JP 2010245075A JP 5534605 B2 JP5534605 B2 JP 5534605B2
Authority
JP
Japan
Prior art keywords
asynchronous serial
serial communication
communication
specific terminal
host machine
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.)
Active
Application number
JP2010245075A
Other languages
Japanese (ja)
Other versions
JP2012099998A (en
Inventor
成実 浅井
Original Assignee
河村電器産業株式会社
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 河村電器産業株式会社 filed Critical 河村電器産業株式会社
Priority to JP2010245075A priority Critical patent/JP5534605B2/en
Publication of JP2012099998A publication Critical patent/JP2012099998A/en
Application granted granted Critical
Publication of JP5534605B2 publication Critical patent/JP5534605B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)
  • Computer And Data Communications (AREA)

Description

本発明は、ホスト機と複数の端末機とが非同期シリアル通信線を介して接続された通信システムにおいて、シリアル通信信号と異なるフォーマットの制御信号を通信する方法に関する。   The present invention relates to a method of communicating a control signal having a format different from a serial communication signal in a communication system in which a host device and a plurality of terminals are connected via an asynchronous serial communication line.

非同期シリアル通信では、通常、転送速度、ビット長、パリティ等の仕様を取り決め、規定のフォーマットで通信を行っている。このため、異なるフォーマットの制御信号を送信しようとすると、通信エラーが発生し、通信自体が成立しない。そこで、例えば、特許文献1では、外部メモリに複数のフォーマットを登録しておき、端末機の種類に応じフォーマットを変えて、非同期シリアル通信を行う方法が提案されている。   In asynchronous serial communication, the communication speeds, bit length, parity, and other specifications are usually decided and communication is performed in a prescribed format. For this reason, if a control signal of a different format is to be transmitted, a communication error occurs and communication itself is not established. Therefore, for example, Patent Document 1 proposes a method of performing asynchronous serial communication by registering a plurality of formats in an external memory and changing the format according to the type of terminal.

特開2008−40582号公報JP 2008-40582 A

ところが、従来の通信方法によると、複数のフォーマットを登録しておくために、端末機に外部メモリを用意する必要がある。このため、通信システムのコストが高くつくばかりでなく、メンテナンスに手間がかかるという問題点があった。   However, according to the conventional communication method, it is necessary to prepare an external memory in the terminal in order to register a plurality of formats. For this reason, there is a problem that not only the cost of the communication system is high, but also maintenance is troublesome.

本発明の目的は、安価な通信システムを用いて、自由フォーマットの制御信号を簡易に通信できる非同期シリアル通信方法を提供することにある。   An object of the present invention is to provide an asynchronous serial communication method capable of easily communicating a free format control signal using an inexpensive communication system.

上記課題を解決するために、本発明の通信方法は、ホスト機と複数の端末機とが非同期シリアル通信線を介して接続されたシステムにおいて、ホスト機が特定端末機に通信開始を通知し、特定端末機がホスト機と他の端末機に応答電文を送信し、他の端末機が所定の時間受信を停止している状態で、同じ時間内にホスト機が自由フォーマットの制御信号を特定端末機に送信することを特徴とする。   In order to solve the above problems, the communication method of the present invention is a system in which a host machine and a plurality of terminals are connected via an asynchronous serial communication line, and the host machine notifies the specific terminal of the start of communication, The specific terminal sends a response message to the host machine and other terminals, and the other terminal stops receiving the specified time, and the host machine sends the free format control signal within the same time. It transmits to a machine.

本発明の非同期シリアル通信方法によれば、他の端末機が受信を待機している期間中に、ホスト機が制御信号を特定端末機に送信するので、安価な通信システムを用いて、自由フォーマットの制御信号を簡易に通信できるという効果がある。   According to the asynchronous serial communication method of the present invention, a host device transmits a control signal to a specific terminal during a period in which another terminal is waiting for reception. The control signal can be easily communicated.

非同期シリアル通信システムの一実施形態を示すブロック図である。1 is a block diagram illustrating an embodiment of an asynchronous serial communication system. 本発明による通信方法の一実施形態を示すフローチャートである。3 is a flowchart illustrating an embodiment of a communication method according to the present invention.

以下、本発明の実施形態を図面に基づいて説明する。図1に示すように、この実施形態の通信システム1は、一台のホスト機2に複数台の端末機3を非同期シリアル通信線4(例えばRS485)で接続して構成されている。ホスト機2および端末機3には、それぞれ送受信回路とMCU(図示略)が装備され、MCUに搭載されたプログラムに従って双方向の非同期シリアル通信が行われる。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. As shown in FIG. 1, the communication system 1 of this embodiment is configured by connecting a plurality of terminals 3 to a single host machine 2 via an asynchronous serial communication line 4 (for example, RS485). Each of the host device 2 and the terminal device 3 is equipped with a transmission / reception circuit and an MCU (not shown), and bidirectional asynchronous serial communication is performed according to a program installed in the MCU.

図2は、ホスト機2が特定の端末機3Aに制御信号を送信するときの通信手順を示す。ここで、まず、ホスト機2は特定端末機3Aに通信の開始を通知する(S11)。次に、特定端末機3Aは、開始通知に応答する電文をホスト機2と他の端末機3Bに送信する(S12)。   FIG. 2 shows a communication procedure when the host device 2 transmits a control signal to a specific terminal 3A. Here, first, the host machine 2 notifies the specific terminal 3A of the start of communication (S11). Next, the specific terminal 3A transmits a message in response to the start notification to the host machine 2 and the other terminal 3B (S12).

続いて、特定端末機3Aは、タイマに設定された所定の時間の間、自機を受信待機状態とする(S13)。他の端末機3Bは、同じタイマ設定時間の間、自機を受信停止状態とする(S14)。そして、ホスト機2は、同じタイマ設定時間内に、自由フォーマットの制御信号を非同期シリアル通信線4を介して特定端末機3Aに送信する(S15)。   Subsequently, the specific terminal 3A sets its own device in a reception standby state for a predetermined time set in the timer (S13). The other terminal 3B puts its own device in a reception stop state during the same timer setting time (S14). Then, the host device 2 transmits a free format control signal to the specific terminal 3A via the asynchronous serial communication line 4 within the same timer setting time (S15).

このとき、特定端末機3Aは、ホスト機2からの制御信号をそのままのフォーマットで自機のシリアル信号受信端子より受け取る(S16)。この間、他の端末機3Bは、ホスト機2と特定端末機3Aとの通信終了を判定するために、制御信号のモニタリングを行う(S17)。   At this time, the specific terminal 3A receives the control signal from the host device 2 in its own format from the serial signal receiving terminal of the own device (S16). Meanwhile, the other terminal 3B monitors the control signal to determine the end of communication between the host machine 2 and the specific terminal 3A (S17).

その後、ホスト機2が送信を終了し、タイマ設定時間が経過すると、特定端末機3Aが受信完了を判断し(S18)、各端末機3A,3Bが通常の受信待ち状態に復帰する(S19,S20)。そして、特定端末機3Aが今回受信した制御信号の全ビット数をカウントし、この値を含む受信結果をホスト機2に報告する(S21)。ホスト機2は、ビット数を照合し、通信結果を記録し(S22)、一連の通信手順を終了する。   Thereafter, when the host device 2 finishes the transmission and the timer set time elapses, the specific terminal 3A determines that the reception is completed (S18), and each of the terminals 3A and 3B returns to the normal reception waiting state (S19, S19). S20). Then, the specific terminal 3A counts the total number of bits of the control signal received this time, and reports the reception result including this value to the host machine 2 (S21). The host machine 2 collates the number of bits, records the communication result (S22), and ends a series of communication procedures.

従って、この実施形態の非同期シリアル通信方法によれば、通信エラーを発生することなく、自由フォーマットの制御信号をホスト機2から端末機3に送信することができる。また、複数のフォーマットを登録するために外部メモリを用意したり、任意フォーマットに対応可能な通信プログラムのMCUを使用したり、フォーマットの追加・変更に伴ってMCUを交換したりする必要がなく、通信システムを安価に構成でき、メンテナンスを容易に行うことができる。   Therefore, according to the asynchronous serial communication method of this embodiment, a free format control signal can be transmitted from the host device 2 to the terminal device 3 without causing a communication error. In addition, there is no need to prepare an external memory to register multiple formats, use an MCU of a communication program that can handle arbitrary formats, or replace the MCU when adding or changing formats, The communication system can be configured at low cost, and maintenance can be easily performed.

なお、本発明は、上記実施形態に限定されるものではなく、発明の趣旨を逸脱しない範囲で、通信システムの構成や通信方法の手順を適宜に変更して実施することも可能である。   Note that the present invention is not limited to the above-described embodiment, and can be implemented by appropriately changing the configuration of the communication system and the procedure of the communication method without departing from the spirit of the invention.

1 通信システム
2 ホスト機
3 端末機
4 非同期シリアル通信線
1 Communication system 2 Host device 3 Terminal 4 Asynchronous serial communication line

Claims (1)

ホスト機と複数の端末機とが非同期シリアル通信線を介して接続されたシステムにおいて、ホスト機が特定端末機に通信開始を通知し、特定端末機がホスト機と他の端末機に応答電文を送信し、他の端末機が所定の時間受信を停止している状態で、同じ時間内にホスト機が自由フォーマットの制御信号を特定端末機に送信することを特徴とする非同期シリアル通信方法。   In a system in which a host machine and multiple terminals are connected via an asynchronous serial communication line, the host machine notifies the specific terminal of the start of communication, and the specific terminal sends a response message to the host machine and other terminals. An asynchronous serial communication method, wherein a host device transmits a control signal in a free format to a specific terminal within the same time in a state where transmission is performed and other terminals have stopped receiving for a predetermined time.
JP2010245075A 2010-11-01 2010-11-01 Asynchronous serial communication method Active JP5534605B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010245075A JP5534605B2 (en) 2010-11-01 2010-11-01 Asynchronous serial communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010245075A JP5534605B2 (en) 2010-11-01 2010-11-01 Asynchronous serial communication method

Publications (2)

Publication Number Publication Date
JP2012099998A JP2012099998A (en) 2012-05-24
JP5534605B2 true JP5534605B2 (en) 2014-07-02

Family

ID=46391436

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010245075A Active JP5534605B2 (en) 2010-11-01 2010-11-01 Asynchronous serial communication method

Country Status (1)

Country Link
JP (1) JP5534605B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003224570A (en) * 2002-01-28 2003-08-08 Matsushita Electric Works Ltd Communication equipment

Also Published As

Publication number Publication date
JP2012099998A (en) 2012-05-24

Similar Documents

Publication Publication Date Title
US9785530B2 (en) Method, device, and system for processing PCIe link fault
JP6891810B2 (en) Communication devices, communication methods, programs, and communication systems
US11620175B2 (en) Method and apparatus for disconnecting link between PCIe device and host
US10348616B2 (en) Packet transmission method and apparatus, and interconnect interface
JP2013535935A5 (en)
CN107066417A (en) A kind of method and apparatus of link parameter on-line tuning
JP3454297B2 (en) Method and apparatus for testing a link between network switches
CN102104531B (en) Message processing device, method and system
KR20170126904A (en) Farewell reset and restart method for coexistence of legacy and next generation devices over a shared multi-mode bus
CN109768907A (en) A kind of CAN bus baud rate self-adapting setting method
TW201029410A (en) Data communication device, communication control method, and program
JP2013510375A (en) System, method and apparatus for data communication
US20160195910A1 (en) Farewell reset and restart method for coexistence of legacy and next generation devices over a shared multi-mode bus
CN109062850B (en) Data sending and receiving method of single chip microcomputer
US20070168580A1 (en) Apparatus to improve the firmware efficiency for a multiframe serial interface
JP2017508391A (en) Method for matching data and event gap transmitted / received in network using different communication technologies
WO2016086638A1 (en) Link detection method, device, and computer storage medium
CN103885910A (en) Method and system for multiple devices for IIC communication in main mode
JP2005277978A (en) Method and device for automatically setting identification number
JP5534605B2 (en) Asynchronous serial communication method
CN106372019B (en) A kind of processing method and timeout treatment device of system bus devices response timeout
KR101324857B1 (en) A method for linking ethernet communication for digital protective relay and the digital protective relay performing the same
JP5439832B2 (en) Serial data communication device
CN101645057B (en) Method and device for preventing CPU local bus from suspension
CN102843290B (en) The Polling Protocol message processing method of data acquisition monitoring system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130925

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140307

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140314

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140404

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140421

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140421

R150 Certificate of patent or registration of utility model

Ref document number: 5534605

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250