[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JP2017038286A - Image formation device, communication control device, and program - Google Patents

Image formation device, communication control device, and program Download PDF

Info

Publication number
JP2017038286A
JP2017038286A JP2015159206A JP2015159206A JP2017038286A JP 2017038286 A JP2017038286 A JP 2017038286A JP 2015159206 A JP2015159206 A JP 2015159206A JP 2015159206 A JP2015159206 A JP 2015159206A JP 2017038286 A JP2017038286 A JP 2017038286A
Authority
JP
Japan
Prior art keywords
control unit
digital signal
communication
unit
signal
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
JP2015159206A
Other languages
Japanese (ja)
Inventor
貴斗 遠藤
Takato Endo
貴斗 遠藤
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2015159206A priority Critical patent/JP2017038286A/en
Publication of JP2017038286A publication Critical patent/JP2017038286A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Control Or Security For Electrophotography (AREA)
  • Information Transfer Systems (AREA)
  • Dc Digital Transmission (AREA)
  • Small-Scale Networks (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image formation device and the like that can accurately detect a communication state between a master control unit and a slave control unit in a control unit comprising the master control unit and the slave control unit that communicate data by serial communication.SOLUTION: A master control unit 10 of an image formation device transmits communication monitoring data including a count pattern CP set to a slave control unit connected via a serial communication line 30 by a CP setting unit 107 to the slave control unit, and receives a digital signal into which an analog signal output on the basis of the count pattern CP is converted. Then, the master control unit 10 refers to a reference table formed by a calibration unit 110 to detect a detection tap position DPTd, and determines a communication state at the serial communication line 30 from the detection tap position DPTd and a prediction tap position DPTe calculated based on the count pattern CP.SELECTED DRAWING: Figure 14

Description

本発明は、画像形成装置、通信制御装置及びプログラムに関する。   The present invention relates to an image forming apparatus, a communication control apparatus, and a program.

特許文献1には、双方向に直列信号を伝送する伝送制御回路の受信側に、受信信号を並列化する直並変換回路と、この直並変換回路の出力を順次格納するメモリを設け、伝送相手方の状態を随時前記メモリに更新登録し、メモリの内容を読み出すことにより、伝送相手方の状況を取り込む伝送制御回路が記載されている。   Patent Document 1 provides a serial-to-parallel converter circuit that parallelizes received signals and a memory that sequentially stores the outputs of the serial-to-parallel converter circuit on the receiving side of a transmission control circuit that transmits serial signals in both directions. A transmission control circuit is described in which the state of the other party is updated and registered in the memory as needed, and the contents of the other party are read by reading the contents of the memory.

特許文献2には、制御MPUとIOリンクを介して接続されてコントローラを構成するプロセス入出力装置であって、複数のIOモジュール、これら複数のIOモジュールをIOバス経由で制御する伝送制御モジュール、及び伝送制御モジュールとIOモジュールを収納するIOシェルフで構成され、IOシェルフの隣接する2つの実装スロットごとに同一種のIOモジュールを実装し、その一方を稼働、他方を待機としてIOモジュールを二重化し、プロセスヘの出力データを伝送制御モジュール経由でIOモジュールペアの双方に与えるとともに、プロセスヘの出力をIOモジュールぺア間の稼働/待機切替え回路により決定される稼働側だけが行い、プロセスからの入力をIOモジュールペアの双方へ接続することにより、伝送制御モジュールは前記切替え回路により決定される稼働側のデータのみを制御MPUへ通知するようにした二重化プロセス入出力装置において、IOモジュールペアのパルス入力モジュールにおけるプロセスインタフェース部およびパルスカウンタを二重化する手段と、二重化されて得られた2つのパルスカウント値を比較し不一致であれば重故障と判別して稼働/待機を切り替える手段と、を備えた二重化プロセス入出力装置が記載されている。   Patent Document 2 discloses a process input / output device that is connected to a control MPU via an IO link to form a controller, and includes a plurality of IO modules, a transmission control module that controls the plurality of IO modules via an IO bus, It is composed of an IO shelf that houses the transmission control module and the IO module, and the same type of IO module is mounted in each of the two adjacent mounting slots of the IO shelf, and the IO module is duplicated with one operating as a standby and the other as a standby. In addition to providing output data to the process to both IO module pairs via the transmission control module, output to the process is performed only by the operating side determined by the operation / standby switching circuit between IO module pairs, and input from the process is performed. By connecting to both IO module pairs, the transmission control module is determined by the switching circuit. In the duplex process input / output device that notifies only the data on the operating side to the control MPU, there are means for duplexing the process interface unit and pulse counter in the pulse input module of the IO module pair, and the two obtained by duplexing There is described a duplex process input / output device comprising means for comparing pulse count values and determining that a major failure is detected and switching between operation / standby if they do not match.

特開平4−178048号公報JP-A-4-17848 特開平11−65603号公報JP-A-11-65603

CPUを備えるマスタ制御部と、マスタ制御部によって制御されて制御対象を制御するスレーブ制御部とを備え、マスタ制御部とスレーブ制御部との間をシリアル(SPI:Serial Peripheral Interface)通信でデータを送受信するマスタスレーブ方式による制御が広く用いられている。しかし、いわゆるSPI通信の規格には、パリティビットチェック、CRC(巡回冗長検査:Cyclic Redundancy Check)、チェックサムなどの通信エラー検出のプロトコルが規定されていない。よって、マスタ制御部からスレーブ制御部に一方的にデータを送信すると、通信回線の物理的な異常による欠落、外来ノイズなどによるデータ化け、通信回線を構成するケーブル等の線材の特性におけるばらつきなどにより、一定の信号波形品質が得られず、通信エラーなどが発生する。このような場合であっても、マスタ制御部は、通信エラーの発生など、通信状態の把握がしづらい。
本発明は、シリアル通信でデータが送受信されるマスタ制御部とスレーブ制御部とを備えた制御部において、マスタ制御部とスレーブ制御部との間の通信状態の検出が精度よく行える画像形成装置などを提供する。
A master control unit including a CPU and a slave control unit that is controlled by the master control unit to control a control target, and serially (SPI: Serial Peripheral Interface) communication between the master control unit and the slave control unit Control by the master-slave system for transmitting and receiving is widely used. However, the so-called SPI communication standard does not define communication error detection protocols such as parity bit check, CRC (Cyclic Redundancy Check), and checksum. Therefore, when data is unilaterally transmitted from the master control unit to the slave control unit, data loss due to physical abnormality of the communication line, garbled data due to external noise, etc., variation in characteristics of wires such as cables constituting the communication line, etc. A certain signal waveform quality cannot be obtained, and a communication error occurs. Even in such a case, it is difficult for the master control unit to grasp the communication state such as the occurrence of a communication error.
The present invention relates to an image forming apparatus capable of accurately detecting a communication state between a master control unit and a slave control unit in a control unit including a master control unit and a slave control unit that transmit and receive data by serial communication. I will provide a.

請求項1に記載の発明は、画像を形成する画像形成部と、前記画像形成部における画像の形成を制御するマスタ部とスレーブ部とを含む制御部と、前記制御部の前記マスタ部と前記スレーブ部との間を接続し、シリアル通信を行うシリアル通信回線と、を備え、前記制御部の前記マスタ部は、前記スレーブ部に対して、第1のデジタル信号を送信する信号送信手段と、前記スレーブ部から、第2のデジタル信号を受信する信号受信手段と、送信した前記第1のデジタル信号と受信した前記第2のデジタル信号とにより、前記シリアル通信の通信状態を判定する通信状態判定手段と、前記第2のデジタル信号と前記スレーブ部において前記第1のデジタル信号に基づいて出力されるアナログ信号と、当該アナログ信号から変換される前記第2のデジタル信号との関係を校正する校正手段と、を有し、前記制御部の前記スレーブ部は、前記第1のデジタル信号に基づいて前記アナログ信号を出力するアナログ信号出力手段と、前記アナログ信号を変換して前記第2のデジタル信号に変換する変換手段と、を有することを特徴とする画像形成装置である。
請求項2に記載の発明は、シリアル通信回線で接続される装置に対して、第1のデジタル信号を送信する信号送信手段と、前記装置において前記第1のデジタル信号に基づいて出力されたアナログ信号から変換された第2のデジタル信号を受信する信号受信手段と、送信した前記第1のデジタル信号と受信した前記第2のデジタル信号とにより、シリアル通信の通信状態を判定する通信状態判定手段と、前記装置における前記アナログ信号と前記第2のデジタル信号との関係を校正する校正手段とを備えた通信制御装置である。
請求項3に記載の発明は、前記校正手段は、前記装置の電源がオンにされる毎に、前記校正を行うことを特徴とする請求項2に記載の通信制御装置である。
請求項4に記載の発明は、前記校正手段は、前記アナログ信号が最大になるように設定した前記第1のデジタル信号を前記信号送信手段から送信させ、前記信号受信手段により受信する当該第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最大値とし、前記アナログ信号が最小になるように設定した前記第1のデジタル信号を前記信号送信手段から送信させ、前記信号受信手段により受信する当該第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最小値とし、前記最大値と前記最小値と、前記アナログ信号を分けた複数の段の段数とから、前記アナログ信号の段と前記第2のデジタル信号との関係を校正することを特徴とする請求項2又は3に記載の通信制御装置である。
請求項5に記載の発明は、前記校正手段は、前記装置の電源がオンにされた際、当該装置の電源がオフにされる際に記憶されていた前記アナログ信号から変換された前記第2のデジタル信号を取得し、前記アナログ信号の前記複数の段と前記第2のデジタル信号との関係が校正された後に、受信した前記第2のデジタル信号を、前記アナログ信号の前記複数の段のいずれかに対応させることを特徴とする請求項4に記載の通信制御装置である。
請求項6に記載の発明は、前記第2のデジタル信号は、前記装置において、デジタルポテンショメータによって保持された前記アナログ信号が変換されて得られたことを特徴とする請求項2乃至5のいずれか1項に記載の通信制御装置である。
請求項7に記載の発明は、シリアル通信回線で接続される装置に対して、第1のデジタル信号を送信し、当該装置において当該第1のデジタル信号に基づいて出力されたアナログ信号から変換された第2のデジタル信号を受信し、当該第1のデジタル信号と当該第2のデジタル信号とから、通信状態を判定する通信制御装置に、前記アナログ信号が最大になるように設定した前記第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最大値とする機能と、前記アナログ信号が最小になるように設定した前記第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最小値とする機能と、前記最大値と前記最小値と、前記アナログ信号を分ける複数の段の段数とから、前記アナログ信号と前記第2のデジタル信号との関係を校正する機能とを実現させるためのプログラムである。
The invention according to claim 1 is an image forming unit that forms an image, a control unit that includes a master unit and a slave unit that control image formation in the image forming unit, the master unit of the control unit, and the A serial communication line that connects between the slave unit and performs serial communication, and the master unit of the control unit transmits a first digital signal to the slave unit; Communication state determination for determining the communication state of the serial communication based on the signal receiving means for receiving the second digital signal from the slave unit, and the transmitted first digital signal and the received second digital signal. Means, the second digital signal, an analog signal output based on the first digital signal in the slave unit, and the second signal converted from the analog signal Calibration means for calibrating the relationship with the digital signal, and the slave section of the control section outputs an analog signal output means for outputting the analog signal based on the first digital signal, and the analog signal An image forming apparatus comprising: a converting unit that converts the signal into the second digital signal.
According to a second aspect of the present invention, there is provided signal transmitting means for transmitting a first digital signal to an apparatus connected by a serial communication line, and an analog output based on the first digital signal in the apparatus. Communication state determining means for determining a communication state of serial communication based on the signal receiving means for receiving the second digital signal converted from the signal, and the transmitted first digital signal and the received second digital signal. And a calibration control device comprising calibration means for calibrating the relationship between the analog signal and the second digital signal in the device.
The invention according to claim 3 is the communication control device according to claim 2, wherein the calibration means performs the calibration every time the power of the device is turned on.
According to a fourth aspect of the present invention, the calibration unit causes the first digital signal set so that the analog signal is maximized to be transmitted from the signal transmission unit, and is received by the signal reception unit. The second digital signal converted from the analog signal output by the digital signal is set to the maximum value, and the first digital signal set so that the analog signal is minimized is transmitted from the signal transmission unit, The second digital signal converted from the analog signal output by the first digital signal received by the signal receiving means is the minimum value, and the maximum value, the minimum value, and the analog signal are divided into a plurality 4. The communication according to claim 2, wherein the relationship between the stage of the analog signal and the second digital signal is calibrated from the number of stages of the stage. A control device.
According to a fifth aspect of the present invention, the calibration means converts the second signal converted from the analog signal stored when the power of the apparatus is turned off when the power of the apparatus is turned on. After the digital signal is acquired and the relationship between the plurality of stages of the analog signal and the second digital signal is calibrated, the received second digital signal is converted into the plurality of stages of the analog signal. The communication control apparatus according to claim 4, wherein the communication control apparatus corresponds to any one of the above.
According to a sixth aspect of the invention, the second digital signal is obtained by converting the analog signal held by a digital potentiometer in the device. The communication control device according to Item 1.
According to a seventh aspect of the present invention, a first digital signal is transmitted to a device connected by a serial communication line, and converted from an analog signal output based on the first digital signal in the device. The first digital signal is received and the first digital signal and the second digital signal are set in the communication control device for determining the communication state from the first digital signal and the second digital signal so that the analog signal is maximized. A function of maximizing the second digital signal converted from the analog signal output from the digital signal, and an analog signal output from the first digital signal set to minimize the analog signal From the function of setting the second digital signal converted from the minimum value, the maximum value and the minimum value, and the number of stages for dividing the analog signal, Serial is a program for realizing a function to calibrate the relationship between the analog signal and said second digital signal.

請求項1の発明によれば、校正手段を備えない場合に比べ、シリアル通信でデータが送受信されるマスタ制御部とスレーブ制御部とを備えた制御部において、マスタ制御部とスレーブ制御部との間の通信状態の検出が精度よく行える。
請求項2の発明によれば、校正手段を備えない場合に比べ、シリアル通信回線で接続される装置との間の通信状態の検出が精度よく行える。
請求項3の発明によれば、電源がオンにされる毎に校正を行わない場合に比べ、シリアル通信回線で接続される装置のばらつきや電源電圧の変動などが許容できる。
請求項4の発明によれば、最大値と最小値とで校正しない場合に比べ、校正が容易にできる。
請求項5の発明によれば、電源がオンにされた際におけるアナログ信号から第2のデジタル信号を受信しない場合に比べ、電源がオフになった要因の推定ができる。
請求項6の発明によれば、デジタルポテンショメータを用いない場合に比べ、より簡易な構成でデジタル信号をアナログ信号に変換できる。
請求項7の発明によれば、校正する機能を備えない場合に比べ、シリアル通信回線で接続される装置との間の通信状態の検出が精度よく行える。
According to the first aspect of the present invention, in the control unit including the master control unit and the slave control unit that transmit and receive data by serial communication, compared with the case where the calibration unit is not provided, the master control unit and the slave control unit It is possible to accurately detect the communication state between the two.
According to the second aspect of the present invention, it is possible to detect the communication state with the apparatus connected by the serial communication line with higher accuracy than when the calibration means is not provided.
According to the invention of claim 3, as compared with a case where calibration is not performed every time the power is turned on, variations in devices connected by a serial communication line, fluctuations in power supply voltage, and the like can be allowed.
According to the invention of claim 4, the calibration can be easily performed as compared with the case where the calibration is not performed with the maximum value and the minimum value.
According to the fifth aspect of the present invention, it is possible to estimate the cause of the power supply being turned off as compared with the case where the second digital signal is not received from the analog signal when the power supply is turned on.
According to the invention of claim 6, a digital signal can be converted into an analog signal with a simpler configuration than when a digital potentiometer is not used.
According to the seventh aspect of the present invention, it is possible to detect a communication state with a device connected by a serial communication line with higher accuracy than in the case where a calibration function is not provided.

本実施の形態が適用される画像形成装置の一例を示す図である。It is a figure which shows an example of the image forming apparatus with which this Embodiment is applied. 制御部の構成の一例を示す図である。It is a figure which shows an example of a structure of a control part. 通信監視回路を説明する図である。(a)は、通信監視回路の詳細図、(b)は、DPのタップを説明する図である。It is a figure explaining a communication monitoring circuit. (A) is a detailed diagram of the communication monitoring circuit, (b) is a diagram for explaining the tap of the DP. マスタ制御部とスレーブ制御部との間で送受信されるデータ列を示す図である。(a)は、マスタ制御部からスレーブ制御部に送信されるデータ列、(b)は、スレーブ制御部からマスタ制御部に送信されるデータ列である。It is a figure which shows the data sequence transmitted / received between a master control part and a slave control part. (A) is a data string transmitted from the master controller to the slave controller, and (b) is a data string transmitted from the slave controller to the master controller. 通信監視データにおけるカウントパターンの一例を示す図である。It is a figure which shows an example of the count pattern in communication monitoring data. マスタ制御部が行う通信監視に関する機能ブロックを説明する図である。It is a figure explaining the functional block regarding the communication monitoring which a master control part performs. マスタ制御部とスレーブ制御部との間の通信を説明するシーケンス図である。It is a sequence diagram explaining communication between a master control part and a slave control part. マスタ制御部による通信品質チェックルーチンのフローチャートの一例である。It is an example of the flowchart of the communication quality check routine by a master control part. DPのタップ位置の移動量がDPに適合するか否かを判断する移動量適合性判断ルーチンを説明するフローチャートの一例である。It is an example of the flowchart explaining the movement amount suitability judgment routine which judges whether the movement amount of the tap position of DP suits DP. シリアル通信回線(伝送路)における周波数特性の劣化により生じた波形の鈍り(フィルタ作用)による通信異常(通信エラー)を検出する例を説明する図である。(a)は、ビットダブルをカウントパターンに用いた場合、(b)は、ビットトグルをカウントパターンに用いた場合である。It is a figure explaining the example which detects the communication abnormality (communication error) by the blunting of the waveform (filter effect | action) produced by the deterioration of the frequency characteristic in a serial communication line (transmission path). (A) is a case where bit double is used for the count pattern, and (b) is a case where bit toggle is used for the count pattern. シリアル通信におけるシリアル通信回線(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズによる通信異常を検出する例を説明する図である。(a)は、ビットトグルをカウントパターンに用いた場合、(b)は、ビットダブルをカウントパターンに用いた場合である。It is a figure explaining the example which detects the communication abnormality by the noise from the transmission line which adjoins the serial communication line (transmission path) in serial communication, or the noise from the exterior. (A) is a case where bit toggle is used for the count pattern, and (b) is a case where bit double is used for the count pattern. シリアル通信回線(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズにおける特定のタイミングで発生する通信エラー(通信異常)を検出する例を説明する図である。(a)は、ビットトグルをカウントパターンに用いた場合、(b)は、ビット連続をカウントパターンに用いた場合である。It is a figure explaining the example which detects the communication error (communication abnormality) which generate | occur | produces at the specific timing in the noise from the transmission line adjacent to a serial communication line (transmission path), or the noise from the exterior. (A) is a case where bit toggle is used for the count pattern, and (b) is a case where bit continuation is used for the count pattern. シリアル通信回線(伝送路)の隣接する伝送路からの突発的なノイズ又は外来からの突発的なノイズによる通信異常を検出する例を説明する図である。It is a figure explaining the example which detects the communication abnormality by the sudden noise from the transmission line adjacent to a serial communication line (transmission line), or the sudden noise from the outside. マスタ制御部による校正に関する機能ブロックを説明する図である。It is a figure explaining the functional block regarding the calibration by a master control part. マスタ制御部、スレーブ制御部におけるI/O拡張回路及び通信監視回路の校正ルーチンに関するシーケンス図である。It is a sequence diagram regarding the calibration routine of the I / O expansion circuit and the communication monitoring circuit in the master control unit and the slave control unit. 参照テーブル作成ルーチンを説明するフローチャートである。It is a flowchart explaining a reference table creation routine. 参照テーブルの一例を説明する図である。It is a figure explaining an example of a reference table.

以下、添付図面を参照して、本発明の実施の形態について詳細に説明する。
ここでは、マスタ制御部とスレーブ制御部とを備え、マスタスレーブ方式により、それらの間でシリアル(SPI:Serial Peripheral Interface)通信によってデータが送受信される装置を、画像形成装置を一例として説明する。
Embodiments of the present invention will be described below in detail with reference to the accompanying drawings.
Here, an apparatus that includes a master control unit and a slave control unit and transmits and receives data by serial (SPI: Serial Peripheral Interface) communication using the master-slave method will be described as an example of an image forming apparatus.

(画像形成装置100)
図1は、本実施の形態が適用される画像形成装置100の一例を示す図である。
この画像形成装置100は、スキャン機能、プリント機能、コピー機能及びファクシミリ機能を備えた所謂複合機である。
(Image forming apparatus 100)
FIG. 1 is a diagram illustrating an example of an image forming apparatus 100 to which the exemplary embodiment is applied.
The image forming apparatus 100 is a so-called multi-function machine having a scan function, a print function, a copy function, and a facsimile function.

画像形成装置100は、制御部1、ユーザインターフェース(UI:User Interface)部2、画像形成部3、画像読取部4、送受信部5を備えている。
UI部2は、ユーザから電源のオン/オフ、スキャン機能、プリント機能、コピー機能及びファクシミリ機能を用いた動作に関連する指示を受け付けるとともに、ユーザに対してメッセージを表示する。画像形成部3は、紙等の記録媒体に画像を形成する。また、画像読取部4は、記録媒体に記録された画像を読み取る。そして、送受信部5は、通信回線(不図示)を介して外部に設けられた端末装置(不図示)、ファクシミリ装置(不図示)、サーバ装置(不図示)とでデータの送受信を行う。
そして、制御部1は、UI部2、画像形成部3、画像読取部4、送受信部5の動作を制御する。
なお、UI部2、画像形成部3、画像読取部4、送受信部5をそれぞれ区別しないときは、機能部と表記する。それぞれの機能部は、制御部1により制御される複数の制御対象を備えているとする。
The image forming apparatus 100 includes a control unit 1, a user interface (UI) unit 2, an image forming unit 3, an image reading unit 4, and a transmission / reception unit 5.
The UI unit 2 receives instructions related to operations using the power on / off, scan function, print function, copy function, and facsimile function from the user, and displays a message to the user. The image forming unit 3 forms an image on a recording medium such as paper. The image reading unit 4 reads an image recorded on a recording medium. The transmission / reception unit 5 transmits / receives data to / from a terminal device (not shown), a facsimile machine (not shown), and a server device (not shown) provided outside via a communication line (not shown).
The control unit 1 controls operations of the UI unit 2, the image forming unit 3, the image reading unit 4, and the transmission / reception unit 5.
When the UI unit 2, the image forming unit 3, the image reading unit 4, and the transmission / reception unit 5 are not distinguished from each other, they are referred to as functional units. It is assumed that each functional unit includes a plurality of control objects controlled by the control unit 1.

制御部1は、UI部2、画像形成部3、画像読取部4、送受信部5から離れて設置されたマスタ制御部10と、UI部2、画像形成部3、画像読取部4、送受信部5に近接して設けられたスレーブ制御部20と、マスタ制御部10とスレーブ制御部20との間を接続するシリアル通信回線30とを備えている。
そして、マスタ制御部10とスレーブ制御部20とは、シリアル通信回線30を介して、データが送受信される。
なお、マスタ制御部をマスタ部又はマスタ制御装置、スレーブ制御部をスレーブ部又はスレーブ制御装置と表記することがある。
The control unit 1 includes a UI control unit 10, an image forming unit 3, an image reading unit 4, a master control unit 10 that is installed away from the transmission / reception unit 5, a UI unit 2, an image formation unit 3, an image reading unit 4, 5, a slave control unit 20 provided in the vicinity of 5, and a serial communication line 30 that connects between the master control unit 10 and the slave control unit 20.
The master control unit 10 and the slave control unit 20 transmit and receive data via the serial communication line 30.
The master control unit may be referred to as a master unit or a master control device, and the slave control unit may be referred to as a slave unit or a slave control device.

制御部1におけるマスタ制御部10は、論理演算及び算術演算を実行するALU(Arithmetic Logical Unit:論理算術演算ユニット)などを備えた演算モジュールの一例としての中央演算処理装置(以下ではCPUと表記する。)(後述する図2におけるCPU11)を備えている。   A master control unit 10 in the control unit 1 is a central processing unit (hereinafter referred to as a CPU) as an example of an arithmetic module including an ALU (Arithmetic Logical Unit) that executes logical operations and arithmetic operations. .) (CPU 11 in FIG. 2 described later).

一方、制御部1におけるスレーブ制御部20は、CPUを備えず、マスタ制御部10から受信したデータ(制御対象を制御するための制御コマンド、制御データなど)を、機能部における制御対象に送信する。また、スレーブ制御部20は、機能部における制御対象から受信したデータ(制御対象の状態を表すステータスデータ、制御対象がセンサである場合のセンサデータなど)を、マスタ制御部10に送信する。
すなわち、マスタ制御部10は、能動装置、スレーブ制御部20は、受動装置として機能する。
On the other hand, the slave control unit 20 in the control unit 1 does not include a CPU, and transmits data received from the master control unit 10 (control command, control data, etc. for controlling the control target) to the control target in the functional unit. . In addition, the slave control unit 20 transmits data received from the control target in the function unit (status data indicating the state of the control target, sensor data when the control target is a sensor, etc.) to the master control unit 10.
That is, the master control unit 10 functions as an active device, and the slave control unit 20 functions as a passive device.

ここでは、制御部1におけるマスタ制御部10からスレーブ制御部20に送信されるデータ(制御対象を制御するための制御コマンド、制御データなど)を、制御のためのデータ、スレーブ制御部20からマスタ制御部10に送信されるデータ(制御対象の状態を表すステータスデータ、制御対象がセンサである場合のセンサデータなど)を、応答のためのデータと表記する。なお、制御のためのデータと応答のためのデータとを区別しない場合は、データと表記する。   Here, data transmitted from the master control unit 10 to the slave control unit 20 in the control unit 1 (control command, control data, etc. for controlling the control target) is used as data for control, and from the slave control unit 20 to the master. Data transmitted to the control unit 10 (status data indicating the state of the control target, sensor data when the control target is a sensor, etc.) is referred to as data for response. In addition, when not distinguishing the data for control and the data for response, it describes with data.

なお、スレーブ制御部20は、マスタ制御部10のI/O(Input/Output)機能を拡張する拡張I/O部に相当する。   The slave control unit 20 corresponds to an extended I / O unit that extends the I / O (Input / Output) function of the master control unit 10.

図1では、UI部2、画像形成部3、画像読取部4、送受信部5のすべての機能部に対して、1個のスレーブ制御部20を設けているが、機能部毎にスレーブ制御部20を設けてもよく、複数の機能部に対して1個のスレーブ制御部20を設けてもよい。   In FIG. 1, one slave control unit 20 is provided for all functional units of the UI unit 2, the image forming unit 3, the image reading unit 4, and the transmission / reception unit 5, but the slave control unit is provided for each functional unit. 20 may be provided, and one slave control unit 20 may be provided for a plurality of functional units.

この画像形成装置100では、画像読取部4によってスキャン機能が実現され、画像形成部3によってプリント機能が実現され、画像読取部4及び画像形成部3によってコピー機能が実現され、画像形成部3、画像読取部4及び送受信部5によってファクシミリ機能が実現される。   In this image forming apparatus 100, a scanning function is realized by the image reading unit 4, a printing function is realized by the image forming unit 3, a copying function is realized by the image reading unit 4 and the image forming unit 3, and the image forming unit 3, The image reading unit 4 and the transmission / reception unit 5 implement a facsimile function.

(制御部1)
図2は、制御部1の構成の一例を示す図である。ここでは、一例として、画像形成部3に含まれる制御対象を制御するとして説明する。
制御部1は、前述したように、マスタ制御部10とスレーブ制御部20とを備えている。そして、マスタ制御部10とスレーブ制御部20とは、シリアル通信回線30で接続されている。シリアル通信回線30は、マスタ制御部10側から見て、送信用の通信路Txと受信用の通信路Rxとの2系統の通信路を備えている。
すなわち、通信路Txを介して、マスタ制御部10からスレーブ制御部20にデータが送信され、通信路Rxを介して、スレーブ制御部20からマスタ制御部10にデータが送信される。
なお、マスタ制御部10が、通信制御装置の一例である。
(Control unit 1)
FIG. 2 is a diagram illustrating an example of the configuration of the control unit 1. Here, as an example, it is assumed that a control target included in the image forming unit 3 is controlled.
As described above, the control unit 1 includes the master control unit 10 and the slave control unit 20. The master control unit 10 and the slave control unit 20 are connected by a serial communication line 30. The serial communication line 30 includes two communication paths, a transmission communication path Tx and a reception communication path Rx, as viewed from the master control unit 10 side.
That is, data is transmitted from the master controller 10 to the slave controller 20 via the communication path Tx, and data is transmitted from the slave controller 20 to the master controller 10 via the communication path Rx.
The master control unit 10 is an example of a communication control device.

以下では、制御部1におけるマスタ制御部10とスレーブ制御部20とを詳細に説明する。
(マスタ制御部10)
マスタ制御部10は、CPU11、メモリ12、通信制御ユニット15を備えている。さらに、CPU11、メモリ12、通信制御ユニット15の間でデータを送受信するデータバス14を備えている。
メモリ12は、RAM、不揮発性メモリ(以下では、NVメモリと表記する。)を備えている。RAMは、電源の供給がないと、書き込まれたデータを保持しないメモリである。NVメモリは、電源の供給がなくとも、書き込まれたデータを保持するメモリであって、読出し専用のROM、又は/及び、書き換え可能なEEPROM(Electrically Erasable Programmable Read-Only Memory)、フラッシュメモリ、HDDなどである。ここでは、メモリ12は、少なくともRAMと読出し専用のNVメモリ(ROM)とを含んでいるとする。
電源がオンになると、CPU11は、メモリ12におけるNVメモリに格納されているプログラム及びデータを読み出して、メモリ12におけるRAMに展開し、展開されたプログラムを実行する。
Below, the master control part 10 and the slave control part 20 in the control part 1 are demonstrated in detail.
(Master control unit 10)
The master control unit 10 includes a CPU 11, a memory 12, and a communication control unit 15. Further, a data bus 14 for transmitting and receiving data among the CPU 11, the memory 12, and the communication control unit 15 is provided.
The memory 12 includes a RAM and a nonvolatile memory (hereinafter referred to as an NV memory). The RAM is a memory that does not hold written data when power is not supplied. The NV memory is a memory that retains written data even when power is not supplied, and is a read-only ROM or / and a rewritable EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, HDD Etc. Here, it is assumed that the memory 12 includes at least a RAM and a read-only NV memory (ROM).
When the power is turned on, the CPU 11 reads out the program and data stored in the NV memory in the memory 12, expands it in the RAM in the memory 12, and executes the expanded program.

通信制御ユニット15は、送信モジュール16、受信モジュール17、通信制御モジュール18を備えている。そして、送信モジュール16は、シリアル通信回線30の通信路Txに接続され、受信モジュール17は、シリアル通信回線30の通信路Rxに接続されている。
通信制御モジュール18は、CPU11の制御により、送信モジュール16及び受信モジュール17によるデータの送受信を制御する。
The communication control unit 15 includes a transmission module 16, a reception module 17, and a communication control module 18. The transmission module 16 is connected to the communication path Tx of the serial communication line 30, and the reception module 17 is connected to the communication path Rx of the serial communication line 30.
The communication control module 18 controls transmission / reception of data by the transmission module 16 and the reception module 17 under the control of the CPU 11.

(スレーブ制御部20)
スレーブ制御部20は、I/O拡張回路21、通信監視回路22、ウオッチドックタイマ回路(WDT)23、電源監視回路24、電源リセット回路25を備えている。
(Slave controller 20)
The slave control unit 20 includes an I / O expansion circuit 21, a communication monitoring circuit 22, a watchdog timer circuit (WDT) 23, a power supply monitoring circuit 24, and a power supply reset circuit 25.

[I/O拡張回路21]
I/O拡張回路21は、通信制御ユニット40、I/O拡張ユニット50、クロック生成回路60、システムリセット回路70を備えている。
[I / O expansion circuit 21]
The I / O expansion circuit 21 includes a communication control unit 40, an I / O expansion unit 50, a clock generation circuit 60, and a system reset circuit 70.

通信制御ユニット40は、マスタ制御部10における通信制御ユニット15と同様に、受信モジュール41、送信モジュール42、通信制御モジュール43を備えている。そして、受信モジュール41は、シリアル通信回線30の通信路Txに接続され、送信モジュール42は、シリアル通信回線30の通信路Rxに接続されている。
すなわち、マスタ制御部10とスレーブ制御部20との間のシリアル通信において、マスタ制御部10の通信制御ユニット15がマスタインターフェースを、スレーブ制御部20におけるI/O拡張回路21の通信制御ユニット40がスレーブインターフェースを構成している。
Similar to the communication control unit 15 in the master control unit 10, the communication control unit 40 includes a reception module 41, a transmission module 42, and a communication control module 43. The reception module 41 is connected to the communication path Tx of the serial communication line 30, and the transmission module 42 is connected to the communication path Rx of the serial communication line 30.
That is, in the serial communication between the master control unit 10 and the slave control unit 20, the communication control unit 15 of the master control unit 10 serves as the master interface, and the communication control unit 40 of the I / O expansion circuit 21 in the slave control unit 20 Configures a slave interface.

I/O拡張ユニット50は、I/O制御モジュール51、インターフェース(IF:Interface)モジュール52、アナログ信号出力手段の一例としてのアナログ/デジタル変換(A/D:Analog/Digital)モジュール53、パルス信号出力モジュール54を備えている。なお、IFモジュール52は、単数であってもよく、複数であってもよい。   The I / O expansion unit 50 includes an I / O control module 51, an interface (IF) module 52, an analog / digital conversion (A / D) module 53 as an example of an analog signal output means, and a pulse signal. An output module 54 is provided. Note that the IF module 52 may be singular or plural.

I/O制御モジュール51には、IFモジュール52、A/Dモジュール53、パルス信号出力モジュール54が並列に接続されるとともに、通信制御ユニット40、クロック生成回路60が接続されている。
I/O制御モジュール51は、通信制御ユニット40の受信モジュール41が受信したデータを、IFモジュール52、A/Dモジュール53、パルス信号出力モジュール54の内の指定されたいずれかに送信する。また、IFモジュール52、A/Dモジュール53、パルス信号出力モジュール54のいずれからか受信したデータを、通信制御ユニット40の送信モジュール42に送信する。
The I / O control module 51 is connected to the IF module 52, the A / D module 53, and the pulse signal output module 54 in parallel, and to the communication control unit 40 and the clock generation circuit 60.
The I / O control module 51 transmits the data received by the reception module 41 of the communication control unit 40 to any one of the IF module 52, the A / D module 53, and the pulse signal output module 54 specified. Further, data received from any of the IF module 52, the A / D module 53, and the pulse signal output module 54 is transmitted to the transmission module 42 of the communication control unit 40.

図2では、例として、2個のIFモジュール52が、画像形成部3の二つの制御対象にそれぞれ接続されている。すなわち、IFモジュール52がデータを受信すると、そのデータが画像形成部3の制御対象に送信される。これにより、その制御対象が制御される。
また、画像形成部3の制御対象からのデータが、IFモジュール52に送信され、I/O制御モジュール51及び通信制御ユニット40を介して、マスタ制御部10に送信される。
なお、画像形成部3における制御対象は、例えば、モータ、ヒータ、温度センサ、湿度センサ、速度センサなどである。
UI部2、画像読取部4、送受信部5についても同様である。
In FIG. 2, as an example, two IF modules 52 are respectively connected to two control objects of the image forming unit 3. That is, when the IF module 52 receives data, the data is transmitted to the control target of the image forming unit 3. Thereby, the controlled object is controlled.
Data from the control target of the image forming unit 3 is transmitted to the IF module 52 and transmitted to the master control unit 10 via the I / O control module 51 and the communication control unit 40.
The control target in the image forming unit 3 is, for example, a motor, a heater, a temperature sensor, a humidity sensor, a speed sensor, or the like.
The same applies to the UI unit 2, the image reading unit 4, and the transmission / reception unit 5.

また、IFモジュール52の一つが、後述するWDT23に接続されている。
パルス信号出力モジュール54及びA/Dモジュール53については、後述する通信監視回路22の説明において説明する。
One of the IF modules 52 is connected to a WDT 23 described later.
The pulse signal output module 54 and the A / D module 53 will be described in the description of the communication monitoring circuit 22 described later.

クロック生成回路60は、クロック信号CKを生成して、I/O拡張ユニット50におけるI/O制御モジュール51に送信する。すなわち、I/O制御モジュール51とIFモジュール52、A/Dモジュール53、パルス信号出力モジュール54とのデータの送受信は、クロック生成回路60によって生成されるクロック信号CKに同期して行われる。   The clock generation circuit 60 generates a clock signal CK and transmits it to the I / O control module 51 in the I / O expansion unit 50. That is, data transmission / reception between the I / O control module 51, the IF module 52, the A / D module 53, and the pulse signal output module 54 is performed in synchronization with the clock signal CK generated by the clock generation circuit 60.

システムリセット回路70は、後述する電源リセット回路25から信号を受信すると、I/O拡張回路21をリセットする。
なお、システムリセット回路70は、I/O拡張回路21がASIC(特定用途向け集積回路:Application Specific Integrated Circuit)として構成される場合に、ASICをリセットする回路である。よって、ASICを用いない場合には、後述する電源リセット回路25が、I/O拡張回路21をリセットしてもよい。
The system reset circuit 70 resets the I / O expansion circuit 21 when receiving a signal from the power supply reset circuit 25 described later.
The system reset circuit 70 is a circuit that resets the ASIC when the I / O expansion circuit 21 is configured as an ASIC (Application Specific Integrated Circuit). Therefore, when the ASIC is not used, the power reset circuit 25 described later may reset the I / O expansion circuit 21.

[通信監視回路22]
通信監視回路22は、デジタルポテンショメータ81(以下では、DP81と表記する。)、書き換え可能な不揮発性メモリ82(以下では、NVメモリ82と表記する。)、メモリタイミング生成回路83を備えている。
DP81は、例えば直列接続された複数の抵抗(抵抗アレイ)を備えている。そして、直列接続された複数の抵抗のそれぞれの接続点のいずれかが出力端子(端子R)に接続されている。そして、端子Rに接続される抵抗の接続点が、受信したパルス信号Pに応じて変化することで、出力電圧を変化させている。
ここでは、接続点をタップと表記する。なお、接続点は、ステップ(Step)又は段と呼ばれることがある。
[Communication monitoring circuit 22]
The communication monitoring circuit 22 includes a digital potentiometer 81 (hereinafter referred to as DP81), a rewritable nonvolatile memory 82 (hereinafter referred to as NV memory 82), and a memory timing generation circuit 83.
The DP 81 includes, for example, a plurality of resistors (resistance array) connected in series. Any one of connection points of the plurality of resistors connected in series is connected to the output terminal (terminal R W ). The connection point of the resistor connected to the terminal R W is, that changes according to the pulse signal P received, and changing the output voltage.
Here, the connection point is expressed as a tap. In addition, a connection point may be called a step (Step) or a step.

NVメモリ82は、書き換え可能な不揮発性メモリであって、電源の供給がなくとも、書き込まれたデータを保持するメモリである。ここでは、DP81の端子Rに接続されている抵抗の接続点(タップ)の位置(タップ位置)DPTを記憶する。なお、NVメモリ82には、EEPROM、フラッシュメモリなどを用い得る。 The NV memory 82 is a rewritable nonvolatile memory that retains written data even when power is not supplied. Here, stores the position (tap position) DPT connection point of the resistor connected to the terminal R W of DP81 (taps). The NV memory 82 may be an EEPROM, a flash memory, or the like.

メモリタイミング生成回路83は、NVメモリ82に、DP81の端子Rに接続されているタップ位置DPTを示すデータを書き込むための一連の制御信号列から構成されるメモリタイミングを生成する。なお、メモリタイミング生成回路83は、ハードウェア(ワイヤードロジック)により構成され、後述する電源監視回路24から信号を受信すると、メモリタイミングが生成されることがよい。つまり、メモリタイミング生成回路83によって生成されたメモリタイミングにより、その際設定されているDP81のタップ位置DPTを示すデータがNVメモリ82に書き込まれる。 Memory timing generation circuit 83, the NV memory 82, generates a memory timing comprised of a series of control signal sequence for writing data indicating the tap position DPT connected to the terminal R W of DP81. The memory timing generation circuit 83 is configured by hardware (wired logic), and when a signal is received from the power supply monitoring circuit 24 described later, the memory timing is preferably generated. That is, data indicating the tap position DPT of the DP 81 set at that time is written in the NV memory 82 at the memory timing generated by the memory timing generation circuit 83.

通信監視回路22は、I/O拡張回路21におけるI/O拡張ユニット50のパルス信号出力モジュール54に接続されている。そして、通信監視回路22は、パルス信号出力モジュール54からDP81のタップ位置DPTを移動させるパルス信号Pなどを受信する。
また、通信監視回路22の端子Rは、I/O拡張回路21におけるI/O拡張ユニット50のA/Dモジュール53に接続されている。
The communication monitoring circuit 22 is connected to the pulse signal output module 54 of the I / O expansion unit 50 in the I / O expansion circuit 21. Then, the communication monitoring circuit 22 receives a pulse signal P that moves the tap position DPT of the DP 81 from the pulse signal output module 54.
The terminal R W of the communication monitoring circuit 22 is connected to the A / D module 53 of the I / O expansion unit 50 in the I / O expansion circuit 21.

[WDT23]
WDT23は、I/O拡張ユニット50における一つのIFモジュール52に接続されている。また、WDT23は、後述する電源リセット回路25に接続されている。
WDT23は、WDT23の備えるタイマをリセットする信号(タイマリセット信号)を予め定められた周期で受信する限り、電源リセット回路25に信号を出力しない。しかし、WDT23は、WDT23のタイマリセット信号をこの予め定められた周期で受信しない場合に、タイマがタイムアップして、電源リセット回路25に信号を送信する。これにより、スレーブ制御部20が電源リセットされる。
[WDT23]
The WDT 23 is connected to one IF module 52 in the I / O expansion unit 50. The WDT 23 is connected to a power reset circuit 25 described later.
The WDT 23 does not output a signal to the power reset circuit 25 as long as it receives a signal (timer reset signal) for resetting the timer included in the WDT 23 at a predetermined cycle. However, when the WDT 23 does not receive the timer reset signal of the WDT 23 at this predetermined period, the timer times out and transmits a signal to the power reset circuit 25. Thereby, the power supply of the slave control unit 20 is reset.

[電源監視回路24]
電源監視回路24は、スレーブ制御部20に供給される電源の電圧(電源電圧)を監視する。そして、電源監視回路24は、電源電圧が予め定められた最低電圧未満になったことを検知すると、通信監視回路22のメモリタイミング生成回路83及び電源リセット回路25に信号を送信する。
[Power supply monitoring circuit 24]
The power supply monitoring circuit 24 monitors the voltage (power supply voltage) of the power supplied to the slave control unit 20. The power supply monitoring circuit 24 transmits a signal to the memory timing generation circuit 83 and the power supply reset circuit 25 of the communication monitoring circuit 22 when detecting that the power supply voltage is less than a predetermined minimum voltage.

なお、電源監視回路24は、電源電圧が最低電圧未満になると、通信監視回路22を電源供給回路(不図示)から切り離す。これにより、電源電圧が最低電圧未満になっても、通信監視回路22に供給されている電源(電圧)が急激に低下することが抑制され、しばらくの間、通信監視回路22が動作を継続するようにしている。
例えば、通信監視回路22は、電源供給回路から電源が供給される部分に、スイッチ及びコンデンサを備えている。電源監視回路24は、電源電圧が正常である間において、スイッチを閉にして、電源供給回路から通信監視回路22に電源を供給するとともに、そのコンデンサを充電する。一方、電源監視回路24は、電源電圧が最低電圧未満になったことを検知すると、スイッチを開にして、通信監視回路22を電源供給回路から切り離す。これにより、通信監視回路22は、コンデンサに蓄積された電荷(電力)によって、しばらくの間動作を継続する。なお、通信監視回路22の動作電圧は、最低電圧より低く設定されているとよい。このようにすることで、通信監視回路22は、動作電圧が最低電圧より低く設定されていない場合に比べ、より長い時間動作を継続する。
なお、動作を継続する時間は、DP81のタップ位置DPTを示すデータをNVメモリ82に書き込むために要する時間以上であればよい。
The power supply monitoring circuit 24 disconnects the communication monitoring circuit 22 from a power supply circuit (not shown) when the power supply voltage becomes less than the minimum voltage. As a result, even when the power supply voltage becomes lower than the minimum voltage, the power supply (voltage) supplied to the communication monitoring circuit 22 is suppressed from rapidly decreasing, and the communication monitoring circuit 22 continues to operate for a while. I am doing so.
For example, the communication monitoring circuit 22 includes a switch and a capacitor in a portion to which power is supplied from a power supply circuit. While the power supply voltage is normal, the power monitoring circuit 24 closes the switch, supplies power from the power supply circuit to the communication monitoring circuit 22, and charges the capacitor. On the other hand, when the power supply monitoring circuit 24 detects that the power supply voltage has become less than the minimum voltage, it opens the switch and disconnects the communication monitoring circuit 22 from the power supply circuit. As a result, the communication monitoring circuit 22 continues to operate for a while by the electric charge (electric power) accumulated in the capacitor. Note that the operating voltage of the communication monitoring circuit 22 is preferably set lower than the minimum voltage. In this way, the communication monitoring circuit 22 continues to operate for a longer time than when the operating voltage is not set lower than the minimum voltage.
The time for which the operation is continued may be longer than the time required for writing data indicating the tap position DPT of the DP 81 in the NV memory 82.

[電源リセット回路25]
電源リセット回路25は、スレーブ制御部20を電源リセットする回路である。電源リセット回路25は、WDT23及び電源監視回路24に接続されている。そして、電源リセット回路25は、WDT23及び電源監視回路24のいずれかから信号を受信すると、I/O拡張回路21におけるシステムリセット回路70及びマスタ制御部10におけるCPU11に信号を送信する。そして、システムリセット回路70により、I/O拡張回路21がリセットされる。また、電源リセット回路25により、スレーブ制御部20の電源供給回路がリセットされるため、通信監視回路22が電源リセットされる。すなわち、電源リセット回路25は、スレーブ制御部20を電源リセットする。
なお、電源リセットとは、電源を瞬時遮断した後、再度電源を供給することをいう。これにより、スレーブ制御部20は、初期状態に再起動(再立ち上げ)される。
[Power reset circuit 25]
The power reset circuit 25 is a circuit that resets the power of the slave control unit 20. The power reset circuit 25 is connected to the WDT 23 and the power monitor circuit 24. When the power reset circuit 25 receives a signal from either the WDT 23 or the power monitoring circuit 24, the power reset circuit 25 transmits a signal to the system reset circuit 70 in the I / O expansion circuit 21 and the CPU 11 in the master control unit 10. Then, the I / O expansion circuit 21 is reset by the system reset circuit 70. Further, since the power supply circuit of the slave control unit 20 is reset by the power reset circuit 25, the communication monitoring circuit 22 is reset. That is, the power reset circuit 25 resets the power of the slave control unit 20.
The power reset means that the power is supplied again after the power is cut off instantaneously. As a result, the slave control unit 20 is restarted (restarted) in the initial state.

(通信監視回路22の詳細)
図3は、通信監視回路22を説明する図である。図3(a)は、通信監視回路22の詳細図、図3(b)は、DP81のタップを説明する図である。
図3(a)において、通信監視回路22を説明する。前述したように、通信監視回路22は、DP81、NVメモリ82、メモリタイミング生成回路83を備えている。そして、通信監視回路22は、I/O拡張ユニット50のA/Dモジュール53及びパルス信号出力モジュール54に接続されている。
(Details of the communication monitoring circuit 22)
FIG. 3 is a diagram for explaining the communication monitoring circuit 22. 3A is a detailed diagram of the communication monitoring circuit 22, and FIG. 3B is a diagram illustrating the tap of the DP 81. As shown in FIG.
The communication monitoring circuit 22 will be described with reference to FIG. As described above, the communication monitoring circuit 22 includes the DP 81, the NV memory 82, and the memory timing generation circuit 83. The communication monitoring circuit 22 is connected to the A / D module 53 and the pulse signal output module 54 of the I / O expansion unit 50.

DP81は、直列接続された複数の抵抗(抵抗アレイ)を備えている(図3(b)参照。)。抵抗アレイの一方が端子R、他方が端子Rである。そして、直列接続された複数の抵抗の接続点(タップ)のいずれかが端子Rに接続される。そして、端子Rが、A/Dモジュール53に接続されている。
ここで、端子Rが基準電位GND(接地電位GND)、端子Rが電源電位VCC(通信監視回路22の電源電圧)に接続されているとする。この場合、端子Rは、電源電位VCCと基準電位GNDとの間の電圧であって、端子Rに接続されたタップ位置DPTの電圧になる。そして、端子Rの電圧は、直列接続された抵抗の数、すなわちタップ(段)数SNで決まる間隔(分解能)で設定される。なお、タップ数SNは、例えば128、256などであることから、端子Rは、アナログ電圧を出力する。ここでは、端子Rは、アナログ電圧であるアナログ信号出力DPOa(aはアナログ値であることを示す。)を出力するとする。そして、A/Dモジュール53は、アナログ信号出力DPOaを、A/D変換して、デジタル信号出力DPOd(dはデジタル値であることを示す。)を出力する。アナログ信号出力DPOaは、アナログ信号の一例である。A/Dモジュール53は、変換手段の一例である。
なお、DP81の端子Rは、アナログ信号出力DPOaを出力し続ける。
The DP 81 includes a plurality of resistors (resistance array) connected in series (see FIG. 3B). One of the resistor arrays is a terminal R L and the other is a terminal RH . Then, either the connection point of the plurality of resistors connected in series (tap) is connected to the terminal R W. Then, the terminal R W is connected to the A / D module 53.
Here, it is assumed that the terminal RL is connected to the reference potential GND (ground potential GND), and the terminal RH is connected to the power supply potential V CC (power supply voltage of the communication monitoring circuit 22). In this case, the terminal R W is a voltage between the power supply potential V CC and a reference potential GND, and becomes the voltage of the tap position DPT connected to the terminal R W. Then, the voltage of the terminal R W, the number of series-connected resistors, that are set by the tap (step) intervals determined by the number SN (resolution). The number SN tap, for example, because it is like 128, 256, the terminal R W outputs an analog voltage. Here, the terminal R W, the analog signal output DPOa an analog voltage (a is. Indicating that the analog value) and outputs a. Then, the A / D module 53 performs A / D conversion on the analog signal output DPOa and outputs a digital signal output DPOd (d indicates that it is a digital value). The analog signal output DPOa is an example of an analog signal. The A / D module 53 is an example of a conversion unit.
The terminal R W of DP81 keeps outputting an analog signal output DPOa.

DP81は、アップ/ダウン(U/D)コマンドを受信する端子U/D(図3(a)ではU/Dと表記する。)、パルス信号Pを受信する端子P(図3(a)ではPと表記する。)、クロック信号CKを受信する端子CK(図3(a)ではCKと表記する。)を備えている。
DP81は、I/O拡張ユニット50のパルス信号出力モジュール54から1個のパルス信号Pを受信すると、端子Rに接続されるタップ位置DPTが一つ移動する(変更される)。このとき、U/Dコマンドがアップ(U)であると、タップ位置DPTは大きい側(端子Rの電圧が大きくなる方向)に一つ移動する(アップする)。一方、U/Dコマンドがダウン(D)であると、タップ位置DPTは小さい側(端子Rの電圧が小さくなる方向)に一つ移動する(ダウンする)。そして、パルス信号Pが複数供給されると、端子Rに接続されるタップ位置DPTが、受信したパルス数(後述するCN)に応じて移動する。
これに伴い、通信監視回路22の端子Rが出力するアナログ信号出力DPOa及びI/O拡張ユニット50のA/Dモジュール53が出力するデジタル信号出力DPOdが変化する。
The DP 81 has a terminal U / D for receiving an up / down (U / D) command (indicated as U / D in FIG. 3A) and a terminal P for receiving a pulse signal P (in FIG. 3A). And a terminal CK (denoted as CK in FIG. 3A) for receiving the clock signal CK.
DP81 receives the pulse signal P from the pulse signal output module 54 1 of the I / O expansion unit 50, the tap position DPT connected to the terminal R W is moved one (change). At this time, the U / D command is an up (U), the tap position DPT is larger side to one moves to (voltage of the terminal R W is increasing direction) (up). On the other hand, when the U / D command is a down (D), the tap position DPT small side (down) one (to the voltage of the terminal R W direction is reduced). When the pulse signal P is more supply, tap position DPT connected to the terminal R W is moved in accordance with the number of the received pulses (CN described later).
Accordingly, the digital signal output DPOd the A / D module 53 of the analog signal output DPOa and I / O expansion unit 50 to the terminal R W of the communication monitoring circuit 22 outputs to output changes.

なお、A/Dモジュール53は、演算、ビットの置換、間引きなどのデジタル処理が施されるように構成されていてもよい。   The A / D module 53 may be configured to perform digital processing such as calculation, bit replacement, and thinning.

前述したように、電源監視回路24は、電源電圧が最低電圧未満になったことを検知すると、通信監視回路22のメモリタイミング生成回路83に端子W(図3(a)ではWと表記する。)を介して、信号を送信する。すると、NVメモリ82に端子Rに接続されているタップ位置DPTを示すデータを記憶するためのメモリタイミングが生成され、端子Rに接続されているタップ位置DPTを示すデータがNVメモリ82に記憶される。 As described above, when the power supply monitoring circuit 24 detects that the power supply voltage has become less than the minimum voltage, the power supply monitoring circuit 24 represents the terminal W (in FIG. 3A) as W in the memory timing generation circuit 83 of the communication monitoring circuit 22. ) To send a signal. Then, NV memory timing for storing data indicating the tap position DPT in the memory 82 is connected to the terminal R W is generated, the data indicating the tap position DPT that is connected to the terminal R W is in the NV memory 82 Remembered.

以上説明したように、通信監視回路22は、電源電位VCC及び基準電位GNDが供給される端子の他、デジタル信号を受信する端子U/D、端子P、端子CK、端子W及びアナログ信号を出力する端子Rを備えている。
なお、図3(a)では、通信監視回路22の端子U/D、端子P、端子CKは、パルス信号出力モジュール54に接続されている。端子U/D、端子CKは、それぞれに設けられたIFモジュール52に接続されていてもよい。
As described above, the communication monitoring circuit 22 receives the terminal U / D, the terminal P, the terminal CK, the terminal W, and the analog signal that receive the digital signal in addition to the terminal to which the power supply potential VCC and the reference potential GND are supplied. and a terminal R W to output.
In FIG. 3A, the terminal U / D, the terminal P, and the terminal CK of the communication monitoring circuit 22 are connected to the pulse signal output module 54. The terminal U / D and the terminal CK may be connected to the IF module 52 provided in each.

なお、DP81及びNVメモリ82に、これらを一体化した集積回路(IC)を使用してもよい。   Note that an integrated circuit (IC) in which these are integrated in the DP 81 and the NV memory 82 may be used.

図3(b)により、DP81のタップ位置DPTについて説明する。
DP81は、タップ数がSNであって、タップ位置DPTは0〜(SN−1)である。以下では、タップ位置DPT〜DPT(SN−1)と表記する。
隣接するタップ位置DPT間は、電圧ADPである。そして、1タップ位置DPTに許容される上限は、電圧ADPT、下限は、電圧ADPBである。ここでは、電圧ADPT及び電圧ADPBは、タップ間の電圧ADPの1/2である電圧ADPGとする。なお、それぞれのタップ位置DPTは、上限を含み、下限を含まないとする。
なお、最小タップ位置DPTは、電圧AMIN、最大タップ位置DPT(SN−1)は、電圧AMAXとする。
DP81のタップ位置DPTに電圧を設定する方法については、後述する。
The tap position DPT of DP81 will be described with reference to FIG.
In DP81, the tap number is SN, and the tap position DPT is 0 to (SN-1). Hereinafter, referred to as tap position DPT 0 ~DPT (SN-1) .
Between adjacent tap positions DPT is a voltage ADP. The upper limit allowed for the 1-tap position DPT is the voltage ADPT, and the lower limit is the voltage ADPB. Here, the voltage ADPT and the voltage ADPB are assumed to be a voltage ADPG that is ½ of the voltage ADP between the taps. Each tap position DPT includes an upper limit and does not include a lower limit.
The minimum tap position DPT 0 is a voltage AMIN, and the maximum tap position DPT (SN-1) is a voltage AMAX.
A method for setting the voltage at the tap position DPT of the DP 81 will be described later.

(制御部1の動作の概要)
図2を参照しつつ、制御部1による通信品質などの通信状態をチェックする方法の概要を説明する。
本実施の形態が適用される制御部1は、マスタ制御部10とスレーブ制御部20との間でシリアル通信が正常に行われているか否かを監視(通信監視)する。
(Outline of operation of control unit 1)
An outline of a method for checking the communication state such as communication quality by the control unit 1 will be described with reference to FIG.
The control unit 1 to which the present exemplary embodiment is applied monitors whether or not serial communication is normally performed between the master control unit 10 and the slave control unit 20 (communication monitoring).

図4は、マスタ制御部10とスレーブ制御部20との間で送受信されるデータ列を示す図である。図4(a)は、マスタ制御部10からスレーブ制御部20に送信されるデータ列、図4(b)は、スレーブ制御部20からマスタ制御部10に送信されるデータ列である。
図4(a)に示すように、マスタ制御部10からスレーブ制御部20に、制御のためのデータCDsに加え、通信監視用の通信監視データTDsが送信される。通信監視用の通信監視データTDsは、予め定められた周期tpで送信される。
また、図4(b)に示すように、スレーブ制御部20からマスタ制御部10に、応答のためのデータCDrに加え、通信監視データTDsに応答する通信監視応答データTDrが送信される。一例として、通信監視応答データTDrも、周期tpで送信されるとする。
周期tpは、例えば10msである。
FIG. 4 is a diagram illustrating a data string transmitted and received between the master control unit 10 and the slave control unit 20. 4A is a data string transmitted from the master control unit 10 to the slave control unit 20, and FIG. 4B is a data string transmitted from the slave control unit 20 to the master control unit 10.
As shown in FIG. 4A, communication monitoring data TDs for communication monitoring is transmitted from the master control unit 10 to the slave control unit 20 in addition to the data CDs for control. Communication monitoring data TDs for communication monitoring is transmitted at a predetermined cycle tp.
In addition to the response data CDr, communication monitoring response data TDr responding to the communication monitoring data TDs is transmitted from the slave control unit 20 to the master control unit 10 as shown in FIG. As an example, it is assumed that the communication monitoring response data TDr is also transmitted with a period tp.
The period tp is, for example, 10 ms.

通信監視データTDsは、後述するように、DP81のタップ位置DPTを移動させるためのパルス数(カウント数CN)を指定するカウントパターンCPや移動方向を設定するアップ/ダウン(U/D)コマンドを含んでいる。図4(a)では、通信監視データTDsに含まれるカウントパターンCPの場合を示している。後述するように、カウントパターンCPは、シリアル通信が正常に行われているか否かをテストするテストパターンである。
そして、通信監視応答データTDrは、I/O拡張ユニット50のA/Dモジュール53が出力するデジタル信号出力DPOdを含んでいる。図4(b)では、通信監視応答データTDrに含まれるデジタル信号出力DPOdを示している。
As will be described later, the communication monitoring data TDs includes a count pattern CP for specifying the number of pulses (count number CN) for moving the tap position DPT of the DP 81 and an up / down (U / D) command for setting the moving direction. Contains. FIG. 4A shows the case of the count pattern CP included in the communication monitoring data TDs. As will be described later, the count pattern CP is a test pattern for testing whether or not serial communication is normally performed.
The communication monitoring response data TDr includes a digital signal output DPOd output from the A / D module 53 of the I / O expansion unit 50. FIG. 4B shows a digital signal output DPOd included in the communication monitoring response data TDr.

ここで、カウントパターンCPを含む通信監視データTDsはシリアルデータである。通信監視データTDsは、第1のデジタル信号の一例である。カウントパターンCPは、信号パターンの一例である。デジタル信号出力DPOdを含む通信監視応答データTDrもシリアルデータである。通信監視応答データTDrは、第2のデジタル信号の一例である。
なお、カウントパターンCP及びデジタル信号出力DPOdに付す(T)はタイミングを表し、(T)に対して、(T−1)は直前、(T+1)は直後を表している。
Here, the communication monitoring data TDs including the count pattern CP is serial data. The communication monitoring data TDs is an example of a first digital signal. The count pattern CP is an example of a signal pattern. The communication monitoring response data TDr including the digital signal output DPOd is also serial data. The communication monitoring response data TDr is an example of a second digital signal.
Note that (T) attached to the count pattern CP and the digital signal output DPOd represents timing, and (T-1) represents immediately before and (T + 1) represents immediately after (T).

(通信監視データTDs)
次に、通信監視データTDsに含まれ、パルス数を指定するカウントパターンCPについて説明する。
図5は、通信監視データTDsにおけるカウントパターンCPの一例を示す図である。
ここでは、一例として、DP81のタップ数SNは128であるとする。そして、カウントパターン数CPNは6であるとする。以下では、それぞれのカウントパターンCPをCP[m](m=1〜6(CPN))と表記する。
(Communication monitoring data TDs)
Next, the count pattern CP included in the communication monitoring data TDs and specifying the number of pulses will be described.
FIG. 5 is a diagram illustrating an example of the count pattern CP in the communication monitoring data TDs.
Here, as an example, it is assumed that the tap number SN of the DP 81 is 128. The count pattern number CPN is 6. Hereinafter, each count pattern CP is represented as CP [m] (m = 1 to 6 (CPN)).

カウントパターンCP[m]は、8ビットの内、下位7ビットが、DP81のタップ位置DPTを移動させるパルス数(カウント数)CN[m]を表す。それぞれのカウント数CN[m]は、CP[1]が85、CP[2]が42、CP[3]が12、CP[4]が51、CP[5]が1、CP[6]が63である。カウント数CNは、タップ数SNの128に対して、偏らないように設定されている。   In the count pattern CP [m], the lower 7 bits of the 8 bits represent the number of pulses (count number) CN [m] for moving the tap position DPT of the DP 81. Each count number CN [m] is 85 for CP [1], 42 for CP [2], 12 for CP [3], 51 for CP [4], 1 for CP [5], and CP [6]. 63. The count number CN is set so as not to be biased with respect to the tap number SN of 128.

そして、カウントパターンCP[1]、CP[2]は、下位7ビットのビットパターンがビットを交互に1、0としたビットトグルパターンである。カウントパターンCP[3]、CP[4]は、下位7ビットのビットパターンが同じビットが2つ連続するビットダブルパターンである。カウントパターンCP[5]、CP[6]は、下位7ビットのビットパターンが、ビットが3以上連続するビット連続パターンである。
なお、他のビットパターンを用いてもよく、カウントパターンCPの数CPNは2以上の複数であれば、6以外であってもよい。
すなわち、本実施の形態では、複数のカウントパターンCPを用いている。
The count patterns CP [1] and CP [2] are bit toggle patterns in which the bit pattern of the lower 7 bits alternately changes the bits to 1 and 0. The count patterns CP [3] and CP [4] are bit double patterns in which two bits having the same bit pattern of the lower 7 bits are consecutive. The count patterns CP [5] and CP [6] are bit continuous patterns in which the bit pattern of the lower 7 bits is a sequence of 3 or more bits.
Other bit patterns may be used, and the number CPN of the count patterns CP may be other than 6 as long as it is a plurality of 2 or more.
That is, in the present embodiment, a plurality of count patterns CP are used.

(マスタ制御部10が行う通信品質チェックに関する機能ブロック)
図6は、マスタ制御部10が行う通信監視に関する機能ブロックを説明する図である。
図6に示す機能ブロックは、図2に示したマスタ制御部10におけるCPU11がソフトウェア(ソフトウエアモジュール)によって実現する。
(Functional blocks related to communication quality check performed by the master control unit 10)
FIG. 6 is a diagram illustrating functional blocks related to communication monitoring performed by the master control unit 10.
The functional block shown in FIG. 6 is realized by software (software module) by the CPU 11 in the master control unit 10 shown in FIG.

まず、マスタ制御部10におけるメモリ12について説明する。メモリ12は、図4に示したカウントパターン数CPNのカウントパターンCPを有するデータベースCP−DB(図6では、CP−DBと表記する。)を格納している。また、メモリ12は、後述する検出タップ位置(DPTd)検出部105が検出タップ位置DPTdを検出するための参照テーブルを備えている。そして、メモリ12は、通信品質チェック(通信監視)によって得られた通信品質に関するログ(通信監視ログ)を格納する。
なお、メモリ12は、通信品質チェックにともなって、一時的に保持する必要のあるデータを格納する。これについては、矢印を設けない。
First, the memory 12 in the master control unit 10 will be described. The memory 12 stores a database CP-DB (indicated as CP-DB in FIG. 6) having the count pattern CP of the count pattern number CPN shown in FIG. In addition, the memory 12 includes a reference table for detecting a detection tap position DPTd by a detection tap position (DPTd) detection unit 105 described later. Then, the memory 12 stores a log (communication monitoring log) regarding the communication quality obtained by the communication quality check (communication monitoring).
Note that the memory 12 stores data that needs to be temporarily stored in connection with the communication quality check. For this, no arrow is provided.

また、UI部2は、CPU11の指示により、通信品質チェック(通信監視)で得られた通信監視状態に関するメッセージを表示(通信監視状態表示)する。   Further, the UI unit 2 displays a message (communication monitoring state display) regarding the communication monitoring state obtained by the communication quality check (communication monitoring) according to an instruction from the CPU 11.

マスタ制御部10において、ソフトウェアで実現される機能ブロックを説明する。
マスタ制御部10は、カウントパターン(CP)生成部101、カウントパターン(CP)順序設定部102、カウントパターン(CP)選定部103を備える。
また、マスタ制御部10は、予測タップ位置DPTe(eは予測値であること示す。)を算出する予測タップ位置(DPTe)算出部104、検出タップ位置DPTd(dは検出値であること示す。)を検出する検出タップ位置(DPTd)検出部105、タップ位置DPTの移動量がDP81に適合するか否かを判断する移動量判断部106、通信制御ユニット15に送信するカウントパターンCPを設定するカウントパターン(CP)設定部107、タップの移動方向を設定するアップ/ダウン(U/D)設定部108を備える。
そして、マスタ制御部10は、通信の品質を判定する通信品質判定部109を備える。
ここでは、図6及び以下では、( )の用語を使用する。
また、DP81におけるタップ位置DPTと、予測タップ位置DPTe、検出タップ位置DPTdとを区別する。
In the master control unit 10, functional blocks realized by software will be described.
The master control unit 10 includes a count pattern (CP) generation unit 101, a count pattern (CP) order setting unit 102, and a count pattern (CP) selection unit 103.
The master control unit 10 also indicates a predicted tap position (DPTe) calculation unit 104 that calculates a predicted tap position DPTe (e indicates that it is a predicted value), and a detected tap position DPTd (d indicates that it is a detected value. ) Detecting tap position (DPTd) detecting unit 105, a moving amount determining unit 106 for determining whether or not the moving amount of the tap position DPT matches DP81, and a count pattern CP to be transmitted to the communication control unit 15 is set. A count pattern (CP) setting unit 107 and an up / down (U / D) setting unit 108 for setting the moving direction of the tap are provided.
The master control unit 10 includes a communication quality determination unit 109 that determines communication quality.
Here, the term () is used in FIG. 6 and the following.
Further, the tap position DPT, the predicted tap position DPTe, and the detected tap position DPTd in DP81 are distinguished.

CP生成部101は、カウントパターンCPを生成して、データベースCP−DBに格納する。
CP順序設定部102は、データベースCP−DBに格納されたカウントパターン数CPNのカウントパターンCPから、カウントパターンCPを選定する順序を設定する。CP順序設定部102は、順序設定手段の一例である。
CP選定部103は、CP順序設定部102によって設定されたカウントパターンCPを選定する順序に基づいて、カウントパターンCPをデータベースCP−DBから選定する。
The CP generation unit 101 generates a count pattern CP and stores it in the database CP-DB.
The CP order setting unit 102 sets the order in which the count pattern CP is selected from the count patterns CP of the count pattern number CPN stored in the database CP-DB. The CP order setting unit 102 is an example of an order setting unit.
The CP selection unit 103 selects the count pattern CP from the database CP-DB based on the order in which the count pattern CP set by the CP order setting unit 102 is selected.

DPTe算出部104は、CP選定部103が選定したカウントパターンCPと、DPTd検出部105が検出した検出タップ位置DPTdとから、カウントパターンCPに基づいてタップ位置DPTを移動させた場合に予測される予測タップ位置DPTeを算出する。
DPTd検出部105は、通信制御ユニット15を介して、スレーブ制御部20から受信するデジタル信号出力DPOdから、DP81の検出タップ位置DPTdを検出する。DPTd検出部105は、信号受信手段の一例である。
移動量判断部106は、予測タップ位置DPTeが、DP81に対して適合するか否かを判断する(移動量適合性判断)。移動量判断部106は、判断手段の一例である。
CP設定部107は、移動量判断部106によって適合すると判断されたカウントパターンCPを、通信制御ユニット15を介してスレーブ制御部20に送信するカウントパターンCPとして設定する。CP設定部107は、信号送信手段の一例である。
U/D設定部108は、移動量判断部106によって適合すると判断されたカウントパターンCPに対応して、通信制御ユニット15に送信するタップ位置DPTの移動方向を指定するU/Dコマンドを設定する。
The DPTe calculation unit 104 is predicted when the tap position DPT is moved based on the count pattern CP from the count pattern CP selected by the CP selection unit 103 and the detected tap position DPTd detected by the DPTd detection unit 105. A predicted tap position DPTe is calculated.
The DPTd detection unit 105 detects the detection tap position DPTd of the DP 81 from the digital signal output DPOd received from the slave control unit 20 via the communication control unit 15. The DPTd detection unit 105 is an example of a signal receiving unit.
The movement amount determination unit 106 determines whether or not the predicted tap position DPTe matches the DP 81 (movement amount compatibility determination). The movement amount determination unit 106 is an example of a determination unit.
The CP setting unit 107 sets the count pattern CP determined to be suitable by the movement amount determination unit 106 as the count pattern CP to be transmitted to the slave control unit 20 via the communication control unit 15. The CP setting unit 107 is an example of a signal transmission unit.
The U / D setting unit 108 sets a U / D command for designating the moving direction of the tap position DPT transmitted to the communication control unit 15 corresponding to the count pattern CP determined to be matched by the moving amount determining unit 106. .

通信品質判定部109は、DPTe算出部104からの予測タップ位置DPTeとDPTd検出部105からの検出タップ位置DPTdとが一致するか否かを判断し、シリアル通信の通信品質を判定する。通信品質判定部109は、通信状態判定手段の一例である。   The communication quality determination unit 109 determines whether the predicted tap position DPTe from the DPTe calculation unit 104 matches the detection tap position DPTd from the DPTd detection unit 105, and determines the communication quality of serial communication. The communication quality determination unit 109 is an example of a communication state determination unit.

(マスタ制御部10とスレーブ制御部20との間における通信)
図7は、マスタ制御部10とスレーブ制御部20との間の通信を説明するシーケンス図である。
ここでは、図6を参照しつつ、マスタ制御部10、スレーブ制御部20におけるI/O拡張回路21及び通信監視回路22における通信監視データTDsと通信監視応答データTDrの送受信を説明する。
(Communication between the master control unit 10 and the slave control unit 20)
FIG. 7 is a sequence diagram for explaining communication between the master control unit 10 and the slave control unit 20.
Here, transmission / reception of the communication monitoring data TDs and the communication monitoring response data TDr in the I / O expansion circuit 21 and the communication monitoring circuit 22 in the master control unit 10 and the slave control unit 20 will be described with reference to FIG.

図4に示したように、マスタ制御部10のU/D設定部108により、U/Dコマンドを含む通信監視データTDsが、通信制御ユニット15を介してスレーブ制御部20に送信される(ステップ101)。
すると、スレーブ制御部20のI/O拡張回路21により、通信監視回路22のDP81のタップ位置DPTの移動方向がアップ/ダウン(U/D)のいずれかに設定される。
As shown in FIG. 4, the communication monitoring data TDs including the U / D command is transmitted to the slave control unit 20 via the communication control unit 15 by the U / D setting unit 108 of the master control unit 10 (step 101).
Then, the moving direction of the tap position DPT of the DP 81 of the communication monitoring circuit 22 is set to either up / down (U / D) by the I / O expansion circuit 21 of the slave control unit 20.

なお、厳密には、図2に示すように、通信監視データTDsは、マスタ制御部10のCPU11(U/D設定部108)から、通信制御ユニット15を介して、スレーブ制御部20に送信される。そして、スレーブ制御部20では、通信制御ユニット40が通信監視データTDsを受信し、I/O拡張ユニット50のI/O制御モジュール51を介して、パルス信号出力モジュール54に送信される。そして、パルス信号出力モジュール54が通信監視回路22のDP81をアップ/ダウン(U/D)のいずれかに設定することになる。以下では、これらの流れを詳細には記載しないこととする。他の場合も同様とする。   Strictly speaking, as shown in FIG. 2, the communication monitoring data TDs is transmitted from the CPU 11 (U / D setting unit 108) of the master control unit 10 to the slave control unit 20 via the communication control unit 15. The In the slave control unit 20, the communication control unit 40 receives the communication monitoring data TDs and transmits it to the pulse signal output module 54 via the I / O control module 51 of the I / O expansion unit 50. Then, the pulse signal output module 54 sets the DP 81 of the communication monitoring circuit 22 to either up / down (U / D). Hereinafter, these flows will not be described in detail. The same applies to other cases.

次に、マスタ制御部10のCP設定部107により、カウントパターンCPを含む通信監視データTDsが、通信制御ユニット15を介してスレーブ制御部20に送信される(ステップ102)。
すると、スレーブ制御部20におけるI/O拡張回路21のパルス信号出力モジュール54から、タップ位置DPTを移動させるカウント数CNのパルス信号Pが、通信監視回路22のDP81に送信される。
これにより、DP81のタップ位置DPTは、U/Dコマンドによって指定された方向にカウント数CN移動する(ステップ103)。
Next, the communication monitoring data TDs including the count pattern CP is transmitted to the slave control unit 20 via the communication control unit 15 by the CP setting unit 107 of the master control unit 10 (step 102).
Then, the pulse signal P of the count number CN that moves the tap position DPT is transmitted from the pulse signal output module 54 of the I / O expansion circuit 21 in the slave control unit 20 to the DP 81 of the communication monitoring circuit 22.
As a result, the tap position DPT of the DP 81 moves the count number CN in the direction specified by the U / D command (step 103).

そして、DP81は、移動したタップ位置DPTに対応するアナログ信号出力DPOaを出力する。
次に、マスタ制御部10のDPTd検出部105により、DPO取得コマンドが送信される(ステップ104)。すると、スレーブ制御部20におけるI/O拡張回路21のA/Dモジュール53によって、アナログ信号出力DPOaがデジタル信号出力DPOdに変換される。そして、デジタル信号出力DPOdがマスタ制御部10のDPTd検出部105に送信される。すると、DPTd検出部105により、デジタル信号出力DPOdから検出タップ位置DPTdが検出される(ステップ105)。
Then, the DP 81 outputs an analog signal output DPOa corresponding to the moved tap position DPT.
Next, a DPO acquisition command is transmitted by the DPTd detection unit 105 of the master control unit 10 (step 104). Then, the analog signal output DPOa is converted into the digital signal output DPOd by the A / D module 53 of the I / O expansion circuit 21 in the slave control unit 20. Then, the digital signal output DPOd is transmitted to the DPTd detection unit 105 of the master control unit 10. Then, the detection tap position DPTd is detected from the digital signal output DPOd by the DPTd detection unit 105 (step 105).

(通信品質チェックルーチン)
次に、マスタ制御部10によって行われる通信品質チェック(通信監視)ルーチンを説明する。
図8は、マスタ制御部10による通信品質チェックルーチンのフローチャートの一例である。
図6を参照しつつ、図8によりマスタ制御部10による通信品質チェックルーチンを説明する。
(Communication quality check routine)
Next, a communication quality check (communication monitoring) routine performed by the master control unit 10 will be described.
FIG. 8 is an example of a flowchart of a communication quality check routine by the master control unit 10.
A communication quality check routine by the master control unit 10 will be described with reference to FIG.

DPTd検出部105により、タイミング(T−1)においてDP81に設定されたタップ位置DPTに対応する検出タップ位置DPTd(T−1)が検出される(ステップ201)。   The DPTd detection unit 105 detects a detection tap position DPTd (T-1) corresponding to the tap position DPT set to DP81 at the timing (T-1) (step 201).

CP順序設定部102によって設定された順序にしたがって、CP選定部103により、データベースCP−DBから、カウントパターンCPが選定される(ステップ202)。   According to the order set by the CP order setting unit 102, the CP selection unit 103 selects the count pattern CP from the database CP-DB (step 202).

DPTe算出部104により、選定されたカウントパターンCPのカウント数CNに基づいて、検出タップ位置DPTd(T−1)を移動させたとして、予測タップ位置DPTe(T)が算出される(ステップ203)。   The DPTe calculation unit 104 calculates the predicted tap position DPTe (T) assuming that the detection tap position DPTd (T-1) is moved based on the count number CN of the selected count pattern CP (step 203). .

そして、移動量判断部106により、カウントパターンCPによって設定されるタップ位置DPTの移動量がDP81に適合するか否かが判断される(ステップ204)。なお、移動量判断部106による、移動量の判断については、後述する。   Then, the movement amount determination unit 106 determines whether or not the movement amount of the tap position DPT set by the count pattern CP matches DP81 (step 204). The determination of the movement amount by the movement amount determination unit 106 will be described later.

ステップ204で否定(No)の判断がされた場合、すなわち、移動量が適合しない場合には、ステップ202に戻る。そして、CP順序設定部102により、次に選定するカウントパターンCPの順序が設定される。そして、ステップ202、203が繰り返される。   If a negative (No) determination is made in step 204, that is, if the amount of movement is not suitable, the process returns to step 202. Then, the order of the count pattern CP to be selected next is set by the CP order setting unit 102. Steps 202 and 203 are then repeated.

ステップ204で肯定(Yes)の判断がされた場合、すなわち、移動量が適合する場合は、移動量判断部106により、U/D設定部108に移動方向(U/D)が指示され、U/D設定部108により、通信制御ユニット15に送信されるU/Dコマンドが設定される(ステップ205)。これは、図7におけるステップ101と同様である。
また、CP選定部103により、CP設定部107に選定されたカウントパターンCPが指示される。CP設定部107により、通信制御ユニット15に送信されるカウントパターンCPが設定される(ステップ206)。これは、図7におけるステップ102と同様である。
そして、予測タップ位置DPTe(T)をメモリ12(RAMであって構わない)に格納する(ステップ207)。
If the determination in step 204 is affirmative (Yes), that is, if the movement amount is appropriate, the movement amount determination unit 106 instructs the movement direction (U / D) to the U / D setting unit 108, and the U The / D setting unit 108 sets a U / D command to be transmitted to the communication control unit 15 (step 205). This is the same as step 101 in FIG.
Further, the CP selection unit 103 instructs the CP setting unit 107 to select the selected count pattern CP. The count pattern CP transmitted to the communication control unit 15 is set by the CP setting unit 107 (step 206). This is the same as step 102 in FIG.
Then, the predicted tap position DPTe (T) is stored in the memory 12 (which may be a RAM) (step 207).

次に、変数nに“1”を設定する(ステップ208)。
そして、DPTd検出部105により、受信したDP81のタップ位置DPTに対するデジタル信号出力DPOdから、検出タップ位置DPTd(T)を検出する(ステップ209)。
そして、通信品質判定部109により、検出タップ位置DPTd(T)と予測タップ位置DPTe(T)とが一致するか否かが判断される(ステップ210)。
Next, “1” is set to the variable n (step 208).
Then, the DPTd detection unit 105 detects the detected tap position DPTd (T) from the received digital signal output DPOd for the tap position DPT of the DP 81 (step 209).
Then, the communication quality determination unit 109 determines whether or not the detected tap position DPTd (T) matches the predicted tap position DPTe (T) (step 210).

ステップ210で肯定(Yes)の判断がされる場合、すなわち検出タップ位置DPTd(T)と予測タップ位置DPTe(T)とが一致する場合には、通信品質判定部109によって、シリアル通信が正常に行われており、スレーブ制御部20も正常に動作していると判定(推定)される(通信正常)。
そして、次に送信する通信監視データTDsに用いるカウントパターンCP(T+1)を選択するために、ステップ202に戻る。
If the determination in step 210 is affirmative (Yes), that is, if the detected tap position DPTd (T) and the predicted tap position DPTe (T) match, the communication quality determination unit 109 causes the serial communication to be performed normally. It is determined that the slave control unit 20 is also operating normally (communication normal).
And in order to select count pattern CP (T + 1) used for the communication monitoring data TDs transmitted next, it returns to step 202.

一方、ステップ210で否定(No)の判断がされる場合、すなわち検出タップ位置DPTd(T)と予測タップ位置DPTe(T)とが一致しない場合には、変数nが“3”であるか否かが判断される(ステップ211)。
ステップ211において、否定(No)の判断がされる場合、すなわち変数nが3未満の場合には、変数nに“1”が加えられる(ステップ212)。そして、ステップ209に戻って、DPTd検出部105により、受信したDP81のタップ位置DPTに対するデジタル信号出力DPOdから、検出タップ位置DPTd(T)を検出する。そして、ステップ210が繰り返される。
On the other hand, if a negative (No) determination is made in step 210, that is, if the detected tap position DPTd (T) and the predicted tap position DPTe (T) do not match, whether the variable n is “3” or not. Is determined (step 211).
If a negative (No) determination is made in step 211, that is, if the variable n is less than 3, “1” is added to the variable n (step 212). Then, returning to step 209, the DPTd detector 105 detects the detected tap position DPTd (T) from the received digital signal output DPOd for the tap position DPT of DP81. Step 210 is then repeated.

また、ステップ211で肯定(Yes)の判断がされる場合、すなわち変数nが“3”である場合には、通信品質判定部109により、通信エラー(通信異常)が発生したと判定される。そして、通信品質判定部109により、メモリ12に通信エラー(通信異常)が発生した旨の通信監視ログが記録される(図8では、ログ記録と表記する。)とともに、UI部2に通信エラーが発生したことを示す通信監視状態表示(図8では、状態表示と表記する。)が行われる(ステップ213)。
これにより、通信品質チェック(通信監視)ルーチンが完了する。
If the determination in step 211 is affirmative (Yes), that is, if the variable n is “3”, the communication quality determination unit 109 determines that a communication error (communication abnormality) has occurred. The communication quality determination unit 109 records a communication monitoring log indicating that a communication error (communication abnormality) has occurred in the memory 12 (referred to as log recording in FIG. 8), and also causes the UI unit 2 to transmit a communication error. A communication monitoring status display (denoted as status display in FIG. 8) indicating that an error has occurred is performed (step 213).
Thereby, the communication quality check (communication monitoring) routine is completed.

図8では、ステップ201として、タイミング(T−1)の検出タップ位置DPTd(T−1)を、DPTd検出部105によって検出した。しかし、ステップ207と同様に、メモリ12に予測タップ位置DPTe(T−1)が蓄積されている。そして、通信が正常であれば、予測タップ位置DPTe(T−1)と検出タップ位置DPTd(T−1)とは、一致している。よって、ステップ201において、タイミング(T−1)の検出タップ位置DPTd(T−1)を、DPTd検出部105によって検出する代わりに、メモリ12から、予測タップ位置DPTe(T−1)を読み出して、検出タップ位置DPTd(T−1)としてもよい。   In FIG. 8, as step 201, the detection tap position DPTd (T−1) at the timing (T−1) is detected by the DPTd detection unit 105. However, the predicted tap position DPTe (T−1) is stored in the memory 12 as in step 207. And if communication is normal, prediction tap position DPTe (T-1) and detection tap position DPTd (T-1) will correspond. Therefore, in step 201, instead of detecting the detection tap position DPTd (T-1) at the timing (T-1) by the DPTd detection unit 105, the predicted tap position DPTe (T-1) is read from the memory 12. The detection tap position DPTd (T-1) may be used.

また、ステップ210において、検出タップ位置DPTd(T)と予測タップ位置DPTe(T)とが一致する場合に通信正常と判定されるようにしたが、予測タップ位置DPTe(T)に対して予め定められた範囲で一致する場合に、通信正常と判定されるようにしてもよい。   In step 210, it is determined that communication is normal when the detected tap position DPTd (T) matches the predicted tap position DPTe (T). If they match within the specified range, it may be determined that the communication is normal.

さらに、ステップ211において、変数nが“3”となった場合に、通信品質判定部109によって、通信エラー(通信異常)と判断されるようにした。これは、デジタル信号出力DPOdを受信する際に通信エラー(通信異常)が発生した場合に、再度デジタル信号出力DPOdを受信することで通信正常となる場合に対応するためである。
しかし、変数nが“1”において検出タップ位置DPTd(T)と予測タップ位置DPTe(T)とが一致しない場合に、通信エラー(通信異常)と判断してもよい。また、変数nが“3”以外の値のとき、通信エラー(通信異常)と判断してもよい。
Further, in step 211, when the variable n becomes “3”, the communication quality determination unit 109 determines a communication error (communication error). This is to cope with a case where communication is normal by receiving the digital signal output DPOd again when a communication error (communication abnormality) occurs when receiving the digital signal output DPOd.
However, a communication error (communication abnormality) may be determined when the detected tap position DPTd (T) and the predicted tap position DPTe (T) do not match when the variable n is “1”. Further, when the variable n is a value other than “3”, it may be determined that a communication error (communication error) has occurred.

通信エラー(通信異常)が発生したと判断された場合、スレーブ制御部20を電源リセットするようにしてもよい。   When it is determined that a communication error (communication abnormality) has occurred, the slave controller 20 may be reset.

また、マスタ制御部10が、DPO取得コマンドを予め定められた周期(図4の周期tp)で送信できなかった場合であっても、送信したカウントパターンCP及びタップ位置DPTを移動させる方向(U/D)の設定から、DP81の予測タップ位置DPTeを計算して、照合してもよい。   In addition, even when the master control unit 10 cannot transmit the DPO acquisition command at a predetermined period (period tp in FIG. 4), the direction in which the transmitted count pattern CP and tap position DPT are moved (U / D), the predicted tap position DPTe of DP81 may be calculated and collated.

後述するように、スレーブ制御部20が電源リセットされた後、電源が回復した場合、NVメモリ82に格納された値によってDP81のタップ位置DPTが設定される(後述する図15のステップ401参照)。次いで、マスタ制御部10がデジタル信号出力DPOdを受信し、デジタル信号出力DPOiniとしてメモリ12に格納される。よって、このデジタル信号出力DPOiniより、スレーブ制御部20の電源リセットの際のタップ位置DPTを検出することで、電源リセットの要因を推定しうる。これについては後述する。   As will be described later, when power is restored after the slave control unit 20 is reset, the tap position DPT of the DP 81 is set according to the value stored in the NV memory 82 (see step 401 in FIG. 15 described later). . Next, the master control unit 10 receives the digital signal output DPOd and stores it in the memory 12 as the digital signal output DPOini. Therefore, the factor of the power reset can be estimated by detecting the tap position DPT at the time of the power reset of the slave control unit 20 from the digital signal output DPOini. This will be described later.

(移動量適合性判断ルーチン)
次に、移動量判断部106などによって行われる、タップ位置DPTの移動量がDP81に適合するか否かを判断する移動量適合性判断ルーチンを説明する。
図9は、DP81のタップ位置DPTの移動量がDP81に適合するか否かを判断する移動量適合性判断ルーチンを説明するフローチャートの一例である。
(Movement suitability judgment routine)
Next, a movement amount suitability determination routine that is performed by the movement amount determination unit 106 and the like to determine whether or not the movement amount of the tap position DPT matches DP81 will be described.
FIG. 9 is an example of a flowchart illustrating a moving amount suitability determination routine for determining whether or not the moving amount of the tap position DPT of the DP 81 is compatible with the DP 81.

まず、CP順序設定部102によって、変数mが“0”に設定される(ステップ301)。次に、変数mに“1”が加えられる(ステップ302)。そして、変数mが“1”以上且つカウントパターン数CPN以下であるか否かが判断される(ステップ303)。なお、カウントパターン数CPNは、データベースCP−DBに格納されているカウントパターンCPの数であって、図5に示す例では、“6”である。   First, the CP order setting unit 102 sets the variable m to “0” (step 301). Next, “1” is added to the variable m (step 302). Then, it is determined whether or not the variable m is “1” or more and the count pattern number CPN or less (step 303). The count pattern number CPN is the number of count patterns CP stored in the database CP-DB, and is “6” in the example shown in FIG.

ステップ303において、肯定(Yes)の判断がされた場合、すなわち変数mが“1”以上且つカウントパターン数CPN以下である場合には、CP選定部103により、データベースCP−DBから、CP順序設定部102で設定されたカウントパターンCP[m]が選定される。   If the determination in step 303 is affirmative (Yes), that is, if the variable m is “1” or more and the count pattern number CPN or less, the CP selection unit 103 sets the CP order from the database CP-DB. The count pattern CP [m] set in the unit 102 is selected.

一方、DPTe算出部104は、検出タップ位置DPTd(T−1)に対して、移動可能なタップ数(移動可能タップ数)DPTvを算出する。アップ(U)側とダウン(D)側とで移動方向が算出される。アップ(U)側の移動可能タップ数DPTv(U)は、タップ数SNから検出タップ位置DPTd(T−1)を引いた値である(DPTv(U)=SN−DPTd(T−1))。また、ダウン(D)側の移動可能タップ数DPTv(D)は、検出タップ位置DPTd(T−1)である(DPTv(D)=DPTd(T−1))。   On the other hand, the DPTe calculation unit 104 calculates the number of movable taps (the number of movable taps) DPTv with respect to the detected tap position DPTd (T−1). The moving direction is calculated on the up (U) side and the down (D) side. The up (U) side movable tap number DPTv (U) is a value obtained by subtracting the detected tap position DPTd (T-1) from the tap number SN (DPTv (U) = SN-DPTd (T-1)). . Further, the number of movable taps DPTv (D) on the down (D) side is the detection tap position DPTd (T−1) (DPTv (D) = DPTd (T−1)).

そして、移動量判断部106によって、カウントパターンCP[m]のカウント数CN[m]が、アップ(U)側の移動可能タップ数DPTv(U)未満か否かが判断される(ステップ304)。   Then, the movement amount determination unit 106 determines whether the count number CN [m] of the count pattern CP [m] is less than the up (U) side movable tap number DPTv (U) (step 304). .

ステップ304において、肯定(Yes)の判断がされた場合、すなわち、CN[m]<DPTv(U)である場合には、DP81のタップ位置DPTをカウント数CN[m]だけアップ(U)側に移動させても、最大タップ位置DPT(SN−1)に到達しない。よって、DP81のタップ位置DPTを移動させる方向をアップ(U)に設定する(ステップ305)。そして、カウントパターンCP[m]が選定される(ステップ306)。これにより、移動量適合性判断ルーチンが終了する。
すなわち、移動量がDP81の最大タップ位置DPT(SN−1)に到達しないことから、DP81の制約条件をクリアするので、移動量が適合する。
If the determination in step 304 is affirmative (Yes), that is, if CN [m] <DPTv (U), the tap position DPT of DP81 is increased by the count number CN [m] (U). The maximum tap position DPT (SN-1) is not reached even when moved to. Therefore, the direction in which the tap position DPT of DP81 is moved is set to up (U) (step 305). Then, the count pattern CP [m] is selected (step 306). Thereby, the movement amount suitability determination routine ends.
That is, since the movement amount does not reach the maximum tap position DPT (SN-1) of DP81, the restriction condition of DP81 is cleared, so the movement amount is suitable.

一方、ステップ304において、否定(No)の判断がされた場合、すなわち、CN[m]≧DPTv(U)である場合には、タップ位置DPTをアップ(U)側に移動させると、最大タップ位置DPT(SN−1)に到達してしまう。すると、カウント数CN[m]に関わらず、アナログ信号出力DPOaが電圧AMAXに固定されてしまう(図3(b)参照)。
そこで、カウント数CN[m]が、ダウン(D)側の移動可能タップ数DPTv(D)未満(CN[m]<DPTv(D))か否かが判断される(ステップ307)。
On the other hand, if a negative (No) determination is made in step 304, that is, if CN [m] ≧ DPTv (U), the maximum tap is determined by moving the tap position DPT to the up (U) side. The position DPT (SN-1) is reached. Then, the analog signal output DPOa is fixed to the voltage AMAX regardless of the count number CN [m] (see FIG. 3B).
Therefore, it is determined whether or not the count number CN [m] is less than the down (D) side movable tap number DPTv (D) (CN [m] <DPTv (D)) (step 307).

ステップ307において、肯定(Yes)の判断がされた場合、すなわち、CN[m]<DPTv(D)である場合には、DP81のタップ位置DPTをカウント数CN[m]だけダウンさせても、最小タップ位置DPTに到達しない。よって、DP81のタップ位置DPTを移動させる方向をダウン(D)に設定する(ステップ308)。
そして、カウントパターンCP[m]を選定する(ステップ306)。これにより、移動量適格性判断ルーチンが終了する。
すなわち、移動量がDP81の最小タップ位置DPTに到達しないことから、移動量がDP81の制約条件をクリアするので、移動量が適合する。
If the determination in step 307 is affirmative (Yes), that is, if CN [m] <DPTv (D), even if the tap position DPT of DP81 is decreased by the count number CN [m] The minimum tap position DPT 0 is not reached. Therefore, the direction in which the tap position DPT of DP81 is moved is set to down (D) (step 308).
Then, a count pattern CP [m] is selected (step 306). Thereby, the movement amount eligibility determination routine ends.
That is, since the movement amount does not reach the minimum tap position DPT 0 of DP81, the movement amount clears the constraint condition of DP81, so the movement amount is suitable.

さて、ステップ307において、否定(No)の判断がされた場合、すなわち、CN[m]≧DPTv(D)である場合には、タップ位置DPTをダウン(D)側に移動させると、最小タップ位置DPTに到達してしまう。すると、CN[m]に関わらず、アナログ信号出力DPOaが電圧AMINに固定されてしまう(図3(b)参照)。
そこで、ステップ302に戻って、変数mに“1”を加える。そして、ステップ303以降を繰り返すことにより、次のカウントパターンCP[m+1]について、移動量が適合するか否かが判断される。
If a negative (No) determination is made in step 307, that is, if CN [m] ≧ DPTv (D), the minimum tap is determined by moving the tap position DPT to the down (D) side. Position DPT 0 is reached. Then, the analog signal output DPOa is fixed to the voltage AMIN regardless of CN [m] (see FIG. 3B).
Therefore, returning to step 302, “1” is added to the variable m. Then, by repeating step 303 and subsequent steps, it is determined whether or not the movement amount is suitable for the next count pattern CP [m + 1].

さて、ステップ303で、No(否定)と判断された場合、すなわち、変数mが“1”以上且つCPN以下でない場合、例えば変数mがカウントパターン数CPNを超える場合には、ステップ301に戻って、変数mを“0”に設定する。そして、ステップ303以降において、図5に示した最初のカウントパターンCP[1]について、選定可能か否かが判断される。   If it is determined as No (No) in step 303, that is, if the variable m is not less than “1” and not less than CPN, for example, if the variable m exceeds the count pattern number CPN, the process returns to step 301. , Variable m is set to “0”. Then, after step 303, it is determined whether or not the first count pattern CP [1] shown in FIG. 5 can be selected.

図5に示すように、カウントパターンCPのカウント数CN[m]を偏らないように設定しておくことで、いずれかのカウントパターンCPを適合させうる。   As shown in FIG. 5, any count pattern CP can be adapted by setting the count number CN [m] of the count pattern CP so as not to be biased.

以上説明したように、移動量が適合するとは、カウントパターンCPのカウント数CNによって設定されるタップ位置DPTの移動量が、DP81の最小タップ位置DPTと最大タップ位置DPT(SN−1)との間にあることをいう。これを、DP81の制約条件と表示することがある。 As described above, that the movement amount is suitable means that the movement amount of the tap position DPT set by the count number CN of the count pattern CP is the minimum tap position DPT 0 and the maximum tap position DPT (SN-1) of the DP 81. It means being between. This may be displayed as a restriction condition of DP81.

以上説明したように、本実施の形態では、マスタ制御部10とスレーブ制御部20との間において、通信監視データTDs及び通信監視応答データTDrの送受信が行われる。これにより、通信品質チェック(通信監視)が行われる。すなわち、マスタ制御部10によって、送信した通信監視データTDsがスレーブ制御部20によって正しく受信されているか否かが判断されるようになっている。
そして、正しく受信されていると判断される場合には、マスタ制御部10とスレーブ制御部20との間におけるシリアル通信が正常に行われているとともに、スレーブ制御部20が正常に動作していると判定される。
As described above, in the present embodiment, communication monitoring data TDs and communication monitoring response data TDr are transmitted and received between the master control unit 10 and the slave control unit 20. Thereby, a communication quality check (communication monitoring) is performed. That is, the master control unit 10 determines whether or not the transmitted communication monitoring data TDs is correctly received by the slave control unit 20.
If it is determined that the data is correctly received, serial communication between the master control unit 10 and the slave control unit 20 is normally performed, and the slave control unit 20 is operating normally. It is determined.

また、正しく受信されていないと判断された場合でも、図8で説明したように、通信監視応答データTDr(デジタル信号出力DPOd)を繰り返し受信することにより、ノイズによる一時的な通信エラーか否かを判別しうる。すなわち、繰り返して受信した通信監視応答データTDr(デジタル信号出力DPOd)により、シリアル通信が正常に行われていると判断された場合には、ノイズによる一時的な通信エラーと判定してよい。   Even if it is determined that the signal has not been received correctly, as described with reference to FIG. 8, by repeatedly receiving the communication monitoring response data TDr (digital signal output DPOd), whether or not there is a temporary communication error due to noise. Can be determined. That is, when it is determined that serial communication is normally performed based on the repeatedly received communication monitoring response data TDr (digital signal output DPOd), it may be determined that the communication error is temporary due to noise.

なお、通信エラー(通信異常)が起こり得る場合であっても、要因によっては検出されなかったり(反応しなかったり)、タイミングずれなどにより検出できなかったりして、すり抜ける場合がある。   Even when a communication error (communication abnormality) may occur, it may not be detected depending on a factor (does not react) or may not be detected due to a timing shift or the like, and may pass through.

このような場合、カウントパターンCPを変更することで、通信エラー(通信異常)の要因を識別するとよい。   In such a case, the cause of the communication error (communication abnormality) may be identified by changing the count pattern CP.

(シリアル通信回線30において発生する通信エラー(通信異常)の要因)
次に、カウントパターンCPを変更することで、シリアル通信回線30において発生する通信異常の要因を識別する方法について説明する。
通信エラー(通信異常)は、マスタ制御部10が送信した送信データがスレーブ制御部20で正しく受信されないことをいう。このため、マスタ制御部10が送信した通信監視データTDs(カウントパターンCP)が反映されず、マスタ制御部10が受信した通信監視応答データTDr(デジタル信号出力DPOd)が異なってしまう。
これは、送信データが、通信監視データTDs(カウントパターンCP)がシリアル通信回線30を伝搬する間に化けて他のデータになることである。
(Causes of communication errors (communication abnormalities) occurring in the serial communication line 30)
Next, a method for identifying the cause of communication abnormality occurring in the serial communication line 30 by changing the count pattern CP will be described.
A communication error (communication abnormality) means that the transmission data transmitted by the master control unit 10 is not correctly received by the slave control unit 20. For this reason, the communication monitoring data TDs (count pattern CP) transmitted by the master control unit 10 is not reflected, and the communication monitoring response data TDr (digital signal output DPOd) received by the master control unit 10 is different.
This is because the transmission data becomes distorted while the communication monitoring data TDs (count pattern CP) propagates through the serial communication line 30.

このような通信エラー(通信異常)は、例えばシリアル通信回線30(伝送路)の周波数特性により、シリアル通信回線30がフィルタとして作用する場合、入出力端における反射による場合、外来ノイズの周波数特性による場合、外来ノイズの発生頻度による場合などに発生する。   Such a communication error (communication abnormality) is caused by, for example, the frequency characteristics of the serial communication line 30 (transmission path), the case where the serial communication line 30 acts as a filter, the case of reflection at the input / output terminal, Occurs due to the occurrence frequency of external noise.

図10は、シリアル通信回線30(伝送路)における周波数特性の劣化により生じた波形の鈍り(フィルタ作用)による通信異常(通信エラー)を検出する例を説明する図である。図10(a)は、ビットダブルをカウントパターンCPに用いた場合、図10(b)は、ビットトグルをカウントパターンCPに用いた場合である。
なお、ビットダブルとは、図5のm=4における“0110011”であって、ビットトグルとは、図5のm=2における“0101010”である。ビットトグルは、ビットダブルに比べて、周波数が高い。
FIG. 10 is a diagram for explaining an example of detecting a communication abnormality (communication error) due to waveform dullness (filter action) caused by deterioration of frequency characteristics in the serial communication line 30 (transmission path). FIG. 10A shows a case where bit double is used for the count pattern CP, and FIG. 10B shows a case where bit toggle is used for the count pattern CP.
The bit double is “0110011” at m = 4 in FIG. 5, and the bit toggle is “0101010” at m = 2 in FIG. The bit toggle has a higher frequency than the bit double.

図10において、上から順に、マスタ制御部10の通信制御ユニット15が送信するカウントパターンCPの送信波形、スレーブ制御部20のI/O拡張回路21の通信制御ユニット40が受信するカウントパターンCPの受信波形、クロック信号CK、スレーブ制御部20のI/O拡張回路21の通信制御ユニット40が出力する出力波形である(図2参照)。
ここでは、出力波形は、クロック信号CK(図10ではCKと表記する。)の立ち上がりタイミングにおける受信波形の電圧によって設定される。つまり、クロック信号CKの立ち上がりタイミングにおいて、受信波形の電圧が中央値より大きいと出力波形は「H」になり、受信波形の電圧が中央値より小さいと出力波形は「L」になる。
In FIG. 10, in order from the top, the transmission waveform of the count pattern CP transmitted by the communication control unit 15 of the master control unit 10 and the count pattern CP received by the communication control unit 40 of the I / O expansion circuit 21 of the slave control unit 20. The received waveform, the clock signal CK, and the output waveform output from the communication control unit 40 of the I / O expansion circuit 21 of the slave control unit 20 (see FIG. 2).
Here, the output waveform is set by the voltage of the received waveform at the rising timing of the clock signal CK (indicated as CK in FIG. 10). That is, at the rising timing of the clock signal CK, the output waveform becomes “H” when the voltage of the received waveform is larger than the median value, and the output waveform becomes “L” when the voltage of the received waveform is smaller than the median value.

図10(a)に示すように、シリアル通信回線30の特性劣化によって、送信信号が受信信号で示すように波形が鈍っても、送信信号がビットダブルの場合、出力波形は、送信波形と一致する。つまり、送信されたカウントパターンCPが正しくDP81のタップ位置DPTの移動量として設定されるため、マスタ制御部10の通信品質判定部109によって、通信正常と判定され、通信エラー(通信異常)とならない。すなわち、ビットダブルをカウントパターンCPに用いた場合、シリアル通信回線30(伝送路)の特性劣化が検出されない。   As shown in FIG. 10A, even if the waveform of the transmission signal is dull as shown by the received signal due to the deterioration of the characteristics of the serial communication line 30, if the transmission signal is bit double, the output waveform matches the transmission waveform. To do. That is, since the transmitted count pattern CP is correctly set as the movement amount of the tap position DPT of the DP 81, the communication quality determination unit 109 of the master control unit 10 determines that communication is normal and does not cause a communication error (communication error). . That is, when bit double is used for the count pattern CP, the characteristic deterioration of the serial communication line 30 (transmission path) is not detected.

しかし、図10(b)に示すように、送信信号をビットトグル、つまり周波数を図10(a)の場合に比べて高くすると、出力波形は、送信波形に一致しない。つまり、送信されたカウントパターンCPがDP81のタップ位置DPTの移動量として正しく反映されないため、マスタ制御部10の通信品質判定部109によって、通信エラー(通信異常)と判定される。すなわち、ビットトグルをカウントパターンCPに用いた場合、シリアル通信の伝送路の特性劣化が検出される。   However, as shown in FIG. 10B, when the transmission signal is bit-toggled, that is, when the frequency is made higher than in the case of FIG. 10A, the output waveform does not match the transmission waveform. That is, since the transmitted count pattern CP is not correctly reflected as the movement amount of the tap position DPT of DP81, the communication quality determination unit 109 of the master control unit 10 determines a communication error (communication abnormality). That is, when the bit toggle is used for the count pattern CP, the deterioration in the characteristics of the serial communication transmission path is detected.

このように、シリアル通信におけるシリアル通信回線30(伝送路)の特性劣化は、周波数が異なるように設定されたビットダブルとビットトグルとの複数のカウントパターンCPの通信監視データTDsを連続させて送信することで検出される。   As described above, the characteristic deterioration of the serial communication line 30 (transmission path) in serial communication is performed by continuously transmitting communication monitoring data TDs of a plurality of count patterns CP of bit double and bit toggle set to have different frequencies. Is detected.

図11は、シリアル通信におけるシリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズによる通信異常を検出する例を説明する図である。図11(a)は、ビットトグルをカウントパターンCPに用いた場合、図11(b)は、ビットダブルをカウントパターンCPに用いた場合である。
波形の関係は、図10(a)、(b)の場合と同様である。
FIG. 11 is a diagram for explaining an example of detecting a communication abnormality due to noise from a transmission line adjacent to a serial communication line 30 (transmission line) or external noise in serial communication. FIG. 11A shows a case where bit toggle is used for the count pattern CP, and FIG. 11B shows a case where bit double is used for the count pattern CP.
The relationship between the waveforms is the same as in FIGS. 10 (a) and 10 (b).

図11(a)、(b)に示すように、受信波形は、隣接する伝送路からのノイズ又は外来からのノイズによって乱れる。
図11(a)に示すように、ビッドトグルの場合には、ノイズの影響を受けても、出力波形は、送信波形と一致する。つまり、送信されたカウントパターンCPが正しくDP81のタップ位置DPTの移動量として設定されるため、マスタ制御部10の通信品質判定部109によって、通信正常と判定され、通信エラー(通信異常)とならない。すなわち、ビットトグルをカウントパターンCPに用いた場合、シリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズが検出されない。
As shown in FIGS. 11A and 11B, the received waveform is disturbed by noise from adjacent transmission lines or external noise.
As shown in FIG. 11A, in the case of the bid toggle, the output waveform matches the transmission waveform even under the influence of noise. That is, since the transmitted count pattern CP is correctly set as the movement amount of the tap position DPT of the DP 81, the communication quality determination unit 109 of the master control unit 10 determines that communication is normal and does not cause a communication error (communication error). . That is, when the bit toggle is used for the count pattern CP, noise from a transmission line adjacent to the serial communication line 30 (transmission line) or noise from the outside is not detected.

しかし、図11(b)に示すように、送信信号をビットダブル、すなわち周波数を図11(a)の場合に比べて低くすると、出力波形は、送信波形に一致しなくなる。つまり、送信されたカウントパターンCPがDP81のタップ位置DPTの移動量として正しく反映されないため、マスタ制御部10の通信品質判定部109によって、通信エラー(通信異常)と判定される。すなわち、ビットダブルをカウントパターンCPに用いた場合、シリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズが検出される。   However, as shown in FIG. 11B, when the transmission signal is bit double, that is, when the frequency is lower than that in the case of FIG. 11A, the output waveform does not match the transmission waveform. That is, since the transmitted count pattern CP is not correctly reflected as the movement amount of the tap position DPT of DP81, the communication quality determination unit 109 of the master control unit 10 determines a communication error (communication abnormality). That is, when bit double is used for the count pattern CP, noise from a transmission line adjacent to the serial communication line 30 (transmission line) or noise from the outside is detected.

このように、シリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズは、周波数が異なるように設定されたビットトグルとビットダブルとのカウントパターンCPの通信監視データTDsを連続させて送信することで検出される。   As described above, the noise from the transmission line adjacent to the serial communication line 30 (transmission line) or the noise from the outside is the communication monitoring data TDs of the count pattern CP of the bit toggle and the bit double set to have different frequencies. Can be detected by continuously transmitting.

図12は、シリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズにおける特定のタイミングで発生する通信エラー(通信異常)を検出する例を説明する図である。図12(a)は、ビットトグルをカウントパターンCPに用いた場合、図12(b)は、ビット連続をカウントパターンCPに用いた場合である。
なお、ビット連続とは、図5のm=5における“0000001”である。
波形の関係は、図10(a)、(b)の場合と同様である。
FIG. 12 is a diagram for explaining an example of detecting a communication error (communication abnormality) occurring at a specific timing in noise from a transmission line adjacent to the serial communication line 30 (transmission path) or noise from outside. FIG. 12A shows a case where bit toggle is used for the count pattern CP, and FIG. 12B shows a case where bit continuation is used for the count pattern CP.
The bit continuation is “0000001” at m = 5 in FIG.
The relationship between the waveforms is the same as in FIGS. 10 (a) and 10 (b).

図12(a)、(b)に示すように、受信波形は、隣接する伝送路からのノイズ又は外来からのノイズによって乱れる。
図12(a)に示すように、ビッドトグルの場合には、ノイズの影響を受けても、出力波形は、送信波形と一致する。つまり、送信されたカウントパターンCPが正しくDP81のタップ位置DPTの移動量として設定されるため、マスタ制御部10の通信品質判定部109によって、通信正常と判定され、通信エラー(通信異常)とならない。すなわち、ビッドトグルをカウントパターンCPに用いた場合、シリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズにおける特定のタイミングで発生する通信エラー(通信異常)が検出されない。
As shown in FIGS. 12A and 12B, the received waveform is disturbed by noise from adjacent transmission lines or noise from the outside.
As shown in FIG. 12A, in the case of the bid toggle, the output waveform matches the transmission waveform even under the influence of noise. That is, since the transmitted count pattern CP is correctly set as the movement amount of the tap position DPT of the DP 81, the communication quality determination unit 109 of the master control unit 10 determines that communication is normal and does not cause a communication error (communication error). . That is, when the bid toggle is used for the count pattern CP, a communication error (communication abnormality) occurring at a specific timing in noise from an adjacent transmission path of the serial communication line 30 (transmission path) or noise from outside is not detected.

しかし、図12(b)に示すように、送信信号をビット連続、つまり“0”(「L」)の期間を図12(a)の場合に比べて長くすると、出力波形にノイズによって“1”(「H」)になる期間が発生して、出力波形は、送信波形に一致しなくなる。つまり、送信されたカウントパターンCPが正しくDP81のタップ位置DPTの移動量として設定されないため、マスタ制御部10の通信品質判定部109によって、通信エラー(通信異常)と判定される。すなわち、ビット連続のカウントパターンCPを用いた場合、シリアル通信回線30(伝送路)の隣接する伝送路からのノイズ又は外来からのノイズにおける特定のタイミングにおいて発生する通信異常が検出される。
なお、“0”(「L」)に代えて“1”(「H」)となる期間を長くしてもよい。
However, as shown in FIG. 12B, when the transmission signal is bit-continuous, that is, when the period of “0” (“L”) is made longer than that in the case of FIG. "(" H ") occurs, and the output waveform does not match the transmission waveform. That is, since the transmitted count pattern CP is not correctly set as the movement amount of the tap position DPT of the DP 81, the communication quality determination unit 109 of the master control unit 10 determines a communication error (communication abnormality). That is, when the bit-continuous count pattern CP is used, a communication abnormality occurring at a specific timing in the noise from the transmission line adjacent to the serial communication line 30 (transmission line) or the noise from the outside is detected.
Note that the period of “1” (“H”) may be lengthened instead of “0” (“L”).

図13は、シリアル通信回線30(伝送路)の隣接する伝送路からの突発的なノイズ又は外来からの突発的なノイズによる通信異常を検出する例を説明する図である。ここでは、“0”と“1”との配列がランダムなカウントパターンCPを用いている。
波形の関係は、図10(a)、(b)の場合と同様である。
FIG. 13 is a diagram for explaining an example of detecting a communication abnormality due to sudden noise from a transmission line adjacent to the serial communication line 30 (transmission line) or sudden noise from outside. Here, a count pattern CP in which the arrangement of “0” and “1” is random is used.
The relationship between the waveforms is the same as in FIGS. 10 (a) and 10 (b).

図13に示すように、受信波形は、隣接する伝送路からの突発的なノイズ又は外来からの突発的なノイズによって乱れる。
図13に示すように、突発的なノイズが発生して、出力波形が送信波形と一致しないと、カウントパターンCPが正しくDP81のタップ位置DPTの移動量として設定されないため、マスタ制御部10の通信品質判定部109によって、通信エラー(通信異常)と判定される。
As shown in FIG. 13, the received waveform is disturbed by sudden noise from adjacent transmission lines or sudden noise from outside.
As shown in FIG. 13, when sudden noise occurs and the output waveform does not match the transmission waveform, the count pattern CP is not correctly set as the movement amount of the tap position DPT of the DP 81, and therefore the communication of the master control unit 10. The quality determination unit 109 determines a communication error (communication abnormality).

以上説明したように、複数の異なるカウントパターンCPを用いることで、通信異常の要因を識別又は特定しうる。
したがって、データベースCP−DBに異なるカウントパターンCPを複数格納し、識別したい通信エラー(通信異常)の要因に応じて、CP順序設定部102がカウントパターンCPの選定順序を設定するようにしてもよい。
As described above, by using a plurality of different count patterns CP, the cause of the communication abnormality can be identified or specified.
Therefore, a plurality of different count patterns CP may be stored in the database CP-DB, and the CP order setting unit 102 may set the selection order of the count patterns CP according to the cause of the communication error (communication abnormality) to be identified. .

(検出タップ位置DPTdの校正)
本実施の形態では、I/O拡張回路21のA/Dモジュール53により、DP81のアナログ信号出力DPOaをデジタル信号出力DPOdに変換している。そして、デジタル信号出力DPOdに基づいて検出した検出タップ位置DPTdにより、シリアル通信回線30(伝送路)の通信品質をチェックしている。
よって、アナログ信号出力DPOaから変換されたデジタル信号出力DPOdから、DP81のタップ位置DPTに対応した検出タップ位置DPTdが正しく得られることが求められる。
そこで、デジタル信号出力DPOdと、DP81のタップ位置DPTとの対応を校正する校正ルーチンを設けている。
(Calibration of detection tap position DPTd)
In this embodiment, the analog signal output DPOa of the DP 81 is converted into a digital signal output DPOd by the A / D module 53 of the I / O expansion circuit 21. The communication quality of the serial communication line 30 (transmission path) is checked based on the detected tap position DPTd detected based on the digital signal output DPOd.
Therefore, it is required that the detection tap position DPTd corresponding to the tap position DPT of DP81 can be obtained correctly from the digital signal output DPOd converted from the analog signal output DPOa.
Therefore, a calibration routine for calibrating the correspondence between the digital signal output DPOd and the tap position DPT of DP81 is provided.

図14は、マスタ制御部10による校正に関する機能ブロックを説明する図である。
図14に示す機能ブロックは、図2に示したマスタ制御部10におけるCPU11がソフトウェア(ソフトウエアモジュール)によって実現する。
マスタ制御部10は、図6に示した機能ブロックにおいて、通信品質判定部109の代わりに、校正部110を設けるとともに、参照テーブル生成部111を設けたものである。
FIG. 14 is a diagram illustrating functional blocks related to calibration by the master control unit 10.
The functional blocks shown in FIG. 14 are realized by software (software module) by the CPU 11 in the master control unit 10 shown in FIG.
In the functional block shown in FIG. 6, the master control unit 10 includes a calibration unit 110 and a reference table generation unit 111 instead of the communication quality determination unit 109.

校正部110は、CP設定部107、U/D設定部108から、予め定められたカウントパターンCPをスレーブ制御部20に送信させるとともに、DPTd検出部105からスレーブ制御部20から受信したデジタル信号出力DPOdを、校正部110に送信する。校正部110は、校正手段の一例である。
参照テーブル生成部111は、校正部110が校正した値に基づいて参照テーブルを作成し、メモリ12に格納する。
The calibration unit 110 causes the CP setting unit 107 and the U / D setting unit 108 to transmit a predetermined count pattern CP to the slave control unit 20 and outputs the digital signal received from the DPTd detection unit 105 from the slave control unit 20. DPOd is transmitted to the calibration unit 110. The calibration unit 110 is an example of a calibration unit.
The reference table generation unit 111 creates a reference table based on the value calibrated by the calibration unit 110 and stores it in the memory 12.

(校正ルーチン)
図15は、マスタ制御部10、スレーブ制御部20におけるI/O拡張回路21及び通信監視回路22の校正ルーチンに関するシーケンス図である。
ここでは、マスタ制御部10、スレーブ制御部20におけるI/O拡張回路21及び通信監視回路22における信号の送受信を説明する。
(Calibration routine)
FIG. 15 is a sequence diagram relating to the calibration routine of the I / O expansion circuit 21 and the communication monitoring circuit 22 in the master control unit 10 and the slave control unit 20.
Here, transmission / reception of signals in the I / O expansion circuit 21 and the communication monitoring circuit 22 in the master control unit 10 and the slave control unit 20 will be described.

まず、マスタ制御部10及びスレーブ制御部20の電源がオンになると、スレーブ制御部20における通信監視回路22において、NVメモリ82に書き込まれていたNVメモリ値により、DP81のタップ位置DPTが設定される(図3参照)(ステップ401)。
なお、DP81のタップ位置DPTが設定されると、DP81は、I/O拡張回路21におけるA/Dモジュール53に、タップ位置DPTに対応したアナログ信号出力DPOaを出力する。
First, when the master controller 10 and the slave controller 20 are turned on, the tap position DPT of the DP 81 is set by the NV memory value written in the NV memory 82 in the communication monitoring circuit 22 in the slave controller 20. (See FIG. 3) (step 401).
When the tap position DPT of the DP 81 is set, the DP 81 outputs an analog signal output DPOa corresponding to the tap position DPT to the A / D module 53 in the I / O expansion circuit 21.

ここで、マスタ制御部10のDPTd検出部105は、スレーブ制御部20に対して、デジタル信号出力DPOdの取得を指示するDPO取得コマンドを送信する(ステップ402)。すると、I/O拡張回路21におけるA/Dモジュール53は、アナログ信号出力DPOaに対応するデジタル信号出力DPOdを出力する。そして、マスタ制御部10のDPTd検出部105に、デジタル信号出力DPOdが送信される。   Here, the DPTd detection unit 105 of the master control unit 10 transmits a DPO acquisition command for instructing acquisition of the digital signal output DPOd to the slave control unit 20 (step 402). Then, the A / D module 53 in the I / O expansion circuit 21 outputs a digital signal output DPOd corresponding to the analog signal output DPOa. Then, the digital signal output DPOd is transmitted to the DPTd detection unit 105 of the master control unit 10.

マスタ制御部10のDPTd検出部105は、受信したデジタル信号出力DPOdをメモリ12(RAMで構わない)に格納する(ステップ403)。
ここで、メモリ12に格納されたデジタル信号出力DPOdは、スレーブ制御部20が電源オンになったときのデジタル信号出力DPOdであって、初期値である。そこで、図15では、DPOiniと表記する。
The DPTd detection unit 105 of the master control unit 10 stores the received digital signal output DPOd in the memory 12 (RAM may be used) (step 403).
Here, the digital signal output DPOd stored in the memory 12 is a digital signal output DPOd when the slave controller 20 is turned on, and is an initial value. Therefore, in FIG. 15, it is expressed as DPOini.

ここから、校正ルーチンが開始される。
まず、マスタ制御部10の校正部110は、DP81のタップ位置DPTを最大タップ位置DPT(SN−1)に移動させるため、タップ数SNに“1”を加えたカウント数CN(=SN+1)のカウントパターンCPをCP設定部107に設定させる。さらに、U/D設定部108に、U/Dコマンドをアップ(U)に設定させる。そして、U/Dコマンドを含む通信監視データTDs及びカウントパターンCPを含む通信監視データTDsをスレーブ制御部20に送信する(ステップ404)。
From here, the calibration routine is started.
First, the calibration unit 110 of the master control unit 10 moves the tap position DPT of the DP 81 to the maximum tap position DPT (SN-1) , and therefore the count number CN (= SN + 1) obtained by adding “1” to the tap number SN. The count pattern CP is set in the CP setting unit 107. Further, the U / D setting unit 108 is caused to set the U / D command to UP (U). Then, the communication monitoring data TDs including the U / D command and the communication monitoring data TDs including the count pattern CP are transmitted to the slave control unit 20 (step 404).

これにより、通信監視回路22のDP81は、最大タップ位置DPT(SN−1)に移動する(ステップ405)。なお、DP81のタップ位置DPTは、タップ数SNより大きいカウント数CN(=SN+1)でアップ(U)側への移動を指示されるが、最大タップ位置DPT(SN−1)に達すると、タップ位置DPTはもはや動くことができない。よって、DP81のタップ位置DPTが最大タップ位置DPT(SN−1)に達するように、タップ数SNより大きいカウント数CNを設定している。
すると、DP81は、最大タップ位置DPT(SN−1)に対応したアナログ信号出力DPOaをI/O拡張回路21のA/Dモジュール53に出力する。
Thereby, DP81 of the communication monitoring circuit 22 moves to the maximum tap position DPT (SN-1) (step 405). The tap position DPT of DP81 is instructed to move to the up (U) side with a count number CN (= SN + 1) larger than the tap number SN, but when the maximum tap position DPT (SN-1) is reached, the tap position DPT is tapped. The position DPT can no longer move. Therefore, the count number CN larger than the tap number SN is set so that the tap position DPT of DP81 reaches the maximum tap position DPT (SN-1) .
Then, the DP 81 outputs an analog signal output DPOa corresponding to the maximum tap position DPT (SN-1) to the A / D module 53 of the I / O expansion circuit 21.

マスタ制御部10のDPTd検出部105が、スレーブ制御部20に対して、デジタル信号出力DPOdの取得を指示するDPO取得コマンドを送信する(ステップ406)。すると、スレーブ制御部20におけるI/O拡張回路21のA/Dモジュール53は、アナログ信号出力DPOaを変換したデジタル信号出力DPOdを、マスタ制御部10に送信する。
マスタ制御部10の校正部110は、DPTd検出部105が受信したデジタル信号出力DPOdを最大電圧AMAXとして、メモリ12(RAMで構わない)に格納する(ステップ407)。
The DPTd detection unit 105 of the master control unit 10 transmits a DPO acquisition command instructing acquisition of the digital signal output DPOd to the slave control unit 20 (step 406). Then, the A / D module 53 of the I / O expansion circuit 21 in the slave control unit 20 transmits the digital signal output DPOd obtained by converting the analog signal output DPOa to the master control unit 10.
The calibration unit 110 of the master control unit 10 stores the digital signal output DPOd received by the DPTd detection unit 105 in the memory 12 (which may be a RAM) as the maximum voltage AMAX (step 407).

次に、マスタ制御部10の校正部110は、DP81のタップ位置DPTを最小タップ位置DPTに移動させるため、タップ数SNに“1”を加えたカウント数CN(=SN+1)のカウントパターンCPをCP設定部107に設定させる。さらに、U/D設定部108に、U/Dコマンドをダウン(D)に設定させる。そして、U/Dコマンドを含む通信監視データTDs及びカウントパターンCPを含む通信監視データTDsをスレーブ制御部20に送信する(ステップ408)。
これにより、通信監視回路22のDP81は、最小タップ位置DPTに移動する(ステップ409)。なお、DP81のタップ位置DPTは、タップ数SNより大きいカウント数CN(=SN+1)のダウン(D)側への移動を指示されるが、最小タップ位置DPTに達すると、タップ位置DPTはもはや動くことができない。よって、DP81のタップ位置DPTが最小タップ位置DPTに達するように、タップ数SNより大きいカウント数CNを設定している。
すると、DP81は、最小タップ位置DPTに対応したアナログ信号出力DPOaをI/O拡張回路21のA/Dモジュール53に出力する。
Next, the calibration unit 110 of the master control unit 10 moves the tap position DPT of the DP 81 to the minimum tap position DPT 0 , so that the count pattern CP of the count number CN (= SN + 1) obtained by adding “1” to the tap number SN. Is set in the CP setting unit 107. Further, the U / D setting unit 108 is caused to set the U / D command to down (D). Then, the communication monitoring data TDs including the U / D command and the communication monitoring data TDs including the count pattern CP are transmitted to the slave control unit 20 (step 408).
As a result, the DP 81 of the communication monitoring circuit 22 moves to the minimum tap position DPT 0 (step 409). Note that the tap position DPT of the DP 81 is instructed to move the count number CN (= SN + 1) larger than the tap number SN to the down (D) side, but when the minimum tap position DPT 0 is reached, the tap position DPT is no longer present. I can't move. Thus, as the tap position DPT of DP81 reaches a minimum tap position DPT 0, and set the number of taps SN greater than the count number CN.
Then, the DP 81 outputs an analog signal output DPOa corresponding to the minimum tap position DPT 0 to the A / D module 53 of the I / O expansion circuit 21.

マスタ制御部10のDPTd検出部105が、スレーブ制御部20に対して、デジタル信号出力DPOdの取得を指示するDPO取得コマンドを送信する(ステップ410)。すると、スレーブ制御部20におけるI/O拡張回路21のA/Dモジュール53は、アナログ信号出力DPOaを変換したデジタル信号出力DPOdを、マスタ制御部10に送信する。
マスタ制御部10の校正部110は、DPTd検出部105が受信したデジタル信号出力DPOdを最小電圧AMINとして、メモリ12(RAMで構わない)に格納する(ステップ411)。
The DPTd detection unit 105 of the master control unit 10 transmits a DPO acquisition command instructing acquisition of the digital signal output DPOd to the slave control unit 20 (step 410). Then, the A / D module 53 of the I / O expansion circuit 21 in the slave control unit 20 transmits the digital signal output DPOd obtained by converting the analog signal output DPOa to the master control unit 10.
The calibration unit 110 of the master control unit 10 stores the digital signal output DPOd received by the DPTd detection unit 105 in the memory 12 (may be a RAM) as the minimum voltage AMIN (step 411).

そして、後述するように、マスタ制御部10における参照テーブル生成部111は、DP81のタップ数(ステップ数)SN、最大電圧AMAX、最小電圧AMINに基づいて、参照テーブルを作成する(参照テーブル作成ルーチン)(ステップ412)。
これにより、校正ルーチンが終了する。
Then, as will be described later, the reference table generation unit 111 in the master control unit 10 generates a reference table based on the number of taps (number of steps) SN of the DP 81, the maximum voltage AMAX, and the minimum voltage AMIN (reference table generation routine). (Step 412).
This completes the calibration routine.

以上説明した校正ルーチンは、マスタ制御部10、スレーブ制御部20が電源オンになった際、及び、マスタ制御部10が電源オンの状態で、スレーブ制御部20が電源オンになった際に実行される。
すなわち、参照テーブルは、スレーブ制御部20の電源がオンになる毎に、新たに生成される。
The calibration routine described above is executed when the master control unit 10 and the slave control unit 20 are powered on, and when the master control unit 10 is powered on and the slave control unit 20 is powered on. Is done.
That is, the reference table is newly generated every time the slave control unit 20 is powered on.

これにより、例え通信監視回路22の電源電位VCCが変動しても、変動した電源電位VCCに対応して、参照テーブルが生成される。
また、マスタ制御部10及びスレーブ制御部20(I/O拡張回路21、通信監視回路22)に、製造ばらつきがあっても、それぞれに対して、参照テーブルが生成されるので、製造ばらつきの影響を受けない。
これに対して、参照テーブルを校正せず予め定められたものとした(固定した)場合には、電源電位VCCの変動や、マスタ制御部10及びスレーブ制御部20(I/O拡張回路21、通信監視回路22)の製造ばらつきによって、DPTd検出部105が検出した検出タップ位置DPTdとDP81のタップ位置DPTとの関係がずれてしまい、通信エラー(通信異常)が発生したと判定されやすくなる。
Accordingly, even when the power source potential V CC of the communication monitoring circuit 22 even variation, in response to the power supply potential VCC, which fluctuates, the reference table is created.
In addition, even if there is a manufacturing variation in the master control unit 10 and the slave control unit 20 (I / O expansion circuit 21, communication monitoring circuit 22), a reference table is generated for each. Not receive.
On the other hand, when the reference table is predetermined (fixed) without being calibrated, fluctuations in the power supply potential VCC , the master control unit 10 and the slave control unit 20 (I / O expansion circuit 21). Due to manufacturing variations of the communication monitoring circuit 22), the relationship between the detected tap position DPTd detected by the DPTd detection unit 105 and the tap position DPT of DP81 is shifted, and it is easy to determine that a communication error (communication abnormality) has occurred. .

(参照テーブル作成ルーチン)
次に、図15におけるステップ412の参照テーブルを作成するルーチン(参照テーブル作成ルーチン)を説明する。
図16は、参照テーブル作成ルーチンを説明するフローチャートである。
なお、DP81のタップ数SNは、予めメモリ12(プログラムなどと同様にNVメモリ)に格納されているとする。
(Reference table creation routine)
Next, a routine (reference table creation routine) for creating a reference table in step 412 in FIG. 15 will be described.
FIG. 16 is a flowchart illustrating a reference table creation routine.
It is assumed that the tap number SN of the DP 81 is stored in advance in the memory 12 (an NV memory similar to a program or the like).

マスタ制御部10の参照テーブル生成部111は、メモリ12に格納されているDP81のタップ数SNを読み出す(ステップ501)。   The reference table generation unit 111 of the master control unit 10 reads out the tap number SN of the DP 81 stored in the memory 12 (step 501).

次に、メモリ12に格納されている最大タップ位置DPT(SN−1)に対応する電圧AMAXと、最小タップ位置DPTに対応する電圧AMINとを読み出す(ステップ502)。
そして、タップ位置DPT間に対応する幅(電圧)ADPを、ADP=(AMAX−AMIN)/SNとして算出する(ステップ503)。
すなわち、タップ位置DPT間の電圧は、電圧AMINと電圧AMAXとの差をタップ数で分割して求められる。ここでは、タップ位置DPT間の電圧は、均等に分割されているとしている。
Next, the voltage AMAX corresponding to the maximum tap position DPT (SN-1) stored in the memory 12 and the voltage AMIN corresponding to the minimum tap position DPT 0 are read (step 502).
Then, a width (voltage) ADP corresponding between the tap positions DPT is calculated as ADP = (AMAX−AMIN) / SN (step 503).
That is, the voltage between the tap positions DPT is obtained by dividing the difference between the voltage AMIN and the voltage AMAX by the number of taps. Here, the voltage between the tap positions DPT is assumed to be divided equally.

次に、DP81の1タップ位置DPTに許容される上限及び下限の幅(電圧)ADPGを、ADPG=ADP/2として算出する(ステップ504)。そして、1タップ位置DPTの上限の電圧ADPTを、ADPT=ADP+ADPGとして算出する(ステップ505)。さらに、1タップ位置DPTの下限の電圧ADPBを、ADPB=ADP−ADPGとして算出する(ステップ506)。   Next, the upper limit and lower limit width (voltage) ADPG allowed for the one-tap position DPT of DP81 is calculated as ADPG = ADP / 2 (step 504). Then, the upper limit voltage ADPT of the one tap position DPT is calculated as ADPT = ADP + ADPG (step 505). Further, the lower limit voltage ADPB of the 1-tap position DPT is calculated as ADPB = ADP−ADPG (step 506).

次に、変数iを“0”と置く(ステップ507)。そして、変数iがタップ数SN−1でないか否かが判断される(ステップ508)。
ステップ508で、肯定(Yes)の判断がされた場合、すなわち、変数iがタップ数SN−1でない場合には、変数iに“1”を加える(ステップ509)。
そして、それぞれのタップ位置DPTに対する最小電圧(最小値)DPOBをDPOB=(ADPB×i)+AMINで、中央電圧(中央値)DPOCをDPOC=(ADP×i)+AMIN、最大電圧(最大値)DPOTを、DPOT=(ADPT×i)+AMINとして算出する。
そして、最小値DPOB、中央値DPOC、最大値DPOTがメモリ12に書き込まれる(ステップ510)。
その後、ステップ508に戻る。
Next, the variable i is set to “0” (step 507). Then, it is determined whether or not the variable i is not the tap number SN-1 (step 508).
If the determination in step 508 is affirmative (Yes), that is, if the variable i is not the tap number SN-1, “1” is added to the variable i (step 509).
Then, the minimum voltage (minimum value) DPOB i for each tap position DPT i is DPOB i = (APDP × i) + AMIN, and the central voltage (median value) DPOC i is DPOC i = (ADP × i) + AMIN, maximum voltage. (Maximum value) DPOT i is calculated as DPOT i = (ADPT × i) + AMIN.
Then, the minimum value DPOB i , the median value DPOC i , and the maximum value DPOT i are written into the memory 12 (step 510).
Thereafter, the process returns to step 508.

一方、ステップ508において、否定(No)の判断がされた場合、すなわち、変数iがタップ数SN−1である場合には、参照テーブル作成ルーチンを終了する。
なお、他のルーチンにより、参照テーブルを作成してもよい。
On the other hand, if a negative (No) determination is made in step 508, that is, if the variable i is the tap number SN-1, the reference table creation routine ends.
Note that the reference table may be created by another routine.

図17は、参照テーブルの一例を説明する図である。
図16のフローチャートにより、図17の参照テーブルが作成される。すなわち、タップ位置DPT〜DPT(SN−1)に対応するデジタル信号出力DPOdの範囲が設定されている。よって、図6のマスタ制御部10のDPTd検出部105は、参照テーブルを参照して、デジタル信号出力DPOdが、DPOB<DPOd≦DPOTであれば、タップ位置DPT(=DPTd)と検出する。
FIG. 17 is a diagram illustrating an example of a reference table.
The reference table of FIG. 17 is created by the flowchart of FIG. That is, the range of the digital signal output DPOd corresponding to the tap positions DPT 0 to DPT (SN-1) is set. Therefore, the DPTd detection unit 105 of the master control unit 10 in FIG. 6 refers to the reference table, and if the digital signal output DPOD is DPOB i <DPOD ≦ DPOT i , the tap position DPT i (= DPTd i ) To detect.

そして、作成された参照テーブルを参照することにより、図15のステップ403でメモリ12に格納されたデジタル信号出力DPOiniに対応する検出タップ位置DPTdが検出される。すなわち、スレーブ制御部20の電源がオフになる前に、通信監視回路22のNVメモリ82に格納された、DP81のタップ位置DPTが分かる。
このタップ位置DPTは、例えば、スレーブ制御部20が電源リセットされた場合の要因の推定に用い得る。
Then, by referring to the created reference table, the detection tap position DPTd corresponding to the digital signal output DPOini stored in the memory 12 in step 403 in FIG. 15 is detected. That is, the tap position DPT of the DP 81 stored in the NV memory 82 of the communication monitoring circuit 22 is known before the slave controller 20 is turned off.
This tap position DPT can be used, for example, for estimating a factor when the power of the slave control unit 20 is reset.

[電源リセット要因の推定]
以上においては、シリアル通信が正常に行われているかの通信品質チェックについて説明した。本実施の形態では、通信品質チェックに関わらず、スレーブ制御部20において、電源リセットが発生した場合において、電源リセットの要因を推定しうる。
以下、電源リセット要因の推定について説明する。
[Estimation of power reset factor]
In the above, the communication quality check for confirming whether serial communication is normally performed has been described. In the present embodiment, regardless of the communication quality check, the slave control unit 20 can estimate the power reset factor when the power reset occurs.
Hereinafter, estimation of the power reset factor will be described.

電源リセットは、例えば、スレーブ制御部20に電源異常が発生する場合、外部からリセット信号が入力された場合、WDT23のタイムアウトによる場合などに発生する。   The power reset occurs, for example, when a power failure occurs in the slave control unit 20, when a reset signal is input from the outside, or due to a timeout of the WDT 23.

まず、スレーブ制御部20の電源に異常が生じ、電源電圧が最低電圧未満になることにより、スレーブ制御部20に電源リセットが発生したとする。
この場合、電源監視回路24は、電源電圧が最低電圧未満に低下したことを検知し、通信監視回路22のメモリタイミング生成回路83に信号を送信する。
すると、メモリタイミング生成回路83は、NVメモリ82にDP81のタップ位置DPTを示すデータを書き込むためのメモリタイミングを生成し、NVメモリ82にDP81のタップ位置DPTを示すデータを書き込む。
First, it is assumed that a power supply reset is generated in the slave control unit 20 when an abnormality occurs in the power supply of the slave control unit 20 and the power supply voltage becomes less than the minimum voltage.
In this case, the power supply monitoring circuit 24 detects that the power supply voltage has dropped below the minimum voltage, and transmits a signal to the memory timing generation circuit 83 of the communication monitoring circuit 22.
Then, the memory timing generation circuit 83 generates a memory timing for writing data indicating the tap position DPT of the DP 81 in the NV memory 82, and writes data indicating the tap position DPT of the DP 81 in the NV memory 82.

NVメモリ82には、DP81のタップ位置DPTを示すデータが書き込めるように、DP81のタップ位置DPTを示すデータが設定されている。しかし、メモリタイミング生成回路83がメモリタイミングを生成しない限り、NVメモリ82へDP81のタップ位置DPTを示すデータの書き込み(記憶)は行われない。
電源電圧が最低電圧未満に低下したときに限りNVメモリ82へ書き込むことにより、NVメモリ82に書き換え(書き込み)回数の制限があっても、書き換え回数がこの制限に達することが抑制される。
In the NV memory 82, data indicating the tap position DPT of the DP 81 is set so that data indicating the tap position DPT of the DP 81 can be written. However, unless the memory timing generation circuit 83 generates the memory timing, the data indicating the tap position DPT of the DP 81 is not written (stored) in the NV memory 82.
By writing to the NV memory 82 only when the power supply voltage drops below the minimum voltage, even if the NV memory 82 has a limited number of rewrites (writes), the number of rewrites is suppressed from reaching this limit.

なお、前述したように、通信監視回路22は、NVメモリ82にDP81のタップ位置DPTを示すデータが書き込まれるまでの間、動作を継続する。   As described above, the communication monitoring circuit 22 continues to operate until data indicating the tap position DPT of the DP 81 is written in the NV memory 82.

その後、スレーブ制御部20の電源電圧が回復すると、NVメモリ82に書き込まれたDP81のタップ位置DPTを表すデータ(NVメモリ値)により、DP81のタップ位置DPTが設定される。
そして、上記したように、DP81のアナログ信号出力DPOaが、A/Dモジュール53によりデジタル信号出力DPOdに変換され、マスタ制御部10に送信される。さらに、マスタ制御部10のDPTd検出部105により、デジタル信号出力DPOdから、検出タップ位置DPTdが検出される。
Thereafter, when the power supply voltage of the slave control unit 20 is restored, the tap position DPT of the DP 81 is set by data (NV memory value) representing the tap position DPT of the DP 81 written in the NV memory 82.
As described above, the analog signal output DPOa of the DP 81 is converted to the digital signal output DPOd by the A / D module 53 and transmitted to the master control unit 10. Further, the detection tap position DPTd is detected from the digital signal output DPOd by the DPTd detection unit 105 of the master control unit 10.

マスタ制御部10にそれまでにスレーブ制御部20に送信した通信監視データTDsによる予測タップ位置DPTeの履歴を記憶させておけば、予測タップ位置DPTeの履歴を参照することにより、どの時点において、スレーブ制御部20に電源異常が発生したか判断される。
例えば、検出タップ位置DPTdが、直前に送信した通信監視データTDsにおけるカウントパターンCPによって設定される予測タップ位置DPTeと一致すれば、スレーブ制御部20の電源電圧の低下によって、スレーブ制御部20の電源リセットが発生したと推定される。
If the master control unit 10 stores the history of the predicted tap position DPTe based on the communication monitoring data TDs that has been transmitted to the slave control unit 20 so far, by referring to the history of the predicted tap position DPTe, at any point in time, the slave It is determined whether a power supply abnormality has occurred in the control unit 20.
For example, if the detected tap position DPTd coincides with the predicted tap position DPTe set by the count pattern CP in the communication monitoring data TDs transmitted immediately before, the power supply voltage of the slave control unit 20 is decreased due to the decrease in the power supply voltage of the slave control unit 20. It is presumed that a reset occurred.

また、スレーブ制御部20の電源リセットが、WDT23によって発生した場合には、図2から分かるように、電源監視回路24は動作しない。よって、NVメモリ82に記憶されたDP81のタップ位置DPTは、直前に送信した通信監視データTDsのカウントパターンCPによって算出された予測タップ位置DPTeと一致せず、それより以前に送信した通信監視データTDsのカウントパターンCPによって算出された予測タップ位置DPTeと一致するはずである。
よって、スレーブ制御部20の電源リセットが、電源電圧が最低電圧未満に低下したことによって発生したのではないと推定しうる。
In addition, when the power reset of the slave control unit 20 is generated by the WDT 23, as can be seen from FIG. 2, the power monitoring circuit 24 does not operate. Therefore, the tap position DPT of the DP 81 stored in the NV memory 82 does not match the predicted tap position DPTe calculated by the count pattern CP of the communication monitoring data TDs transmitted immediately before, and the communication monitoring data transmitted earlier than that. It should match the predicted tap position DPTe calculated by the count pattern CP of TDs.
Therefore, it can be estimated that the power reset of the slave control unit 20 is not caused by the power supply voltage dropping below the minimum voltage.

そして、スレーブ制御部20の電源リセットが、外部からのリセット信号によって発生する場合には、リセット信号は、電源リセット回路25に入力される。この場合においても、図2から分かるように、電源監視回路24は動作しない。よって、NVメモリ82に書き込まれたDP81のタップ位置DPTは、直前に送信した通信監視データTDsのカウントパターンCPよって算出された予測タップ位置DPTeと一致せず、それ以前に送信した通信監視データTDsのカウントパターンCPによって算出された予測タップ位置DPTeと一致するはずである。
どの時点で送信した通信監視データTDsのカウントパターンCPであるかにより、スレーブ制御部20に発生した電源リセットが、WDT23によるか、外部からのリセット信号によるかを推定しうる。
When the power reset of the slave controller 20 is generated by an external reset signal, the reset signal is input to the power reset circuit 25. Even in this case, as can be seen from FIG. 2, the power supply monitoring circuit 24 does not operate. Therefore, the tap position DPT of DP81 written in the NV memory 82 does not match the predicted tap position DPTe calculated by the count pattern CP of the communication monitoring data TDs transmitted immediately before, and the communication monitoring data TDs transmitted before that. Should match the predicted tap position DPTe calculated by the count pattern CP.
Depending on at which point the count pattern CP of the communication monitoring data TDs is transmitted, it can be estimated whether the power reset generated in the slave control unit 20 is due to the WDT 23 or an external reset signal.

I/O拡張回路21は、例えば、ASICで構成される。
この場合、汎用性を考慮して、I/O拡張ユニット50には、多数のIFモジュールが設けられる。これらには、特定の機能部の特定の制御対象を制御する専用モジュールの他に、シリアル信号を出力するIFモジュール、センサからのアナログ信号をシリアル信号に変換するA/D変換器として機能するIFモジュールなどの汎用IFモジュールが含まれる。そして、いくつかの汎用IFモジュールは用いられず、余剰となっている。
The I / O expansion circuit 21 is composed of, for example, an ASIC.
In this case, in consideration of versatility, the I / O expansion unit 50 is provided with a large number of IF modules. These include a dedicated module that controls a specific control target of a specific function unit, an IF module that outputs a serial signal, and an IF that functions as an A / D converter that converts an analog signal from a sensor into a serial signal. General purpose IF modules such as modules are included. Some general-purpose IF modules are not used and are redundant.

そこで、本実施の形態では、機能部の制御に用いられないIFモジュールの内、A/D変換器として機能するIFモジュールをA/Dモジュール53、パルス信号Pをシリアルに出力するIFモジュール52をパルス信号出力モジュール54として用いている。
すなわち、汎用性を考慮したASICで構成されたI/O拡張回路21に、通信監視回路22を設けることで、マスタ制御部10とスレーブ制御部20との間のシリアル通信の品質のチェック(監視)、ノイズ要因の識別又は特定、及び/又は、スレーブ制御部20における電源リセットの要因の推定を行っている。
Therefore, in the present embodiment, among the IF modules that are not used for controlling the functional unit, the IF module that functions as an A / D converter is the A / D module 53, and the IF module 52 that serially outputs the pulse signal P is provided. It is used as the pulse signal output module 54.
That is, the communication monitoring circuit 22 is provided in the I / O expansion circuit 21 configured with an ASIC in consideration of versatility, thereby checking the quality (monitoring) of serial communication between the master control unit 10 and the slave control unit 20. ), Identification or specification of noise factors, and / or estimation of power reset factors in the slave controller 20.

また、マスタ制御部10における通信制御ユニット15、スレーブ制御部20におけるI/O拡張回路21の通信制御ユニット40は、SPI通信の規格にて構築されていて、変更することが容易でない。よって、本実施の形態では、通信制御ユニット15及び通信制御ユニット40を変更することなく、それらの外部に通信監視回路22を設け、シリアル通信を監視している。   Further, the communication control unit 15 in the master control unit 10 and the communication control unit 40 of the I / O expansion circuit 21 in the slave control unit 20 are constructed according to the SPI communication standard and are not easy to change. Therefore, in this embodiment, without changing the communication control unit 15 and the communication control unit 40, the communication monitoring circuit 22 is provided outside them to monitor serial communication.

しかも、本実施の形態では、通信監視回路22にDP81を用いることにより、I/O拡張ユニット50におけるパルス信号出力モジュール54からのパルス信号PによりDP81のタップ位置DPTを移動させ、DP81のアナログ信号出力DPOaをA/Dモジュール53によりデジタル信号出力DPOdに変換している。これにより、通信監視回路22に接続されるI/O拡張ユニット50におけるIFモジュールの数を2個(A/Dモジュール53、パルス信号出力モジュール54)に抑制している。すなわち、DP81を用いることで、通信監視回路22を端子数が少ない回路構成とし、ASICで構成されたI/O拡張回路21に実装(接続)しやすくしている。
すなわち、ASICで構成されたI/O拡張回路21の構成を変更することなく、シリアル通信の通信品質のチェックなどを行う機能を付加している。
Moreover, in the present embodiment, by using DP81 for the communication monitoring circuit 22, the tap position DPT of DP81 is moved by the pulse signal P from the pulse signal output module 54 in the I / O expansion unit 50, and the analog signal of DP81 is moved. The output DPOa is converted into a digital signal output DPOd by the A / D module 53. As a result, the number of IF modules in the I / O expansion unit 50 connected to the communication monitoring circuit 22 is suppressed to two (A / D module 53, pulse signal output module 54). That is, by using the DP 81, the communication monitoring circuit 22 has a circuit configuration with a small number of terminals, and can be easily mounted (connected) to the I / O expansion circuit 21 configured by an ASIC.
In other words, a function for checking the communication quality of serial communication and the like is added without changing the configuration of the I / O expansion circuit 21 configured with an ASIC.

(変形例)
上記においては、通信監視回路22にDP81を用いた。そして、受信したカウントパターンCPに応じて、現在のDP81のタップ位置DPTからアップ(U)側又はダウン(D)側に移動させるようにした。このため、タップ位置DPTは、これまで受信したカウントパターンCP及びU/Dコマンドの累積値となる。
このように、タップ位置DPTを累積させず、通信監視データTDs(カウントパターンCP)を受信する毎に、最小タップ位置DPT又は最大タップ位置DPT(SN−1)にリセットするようにしてもよい。
このようにすることで、DPTe算出部104における予測タップ位置DPTeの算出が容易になる。
(Modification)
In the above, DP81 is used for the communication monitoring circuit 22. And according to received count pattern CP, it was made to move to the up (U) side or the down (D) side from tap position DPT of present DP81. For this reason, the tap position DPT is a cumulative value of the count pattern CP and U / D command received so far.
In this way, the tap position DPT is not accumulated, and every time the communication monitoring data TDs (count pattern CP) is received, the tap position DPT may be reset to the minimum tap position DPT 0 or the maximum tap position DPT (SN-1). .
By doing so, the calculation of the predicted tap position DPTe in the DPTe calculation unit 104 is facilitated.

この場合には、図8に示す通信品質チェックルーチンにおいて、ステップ212の戻り先をステップ202としてよい。このようにすることで、複数回(図8では3回)、カウントパターンCPを送信し、それに対する検出タップ位置DPTdを受信することで、シリアル通信回線30の送信と受信とにおいて通信品質のチェックがされる。
このようにすることで、複数のカウントパターンCPを送信して行う、シリアル通信回線30に発生するノイズの識別や特定が容易になる。
なお、ステップ208は、ステップ201の後、ステップ212からの戻りの前にずらすことになる。
In this case, the return destination of step 212 may be step 202 in the communication quality check routine shown in FIG. By doing so, the count pattern CP is transmitted a plurality of times (three times in FIG. 8), and the detection tap position DPTd is received, thereby checking the communication quality in the transmission and reception of the serial communication line 30. Is done.
By doing so, it becomes easy to identify and specify noise generated in the serial communication line 30 by transmitting a plurality of count patterns CP.
Note that step 208 is shifted after step 201 and before returning from step 212.

また、DP81を用いた通信監視回路22の代わりに、カウントパターンCPを含む通信監視データTDsをアナログ変換して保持するものを用いてもよい。   Further, instead of the communication monitoring circuit 22 using the DP 81, the communication monitoring data TDs including the count pattern CP may be analog-converted and held.

ここで、本実施の形態が適用される制御部1と、本実施の形態が適用されない制御部1とを比較する。本実施の形態が適用されない制御部1とは、スレーブ制御部20が通信監視回路22を備えない制御部1であって、マスタ制御部10とスレーブ制御部20との間で、通信監視データTDs及び通信監視応答データTDrの送受信がされない場合をいう。   Here, the control unit 1 to which the present embodiment is applied is compared with the control unit 1 to which the present embodiment is not applied. The control unit 1 to which the present embodiment is not applied is a control unit 1 in which the slave control unit 20 does not include the communication monitoring circuit 22, and communication monitoring data TDs between the master control unit 10 and the slave control unit 20. The communication monitoring response data TDr is not transmitted / received.

本実施の形態が適用されない制御部1では、マスタ制御部10は、スレーブ制御部20にデータ(図4におけるCDs)を一方的に送信することになる。このため、マスタ制御部10は、送信したデータがスレーブ制御部20によって正しく受信されているか否かを判断できない。すなわち、通信エラー(通信異常)が発生しても、マスタ制御部10は、通信エラー(通信異常)の発生を検知することができない。
この場合、マスタ制御部10は、機能部における制御対象がエラーを含むデータを受信したことによる異常動作などによって発せられる異常(フェイル:Fail)信号などを受信することで、通信エラー(通信異常)の発生を知ることになる。
In the control unit 1 to which this embodiment is not applied, the master control unit 10 unilaterally transmits data (CDs in FIG. 4) to the slave control unit 20. For this reason, the master control unit 10 cannot determine whether or not the transmitted data is correctly received by the slave control unit 20. That is, even if a communication error (communication abnormality) occurs, the master control unit 10 cannot detect the occurrence of the communication error (communication abnormality).
In this case, the master control unit 10 receives a communication error (communication error) by receiving an abnormality (failure) signal or the like generated by an abnormal operation or the like due to the control target in the function unit receiving data including an error. Will know the occurrence of.

また、本実施の形態が適用されない制御部1において、マスタ制御部10からスレーブ制御部20に送信する制御するためのデータCDsを、スレーブ制御部20からマスタ制御部10に折り返し送信させることで、マスタ制御部10からスレーブ制御部20に正しくデータCDsが送信されているか否かを判断する方式がある(ミラー方式)。
しかし、ミラー方式では、シリアル通信回線30における受信用の通信路Rxが、折り返しのデータCDsに占有される。すなわち、シリアル通信回線30の通信レートがミラー方式を使用しない場合の倍になる。このため、制御対象からの応答のためのデータCDrの送信が妨げられるおそれがある。すなわち、画像形成装置100が必要とする通信レートが確保できないおそれがある。
Further, in the control unit 1 to which the present embodiment is not applied, by causing the slave control unit 20 to send back data CDs for control to be transmitted from the master control unit 10 to the slave control unit 20, There is a method for determining whether or not the data CDs are correctly transmitted from the master control unit 10 to the slave control unit 20 (mirror method).
However, in the mirror system, the reception communication path Rx in the serial communication line 30 is occupied by the folded data CDs. That is, the communication rate of the serial communication line 30 is double that when the mirror method is not used. For this reason, there is a possibility that transmission of data CDr for a response from the controlled object may be hindered. That is, the communication rate required by the image forming apparatus 100 may not be ensured.

さらに、マスタ制御部10が、スレーブ制御部20に定期的に固定のデータ(ビット)を送信し、スレーブ制御部20におけるI/O拡張回路21の予め定められたレジスタに格納し、返信されたデータが送信したデータと一致するかを判断して、通信品質をチェックすることが考えられる。
この場合、スレーブ制御部20が電源リセットされると、レジスタに格納されたデータが消去されてしまう。このため、電源リセットの要因が特定されない。
また、固定のデータを用いる方法では、前述したように、シリアル通信回線30に生じる通信異常の要因によっては、そもそも検出されなかったり(反応しなかったり)、タイミングずれなどにより検出できなかったりして、すり抜けるおそれがある。
Further, the master control unit 10 periodically transmits fixed data (bits) to the slave control unit 20, stores it in a predetermined register of the I / O expansion circuit 21 in the slave control unit 20, and returns a reply. It can be considered that the communication quality is checked by determining whether the data matches the transmitted data.
In this case, when the power of the slave control unit 20 is reset, the data stored in the register is erased. For this reason, the cause of power reset is not specified.
Further, in the method using fixed data, as described above, depending on the cause of the communication abnormality occurring in the serial communication line 30, it may not be detected in the first place (not responding) or may not be detected due to a timing shift or the like. There is a risk of slipping through.

また、本実施の形態が適用されない制御部1では、通信監視データTDsと通信監視応答データTDrとのやり取りが行われないため、スレーブ制御部20の電源リセットが、スレーブ制御部20の電源電圧の最低電圧未満への低下によるか、WDT23によるか、外部からのリセット信号によるかを推定しえない。   Further, in the control unit 1 to which the present embodiment is not applied, the communication monitoring data TDs and the communication monitoring response data TDr are not exchanged. Therefore, the power reset of the slave control unit 20 causes the power supply voltage of the slave control unit 20 to be reduced. It cannot be estimated whether the voltage is lower than the minimum voltage, WDT 23, or an external reset signal.

これに対し、本実施の形態が適用される制御部1では、マスタ制御部10とスレーブ制御部20との間において、通信監視データTDs及び通信監視応答データTDrの送受信が行われる。よって、マスタ制御部10は、送信した通信監視データTDsがスレーブ制御部20によって正しく受信されているか否かが判断される。
そして、スレーブ制御部20における通信監視回路22は、電源リセットが生じた際のDP81のタップ位置DPTをNVメモリ82に格納する。このタップ位置DPTは、電源リセットで消去されない。よって、このタップ位置DPTを読み出すことで、スレーブ制御部20に発生した電源リセットの要因を推定しうる。
On the other hand, in the control unit 1 to which this exemplary embodiment is applied, communication monitoring data TDs and communication monitoring response data TDr are transmitted and received between the master control unit 10 and the slave control unit 20. Therefore, the master control unit 10 determines whether or not the transmitted communication monitoring data TDs is correctly received by the slave control unit 20.
The communication monitoring circuit 22 in the slave control unit 20 stores the tap position DPT of the DP 81 when the power reset occurs in the NV memory 82. This tap position DPT is not erased by power reset. Therefore, by reading the tap position DPT, it is possible to estimate the power reset factor that has occurred in the slave control unit 20.

また、本実施の形態が適用される制御部1では、通信監視データTDsに複数のカウントパターンCPを用いていることから、シリアル通信回線30に生じる通信エラー(通信異常)の要因を識別又は特定しうる。   Further, since the control unit 1 to which the present embodiment is applied uses a plurality of count patterns CP for the communication monitoring data TDs, the cause of the communication error (communication abnormality) occurring in the serial communication line 30 is identified or specified. Yes.

さらに、本実施の形態が適用される制御部1では、図4に示すように、機能部を制御するデータCDsの間に、周期的に通信監視データTDsを挿入している。そして、折り返される応答のための通信監視応答データTDrは、通信監視データTDsに対応して送信される。よって、制御のためのデータCDs及び応答のためのデータCDrの通信が妨げられることが抑制される。   Further, in the control unit 1 to which the present embodiment is applied, as shown in FIG. 4, communication monitoring data TDs is periodically inserted between data CDs for controlling the functional unit. Then, the communication monitoring response data TDr for the response to be returned is transmitted corresponding to the communication monitoring data TDs. Therefore, the communication of the data CDs for control and the data CDr for response is prevented from being hindered.

1…制御部、2…ユーザインターフェース(UI)部、3…画像形成部、4…画像読取部、5…送受信部、10…マスタ制御部、11…CPU、12…メモリ、14…データバス、15、40…通信制御ユニット、16、42…送信モジュール、17、41…受信モジュール、18、43…通信制御モジュール、20…スレーブ制御部、21…I/O拡張回路、22…通信監視回路、23…ウオッチドックタイマ回路(WDT)、24…電源監視回路、25…電源リセット回路、30…シリアル通信回線、50…I/O拡張ユニット、51…I/O制御モジュール、52…IF(インターフェース)モジュール、53…A/Dモジュール、54…パルス信号出力モジュール、60…クロック生成回路、70…システムリセット回路、81…デジタルポテンショメータ(DP)、82…NVメモリ、83…メモリタイミング生成回路、100…画像形成装置、101…カウントパターン(CP)生成部、102…カウントパターン(CP)順序設定部、103…カウントパターン(CP)選定部、104…予測タップ位置(DPTe)算出部、105…検出タップ位置(DPTd)検出部、106…移動量判断部、107…カウントパターン(CP)設定部、108…アップ/ダウン(U/D)設定部、109…通信品質判定部、110…校正部、111…参照テーブル生成部、CK…クロック信号、CN…カウント数、CP…カウントパターン、CP−DB…データベース、DPOa…アナログ信号出力、DPOd…デジタル信号出力、DPT…タップ位置、DPTd…検出タップ位置、DPTe…予測タップ位置、SN…タップ数、TDr…通信監視応答データ、TDs…通信監視データ DESCRIPTION OF SYMBOLS 1 ... Control part, 2 ... User interface (UI) part, 3 ... Image formation part, 4 ... Image reading part, 5 ... Transmission / reception part, 10 ... Master control part, 11 ... CPU, 12 ... Memory, 14 ... Data bus, DESCRIPTION OF SYMBOLS 15, 40 ... Communication control unit 16, 42 ... Transmission module, 17, 41 ... Reception module, 18, 43 ... Communication control module, 20 ... Slave control part, 21 ... I / O expansion circuit, 22 ... Communication monitoring circuit, 23 ... Watchdog timer circuit (WDT), 24 ... Power supply monitoring circuit, 25 ... Power supply reset circuit, 30 ... Serial communication line, 50 ... I / O expansion unit, 51 ... I / O control module, 52 ... IF (interface) Module 53 ... A / D module 54 ... Pulse signal output module 60 ... Clock generation circuit 70 ... System reset circuit 81 ... De Tal potentiometer (DP), 82... NV memory, 83... Memory timing generation circuit, 100... Image forming apparatus, 101... Count pattern (CP) generation unit, 102. CP) selection unit, 104 ... predicted tap position (DPTe) calculation unit, 105 ... detection tap position (DPTd) detection unit, 106 ... movement amount determination unit, 107 ... count pattern (CP) setting unit, 108 ... up / down ( U / D) setting unit, 109 ... communication quality judgment unit, 110 ... calibration unit, 111 ... reference table generation unit, CK ... clock signal, CN ... count number, CP ... count pattern, CP-DB ... database, DPOa ... analog Signal output, DPOd ... Digital signal output, DPT ... Tap position, DPTd ... Detection tap Location, DPTe ... prediction tap position, SN ... number of taps, TDr ... communication monitoring response data, TDs ... communication monitoring data

Claims (7)

画像を形成する画像形成部と、
前記画像形成部における画像の形成を制御するマスタ部とスレーブ部とを含む制御部と、
前記制御部の前記マスタ部と前記スレーブ部との間を接続し、シリアル通信を行うシリアル通信回線と、を備え、
前記制御部の前記マスタ部は、
前記スレーブ部に対して、第1のデジタル信号を送信する信号送信手段と、
前記スレーブ部から、第2のデジタル信号を受信する信号受信手段と、
送信した前記第1のデジタル信号と受信した前記第2のデジタル信号とにより、前記シリアル通信の通信状態を判定する通信状態判定手段と、
前記第2のデジタル信号と前記スレーブ部において前記第1のデジタル信号に基づいて出力されるアナログ信号と、当該アナログ信号から変換される前記第2のデジタル信号との関係を校正する校正手段と、を有し、
前記制御部の前記スレーブ部は、
前記第1のデジタル信号に基づいて前記アナログ信号を出力するアナログ信号出力手段と、
前記アナログ信号を変換して前記第2のデジタル信号に変換する変換手段と、を有する
ことを特徴とする画像形成装置。
An image forming unit for forming an image;
A control unit including a master unit and a slave unit for controlling image formation in the image forming unit;
A serial communication line that connects between the master unit and the slave unit of the control unit and performs serial communication,
The master unit of the control unit is
Signal transmitting means for transmitting a first digital signal to the slave unit;
Signal receiving means for receiving a second digital signal from the slave unit;
Communication state determination means for determining a communication state of the serial communication based on the transmitted first digital signal and the received second digital signal;
Calibration means for calibrating the relationship between the second digital signal and the analog signal output based on the first digital signal in the slave unit and the second digital signal converted from the analog signal; Have
The slave unit of the control unit is
Analog signal output means for outputting the analog signal based on the first digital signal;
An image forming apparatus comprising: conversion means for converting the analog signal into the second digital signal.
シリアル通信回線で接続される装置に対して、第1のデジタル信号を送信する信号送信手段と、
前記装置において前記第1のデジタル信号に基づいて出力されたアナログ信号から変換された第2のデジタル信号を受信する信号受信手段と、
送信した前記第1のデジタル信号と受信した前記第2のデジタル信号とにより、シリアル通信の通信状態を判定する通信状態判定手段と、
前記装置における前記アナログ信号と前記第2のデジタル信号との関係を校正する校正手段と
を備えた通信制御装置。
Signal transmitting means for transmitting a first digital signal to a device connected by a serial communication line;
Signal receiving means for receiving a second digital signal converted from an analog signal output based on the first digital signal in the device;
A communication state determination means for determining a communication state of serial communication based on the transmitted first digital signal and the received second digital signal;
A communication control device comprising calibration means for calibrating the relationship between the analog signal and the second digital signal in the device.
前記校正手段は、
前記装置の電源がオンにされる毎に、前記校正を行う
ことを特徴とする請求項2に記載の通信制御装置。
The calibration means includes
The communication control apparatus according to claim 2, wherein the calibration is performed each time the apparatus is turned on.
前記校正手段は、
前記アナログ信号が最大になるように設定した前記第1のデジタル信号を前記信号送信手段から送信させ、前記信号受信手段により受信する当該第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最大値とし、
前記アナログ信号が最小になるように設定した前記第1のデジタル信号を前記信号送信手段から送信させ、前記信号受信手段により受信する当該第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最小値とし、
前記最大値と前記最小値と、前記アナログ信号を分けた複数の段の段数とから、前記アナログ信号の段と前記第2のデジタル信号との関係を校正する
ことを特徴とする請求項2又は3に記載の通信制御装置。
The calibration means includes
The first digital signal set so that the analog signal is maximized is transmitted from the signal transmission unit, and the analog signal output from the first digital signal received by the signal reception unit is converted. The second digital signal is the maximum value,
The first digital signal set to minimize the analog signal is transmitted from the signal transmission unit, and the analog signal output from the first digital signal received by the signal reception unit is converted. Minimize the second digital signal,
The relationship between the stage of the analog signal and the second digital signal is calibrated from the maximum value, the minimum value, and the number of stages of the plurality of stages obtained by dividing the analog signal. 4. The communication control device according to 3.
前記校正手段は、
前記装置の電源がオンにされた際、当該装置の電源がオフにされる際に記憶されていた前記アナログ信号から変換された前記第2のデジタル信号を取得し、
前記アナログ信号の前記複数の段と前記第2のデジタル信号との関係が校正された後に、受信した前記第2のデジタル信号を、前記アナログ信号の前記複数の段のいずれかに対応させる
ことを特徴とする請求項4に記載の通信制御装置。
The calibration means includes
When the device is turned on, obtain the second digital signal converted from the analog signal stored when the device is turned off;
After the relationship between the plurality of stages of the analog signal and the second digital signal is calibrated, the received second digital signal is made to correspond to one of the plurality of stages of the analog signal. The communication control device according to claim 4, wherein
前記第2のデジタル信号は、
前記装置において、デジタルポテンショメータによって保持された前記アナログ信号が変換されて得られた
ことを特徴とする請求項2乃至5のいずれか1項に記載の通信制御装置。
The second digital signal is:
6. The communication control device according to claim 2, wherein the analog signal held by the digital potentiometer is converted in the device and obtained.
シリアル通信回線で接続される装置に対して、第1のデジタル信号を送信し、当該装置において当該第1のデジタル信号に基づいて出力されたアナログ信号から変換された第2のデジタル信号を受信し、当該第1のデジタル信号と当該第2のデジタル信号とから、通信状態を判定する通信制御装置に、
前記アナログ信号が最大になるように設定した前記第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最大値とする機能と、
前記アナログ信号が最小になるように設定した前記第1のデジタル信号により出力されたアナログ信号から変換された前記第2のデジタル信号を最小値とする機能と、
前記最大値と前記最小値と、前記アナログ信号を分ける複数の段の段数とから、前記アナログ信号と前記第2のデジタル信号との関係を校正する機能とを
実現させるためのプログラム。
A first digital signal is transmitted to a device connected by a serial communication line, and a second digital signal converted from an analog signal output based on the first digital signal in the device is received. The communication control device for determining the communication state from the first digital signal and the second digital signal,
A function of maximizing the second digital signal converted from the analog signal output by the first digital signal set so that the analog signal is maximized;
A function of minimizing the second digital signal converted from the analog signal output by the first digital signal set to minimize the analog signal;
A program for realizing a function of calibrating the relationship between the analog signal and the second digital signal from the maximum value, the minimum value, and the number of stages that divide the analog signal.
JP2015159206A 2015-08-11 2015-08-11 Image formation device, communication control device, and program Pending JP2017038286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015159206A JP2017038286A (en) 2015-08-11 2015-08-11 Image formation device, communication control device, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015159206A JP2017038286A (en) 2015-08-11 2015-08-11 Image formation device, communication control device, and program

Publications (1)

Publication Number Publication Date
JP2017038286A true JP2017038286A (en) 2017-02-16

Family

ID=58048071

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015159206A Pending JP2017038286A (en) 2015-08-11 2015-08-11 Image formation device, communication control device, and program

Country Status (1)

Country Link
JP (1) JP2017038286A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023093306A (en) * 2021-12-22 2023-07-04 奇景光電股▲ふん▼有限公司 Large touch display integrated circuit and method of operation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023093306A (en) * 2021-12-22 2023-07-04 奇景光電股▲ふん▼有限公司 Large touch display integrated circuit and method of operation
JP7433384B2 (en) 2021-12-22 2024-02-19 奇景光電股▲ふん▼有限公司 Large touch display integrated circuit and how it works

Similar Documents

Publication Publication Date Title
JP6140459B2 (en) Sensor data transmission device
JP6205756B2 (en) Synchronous measurement system
JP6155719B2 (en) Synchronous measurement system
JP5071151B2 (en) COMMUNICATION SYSTEM, ABNORMALITY ESTIMATION METHOD, AND INFORMATION READING DEVICE
JP6413698B2 (en) Image forming apparatus and communication monitoring system
JP6608128B2 (en) Position measuring apparatus and method for checking operation clock signal
JP5184981B2 (en) X-ray image diagnostic system, image processing apparatus, and image processing method
JP2009303178A (en) Data receiver, method of receiving data, and data receiving program
JP2017038286A (en) Image formation device, communication control device, and program
JP2017045154A (en) Image formation device and communication control device
JP5864748B2 (en) 2-wire process control loop current diagnostic apparatus and method
JP2017040984A (en) Image forming apparatus, communication control device, and program
JP6861611B2 (en) Semiconductor devices and semiconductor systems equipped with them
JP2008283259A (en) Distribution control system, and device controller
JP2804909B2 (en) Distributed data collection system
US11012195B2 (en) Method, sensor, and controller for transmitting a data packet from a sensor to a controller
JP4462371B2 (en) Data receiving apparatus and microcomputer
CN101122784A (en) Method and device for serial asynchronous data transmission
JP6858019B2 (en) Equipment status monitoring system
JP7060322B2 (en) Electrical equipment system
JP5669419B2 (en) Image forming apparatus
JP7189853B2 (en) vehicle control system
JP6569981B2 (en) Automatic fire alarm system parent machine, automatic fire alarm system, automatic fire alarm system slave unit
JP5299443B2 (en) I2C bus communication control system and I2C bus communication control method
JP4775224B2 (en) Two-way communication system