JP3904015B2 - Opening and closing body control device - Google Patents

Opening and closing body control device Download PDF

Info

Publication number
JP3904015B2
JP3904015B2 JP2005002440A JP2005002440A JP3904015B2 JP 3904015 B2 JP3904015 B2 JP 3904015B2 JP 2005002440 A JP2005002440 A JP 2005002440A JP 2005002440 A JP2005002440 A JP 2005002440A JP 3904015 B2 JP3904015 B2 JP 3904015B2
Authority
JP
Japan
Prior art keywords
opening
roof
closing body
tilt
counter
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.)
Expired - Fee Related
Application number
JP2005002440A
Other languages
Japanese (ja)
Other versions
JP2005155320A (en
Inventor
規朗 寺島
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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2005002440A priority Critical patent/JP3904015B2/en
Publication of JP2005155320A publication Critical patent/JP2005155320A/en
Application granted granted Critical
Publication of JP3904015B2 publication Critical patent/JP3904015B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Power-Operated Mechanisms For Wings (AREA)

Description

本発明は、スライディングルーフ等に採用される開閉体のスライド動作又はチルト動作を制御する開閉体制御装置に関する。   The present invention relates to an opening / closing body control device that controls a sliding operation or a tilting operation of an opening / closing body employed in a sliding roof or the like.

従来、乗用車には、車室内の温度調整、或いはドライブ中の開放感等に供するために、スライディングルーフ(以下、単に「ルーフ」と称す)が設けられたものがある。このルーフはモータにより駆動され、ルーフパネルに形成された開口部の全開位置と全閉位置との間でスライド動作を行い、さらにこの全閉位置からその後端側を上昇させるチルト動作を行う。   Conventionally, some passenger cars are provided with a sliding roof (hereinafter simply referred to as a “roof”) in order to provide temperature adjustment in the passenger compartment or a feeling of opening during driving. The roof is driven by a motor, and slides between a fully open position and a fully closed position of an opening formed in the roof panel, and further performs a tilt operation that raises the rear end side from the fully closed position.

具体的には、図9に示すように、ルーフ101は、ルーフパネル103の開口部105の全開位置(スライド全開位置:図9(a))から図示しないモータが一方向に回転されると、ルーフパネル103内をスライドし、開口部105を閉じる方向に移動する。そして、開口部が全閉状態(図9(b))となった後、チルトアップモードに入り、その後端101aを傾動上昇させ、その最も上昇した位置(チルト全開位置:図9(c)))でロックされる(以下、ルーフのこの作動方向を「チルトアップ方向」という)。一方、このチルト全開位置からモータが逆方向に回転されると、スライディングルーフ101の後端101aが傾動下降して全閉状態となる(図9(d)、(e))そして、さらにモータが同方向に回転されると、ルーフ101はルーフパネル103内をスライドし、スライド全開位置(図9(f))でロックされる(以下、ルーフのこの作動方向を「スライドオープン方向」という)。   Specifically, as shown in FIG. 9, the roof 101 is rotated in one direction from a fully open position of the opening 105 of the roof panel 103 (slide fully open position: FIG. 9A). It slides in the roof panel 103 and moves in a direction to close the opening 105. Then, after the opening is in the fully closed state (FIG. 9B), the tilt-up mode is entered, the rear end 101a is tilted and raised, and the most raised position (tilt fully open position: FIG. 9C). ) (Hereinafter, this operating direction of the roof is referred to as “tilt up direction”). On the other hand, when the motor is rotated in the reverse direction from the fully open position of the tilt, the rear end 101a of the sliding roof 101 is tilted and lowered to a fully closed state (FIGS. 9D and 9E). When rotated in the same direction, the roof 101 slides in the roof panel 103 and is locked in the fully open position (FIG. 9F) (hereinafter, this operating direction of the roof is referred to as “slide open direction”).

このようなルーフ制御において、例えばルーフを全閉状態にて停止させるには、現在のルーフの位置を判定する必要がある。このため、従来では、ルーフ制御装置内にルーフが全閉位置にきたときに切り替わるリミットスイッチを設け、この情報を用いて制御していた。しかし、このリミットスイッチによる構成では機構が複雑となり、しかも高価であることから、近年ではこれより安価なホール素子を用いてモータの回転に同期したパルスを出力するセンサを設置し、ルーフがスライド全開位置又はチルト全開位置のいずれか一方でロック停止する毎に、この停止位置を基準位置としたパルスのカウント値をカウントすることにより、ルーフの位置を判定する方法が提案されている。   In such roof control, for example, in order to stop the roof in a fully closed state, it is necessary to determine the current roof position. For this reason, conventionally, a limit switch that switches when the roof reaches the fully closed position is provided in the roof control device, and control is performed using this information. However, this limit switch configuration makes the mechanism complicated and expensive, and in recent years, a sensor that outputs a pulse synchronized with the rotation of the motor using a cheaper Hall element is installed, and the roof is fully opened. There has been proposed a method of determining the position of the roof by counting the count value of the pulse with the stop position as a reference position every time the lock is stopped at either the position or the tilt fully open position.

しかしながら、この技術では、そのパルスをカウントする基準位置を、ルーフがスライド全開位置又はチルト全開位置のいずれか一方でロック停止した位置においているため、モータの出力がルーフに伝わる経路における機構部の遊び等の機構的誤差により、モータが逆転したときにカウント値がずれ、適切な制御ができないといった問題があった。特に、樹脂製構造物からなるモータのダンパ(出力軸の緩衝材)やルーフのストッパ等が、高温下等において熱歪みを生じたときには、このような機構的誤差によるカウント値への影響が一層顕在化されていた。   However, in this technique, since the reference position for counting the pulses is a position where the roof is locked in one of the slide fully open position and the tilt fully open position, the play of the mechanism unit in the path through which the motor output is transmitted to the roof. Due to such mechanical errors as described above, there is a problem that the count value is shifted when the motor is reversely rotated, and appropriate control cannot be performed. In particular, when a motor damper (output shaft cushioning material) made of a resin structure or a roof stopper is subjected to thermal distortion at high temperatures, the mechanical error has a greater effect on the count value. It was manifested.

また、以上のような問題は、上記スライディングルーフ制御に限らず、同様の機能を有する開閉体には共通して言えることでもある。   Moreover, the above problems are not limited to the sliding roof control, but can be said to be common to opening / closing bodies having similar functions.

そこで、本発明は、スライディングルーフ等の開閉体の制御において、開閉体の移動方向或いは外部電源のオン/オフに関わりなく、開閉体を精度良く適切に移動制御することができる開閉体制御装置を提供することを目的とする。   Therefore, the present invention provides an opening / closing body control apparatus capable of accurately controlling the opening / closing body with high accuracy regardless of the movement direction of the opening / closing body or the on / off of an external power source in the control of the opening / closing body such as a sliding roof. The purpose is to provide.

上記課題に鑑み、本願請求項1に記載の開閉体制御装置では、開閉体を動作させるために駆動されたモータの正転又は逆転をセンサにより検出し、このセンサにより出力されたパルスをカウント手段がカウントすることにより、開閉体の移動方向及び位置を判定する。   In view of the above problems, in the opening / closing body control apparatus according to claim 1 of the present application, the forward or reverse rotation of the motor driven to operate the opening / closing body is detected by a sensor, and the pulses output by the sensor are counted. Counts to determine the moving direction and position of the opening / closing body.

このカウント手段は、開閉体がチルトアップ方向へ移動する際には、第1カウンタを用いてチルト全開位置を基準位置としたカウント値でパルスをカウントする。すなわち、第1カウンタは、例えばチルトアップ方向にダウンカウントし、スライドオープン方向にアップカウントするカウンタとして構成され、チルト全開位置にてカウント値が0となるように構成される。また、開閉体がスライドオープン方向へ移動する際には、第2カウンタを用いてスライド全開位置を基準位置としたカウント値で前記パルスをカウントする。すなわち、第2カウンタは、例えばスライドオープン方向にダウンカウントし、チルトアップ方向にアップカウントするカウンタとして構成され、スライド全開位置にてカウント値が0となるように構成される。そして、位置判定手段は、開閉体がチルトアップ方向に移動する際には、第1カウンタを参照して開閉体の位置を判定し、開閉体がスライドオープン方向に移動する際には、第2カウンタを参照して開閉体の位置を判定する。   When the opening / closing body moves in the tilt-up direction, the counting means counts pulses with a count value using the first fully countered position as the reference position. That is, the first counter is configured, for example, as a counter that counts down in the tilt up direction and counts up in the slide open direction, and is configured such that the count value becomes 0 at the tilt fully open position. When the opening / closing body moves in the slide opening direction, the second counter is used to count the pulses with a count value with the slide fully open position as a reference position. That is, for example, the second counter is configured as a counter that counts down in the slide open direction and counts up in the tilt up direction, and is configured such that the count value becomes 0 at the slide fully open position. The position determination means determines the position of the opening / closing body with reference to the first counter when the opening / closing body moves in the tilt-up direction, and second when the opening / closing body moves in the slide open direction. The position of the opening / closing body is determined with reference to the counter.

具体的には、スライド全開位置と全閉位置との間のストローク、及びチルト全開位置と全閉位置との間のストロークは設計上予め分かっているため、開閉体がこれらのストロークを移動する際にセンサから出力されるパルス数が予め算出される。そして、このとき全閉位置からチルト全開位置に到るまでにセンサから出力されるパルス数が「第1所定値」であるとすると、開閉体がチルトアップ方向に移動する際の第1カウンタのカウント値として、全閉位置のカウント値として「第1所定値」、チルト全開位置のカウント値として「0」が記憶される。そして、位置判定手段は、第1カウンタが「第1所定値」を表示したときに開閉体は全閉位置にあると判定し、第1カウンタが「0」を表示したときに開閉体はチルト全開位置にあると判定する。なお、開閉体が全閉位置とスライド全開位置との間にある場合には、第1カウンタは「第1所定値」よりも大きな値をとる。   Specifically, the stroke between the fully open position of the slide and the fully closed position, and the stroke between the fully open position of the tilt and the fully closed position are known in advance in the design, so when the opening / closing body moves these strokes. The number of pulses output from the sensor is calculated in advance. At this time, if the number of pulses output from the sensor before reaching the fully open position from the fully closed position is the “first predetermined value”, the first counter when the opening / closing body moves in the tilt up direction is used. As the count value, “first predetermined value” is stored as the count value at the fully closed position, and “0” is stored as the count value at the tilt fully open position. The position determining means determines that the opening / closing body is in the fully closed position when the first counter displays “first predetermined value”, and the opening / closing body is tilted when the first counter displays “0”. Determined to be in the fully open position. When the opening / closing body is between the fully closed position and the slide fully open position, the first counter takes a value larger than the “first predetermined value”.

同様に、全閉位置からスライド全開位置に到るまでにセンサから出力されるパルス数が「第2所定値」であるとすると、開閉体がスライドオープン方向に移動する際の第2カウンタのカウント値として、全閉位置のカウント値として「第2所定値」、スライド全開位置のカウント値として「0」が記憶される。そして、位置判定手段は、第2カウンタが「第2所定値」を表示したときに開閉体は全閉位置にあると判定し、第2カウンタが「0」を表示したときに開閉体はスライド全開位置にあると判定する。なお、開閉体が全閉位置とチルト全開位置との間にある場合には、第2カウンタは「第2所定値」よりも大きな値をとる。   Similarly, if the number of pulses output from the sensor from the fully closed position to the fully open position of the slide is the “second predetermined value”, the count of the second counter when the opening / closing body moves in the slide opening direction. As the values, “second predetermined value” is stored as the count value of the fully closed position, and “0” is stored as the count value of the slide fully open position. The position determination means determines that the opening / closing body is in the fully closed position when the second counter displays “second predetermined value”, and the opening / closing body slides when the second counter displays “0”. Determined to be in the fully open position. When the opening / closing body is between the fully closed position and the tilt fully opened position, the second counter takes a value larger than the “second predetermined value”.

このように、請求項1記載の開閉体制御装置では、開閉体の作動方向によって開閉体の位置を記憶するカウンタが別々に設定され、開閉***置を判定する際に位置判定手段により参照されるカウンタも、これに合わせて別々に設定される。さらに、この各々のカウンタのカウント値の基準位置も、各々の作動方向の全開位置(終点)に設定されている。すなわち、同方向の移動に対しては機構部の遊び等の影響はないので、このように設定することで、開閉体の作動方向の転換時に際してカウント値にずれが生じる等の問題は生じない。この結果、精度の良い開閉体制御を行うことができる。   Thus, in the opening / closing body control apparatus according to the first aspect, the counter for storing the position of the opening / closing body is set separately depending on the operating direction of the opening / closing body, and is referred to by the position determination means when determining the position of the opening / closing body. The counter is also set separately according to this. Furthermore, the reference position of the count value of each counter is also set to the fully open position (end point) in each operation direction. That is, the movement in the same direction is not affected by play or the like of the mechanism portion, and thus setting does not cause a problem such as a deviation in the count value when the operating direction of the opening / closing body is changed. . As a result, accurate opening / closing body control can be performed.

以下、本発明の好適な実施例を図面に基づいて説明する。尚、本実施例は、本発明の開閉体制御装置をスライディングルーフ制御装置に適用したものである。図1は、本実施例にかかるスライディングルーフ制御装置の構成を表すブロック図である。   Preferred embodiments of the present invention will be described below with reference to the drawings. In this embodiment, the opening / closing body control device of the present invention is applied to a sliding roof control device. FIG. 1 is a block diagram illustrating a configuration of a sliding roof control device according to the present embodiment.

図1に示すスライディングルーフ制御装置1は、上記従来技術で述べたものと同様、図9に示す態様でスライディングルーフ(以下、単に「ルーフ」とも称す)を動作させるものであり、ルーフをチルトアップさせる方向(以下、「チルトアップ方向」と称す)に動作させる指示を入力するスイッチ11、ルーフをスライドさせ全開させる方向(以下、「スライドオープン方向」と称す)に動作させる指示を入力するスイッチ12、これらスイッチ11、12の入力に応じてモータ駆動回路30にモータの駆動信号を出力する制御回路10、モータ駆動回路30により回転駆動され、ルーフを所望の位置に移動させるモータ35、及び制御回路10に安定した電力を供給する電源回路40等から構成されている。   The sliding roof control device 1 shown in FIG. 1 operates the sliding roof (hereinafter also simply referred to as “roof”) in the manner shown in FIG. 9 in the same manner as described in the above prior art, and the roof is tilted up. A switch 11 for inputting an instruction to operate in a direction to be moved (hereinafter referred to as “tilt up direction”), and a switch 12 for inputting an instruction to operate in a direction to slide the roof fully open (hereinafter referred to as “slide open direction”). A control circuit 10 that outputs a motor drive signal to the motor drive circuit 30 in response to the inputs of the switches 11 and 12, a motor 35 that is rotationally driven by the motor drive circuit 30 and moves the roof to a desired position, and a control circuit 10 includes a power supply circuit 40 for supplying stable power to the power supply 10 and the like.

制御回路10は、図示しないが、各種機器を制御するCPU、予め各種の数値やプログラムが書き込まれたROM、演算過程の数値やフラグが所定の領域に書き込まれるRAM、各種ディジタル信号が入出力される入出力インターフェース(I/O)、所定の経過時間等を計時するタイマ、及びこれら各機器がそれぞれ接続されるバスラインから構成されている。後述するフローチャートに示す制御プログラムは、上記ROMに予め書き込まれている。また、モータ駆動回路30はリレー等により構成される。   Although not shown, the control circuit 10 includes a CPU for controlling various devices, a ROM in which various numerical values and programs are written in advance, a RAM in which numerical values and flags of calculation processes are written in a predetermined area, and various digital signals are input and output. Input / output interface (I / O), a timer for measuring a predetermined elapsed time, and a bus line to which these devices are connected. A control program shown in a flowchart described later is written in advance in the ROM. The motor drive circuit 30 is configured by a relay or the like.

モータ35のアーマチャ軸の鉛直面上には、その軸中心からみて互いに90°離れた位置にホールICからなる2つのセンサ51、52がそれぞれ配置されている。これらのセンサ51、52は、それぞれモータ35の回転に同期したパルスを出力するものであり、各々の出力パルスは互いに90°の位相差をもって出力されるようになっている。   On the vertical plane of the armature shaft of the motor 35, two sensors 51 and 52 each comprising a Hall IC are arranged at positions 90 ° apart from each other when viewed from the shaft center. Each of these sensors 51 and 52 outputs a pulse synchronized with the rotation of the motor 35, and each output pulse is output with a phase difference of 90 °.

また、制御回路10には、ルーフの全閉状態を記憶するための状態記憶回路20が接続されており、この状態記憶回路20は、図2に示す簡易な回路で構成されている。すなわち、状態記憶回路20は、1ビットの情報を電荷の蓄積により記憶するコンデンサC、コンデンサCに対して電荷を充電又は放電するためのトランジスタTR、ダイオードD、及び抵抗R1〜R5から構成されている。コンデンサCの一端は抵抗R5を介してトランジスタTRのコレクタに接続され、コンデンサCの他端はグランドラインGNDに接地されている。トランジスタTRのベースは抵抗R1を介して制御回路10のポート1に接続されるとともに、抵抗R4を介してグランドラインGNDに接地されている。また、トランジスタTRのエミッタはグランドラインGNDに接地されている。このため、トランジスタTRのベースには、ポート1からの出力が”H(Hightレベル)”になったときにその出力電圧を抵抗R1と抵抗R4とで分圧した所定電圧が入力されることになり、この所定電圧が入力されて初めてトランジスタTRがオンし、コンデンサCに蓄えられた電荷が放電される。また、コンデンサCと抵抗R5との接続点には、ダイオードDのカソードが接続されており、このダイオードDのアノードは、抵抗R2を介してポート2に接続されると共に、抵抗R3を介してポート3に接続されている。このため、ポート2からの出力が”H”になると、コンデンサCの両端電圧がポート2からの出力電圧で決まる所定電圧に達するまでは、抵抗2及びダイオードDを介してコンデンサCに電流が流れ込んでコンデンサCが充電され、その後コンデンサCの充電が完了に近づくにつれ、ポート3の電位がポート2の電位に近づくようになっている。   Further, a state storage circuit 20 for storing the fully closed state of the roof is connected to the control circuit 10, and this state storage circuit 20 is constituted by a simple circuit shown in FIG. In other words, the state memory circuit 20 includes a capacitor C that stores 1-bit information by storing charges, a transistor TR for charging or discharging the capacitor C, a diode D, and resistors R1 to R5. Yes. One end of the capacitor C is connected to the collector of the transistor TR via the resistor R5, and the other end of the capacitor C is grounded to the ground line GND. The base of the transistor TR is connected to the port 1 of the control circuit 10 through the resistor R1, and is grounded to the ground line GND through the resistor R4. The emitter of the transistor TR is grounded to the ground line GND. Therefore, a predetermined voltage obtained by dividing the output voltage by the resistor R1 and the resistor R4 when the output from the port 1 becomes “H (High level)” is input to the base of the transistor TR. Thus, the transistor TR is turned on only after this predetermined voltage is input, and the electric charge stored in the capacitor C is discharged. A cathode of a diode D is connected to a connection point between the capacitor C and the resistor R5, and an anode of the diode D is connected to the port 2 through the resistor R2 and is connected to the port through the resistor R3. 3 is connected. For this reason, when the output from the port 2 becomes “H”, current flows into the capacitor C through the resistor 2 and the diode D until the voltage across the capacitor C reaches a predetermined voltage determined by the output voltage from the port 2. Then, the capacitor C is charged, and thereafter, as the charging of the capacitor C approaches completion, the potential of the port 3 approaches the potential of the port 2.

そして、ルーフが全閉状態である場合には、制御回路10においてポート1を”L(Lowレベル)”、ポート2を”H”にする信号が出力され、ポート2から状態記憶回路20に電荷が供給される。この電荷はコンデンサCの充電が完了するまで蓄積される。他方、ルーフが全閉状態以外の場合には、制御回路10においてポート1を”H”、ポート2を”L”にする信号が出力され、ポート1からの電圧の供給によりトランジスタTRがオンとなり、コンデンサCに蓄積された電荷が放電される構成となっている。従って、状態記憶回路20ではこのコンデンサCの充電が完了した状態をもってルーフが全閉状態にあることを記憶することになり、後述する制御処理においては、このコンデンサCの充電状況を検出することにより、現在のルーフの位置が全閉位置にあるか否かを判定できるようになっている。尚、ポート3は、その電位によりコンデンサCの充電を検出するための端子である。   When the roof is in a fully closed state, the control circuit 10 outputs a signal for setting the port 1 to “L (Low level)” and the port 2 to “H”. Is supplied. This charge is accumulated until the charging of the capacitor C is completed. On the other hand, when the roof is not in the fully closed state, the control circuit 10 outputs a signal for setting the port 1 to “H” and the port 2 to “L”, and the transistor TR is turned on by supplying the voltage from the port 1. The electric charge accumulated in the capacitor C is discharged. Accordingly, the state storage circuit 20 stores that the roof is in the fully closed state when the charging of the capacitor C is completed. In the control process described later, the state of charging of the capacitor C is detected. It is possible to determine whether or not the current roof position is at the fully closed position. The port 3 is a terminal for detecting charging of the capacitor C by its potential.

次に、スライディングルーフ制御におけるルーフの現在位置の具体的検出方法について図3に示す概念図に沿って説明する。ルーフの現在位置は、モータ35の回転を検出するセンサ51、52の出力パルスとの関係で規定されている。つまり、同図において「スライド区間」とは、ルーフがスライド動作していることをセンサ51、52の出力パルスから検知する区間であり、「チルト区間」とは、ルーフがチルト動作していることをセンサ51、52の出力パルスから検知する区間を意味する。そして、同図において、「全閉区間」として所定の幅をもった領域が設定されているのは、ルーフが全閉状態となった後も、機構上モータ35のみがその慣性により空転する領域があるため、このときの出力パルス数を考慮したものである。ルーフ自体を全閉状態で止める位置(全閉位置)は、この全閉区間内に設定されている。   Next, a specific method for detecting the current position of the roof in sliding roof control will be described with reference to the conceptual diagram shown in FIG. The current position of the roof is defined in relation to the output pulses of the sensors 51 and 52 that detect the rotation of the motor 35. That is, in the figure, the “sliding section” is a section in which it is detected from the output pulses of the sensors 51 and 52 that the roof is sliding, and the “tilting section” is that the roof is tilting. Is detected from the output pulses of the sensors 51 and 52. In the drawing, an area having a predetermined width is set as the “fully closed section” because an area where only the motor 35 on the mechanism idles due to its inertia even after the roof is fully closed. Therefore, the number of output pulses at this time is taken into consideration. The position where the roof itself is stopped in the fully closed state (fully closed position) is set within this fully closed section.

ルーフの現在位置は、ルーフがルーフパネルに設けられた開口部(図9参照)を全開した位置(ポイントD:以下、「スライド全開位置」と称す)、及び、ルーフが上記開口部を全閉させる位置(ポイントE:全閉位置)からその後端部をチルト方向に最も上昇させた位置(ポイントC:以下、「チルト全開位置」と称す)を基準に判定される。すなわち、ルーフがスライド全開位置から全閉位置を介してチルト全開位置に向かう方向(チルトアップ方向)に動作している場合には、チルト全開位置を基準として現在位置が判定され、逆に、ルーフがチルト全開位置から全閉位置を介してスライド全開位置に向かう方向(スライドオープン方向)に動作している場合には、スライド全開位置を基準として現在位置が判定される。   The current position of the roof is the position where the roof fully opens the opening (see FIG. 9) provided in the roof panel (point D: hereinafter referred to as “sliding fully open position”), and the roof fully closes the opening. The position is determined with reference to the position (point C: hereinafter referred to as “tilt fully open position”) where the rear end is most raised in the tilt direction from the position to be moved (point E: fully closed position). That is, when the roof is moving in the direction from the fully open position of the slide toward the fully open position of the tilt (tilt up direction), the current position is determined based on the fully open position of the tilt. Is operating in the direction from the fully open position of the tilt toward the fully open position of the slide (slide open direction), the current position is determined based on the fully open position of the slide.

このように、ルーフの作動方向によってそれぞれの基準位置を別々に設定したのは、モータ35の出力をルーフに伝える機構部の遊びや緩み、或いはモータ35のダンパ(出力軸の緩衝材)のねじれ等により、ルーフの作動方向が変わるとモータ35の出力とルーフの移動距離との間にずれが生ずるため、このずれに起因する両作動方向のカウント値の誤差を解消するためである。   As described above, the respective reference positions are set separately depending on the operating direction of the roof because play or looseness of the mechanism part that transmits the output of the motor 35 to the roof or torsion of the damper (buffer material of the output shaft) of the motor 35. For example, if the roof operating direction is changed due to the above, a deviation occurs between the output of the motor 35 and the movement distance of the roof, so that an error in the count values in both operating directions due to this deviation is eliminated.

スライド全開位置と全閉位置との間のストロークA、及びチルト全開位置と全閉位置との間のストロークBは設計上予め分かっているため、これらの各ストロークに対しモータ35の回転によりセンサ51、52から出力されるパルス数が予め算出される。そして、このとき全閉位置からチルト全開位置に到るまでにセンサ51、52から出力されるパルス数が「第1所定値」、全閉位置からスライド全開位置に到るまでにセンサ51、52から出力されるパルス数が「第2所定値」である場合、チルト全開位置からパルスが「第1所定値」出力された位置が全閉位置と判断され、スライド全開位置からパルス数が「第2所定値」出力された位置が全閉位置と判断される。   Since the stroke A between the fully open position of the slide and the fully closed position and the stroke B between the fully open position of the tilt and the fully closed position are known in advance by design, the sensor 51 is rotated by the rotation of the motor 35 for each of these strokes. , 52 is calculated in advance. At this time, the number of pulses output from the sensors 51 and 52 from the fully closed position to the fully open position of the tilt is “first predetermined value”, and the sensors 51 and 52 are required from the fully closed position to the fully open position of the slide. When the number of pulses output from the “second predetermined value” is determined, the position at which the pulse is output from the tilt fully open position is determined as the fully closed position, and the number of pulses from the fully open position of the slide is “first”. The position where “2 predetermined value” is output is determined as the fully closed position.

制御回路10にはセンサ51、52から出力されるこれらのパルスをカウントする第1カウンタ及び第2カウンタが設けられている。ここで、第1カウンタは、ルーフがチルトアップ方向に移動する際にルーフの位置をカウント値として記憶するために用いられ、ルーフがチルトアップ方向に進んだことを表すパルスが出力されるとそのパルス数に応じてカウント値をダウンカウント(減算)し、ポイントCでクリアし(つまり0とし)、ルーフがスライドオープン方向に進んだことを表すパルスが出力されるとそのパルス数に応じてカウント値をアップカウント(加算)するものである。従って、この第1カウンタが「第1所定値」を表示したときにルーフは全閉位置にあることになり、第1カウンタが「0」を表示したときにルーフはチルト全開位置にあることになる。   The control circuit 10 is provided with a first counter and a second counter that count these pulses output from the sensors 51 and 52. Here, the first counter is used for storing the position of the roof as a count value when the roof moves in the tilt-up direction, and when a pulse indicating that the roof has advanced in the tilt-up direction is output. The count value is counted down (subtracted) according to the number of pulses, cleared at point C (that is, set to 0), and when a pulse indicating that the roof has advanced in the slide open direction is output, it is counted according to the number of pulses. The value is up-counted (added). Therefore, when the first counter displays “first predetermined value”, the roof is in the fully closed position, and when the first counter displays “0”, the roof is in the tilt fully opened position. Become.

一方、第2カウンタは、ルーフがスライドオープン方向に移動する際にルーフの位置をカウント値として記憶するために用いられ、ルーフがスライドオープン方向に進んだことを表すパルスが出力されるとそのパルス数に応じてカウント値をダウンカウントし、ポイントDでクリアし(つまり0とし)、ルーフがチルトアップ方向に進んだことを表すパルスが出力されるとそのパルス数に応じてカウント値をアップカウントするものである。従って、この第2カウンタが「第2所定値」を表示したときにルーフは全閉位置にあることになり、第2カウンタが「0」を表示したときにルーフはスライド全開位置にあることになる。   On the other hand, the second counter is used to store the position of the roof as a count value when the roof moves in the slide open direction, and when a pulse indicating that the roof has advanced in the slide open direction is output, The count value is counted down according to the number, cleared at point D (that is, set to 0), and when a pulse indicating that the roof has advanced in the tilt-up direction is output, the count value is counted up according to the number of pulses. To do. Accordingly, the roof is in the fully closed position when the second counter displays “second predetermined value”, and the roof is in the fully open position when the second counter displays “0”. Become.

上記パルスのカウントは、具体的には図4に示す出力パルスのタイムチャートに基づいて判断される。同図において横軸は時刻tを表す。上述したように、2つのセンサ51、52からは、モータ35の回転に対して互いに90°の位相差をもった矩形パルスA、パルスBがそれぞれ出力される。ここで、パルスAは上記カウントの対象となるパルスであり、パルスBはパルスAとの位置関係によりカウント方向(ルーフの動作方向)を判定するためのパルスである。   Specifically, the pulse count is determined based on the output pulse time chart shown in FIG. In the figure, the horizontal axis represents time t. As described above, the two sensors 51 and 52 respectively output the rectangular pulse A and the pulse B having a phase difference of 90 ° with respect to the rotation of the motor 35. Here, the pulse A is a pulse to be counted, and the pulse B is a pulse for determining the counting direction (roof operating direction) based on the positional relationship with the pulse A.

具体的には、パルスのカウントは、図4に示すパルスAの立ち上がり及び立ち下がりをカウントすることにより行う。なお、ホールICによる位置検出を行っているため、この立ち上がりと立ち下がりの位相差は180°(モータ35の1/2回転分)となっている。   Specifically, the pulse is counted by counting the rise and fall of the pulse A shown in FIG. Since the position detection is performed by the Hall IC, the phase difference between the rising edge and the falling edge is 180 ° (1/2 rotation of the motor 35).

そして、パルスAの立ち上がりが検出され、このときのパルスBのレベルが”H(Hight)”である場合、及び、パルスAの立ち下がりが検出され、このときのパルスBのレベルが”L(Low)”である場合には、ルーフがチルトアップ方向に進んでいると判断される。逆に、パルスAの立ち上がりが検出され、このときのパルスBのレベルが”L(Low)”である場合、及びパルスAの立ち下がりが検出され、このときのパルスBのレベルが”H(Hight)”である場合には、ルーフがスライドオープン方向に進んでいると判断される。これは、モータ35が反転することによりパルスAとパルスBとの前後関係も反転することを利用したものである。従って、図4に示す例では、当初ルーフがチルトアップ方向に進んでいたが、時刻t1でモータ35の回転が反転してスライドオープン方向に進んだことを示している。   Then, when the rising edge of the pulse A is detected and the level of the pulse B at this time is “H (High)”, and the falling edge of the pulse A is detected, the level of the pulse B at this time is “L ( Low) ”, it is determined that the roof is moving in the tilt-up direction. Conversely, when the rising edge of the pulse A is detected and the level of the pulse B at this time is “L (Low)” and when the falling edge of the pulse A is detected, the level of the pulse B at this time is “H ( In the case of “High)”, it is determined that the roof is moving in the slide open direction. This utilizes the fact that the anteroposterior relationship between pulse A and pulse B is also reversed when the motor 35 is reversed. Therefore, in the example shown in FIG. 4, the roof initially traveled in the tilt-up direction, but the rotation of the motor 35 was reversed at time t1 and proceeded in the slide open direction.

なお、上記においては、パルスカウントの際の分解能を高めるため、パルスのカウントを、パルスAの立ち上がり及び立ち下がりの双方でカウントすることにより行ったが、いずれか一方でカウントする構成とすることもできる。また、パルスAとパルスBとの位置関係と、ルーフの作動方向との関係を上記とは逆にしてもよいことはもちろんである。   In the above, in order to increase the resolution at the time of pulse counting, the pulse is counted by counting both at the rising edge and the falling edge of the pulse A. However, either one may be counted. it can. Of course, the relationship between the positional relationship between the pulse A and the pulse B and the operating direction of the roof may be reversed.

次に、制御回路10によって実行されるスライディングルーフの制御処理について、図5〜図8に示すフローチャートに沿って詳細に説明する。図5に示すように、本制御では、まずルーフが全閉位置にあるか否かを確認するため、図6に示す初期化処理が行われる(S100)。なお、この初期化処理は、電源回路40からの電力の遮断時、つまりバッテリ等の電源が交換される毎に一回だけ行われるものである。   Next, the sliding roof control process executed by the control circuit 10 will be described in detail with reference to the flowcharts shown in FIGS. As shown in FIG. 5, in this control, first, initialization processing shown in FIG. 6 is performed to confirm whether or not the roof is in the fully closed position (S100). This initialization process is performed only once when the power from the power supply circuit 40 is cut off, that is, whenever the power source such as a battery is replaced.

この初期化処理では、まず、制御回路10からポート1に”L”、ポート2に”H”がそれぞれ出力される(S101)。従って、このときポート1からトランジスタTRに対する電圧供給はなく、ポート2からコンデンサCに対して所定時間電荷が供給される。このため、トランジスタTRはオフのままであり、コンデンサCから電荷が放電されることはなく、逆にポート2から供給された電荷がコンデンサCに蓄積される。この「所定時間」とは、抵抗R2とコンデンサCとにより決定される時定数を考慮して設定されるものであり、コンデンサCが非充電の状態から充電されるまでの時間に比して十分に短い時間に設定されている。   In this initialization process, first, the control circuit 10 outputs “L” to port 1 and “H” to port 2 (S101). Accordingly, at this time, no voltage is supplied from the port 1 to the transistor TR, and charge is supplied from the port 2 to the capacitor C for a predetermined time. For this reason, the transistor TR remains off, and the charge is not discharged from the capacitor C. Conversely, the charge supplied from the port 2 is accumulated in the capacitor C. This “predetermined time” is set in consideration of the time constant determined by the resistor R2 and the capacitor C, and is sufficiently larger than the time until the capacitor C is charged from the non-charged state. Is set to a short time.

そして、この所定時間が経過したか否かが判断され(S102)、この所定時間が経過したと判断されると(S102:YES)、ポート3が”H”になっているか否かが判断される(S103)。ポート3が”H”になっている場合には(S103:YES)、ポート2から抵抗R2、R3を介してポート3に出力されていることになるため、コンデンサCには既に電荷が充電されていたものと判断される。つまり、電源回路40からの電力が遮断される直前(バッテリ等の電源を交換する直前)のスライディングルーフ制御においてルーフが全閉位置で停止し、現在もルーフが全閉状態にあると判断されるのである。このため、この状態を保持した状態で全閉状態である旨の情報をRAMに格納するために、ポート1及びポート2にともに”L”が出力される(S104)。そして、図3の説明でも述べたように、この全閉状態を表すために、第1カウンタに予め設定された「第1所定値」(チルト全開位置と全閉位置の間のカウント値を表す)がセットされ、同様に、第2カウンタに予め設定された「第2所定値」(スライド全開位置と全閉位置の間のカウント値を表す)がセットされる(S105、S106)。   Then, it is determined whether or not the predetermined time has elapsed (S102). If it is determined that the predetermined time has elapsed (S102: YES), it is determined whether or not the port 3 is “H”. (S103). When the port 3 is “H” (S103: YES), since the output from the port 2 to the port 3 through the resistors R2 and R3 is performed, the capacitor C is already charged. It is judged that it was. That is, in the sliding roof control immediately before the power from the power supply circuit 40 is cut off (immediately before replacing the power source such as the battery), it is determined that the roof is stopped at the fully closed position and is still in the fully closed state. It is. Therefore, in order to store in the RAM information indicating that the state is fully closed while maintaining this state, “L” is output to both port 1 and port 2 (S104). As described in the description of FIG. 3, in order to represent this fully closed state, a “first predetermined value” (a count value between the tilt fully opened position and the fully closed position) preset in the first counter is represented. Similarly, “second predetermined value” (representing a count value between the fully open position of the slide and the fully closed position) set in the second counter is set (S105, S106).

一方、S103において、ポート3が”H”になっていないと判断された場合には(S103:NO)、ポート2から供給された電荷が依然としてコンデンサCに蓄積され続けている、すなわち、コンデンサCは充電が未完了であったと判断される。つまり、前回のスライディングルーフ制御においてルーフが全閉位置以外の位置で停止した状態でバッテリ等の電源が交換されたものと判断される。このとき、S101の処理でポート2からの電荷がある程度コンデンサCに供給されている。このため、以降の処理において全閉状態であることの誤認を生ずることがないようコンデンサC内の電荷を完全に抜くために、ポート1に”H”を出力し、ポート2に”L”を出力する(S107)。また、このとき、RAMに記憶されたルーフ位置の情報は消去されており、ルーフの位置を把握することはできないため、以降の処理の前処理として第1カウンタ及び第2カウンタが共にクリアされる(S108、S109)。   On the other hand, when it is determined in S103 that the port 3 is not “H” (S103: NO), the charge supplied from the port 2 is still stored in the capacitor C, that is, the capacitor C Is determined to be incompletely charged. That is, it is determined that the power source such as the battery has been replaced while the roof is stopped at a position other than the fully closed position in the previous sliding roof control. At this time, the charge from the port 2 is supplied to the capacitor C to some extent by the processing of S101. Therefore, “H” is output to port 1 and “L” is output to port 2 in order to completely remove the charge in the capacitor C so that the subsequent processing does not cause the false recognition of the fully closed state. Output (S107). At this time, the roof position information stored in the RAM is erased, and the position of the roof cannot be grasped. Therefore, both the first counter and the second counter are cleared as pre-processing of the subsequent processing. (S108, S109).

そして、以上の初期化処理が完了すると、まず、スイッチ11がオンされているか否かが判断される(S110)。スイッチ11がオンされていると判断されると(S110:YES)、ルーフをチルトアップ方向に動作させるため、ポート1に”H”を、ポート2に”L”をそれぞれ出力した上で、モータ35の出力をオンしチルトアップ側に回転させる(S140)。ここで、ポート1を”H”としたのは、ルーフを動作させる以上ルーフは全閉位置に留まらないため、コンデンサCの正極側に蓄えられた電荷を抜くことにより全閉位置でないことを示すこととしたものである。また、ポート2を”L”としたのは、全閉位置であるとの誤認を防止するため、コンデンサCへの電荷の供給を行わないようしたものである。   When the above initialization process is completed, it is first determined whether or not the switch 11 is turned on (S110). If it is determined that the switch 11 is turned on (S110: YES), in order to operate the roof in the tilt-up direction, “H” is output to port 1 and “L” is output to port 2, respectively. The output of 35 is turned on and rotated to the tilt-up side (S140). Here, the port 1 is set to “H” because the roof does not stay in the fully closed position as long as the roof is operated, and therefore, it is not in the fully closed position by removing the charge stored on the positive electrode side of the capacitor C. That's what it meant. The reason why the port 2 is set to “L” is that charge is not supplied to the capacitor C in order to prevent misidentification of the fully closed position.

そして、モータ35の回転に従って図7に示すパルスカウント処理が行われる(S150)。このパルスカウント処理では、図4の説明でも述べたように、まずパルスAの立ち上がりが検出されたか否かが判断され(S401)、この立ち上がりが検出された場合には(S401:YES)、このときのパルスBのレベルが”H”であるか否かが判断される(S402)。このとき、パルスBのレベルが”H”であると判断されると(S402:YES)、これはモータ35がチルトアップ側に1/2回転したことを意味するため、第1カウンタがダウンカウントし、第2カウンタがアップカウントする。また、S401において、パルスAの立ち上がりが検出されなかった場合には、パルスAの立ち下がりが検出されたか否かが判断され(S403)、この立ち下がりが検出された場合には(S403:YES)、このときのパルスBのレベルが”H”であるか否かが判断される(S404)。このとき、パルスBのレベルが”H”でない、つまりパルスBのレベルが”L”あると判断されると(S404:NO)、上記と同様、これはモータ35がチルトアップ側に1/2回転したことを意味するため、第1カウンタがダウンカウントし(S405)、第2カウンタがアップカウントする(S406)。なお、上記において、ダウンカウントにより第1カウンタが0以下となる場合には(S407:YES)、第1カウンタをクリアする(つまり、0にする)(S408)。   Then, the pulse count process shown in FIG. 7 is performed according to the rotation of the motor 35 (S150). In this pulse counting process, as described in FIG. 4, it is first determined whether or not the rising edge of the pulse A is detected (S401). If this rising edge is detected (S401: YES), It is determined whether the level of the pulse B at that time is “H” (S402). At this time, if it is determined that the level of the pulse B is “H” (S402: YES), this means that the motor 35 has made a half turn to the tilt up side, so the first counter counts down. Then, the second counter counts up. If the rising edge of the pulse A is not detected in S401, it is determined whether or not the falling edge of the pulse A is detected (S403). If this falling edge is detected (S403: YES) At this time, it is determined whether or not the level of the pulse B is “H” (S404). At this time, if it is determined that the level of the pulse B is not “H”, that is, the level of the pulse B is “L” (S404: NO), as described above, this means that the motor 35 is ½ on the tilt-up side. In order to mean that it rotated, the 1st counter counts down (S405) and the 2nd counter counts up (S406). In the above description, when the first counter becomes 0 or less due to the down count (S407: YES), the first counter is cleared (that is, set to 0) (S408).

このように、第1カウンタが0よりも小さくなる場合としては、チルトアップが完了した際に、チルト全開位置が前回よりさらにチルトアップ側にずれた場合が考えられる。このチルト全開位置のずれは、例えば、ルーフのストッパが樹脂でできているときに、当該ストッパが高温下において軟化して縮みやすくなった場合に生じるものと考えられる。或いは、上述の初期化処理(図6)のS108において第1カウンタがクリアされた場合等も考えられる。   As described above, as a case where the first counter is smaller than 0, it is conceivable that when the tilt up is completed, the tilt fully opened position is further shifted to the tilt up side from the previous time. This deviation of the tilt fully open position is considered to occur, for example, when the stopper of the roof is made of resin, and the stopper is softened at high temperature and easily contracts. Or the case where the 1st counter is cleared in S108 of the above-mentioned initialization processing (Drawing 6) etc. can also be considered.

一方、上記S401においてパルスAの立ち上がりが検出され(S401:YES)、さらにこのときのパルスBのレベルが”L”であると判断された場合(S402:NO)、及び、上記S403において立ち下がりが検出され(S403:YES)、かつ、このときのパルスBのレベルが”H”であると判断された場合には(S404:YES)、モータ35がスライドオープン側に1/2回転したことになるため、第2カウンタがダウンカウントし(S409)、第1カウンタがアップカウントする(S410)。なお、上記において、ダウンカウントにより第2カウンタが0以下となる場合には(S411:YES)、第2カウンタをクリアする(つまり、0にする)(S412)。   On the other hand, when the rising edge of the pulse A is detected in S401 (S401: YES), and when the level of the pulse B at this time is determined to be “L” (S402: NO), the falling edge is detected in S403. Is detected (S403: YES), and it is determined that the level of the pulse B at this time is “H” (S404: YES), the motor 35 has made a half turn to the slide open side. Therefore, the second counter counts down (S409), and the first counter counts up (S410). In the above description, when the second counter becomes 0 or less due to the down-count (S411: YES), the second counter is cleared (that is, set to 0) (S412).

このように、第2カウンタが0よりも小さくなる場合としては、スライドオープンが完了した際に、スライド全開位置が前回よりさらにスライドオープン方向にずれた場合が考えられる。或いは、上述の初期化処理(図6)のS109において第2カウンタがクリアされた場合等も考えられる。   As described above, as a case where the second counter is smaller than 0, it is conceivable that when the slide open is completed, the slide fully open position is further shifted in the slide open direction from the previous time. Or the case where the 2nd counter is cleared in S109 of the above-mentioned initialization processing (Drawing 6) etc. can also be considered.

そして、パルスカウント処理が終了すると、図8に示すカウント状態判定処理が行われる(S160)。このカウント状態判定処理は、第1カウンタ及び第2カウンタに記憶されたカウント値が異常である場合には、その後のスライディングルーフ制御に支障をきたすため、これらのカウンタが正常であるか否かを判定するものである。   Then, when the pulse count process is completed, a count state determination process shown in FIG. 8 is performed (S160). In the count state determination process, if the count values stored in the first counter and the second counter are abnormal, the subsequent sliding roof control is hindered. Therefore, whether these counters are normal is determined. Judgment.

すなわち、上述の制御では、第1カウンタがダウンカウントしたときは第2カウンタはアップカウントし、逆に第1カウンタがアップカウントしたときは第2カウンタはダウンカウントする。このため、スライディングルーフ制御装置1が正常に機能している場合には、これら第1カウンタに記憶された数値と第2カウンタに記憶された数値とを足し合わせた値(つまり、全ストロークのカウント値)は、予め全閉位置にてそれぞれ設定された第1所定値と第2所定値との和になるはずである。ところが、場合によっては各々のカウント値がノイズ等で余分にカウントされたり、RAMに記憶されたカウント値が化ける等の事態が生ずる場合が考えられる。また、初期化処理における上記S108、S109の処理にて第1カウンタ及び第2カウンタがクリアされた場合には、全ストロークは第1所定値と第2所定値との和にはならない。このため、その後の制御において、現在の位置を把握することができない。従って、この様な状態から抜け出す処理を行う前提の処理として、このカウント状態が正常であるか否かの判定を行うのである。   That is, in the above-described control, when the first counter counts down, the second counter counts up, and conversely when the first counter counts up, the second counter counts down. Therefore, when the sliding roof control device 1 is functioning normally, a value obtained by adding the numerical values stored in the first counter and the numerical values stored in the second counter (that is, the count of all strokes). Value) should be the sum of the first predetermined value and the second predetermined value set in advance at the fully closed position. However, depending on circumstances, there may be a case in which each count value is excessively counted due to noise or the like, or the count value stored in the RAM is corrupted. Further, when the first counter and the second counter are cleared in the processing of S108 and S109 in the initialization processing, the total stroke is not the sum of the first predetermined value and the second predetermined value. For this reason, in the subsequent control, the current position cannot be grasped. Therefore, as a precondition for performing the process of exiting from such a state, it is determined whether or not the count state is normal.

具体的には、図8に示すように、まず第1カウンタ及び第2カウンタにそれぞれ表示されたカウント値を合計し、全ストロークを算出する(S501)。そして、この全ストロークを、第1所定値と第2所定値との合計にさらに所定値αを加えたもの(以下、「第1比較値」と称す)と比較する。そして、この全ストロークが第1比較値よりも大きいか否かが判断され(S502)、大きいと判断されると(S502:YES)、設計上ありえないカウント値になったとして第1カウンタ及び第2カウンタが共にクリアされる(S503、S504)。次に、上記全ストロークを、第1所定値と第2所定値との合計から所定値αを差し引いたもの(以下、「第2比較値」と称す)と比較する。そして、この全ストロークが第2比較値よりも小さいか否かが判断され(S505)、小さいと判断されると(SS505:YES)、RAMに記憶されたカウント値が化けた、或いは、初期化処理における上記S108、S109の処理にて第1カウンタ及び第2カウンタがクリアされたものと判断し、カウント値が異常であると判定される(S506)。一方、上記S502及びS505の判断により、全ストロークが第1比較値と第2比較値との間の範囲内にあると判断されると(S502、S505:YES)、カウント値は正常であると判定される(S507)。   Specifically, as shown in FIG. 8, first, the count values respectively displayed on the first counter and the second counter are summed to calculate the total stroke (S501). Then, this total stroke is compared with a sum of the first predetermined value and the second predetermined value plus a predetermined value α (hereinafter referred to as “first comparison value”). Then, it is determined whether or not the total stroke is larger than the first comparison value (S502). If it is determined that the total stroke is larger (S502: YES), the first counter and the second counter are assumed to have become count values that cannot be designed. Both counters are cleared (S503, S504). Next, the total stroke is compared with a value obtained by subtracting the predetermined value α from the sum of the first predetermined value and the second predetermined value (hereinafter referred to as “second comparison value”). Then, it is determined whether or not the total stroke is smaller than the second comparison value (S505). If it is determined that the total stroke is smaller (SS505: YES), the count value stored in the RAM is garbled or initialized. It is determined that the first counter and the second counter have been cleared in the processing of S108 and S109 in the processing, and it is determined that the count value is abnormal (S506). On the other hand, if it is determined in S502 and S505 that the entire stroke is within the range between the first comparison value and the second comparison value (S502, S505: YES), the count value is normal. It is determined (S507).

なお、上記において、第1比較値及び第2比較値の中に新たな所定値αを導入したのは、経年変化による機構上のずれ、或いはチルト全開位置又はスライド全開位置が更新された際のずれ等、設計上許容される誤差(予め設計値の誤差の範囲にあるもの)を考慮するためである。従って、所定値αの値は設計上適宜設定することになるが、第1所定値又は第2所定値に比して十分に小さいものとする。   In the above, the new predetermined value α is introduced in the first comparison value and the second comparison value when the mechanism shift due to secular change, or when the tilt fully open position or slide fully open position is updated. This is to take into account design tolerances such as deviations (those that are in the range of design value errors in advance). Therefore, although the value of the predetermined value α is appropriately set in design, it is assumed to be sufficiently smaller than the first predetermined value or the second predetermined value.

そして、上記カウント状態判定処理の判定結果から、カウント状態が異常か否かが判断され(S170)、異常であると判断された場合には(S170:YES)、ルーフ動作が正常に行える状態になるまで、とりあえずルーフ動作を継続して行う。   Then, from the determination result of the count state determination process, it is determined whether or not the count state is abnormal (S170). If it is determined that the count state is abnormal (S170: YES), the roof operation can be normally performed. Until then, continue the roof operation for the time being.

このようにカウント値が異常である場合に、ルーフ動作を継続しルーフをチルトアップ方向に動作させると、その終端(つまり、チルト全開位置)で第1カウンタの値は0となる。従って、以降の処理においては、この新たなチルト全開位置がルーフのチルトアップ方向への基準位置として設定される。このとき、他方の第2カウンタは、本来示すべき値(第1所定値+第2所定値)を示していないが、その後、ルーフがスライドオープン方向に動作し、その終端(つまり、スライド全開位置)で第2カウンタの値は0となる。従って、以降の処理においては、この新たなスライド全開位置がルーフのスライドオープン方向への基準位置として設定される。このとき、他方の第1カウンタは、ほぼ上記処理により本来示すべき値(第1所定値+第2所定値)を示しているため、これ以降は、全閉位置を正確に把握することができ、正確なスライディングルーフ制御が実行できる。   When the count value is abnormal as described above, if the roof operation is continued and the roof is moved in the tilt-up direction, the value of the first counter becomes 0 at the end (that is, the tilt fully open position). Accordingly, in the subsequent processing, this new tilt fully open position is set as a reference position in the tilt up direction of the roof. At this time, the other second counter does not indicate a value that should be originally indicated (first predetermined value + second predetermined value), but the roof subsequently operates in the slide open direction, and its end (that is, the slide fully open position). ), The value of the second counter becomes zero. Accordingly, in the subsequent processing, this new slide fully open position is set as a reference position in the slide open direction of the roof. At this time, the other first counter indicates a value (first predetermined value + second predetermined value) that should be originally indicated by the above processing, and thereafter, the fully closed position can be accurately grasped. Accurate sliding roof control can be executed.

一方、S170においてカウント状態が正常であると判断された場合には(S170:NO)、現在の第1カウンタのカウント表示が第1所定値であるか否かを判断する(S180)。そして、当該カウント表示が第1所定値であると判断されると(S180:YES)、ルーフの現在位置が全閉位置にあることが確認されたことになるため、一旦モータ35の出力をオフにする(S190)。そして、以降の制御のため全閉状位置であることを状態記憶回路20に記憶させるため、ポート1に”L”を出力し、ポート2に”H”を出力してコンデンサCを充電する(S200)。   On the other hand, when it is determined in S170 that the count state is normal (S170: NO), it is determined whether or not the current count display of the first counter is the first predetermined value (S180). When it is determined that the count display is the first predetermined value (S180: YES), it is confirmed that the current position of the roof is in the fully closed position, so the output of the motor 35 is temporarily turned off. (S190). Then, in order to store the fully closed position in the state storage circuit 20 for the subsequent control, “L” is output to the port 1 and “H” is output to the port 2 to charge the capacitor C (S200). ).

ここで状態記憶回路20に全閉位置の情報が記憶されると、この全閉状態で電源回路40からの電源が遮断されても、次回の初期化処理(図6)でこの全閉状態を速やかに把握することができ、このときのカウント値とルーフ位置との関係をそのまま利用してスライディングルーフ制御を再開することができる。   Here, when the information of the fully closed position is stored in the state storage circuit 20, even if the power supply from the power supply circuit 40 is shut off in this fully closed state, this fully closed state is stored in the next initialization process (FIG. 6). The sliding roof control can be resumed by using the relationship between the count value and the roof position at this time as it is.

なお、S180において第1カウンタの表示が第1所定値でない場合は、ルーフが全閉位置以外の位置にあることになるが、カウント値は正常であるため、ルーフの現在位置を把握することができるので、そのままルーフ制御を継続して行う。   If the display of the first counter is not the first predetermined value in S180, the roof is in a position other than the fully closed position, but since the count value is normal, it is possible to grasp the current position of the roof. Since this is possible, the roof control is continued as it is.

一方、S110において、スイッチ11がオンされていないと判断された場合には、スイッチ12がオンされているか否かが判断される(S120)。そして、スイッチ12がオンされていると判断された場合には(S120:YES)、S230〜S300の処理を行う。このS230〜S300までの処理は、上記S130〜S200までの処理にそれぞれ対応するものである。すなわち、S130〜S200の処理は、ルーフの作動方向がチルトアップ方向であり、チルトアップ方向のルーフ位置をカウントするカウンタとして第1カウンタを用いており、さらに、全閉位置を表す場合の第1カウンタのカウント値として第1所定値を設定している。これに対し、S230〜S300の処理は、ルーフの作動方向がスライドオープン方向であり、スライドオープン方向のルーフ位置をカウントするカウンタとして第2カウンタを用いており、さらに、全閉位置を表す場合の第2カウンタのカウント値として第2所定値を設定している。以上の点で両者は異なるが、それ以外の処理は同様であるため、S230〜S300までの処理の説明については省略する。   On the other hand, if it is determined in S110 that the switch 11 is not turned on, it is determined whether or not the switch 12 is turned on (S120). If it is determined that the switch 12 is turned on (S120: YES), the processing of S230 to S300 is performed. The processes from S230 to S300 correspond to the processes from S130 to S200, respectively. That is, in the processes of S130 to S200, the first counter is used as a counter for counting the roof position in the tilt-up direction when the operation direction of the roof is the tilt-up direction, and further represents the fully closed position. A first predetermined value is set as the count value of the counter. On the other hand, in the processing of S230 to S300, the operating direction of the roof is the slide open direction, the second counter is used as a counter for counting the roof position in the slide open direction, and the fully closed position is represented. A second predetermined value is set as the count value of the second counter. Although the two are different in the above points, the other processes are the same, so the description of the processes from S230 to S300 will be omitted.

一方、S120においてスイッチ12がオンされていないと判断された場合には、スイッチ11及びスイッチ12が共にオフされたと判断し、ルーフ駆動用のモータ35の出力がオフされる(S330)。このとき、モータ35の出力をオフにしても、当該モータ35はその慣性により動いている場合があるため、次回のスライディングルーフ制御のために、パルスカウント処理を行う(S340)。次回のスライディングルーフ制御では、電源回路40からの電源の遮断が行われない限り(バッテリ等の電源が交換されない限り)、このパルスカウント処理におけるカウント値が制御回路10のRAMに保存されているため、このカウント値によりルーフの現在位置を容易に把握することができる。   On the other hand, if it is determined in S120 that the switch 12 is not turned on, it is determined that both the switch 11 and the switch 12 are turned off, and the output of the roof driving motor 35 is turned off (S330). At this time, even if the output of the motor 35 is turned off, the motor 35 may be moving due to its inertia, so the pulse counting process is performed for the next sliding roof control (S340). In the next sliding roof control, the count value in the pulse count process is stored in the RAM of the control circuit 10 unless the power supply from the power supply circuit 40 is cut off (unless the power supply of the battery or the like is replaced). The current position of the roof can be easily grasped from this count value.

以上の一連の動作により、スライディングルーフ制御を終了する。このように、本実施例のスライディングルーフ制御装置1では、ルーフの作動方向によってルーフの位置を記憶するカウンタが、第1カウンタ及び第2カウンタとして別々に設定され、ルーフ位置を判定する際にも、その作動方向のルーフ位置を記憶するカウンタが参照される。さらに、この各々の第1カウンタ及び第2カウンタの各々のカウント値の基準位置も、それぞれチルト全開位置、スライド全開位置(作動方向の終点)に設定されている。このため、機構部の遊び等によるルーフの作動方向の転換時のカウント値のずれを有効に防止することができ、精度の良いスライディングルーフ制御を行うことができる。   The sliding roof control is terminated by the series of operations described above. As described above, in the sliding roof control device 1 according to the present embodiment, the counter for storing the position of the roof according to the operating direction of the roof is set separately as the first counter and the second counter, and also when the roof position is determined. Reference is made to a counter which stores the roof position in its operating direction. Further, the reference position of each count value of each of the first counter and the second counter is also set to a tilt fully open position and a slide fully open position (end point in the operation direction), respectively. For this reason, it is possible to effectively prevent the deviation of the count value when the operation direction of the roof is changed due to the play of the mechanism portion or the like, and it is possible to perform the sliding roof control with high accuracy.

また、上述のように、スライディングルーフ制御装置1では、揮発性のRAMにそのカウント値を記憶するように構成された態様の装置であるが、電源回路40からの電力供給が中断されても、この間全閉状態を一時的に保持可能な状態記憶回路20が設けられている。そして、電源回路40からの電力が再び投入された直後に、この全閉状態の情報がRAMに再度格納される態様となっている。   Further, as described above, the sliding roof control apparatus 1 is an apparatus configured to store the count value in the volatile RAM, but even if the power supply from the power supply circuit 40 is interrupted, During this period, a state memory circuit 20 is provided that can temporarily hold the fully closed state. Then, immediately after the power from the power supply circuit 40 is turned on again, this fully closed state information is stored again in the RAM.

従って、ルーフが全閉位置で停止した状態で電力が遮断された場合には、電源の再投入後に全閉位置を直ちに把握することができ、電力遮断前のカウンタの設定値にてスライディングルーフ制御を行うことができる。また、この場合、カウント手段の初期設定、つまりチルト全開位置、スライド全開位置、及び全閉位置に対する第1カウンタ及び第2カウンタの設定値は、少なくとも電源が遮断されるまでは大きく変更されることがない。しかも、この電源の遮断はバッテリの交換時等に行われるが、通常ルーフが全閉状態にされた状態で行われることがほとんどであるため、第1カウンタが認識するチルト全開位置、及び第2カウンタが認識するスライド全開位置は、ほとんどの場合、車両の製造時の設定値に基づくことになる。このため、温度変化等によるストッパの軟化、機構部の緩み、或いはモータのダンパ(出力軸の緩衝材)のねじれ等によりカウンタの基準位置が変更され、制御に支障をきたす等の従来の問題が生じる可能性は極めて少ない。   Therefore, when the power is cut off while the roof is stopped at the fully closed position, the fully closed position can be immediately grasped after the power is turned on again, and the sliding roof control is performed with the set value of the counter before the power is cut off. It can be performed. In this case, the initial setting of the counting means, that is, the setting values of the first counter and the second counter for the fully open position of the tilt, the fully open position of the slide, and the fully closed position are largely changed at least until the power is turned off. There is no. In addition, the power is shut off when the battery is replaced. However, since the roof is usually usually in the fully closed state, the tilt fully opened position recognized by the first counter and the second The slide fully open position recognized by the counter is almost always based on a set value at the time of manufacture of the vehicle. For this reason, there are conventional problems such as that the reference position of the counter is changed due to softening of the stopper due to temperature change, loosening of the mechanism, or twisting of the motor damper (buffer material of the output shaft), which hinders control. Very unlikely to occur.

さらに、本実施例の状態記憶回路20は、上記のようにトランジスタTRやダイオードD等の回路素子を利用した回路により簡単に構成されるため、EEPROM等の高価な記憶素子を使用しなくてもルーフの状態(全閉状態)を記憶することができ、コストの低減を図ることができる。   Further, since the state storage circuit 20 of this embodiment is simply configured by a circuit using circuit elements such as the transistor TR and the diode D as described above, it is not necessary to use an expensive storage element such as an EEPROM. The state of the roof (fully closed state) can be stored, and the cost can be reduced.

なお、本実施例において、制御回路10がカウント手段、位置判定手段、状態検出手段、及び格納手段に該当し、状態記憶回路20が状態記憶手段に該当する。そして、制御回路10が実行する処理の内、図5のフローチャートに示したS150、S250及びS340の処理がカウント手段としての処理に該当し、S180及びS280の処理が位置判定手段としての処理に該当する。また、図6に示すS103の処理が状態検出手段としての処理に該当し、S105及びS106の処理が格納手段としての処理に該当する。   In this embodiment, the control circuit 10 corresponds to a counting unit, a position determination unit, a state detection unit, and a storage unit, and the state storage circuit 20 corresponds to a state storage unit. Of the processes executed by the control circuit 10, the processes of S150, S250 and S340 shown in the flowchart of FIG. 5 correspond to the process as the counting means, and the processes of S180 and S280 correspond to the process as the position determining means. To do. Further, the process of S103 shown in FIG. 6 corresponds to the process as the state detection unit, and the processes of S105 and S106 correspond to the process as the storage unit.

以上、本発明の実施例について説明したが、本発明の実施の形態は、上記実施例に何ら限定されることなく、本発明の技術的範囲に属する限り種々の形態をとり得ることはいうまでもない。例えば、上記実施例では、ルーフの全閉位置以外の位置で停止した状態で電源が遮断された場合に、使用者自らがルーフをチルトアップ方向及びスライドオープン方向に移動して第1カウンタ及び第2カウンタのカウント値の基準値を新たに更新する態様をとったが、この場合の更新処理を初期化処理の中で自動的に行う態様としてもよい。この場合は、図6のS109の処理の後、ルーフを自動的にチルトアップ方向及びスライドオープン方向に移動させる(一往復させる)とともに、S130〜S200及びS230〜S300の処理を自動的に行うことが考えられる。   As mentioned above, although the Example of this invention was described, it cannot be overemphasized that embodiment of this invention can take various forms, as long as it belongs to the technical scope of this invention, without being limited to the said Example at all. Nor. For example, in the above embodiment, when the power is shut off in a state where the roof is stopped at a position other than the fully closed position, the user moves the roof in the tilt-up direction and the slide open direction, Although the reference value of the count value of the two counter is newly updated, the update process in this case may be automatically performed in the initialization process. In this case, after the process of S109 of FIG. 6, the roof is automatically moved in the tilt-up direction and the slide open direction (reciprocated once), and the processes of S130 to S200 and S230 to S300 are automatically performed. Can be considered.

本発明の実施例にかかるスライディングルーフ制御装置の構成を示すブロック図である。It is a block diagram which shows the structure of the sliding roof control apparatus concerning the Example of this invention. 実施例にかかる状態記憶回路の説明図である。It is explanatory drawing of the state memory circuit concerning an Example. 実施例にかかるスライディングルーフ制御方法の説明図である。It is explanatory drawing of the sliding roof control method concerning an Example. 実施例にかかるパルスカウント処理の説明図である。It is explanatory drawing of the pulse count process concerning an Example. 実施例にかかるスライディングルーフ制御を説明するフローチャートである。It is a flowchart explaining the sliding roof control concerning an Example. スライディングルーフ制御における初期化処理を説明するフローチャートである。It is a flowchart explaining the initialization process in sliding roof control. スライディングルーフ制御におけるパルスカウント処理を説明するフローチャートである。It is a flowchart explaining the pulse count process in sliding roof control. スライディングルーフ制御におけるカウント状態判定処理を説明するフローチャートである。It is a flowchart explaining the count state determination process in sliding roof control. スライディングルーフの一般的動作の説明図である。It is explanatory drawing of the general operation | movement of a sliding roof.

符号の説明Explanation of symbols

1・・・スライディングルーフ制御装置、
10・・・制御回路、 11、12・・・スイッチ、
20・・・状態記憶回路、 30・・・モータ駆動回路、
35・・・モータ、 40・・・電源回路、
51、52・・・センサ、
C・・・コンデンサ、 D・・・ダイオード、
R1〜R5・・・抵抗、 TR・・・トランジスタ
1 ... sliding roof control device,
10 ... Control circuit 11,12 ... Switch,
20 ... State memory circuit, 30 ... Motor drive circuit,
35 ... motor, 40 ... power supply circuit,
51, 52 ... sensors,
C ... capacitor, D ... diode,
R1 to R5 ... resistor, TR ... transistor

Claims (1)

開口部を全開するスライド全開位置と該開口部を閉塞する全閉位置との間で開閉体をスライド動作させ、及び、前記全閉位置と前記開閉体の後端側を上昇するチルト全開位置との間で前記開閉体をチルト動作させるために、正転又は逆転駆動されるモータと、
該モータの正転又は逆転を検出し、その検出毎に各々の回転方向に応じたパルスを出力するセンサと、
前記モータの正転又は逆転の方向に応じて前記センサにより検出されたパルスを、アップカウント又はダウンカウントするカウント手段と、該カウント手段によりカウントされたカウント値に基づいて前記開閉体の位置を判定する位置判定手段と、
を備え、該位置判定手段の判定結果を用いて前記モータを駆動し、前記開閉体の移動を制御する開閉体制御装置において、
前記カウント手段は、前記開閉体が前記スライド全開位置から前記全閉位置を介して前記チルト全開位置へ向かうチルトアップ方向へ移動する際に、前記チルト全開位置を基準位置としたカウント値で前記パルスをカウントする第1カウンタと、前記開閉体が前記チルト全開位置から前記全閉位置を介して前記スライド全開位置へ向かうスライドオープン方向へ移動する際に、前記スライド全開位置を基準位置としたカウント値で前記パルスをカウントする第2カウンタとを備え、
前記位置判定手段は、前記開閉体がチルトアップ方向に移動する際には、前記第1カウンタを参照して該開閉体の位置を判定し、前記開閉体がスライドオープン方向に移動する際には、前記第2カウンタを参照して該開閉体の位置を判定することを特徴とする開閉体制御装置。
A tilt fully open position for sliding the opening / closing body between a slide fully open position for fully opening the opening and a fully closed position for closing the opening, and raising the rear end side of the fully closed position and the opening / closing body; A motor that is normally or reversely driven to tilt the opening / closing body between
A sensor that detects normal rotation or reverse rotation of the motor and outputs a pulse corresponding to each rotation direction for each detection;
Count means for up-counting or down-counting pulses detected by the sensor according to the forward or reverse direction of the motor, and determining the position of the opening / closing body based on the count value counted by the count means Position determining means to perform,
An opening / closing body control device for controlling the movement of the opening / closing body by driving the motor using the determination result of the position determination means,
When the opening / closing body moves in the tilt-up direction from the fully open position of the slide to the fully open position of the tilt toward the fully open position of the tilt, the counting means uses the count value with the fully open position of the tilt as a reference position. And a count value with the slide fully open position as a reference position when the opening / closing body moves from the tilt fully open position to the slide fully open position via the fully closed position. And a second counter for counting the pulses at
The position determining means determines the position of the opening / closing body with reference to the first counter when the opening / closing body moves in the tilt-up direction, and when the opening / closing body moves in the slide open direction. An opening / closing body control device that determines the position of the opening / closing body with reference to the second counter.
JP2005002440A 2005-01-07 2005-01-07 Opening and closing body control device Expired - Fee Related JP3904015B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005002440A JP3904015B2 (en) 2005-01-07 2005-01-07 Opening and closing body control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005002440A JP3904015B2 (en) 2005-01-07 2005-01-07 Opening and closing body control device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP36260099A Division JP3656491B2 (en) 1999-12-21 1999-12-21 Opening and closing body control device

Publications (2)

Publication Number Publication Date
JP2005155320A JP2005155320A (en) 2005-06-16
JP3904015B2 true JP3904015B2 (en) 2007-04-11

Family

ID=34737510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005002440A Expired - Fee Related JP3904015B2 (en) 2005-01-07 2005-01-07 Opening and closing body control device

Country Status (1)

Country Link
JP (1) JP3904015B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6089630B2 (en) * 2012-11-27 2017-03-08 アイシン精機株式会社 Sunroof device for vehicle

Also Published As

Publication number Publication date
JP2005155320A (en) 2005-06-16

Similar Documents

Publication Publication Date Title
US9109924B2 (en) Method for determining the set position of an adjustment part
JP5277301B2 (en) Motor control device
US8120293B2 (en) Control apparatus for open/close member and method for controlling open/close member
US6972536B2 (en) Closure member control device and method for limiting positional deviation of closure member
JP3656491B2 (en) Opening and closing body control device
US9725943B2 (en) Control device
US11447043B2 (en) Seat operation range setting system
JP3904015B2 (en) Opening and closing body control device
JP2006022570A (en) Opening and closing body driving device
US20090132114A1 (en) Control Device and Adjusting Mechanism of a Motor Vehicle
JP2007053894A (en) Motor control device
US8035328B2 (en) State memorizing device for movable member
JP4596079B2 (en) Opening / closing control device for opening covering material
KR101077124B1 (en) Control apparatus for open/close member and method for controlling open/close member
US7764036B2 (en) Sliding member controller
JP2010188997A (en) Opening/closing control device for opening covering material
US11421467B2 (en) Opening-closing body controller
JP2004232280A (en) Pinching detector for opening/closing body
JP2003003740A (en) Open-close member controller and method for controlling open-close member
JP3613611B2 (en) Motor control device
JP2996306B2 (en) Power window opening and closing device for vehicles
KR101743145B1 (en) Air conditioning system for automotive vehicles
JPS58224828A (en) Automatic angle regulating unit for fender mirror
JP2003253957A (en) Opening/closing member controller and positional displacement prevention method of opening/closing member in the same
JP2000184780A (en) Motor controlling device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060602

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060606

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060804

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060905

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061106

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061219

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070101

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110119

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120119

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130119

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140119

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees