JP2000305001A - Optical device - Google Patents

Optical device

Info

Publication number
JP2000305001A
JP2000305001A JP11113487A JP11348799A JP2000305001A JP 2000305001 A JP2000305001 A JP 2000305001A JP 11113487 A JP11113487 A JP 11113487A JP 11348799 A JP11348799 A JP 11348799A JP 2000305001 A JP2000305001 A JP 2000305001A
Authority
JP
Japan
Prior art keywords
lens
unit
subroutine
command
optical
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
JP11113487A
Other languages
Japanese (ja)
Inventor
Noboru Suzuki
昇 鈴木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP11113487A priority Critical patent/JP2000305001A/en
Publication of JP2000305001A publication Critical patent/JP2000305001A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent the oscillation or micro vibration of an optical means by prohibiting drive control when an absolute value of the difference between a detecting position and a target position is below a predetermined amount. SOLUTION: A driving dead zone is examined (s 307, 311) by checking whether a lens is driven or not and by calling a subroutine CheckDeadZone at the time of stopping. In the subroutine CheckDeadZone, a speed command DemRpm is examined and a drive start approval is not given at the time of DemRpm=0. For DemRpm=0, a moving amount Lrest from a present position Lpos to a stop target position Ltarget is examined and when DriveDeadZone>=ABS(Lrest) is valid, at the lens moving amount Lrest is below the dead zone DriveDeadZone and the drive start approval is not given, a drive start approval flag is made as fDriveStart=0 and the subroutine CheckDeadZone is finished.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、テレビジョン撮影
などに用いられるテレビ用撮影レンズ等の光学装置に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an optical device such as a photographic lens for a television used for photographing a television.

【0002】[0002]

【従来の技術】従来、放送用テレビカメラシステムにお
いては、カメラ−レンズ間インターフェースとしてアナ
ログ信号にて通信を行ってきた。例えば、フォーカス・
レンズやIRISの位置を決めたり、ズーム・レンズの
速度を決めたりする電圧をレンズに指定することで、レ
ンズ・システムの制御を行ったり、逆にフォーカス・レ
ンズやズーム・レンズ、アイリス(IRIS)の位置を
示す電圧をカメラ側に送ることで、レンズの情報を伝え
ている。
2. Description of the Related Art Conventionally, in a television camera system for broadcasting, communication has been performed by analog signals as an interface between a camera and a lens. For example, focus
By controlling the lens system by specifying the voltage of the lens that determines the position of the lens and IRIS, and the speed of the zoom lens, the focus lens, zoom lens, and iris (IRIS) The lens information is transmitted by sending a voltage indicating the position to the camera.

【0003】またレンズにおいては、制御系はアナログ
・サーボを用いているため、ノイズの影響によりレンズ
が発振を起こしたり、制御指令を入力する操作が行われ
ていないのにレンズが微振動を起こしてしまう可能性が
あるため、ゲインを小さく設定していた。
Further, since the control system of the lens uses an analog servo, the lens oscillates due to the influence of noise, and the lens causes micro vibration even though no operation for inputting a control command is performed. Therefore, the gain was set to a small value.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記従
来例では、ゲインを小さく設定しているため応答が悪
く、十分な操作性を得ることができない場合がある。レ
ンズの応答をよくして操作性をよくするためにゲインを
高く設定すると、レンズが発振や振動などを起こしたり
するという欠点があった。
However, in the above-mentioned conventional example, since the gain is set small, the response is poor and sufficient operability may not be obtained. If the gain is set high to improve the response of the lens and improve the operability, there is a disadvantage that the lens may oscillate or vibrate.

【0005】[0005]

【課題を解決するための手段】本発明による光学装置の
第1の構成は、光学手段と、前記光学手段を移動させる
ための駆動手段と、前記光学手段の位置を検出する位置
検出手段と、前記光学手段についての目標位置に基づい
て前記駆動手段を制御する駆動制御手段と、を有する光
学装置において、前記位置検出手段の出力に基づいて前
記光学手段の移動方向における前記目標位置から第1の
所定量の手前の位置で前記駆動手段を制動するための制
動制御手段と、前記位置検出手段の検出位置と前記目標
位置との差分を検出する差分検出手段と、前記光学手段
が停止している際において前記差分検出手段の検出した
差分の絶対値が第2の所定量以下の場合には前記駆動制
御手段による駆動制御を禁止する駆動禁止手段と、を有
するものである。
A first configuration of an optical device according to the present invention comprises: an optical unit; a driving unit for moving the optical unit; a position detecting unit for detecting a position of the optical unit; A drive control means for controlling the drive means based on a target position of the optical means, wherein a first position is determined from the target position in the moving direction of the optical means based on an output of the position detection means. Braking control means for braking the driving means at a position before a predetermined amount, difference detecting means for detecting a difference between a detection position of the position detecting means and the target position, and the optical means being stopped A driving prohibition unit for prohibiting the drive control by the drive control unit when the absolute value of the difference detected by the difference detection unit is equal to or smaller than a second predetermined amount.

【0006】本発明による光学装置の第2の構成は、合
焦用光学手段と、前記光学手段を駆動するための駆動手
段と、前記光学手段の位置を検出する位置検出手段と、
前記光学手段についての目標位置に基づいて前記駆動手
段を制御する駆動制御手段と、を有する光学装置におい
て、前記位置検出手段の出力に基づいて、前記光学手段
の移動方向における前記目標位置から第1の所定量手前
の位置で前記駆動手段を制動するための制動制御手段
と、前記位置検出手段の検出位置と前記目標位置との差
分を検出する差分検出手段と、前記光学手段が停止して
いる際において前記差分検出手段の検出した差分の絶対
値が第2の所定量以下の場合には前記駆動制御手段によ
る駆動制御を禁止する駆動禁止手段と、を有するもので
ある。
A second configuration of the optical device according to the present invention comprises focusing optical means, driving means for driving the optical means, position detecting means for detecting the position of the optical means,
A drive control means for controlling the drive means based on a target position of the optical means, wherein a first position is determined from the target position in the moving direction of the optical means based on an output of the position detection means. A braking control unit for braking the driving unit at a position before a predetermined amount, a difference detection unit for detecting a difference between a detection position of the position detection unit and the target position, and the optical unit is stopped. A driving prohibition unit for prohibiting the drive control by the drive control unit when the absolute value of the difference detected by the difference detection unit is equal to or smaller than a second predetermined amount.

【0007】本発明による光学装置の第3の構成は、前
記第1の所定量を前記第2の所定量と等しく又は前記第
2の所定量より小さく設定したものである。
In a third configuration of the optical apparatus according to the present invention, the first predetermined amount is set to be equal to or smaller than the second predetermined amount.

【0008】本発明による光学装置の第4の構成は、前
記第1の所定量を前記第2の所定量より大きく設定した
ものである。
In a fourth configuration of the optical device according to the present invention, the first predetermined amount is set to be larger than the second predetermined amount.

【0009】本発明による光学装置の第5の構成は、前
記第1および第2の所定量の少なくとも一方は、前記光
学装置の状態により変動する光学特性に基づいて変化さ
せるようにしたものである。
In a fifth configuration of the optical device according to the present invention, at least one of the first and second predetermined amounts is changed based on an optical characteristic that varies depending on a state of the optical device. .

【0010】本発明による光学装置の第6の構成は、前
記第1および第2の所定量の少なくとも一方は、前記光
学装置の状態により変動する被写界深度に関連して変化
させるようにしたものである。
In a sixth configuration of the optical device according to the present invention, at least one of the first and second predetermined amounts is changed in relation to a depth of field that varies depending on a state of the optical device. Things.

【0011】上記した構成において、制動制御手段は位
置検出手段の出力に基づき、光学手段の移動方向におい
て光学手段についての目標位置より所定量手前の位置で
駆動手段を制動するように制御することになる。
In the above structure, the braking control means controls the driving means based on the output of the position detecting means so as to brake the driving means at a position a predetermined distance before the target position of the optical means in the moving direction of the optical means. Become.

【0012】また、光学手段が停止している場合におい
て、光学手段についての検出位置と目標位置との差の絶
対値が所定量以下であることを差分検出手段が検出した
場合には、駆動禁止手段は駆動制御手段による駆動制御
を禁止する。
If the difference detecting means detects that the absolute value of the difference between the detected position of the optical means and the target position is equal to or less than a predetermined amount while the optical means is stopped, the driving is prohibited. The means prohibits drive control by the drive control means.

【0013】さらに、上記した構成において、前記光学
手段が合焦用光学系の場合は、さらに焦点距離や焦点深
度に応じても制御される。
Further, in the above arrangement, when the optical means is a focusing optical system, the control is further performed in accordance with the focal length and the focal depth.

【0014】[0014]

【発明の実施の形態】(第1の実施の形態)図1〜図3
1は本発明の第1の実施の形態を示し、図3に示すメイ
ンフローチャートのステップ311のサブルーチン(図
11)、ステップ316のサブルーチン(図14)、お
よび図25、図26、図30、図31に本実施の形態の
特徴的な処理等を示す。
(First Embodiment) FIGS. 1 to 3
Reference numeral 1 denotes a first embodiment of the present invention, in which a subroutine of step 311 (FIG. 11), a subroutine of step 316 (FIG. 14), and FIGS. 25, 26, 30, and FIG. 31 shows a characteristic process and the like of the present embodiment.

【0015】図1は本発明の第1の実施の形態を示す光
学装置のブロック図である。101は撮影のためのレン
ズ部で、120はレンズ部101の光学系を通して撮影
するカメラ部である。
FIG. 1 is a block diagram of an optical device showing a first embodiment of the present invention. Reference numeral 101 denotes a lens unit for photographing, and reference numeral 120 denotes a camera unit for photographing through the optical system of the lens unit 101.

【0016】102はレンズ部101を管理しサーボ系
のコントロールを行う第1制御装置(以下aCPUと略
す)、103はaCPU102がレンズ部101のシス
テムを管理するためのタイマ、104はモータ105を
駆動するためのドライバ、106はモータ105に接続
された光学レンズ、107は光学レンズ106の位置を
検出するためのエンコーダ、107はエンコーダ106
からの出力をカウントするためのカウンタである。
Reference numeral 102 denotes a first control device (hereinafter abbreviated as aCPU) for managing the lens unit 101 and controlling the servo system; 103, a timer for the aCPU 102 to manage the system of the lens unit 101; 106 is an optical lens connected to the motor 105, 107 is an encoder for detecting the position of the optical lens 106, and 107 is an encoder 106
This is a counter for counting the output from.

【0017】109は光学レンズ106を手動で動かす
ための手動操作部である。
Reference numeral 109 denotes a manual operation unit for manually moving the optical lens 106.

【0018】カウンタ108やタイマ103は、aCP
U102に接続されているため、aCPU102はカウ
ンタ108の値やタイマ103の値を用いることによ
り、光学レンズ106の位置や速度を知ることが可能と
なっている。
The counter 108 and the timer 103 are aCP
Since it is connected to U102, the aCPU 102 can know the position and speed of the optical lens 106 by using the value of the counter 108 and the value of the timer 103.

【0019】110は光学レンズ106の駆動開始を行
うための開始スイッチ(START−SW)、111は
レンズ部101の状態を示すための表示部である。
Reference numeral 110 denotes a start switch (START-SW) for starting driving of the optical lens 106, and reference numeral 111 denotes a display unit for indicating the state of the lens unit 101.

【0020】112はレンズ部の制御をリモート・モー
ド(カメラ側の指令により行うモード)で行うか、ロー
カル・モード(レンズ側の指令により行うモード)で行
うかを選択するローカル・リモート選択スイッチ(R/
L−SW)であり、113はレンズ部101で使用する
ためのデータを保持しておく書き換え可能な不揮発性メ
モリ(EERPORM)である。
Reference numeral 112 denotes a local / remote selection switch (selecting whether to control the lens unit in a remote mode (mode performed by a command on the camera side) or a local mode (mode performed by a command on the lens side). R /
L-SW), and 113 is a rewritable non-volatile memory (EERPORT) that holds data to be used in the lens unit 101.

【0021】また、130は光学レンズ106の制御を
要求するためのデマンドである。
Reference numeral 130 denotes a demand for requesting control of the optical lens 106.

【0022】カメラ部120には、第2制御装置(以下
bCPUと略す)121が搭載され、レンズ部101の
aCPU102とシリアル通信線140によりシリアル
通信が行えるようになっている。
A second control device (hereinafter abCPU) 121 is mounted on the camera section 120, and serial communication can be performed with the aCPU 102 of the lens section 101 via a serial communication line 140.

【0023】ここで、R/L−SW112によるリモー
ト・モードとローカル・モードの説明をする。
Here, the remote mode and the local mode by the R / L-SW 112 will be described.

【0024】リモート・モードでは、カメラ部120の
bCPU121からの制御指令により光学レンズ106
を制御するものであり、ローカル・モードはデマンド1
30からの制御指令を選択して光学レンズ106を駆動
するものある。
In the remote mode, the optical lens 106 is controlled by a control command from the bCPU 121 of the camera unit 120.
And the local mode is demand 1
In some cases, the control command from 30 is selected to drive the optical lens 106.

【0025】次に光学レンズ106の移動方向とカウン
タ108のカウント値について、フォーカス・レンズを
用いて図2を参照して説明をする。
Next, the moving direction of the optical lens 106 and the count value of the counter 108 will be described with reference to FIG. 2 using a focus lens.

【0026】ここで、フォーカス・レンズのINF(無
限)端201をカウンタ値0とし、MOD(最至近)端
202の値を10000とする。フォーカス・レンズが
CW方向に回転した場合、カウント・アップされ、MO
D方向に移動し、また、CCW方向に回転した場合、カ
ウント・ダウンされ、INF方向に移動するものと仮定
する。例えば、現在位置がLpos203とし、その位
置でのカウンタ値を2000とし、移動目標位置をLp
os204とし、その位置のカウンタ値を7000とし
た場合、移動量Lrest203は次式で与えられる。
Here, the INF (infinite) end 201 of the focus lens is set to a counter value of 0, and the value of the MOD (closest) end 202 is set to 10000. When the focus lens rotates in the CW direction, it is counted up and the MO
It is assumed that when it moves in the D direction and rotates in the CCW direction, it counts down and moves in the INF direction. For example, the current position is Lpos203, the counter value at that position is 2000, and the movement target position is Lp203.
When os204 is set and the counter value at that position is set to 7000, the movement amount Lrest203 is given by the following equation.

【0027】 Lrest = Ltarget − Lpos = 7000 ― 2000 = 5000 従ってこの場合では、Lrest>0なので、フォーカ
ス・レンズは現在位置よりMOD方向に5000移動す
ることになり、回転方向はCWとなる。またLrest
<0の場合は回転方向はCCWとなり、CCW方向に回
転している間は、レンズの速度は負の値をとるものとす
る。
Lrest = Ltarget−Lpos = 7000−2000 = 5000 Therefore, in this case, since Lrest> 0, the focus lens moves 5000 in the MOD direction from the current position, and the rotation direction is CW. Also Lrest
If <0, the rotation direction is CCW, and the speed of the lens assumes a negative value while rotating in the CCW direction.

【0028】次にフローチャートを用いてレンズ・シス
テムの説明を行うが、このレンズ・システムにおいて
は、シリアル通信は割り込みを用いているものとする。
Next, the lens system will be described with reference to a flowchart. In this lens system, it is assumed that serial communication uses an interrupt.

【0029】まず、図3に示すメイン処理の説明を行
う。
First, the main processing shown in FIG. 3 will be described.

【0030】ステップ301でレンズ部101に電源が
投入される。ステップ302でサブルーチンPonIn
itを呼び出し、レンズ部101の初期化を行う。
In step 301, power is supplied to the lens unit 101. Subroutine PonIn in step 302
It is called to initialize the lens unit 101.

【0031】初期化が終了したら、ステップ303で現
在時刻T1およびレンズの現在位置Lposを入力す
る。
When the initialization is completed, the current time T1 and the current position Lpos of the lens are input in step 303.

【0032】ステップ304では、サブルーチンLen
sModeSetを呼び出し、レンズ駆動指令の有無の
チェックを行う。
In step 304, a subroutine Len
sModeSet is called to check whether a lens driving command is present.

【0033】ステップ305では、サブルーチンLen
sModeSetにおいて、レンズ駆動指令の有無をフ
ラグfReadyLensCmdを用いて調べる。
In step 305, a subroutine Len
In sModeSet, the presence or absence of a lens drive command is checked using the flag fReadyLensCmd.

【0034】ステップ305でレンズ駆動指令ありと判
断された場合(fReadyLensCmd=1の場
合)、ステップ306に進み、サブルーチンSetLe
nsDirを呼び出し、レンズの現在位置からの駆動方
向をセットする。
If it is determined in step 305 that there is a lens drive command (if fReadyLensCmd = 1), the flow advances to step 306 to execute a subroutine SetLe.
Call nsDir and set the driving direction from the current position of the lens.

【0035】次に、レンズが駆動中であるかどうかをス
テップ307で調べ、レンズが停止している場合(fL
ensOnDrive=0の場合)はステップ311に
進み、サブルーチンCheckDeadZoneを呼び
出し、駆動不感帯を調べる。
Next, it is checked in step 307 whether the lens is being driven. If the lens is stopped (fL
If ensOnDrive = 0, the process proceeds to step 311 to call the subroutine CheckDeadZone and check the drive dead zone.

【0036】サブルーチンCheckDeadZone
において、駆動不感帯にいるかどうかを調べた結果を、
ステップ312においてフラグfDriveStart
により判断する。
Subroutine CheckDeadZone
In, the result of examining whether it is in the drive dead zone,
In step 312, the flag fDriveStart
Judge by

【0037】ステップ312において、駆動許可がない
と判断された場合(fDriveStart=0の場
合)は、ステップ303に戻り、駆動許可があったと判
断された場合(fDriveStart=1の場合)、
ステップ313に進み、駆動開始用のデータをセットす
るためにサブルーチンPrepDriveを呼び出し、
セットし終えたらステップ314でサブルーチンLen
sDriveStartを呼び出し、レンズ駆動を開始
する。
If it is determined in step 312 that there is no drive permission (if fDriveStart = 0), the process returns to step 303, and if it is determined that drive has been permitted (if fDriveStart = 1),
Proceeding to step 313, a subroutine PrepDrive is called to set driving start data,
When the setting is completed, the subroutine Len is executed in step 314.
Call sDriveStart to start driving the lens.

【0038】レンズ駆動開始が行われたら、ステップ3
15においてレンズをPID制御により駆動制御する。
When the lens drive is started, step 3
At 15, the lens is driven and controlled by PID control.

【0039】ここでPID制御は一般的な比例・積分・
微分制御を行うもので、今回の発明の主旨とは異なるた
め、説明を省略するものとする。またPID制御はデジ
タル制御によりサンプリング周期を一定にして制御する
場合を考慮すると、タイマ割り込みを使用して、割り込
み処理によるPID制御をすることも可能である。
Here, the PID control is a general proportional / integral
Since the differential control is performed and is different from the gist of the present invention, the description is omitted. Further, in consideration of the case where the PID control is performed by controlling the sampling period to be constant by digital control, it is also possible to perform the PID control by interrupt processing using a timer interrupt.

【0040】ステップ316では、レンズが目標位置に
到達したかどうかを判断するために、サブルーチンCh
kLensStopPosを呼び出す。
In step 316, a subroutine Ch is performed to determine whether the lens has reached the target position.
Call kLensStopPos.

【0041】さらに到達したかどうかを判断するため
に、ステップ317でフラグfReachStopPo
sを調べる。
In order to determine whether or not the flag has been reached, the flag fReachStopPo is determined in step 317.
Examine s.

【0042】目標位置に到達したと判断した場合(fR
eachStopPos=1の場合)、ステップ320
に進み、サブルーチンReachPosを呼び出し、目
標位置到達処理を行う。ステップ320で目標位置到達
処理を終了したら、ステップ303に戻る。またステッ
プ317で目標位置に到達していないと判断した場合
(fReachStopPos=0の場合)は、ステッ
プ318に進みサブルーチンCheckLensSts
を呼び出し、レンズの過誤差状態を調べる。
When it is determined that the target position has been reached (fR
(if stopStopPos = 1), step 320
The subroutine ReachPos is called to perform target position reaching processing. When the target position reaching process is completed in step 320, the process returns to step 303. If it is determined in step 317 that the target position has not been reached (if fReachStopPos = 0), the flow advances to step 318 to execute the subroutine CheckLensSts.
To check the lens over-error condition.

【0043】ステップ319では、ステップ318のサ
ブルーチンCheckLensStsで調べた結果をフ
ラグfLensStsErrにより判断する。
In step 319, the result checked in the subroutine CheckLensSts in step 318 is determined by the flag fLensStsErr.

【0044】ステップ319で過誤差状態と判断された
場合(fLensStsErr=1の場合)、ステップ
321に進み、サブルーチンOverErrorを呼び
出し、過誤差処理を行う。処理が終了したら、ステップ
303に戻る。
If it is determined in step 319 that an over-error condition has occurred (if fLensStsErr = 1), the flow advances to step 321 to call a subroutine OverError and perform over-error processing. Upon completion of the process, the process returns to the step 303.

【0045】またステップ319で過誤差状態ではない
と判断されたら(fLensStsErr=0の場
合)、ステップ303に戻る。
If it is determined in step 319 that the state is not an excessive error state (when fLensStsErr = 0), the process returns to step 303.

【0046】上述したステップ305において、レンズ
駆動指令なしと判断された場合(fReadyLens
Cmd=0の場合)は、ステップ308に進み、フラグ
fLensOnDriveを調べることでレンズが駆動
中か停止中かを判断する。
When it is determined in step 305 that there is no lens drive command (fReadyLens
If Cmd = 0), the process proceeds to step 308, where it is determined whether the lens is being driven or stopped by checking the flag fLensOnDrive.

【0047】ステップ308で停止中と判断された場合
(fLensOnDrive=0の場合)、ステップ3
03に戻る。駆動中と判断された場合(fLensOn
Drive=1の場合)はステップ315に進み引き続
きPID制御を行う。
If it is determined in step 308 that the operation is stopped (if fLensOnDrive = 0), step 3
Return to 03. When it is determined that driving is being performed (fLensOn)
If Drive = 1), the process proceeds to step 315 to continue PID control.

【0048】また、上述したステップ307において、
レンズが駆動中であると判断された場合(fLensO
nDrive=1の場合)、ステップ309に進み、サ
ブルーチンCheckDriveCmdを呼び出し、現
在の駆動方向と新たな駆動指令とを比較し、駆動方向に
矛盾がないかどうかを調べる。
In step 307 described above,
When it is determined that the lens is being driven (fLensO
If nDrive = 1), the process proceeds to step 309, where the subroutine CheckDriveCmd is called, the current driving direction is compared with the new driving command, and it is checked whether there is any contradiction in the driving direction.

【0049】調べた結果をステップ310でフラグfL
ensOnDriveにより判断する。
At step 310, the result of the check is set to the flag fL.
It is determined by ensOnDrive.

【0050】駆動方向に矛盾があってサブルーチンCh
eckDriveCmdにおいてレンズが停止させられ
た場合、ステップ310では停止中と判断されるため
(fLensOnDrive=0の場合)、ステップ3
11に進み、新しい指令に基づいてレンズの再駆動を行
う。
Subroutine Ch due to inconsistency in the driving direction
If the lens is stopped in ckDriveCmd, it is determined that the lens is stopped in step 310 (if fLensOnDrive = 0), so step 3
Proceeding to 11, the lens is driven again based on the new command.

【0051】また、ステップ310で駆動中と判断され
た場合(fLensOnDrive=1の場合)は、ス
テップ309におけるサブルーチンCheckDriv
eDirで駆動方向に矛盾がないと判断されため、ステ
ップ315に進み、引き続きPID制御によりレンズを
駆動する。
If it is determined in step 310 that driving is being performed (if fLensOnDrive = 1), the subroutine CheckDrive in step 309 is selected.
Since it is determined by eDir that there is no inconsistency in the driving direction, the process proceeds to step 315, and the lens is continuously driven by PID control.

【0052】次に、図4を用いてシリアル通信による割
り込み処理の説明を行う。
Next, interrupt processing by serial communication will be described with reference to FIG.

【0053】カメラ部120よりシリアル通信割り込み
が発生した場合、サブルーチンSerialIntに飛
び、ステップ401でレンズ制御指令を入力する。
When a serial communication interrupt occurs from the camera unit 120, the process jumps to a subroutine SerialInt, and inputs a lens control command in step 401.

【0054】ステップ402でレンズ制御指令が位置お
よび速度指令かどうかを調べる。位置および速度指令で
あると判断された場合、ステップ411に進み、カメラ
位置指令を位置指令としてCmdPosに、さらにカメ
ラ速度指令を目標速度としてCmdRpmにセットす
る。そしてステップ409に進み、レンズ駆動指令があ
ったとして、フラグfLensCmdIn=1とする。
そしてサブルーチンSerialIntを終了する。
At step 402, it is checked whether the lens control command is a position and speed command. If it is determined that the command is a position and speed command, the process proceeds to step 411, where the camera position command is set to CmdPos as a position command, and the camera speed command is set to CmdRpm as a target speed. Then, the process proceeds to a step 409, where a flag fLensCmdIn = 1 is set assuming that a lens drive command has been issued.
Then, the subroutine SerialInt ends.

【0055】また、ステップ402で条件が成立しなか
った場合はステップ403に進み、レンズ制御指令が速
度指令のみかどうかを調べる。
If the condition is not satisfied in step 402, the flow advances to step 403 to check whether the lens control command is only a speed command.

【0056】速度指令のみと判断された場合、ステップ
404に進み速度指令の符号を調べる。正の場合はMO
D方向に移動する指令のため、ステップ405でカメラ
位置指令としてMOD端にセットし、ステップ411に
進む。
If it is determined that only the speed command is issued, the flow advances to step 404 to check the sign of the speed command. MO if positive
Since it is a command to move in the D direction, the camera position command is set at the MOD end in step 405, and the process proceeds to step 411.

【0057】また、ステップ404で条件が成立しなか
った場合は負と判断され、ステップ406でカメラ位置
指令としてINF端をセットし、ステップ411に進
む。
If the condition is not satisfied in step 404, it is determined to be negative. In step 406, the INF end is set as a camera position command, and the flow advances to step 411.

【0058】ステップ403で条件が成立しなかった場
合は、ステップ407に進み、レンズ制御指令が位置指
令のみどうかを調べる。レンズ制御指令が位置指令のみ
と判断された場合はステップ408に進み、カメラ速度
指令として仮速度指令TempLensRpmをセット
する。そしてステップ411に進む。
If the condition is not satisfied in step 403, the flow advances to step 407 to check whether the lens control command is only a position command. If it is determined that the lens control command is only the position command, the process proceeds to step 408, and a temporary speed command TempLensRpm is set as the camera speed command. Then, the process proceeds to step 411.

【0059】ステップ407で条件が成立しなかった場
合は、レンズ制御指令に矛盾があるものとし、ステップ
410に進む。ステップ410では、フラグfLens
CmdIn=0とし、レンズ駆動指令がなかったものと
する。そしてサブルーチンSerialIntを終了す
る。
If the condition is not satisfied in step 407, it is determined that there is a contradiction in the lens control command, and the flow advances to step 410. In step 410, the flag fLens
It is assumed that CmdIn = 0 and there is no lens drive command. Then, the subroutine SerialInt ends.

【0060】次に各サブルーチンの説明を行う。Next, each subroutine will be described.

【0061】図5を用いて、サブルーチンPonIni
tの説明を行う。このサブルーチンは初期化処理を行う
ものである。まずステップ501でフラグの初期化を行
う。
Referring to FIG. 5, a subroutine PonIni
A description of t will be given. This subroutine performs an initialization process. First, in step 501, a flag is initialized.

【0062】fLensManual=0 (サーボ・
モードの設定) fLensOnDrive=0 (レンズ停止中) fLensCmdIn=0 (レンズ制御指令入力な
し) fRemoteLocal=0 (ローカル・モード) fTargetPos=0 (目標位置到達のクリア) ステップ502において、データの初期化を行う。
FLensManual = 0 (servo
Mode setting) fLensOnDrive = 0 (during lens stop) fLensCmdIn = 0 (no lens control command input) fRemoteLocal = 0 (local mode) fTargetPos = 0 (clear target position arrival) In step 502, data is initialized. .

【0063】仮速度指令のセット TempLensRpm=100[RPM] ローカル・モードにおけるマニュアル・モード解除デマ
ンド操作量 DemandServo=1000 次に、ステップ503において、サブルーチンLens
PosInitを呼び出し、レンズ位置の初期化を行
う。エンコーダが絶対値出力のものを使用できない場
合、相対値出力形式のものを使用すると電源投入時で
は、レンズの絶対値が不明である。そこでレンズの絶対
位置を決定するために、図示していないが、サブルーチ
ンLensPosInitの内容として、例えばINF
端にスイッチを設けた場合、フォーカス・レンズをIN
F方向に移動し、前記スイッチの入る場所で停止するこ
とでINF端を知ることができる。
Temporary speed command setting TempLensRpm = 100 [RPM] Manual mode release demand operation amount in local mode DemandService = 1000 Next, in step 503, the subroutine Lens
Call PosInit to initialize the lens position. If the encoder cannot use the one that outputs an absolute value, the absolute value of the lens is unknown when the power is turned on if the encoder that uses the absolute value output is used. In order to determine the absolute position of the lens, although not shown, the contents of the subroutine LensPosInit include, for example, INF
If a switch is provided at the end, set the focus lens to IN
By moving in the direction F and stopping where the switch is turned on, the end of the INF can be known.

【0064】ここでカウンタを0にセットすれば、IN
F端を0としてフォーカス・レンズの絶対位置が検出可
能となる。レンズ・システムの初期化が終了した時点
で、ステップ504においてシリアル通信を許可する。
Here, if the counter is set to 0, IN
With the F end set to 0, the absolute position of the focus lens can be detected. When the initialization of the lens system is completed, serial communication is permitted in step 504.

【0065】図6を用いて、サブルーチンLensMo
deSetを説明する。
Referring to FIG. 6, subroutine LensMo
The deSet will be described.

【0066】ステップ601で、R/L−SWの状態を
調べる。オンしている場合はリモート・モードであると
して、ステップ606においてリモート・ローカル設定
フラグをfRemoteLocal=1とする。次にス
テップ607においてリモート・モード用のデータのセ
ットを行う。
At step 601, the state of the R / L-SW is checked. If it is on, it is determined that the remote mode is set, and the remote / local setting flag is set to fRemoteLocal = 1 in step 606. Next, in step 607, data for the remote mode is set.

【0067】 駆動不感帯量の設定 DriveDeadZone=8 停止オフセットの設定 StopOffset=4 レンズの最高速度の設定 LensMaxRpm=80 そして、ステップ604に進み、リモート・ローカル設
定状態を調べる。
Setting of Drive Dead Zone Amount DriveDeadZone = 8 Setting of Stop Offset StopOffset = 4 Setting of Maximum Speed of Lens LensMaxRpm = 80 Then, the process proceeds to step 604 to check the remote / local setting state.

【0068】リモート・モードの場合(fRemote
Local=1の場合)、ステップ608に進み、サブ
ルーチンRemoteCmdIn1を呼び出した後、サ
ブルーチンLensModeSetを終了する。
In the case of the remote mode (fRemote
In the case of Local = 1), the process proceeds to step 608, calls the subroutine RemoteCmdIn1, and then ends the subroutine LensModeSet.

【0069】またステップ601でR/L−SWがオフ
している場合は、ローカル・モードであるとしてステッ
プ602に進み、リモート・ローカル設定フラグをfR
emoteLocal=0とする。そしてステップ60
3においてローカル・モード用のデータの設定を行う。
If the R / L-SW is turned off in step 601, it is determined that the mode is the local mode, and the flow advances to step 602 to set the remote / local setting flag to fR.
It is assumed that remoteLocal = 0. And step 60
In step 3, data for the local mode is set.

【0070】駆動不感帯量の設定 DriveDead
Zone=10 停止オフセットの設定 StopOffset=5 レンズの最高速度の設定 LensMaxRpm=50 そしてステップ604に進む。
Setting of Drive Dead Zone Amount DriveDead
Zone = 10 Setting of stop offset StopOffset = 5 Setting of maximum lens speed LensMaxRpm = 50 Then, the process proceeds to step 604.

【0071】ステップ604において、ローカル・モー
ドであると判断された場合(fRemoteLocal
=0の場合)、ステップ605に進みサブルーチンLo
calCmdInを呼び出した後、サブルーチンLen
sModeSetを終了する。
If it is determined in step 604 that the mode is the local mode (fRemoteLocal)
= 0), the process proceeds to step 605 and the subroutine Lo
After calling calCmdIn, subroutine Len
The sModeSet ends.

【0072】ここでリモート・モードとローカル・モー
ドで不感帯量や停止オフセット、最高速度のデータを変
えられるようにすることで、それぞれのモードにおける
レンズ移動の特色を出せるようにしている。 すなわ
ち、リモート・モードではレンズの移動性能に対して高
性能を要求されるため、感度の高いデータをセットして
おくが、ローカル・モードでは、感度の低いデータをセ
ットすることで、モータ駆動電流の省エネ化を図ること
が可能となる。
Here, the data of the dead zone amount, the stop offset, and the maximum speed can be changed between the remote mode and the local mode, so that the characteristic of the lens movement in each mode can be obtained. In other words, high-sensitivity data is set in the remote mode because high performance is required for the lens movement performance. In the local mode, low-sensitivity data is set to reduce the motor drive current. Energy saving can be achieved.

【0073】図7を用いてサブルーチンRemoteC
mdIn1を説明する。
Using the subroutine RemoteC with reference to FIG.
mdIn1 will be described.

【0074】ステップ701にてSTART―SW11
0の状態を調べる。SW110がオフしている場合は、
ステップ704に進み、レンズ駆動指令の入力状態を調
べる。指令値がない場合(fLensCmdIn=0の
場合)、ステップ710にてレンズ制御指令が有効状態
でないとしてフラグfReadyLensCmd=0と
する。そして、サブルーチンRemoteCmdIn1
を終了する。
At step 701, START-SW11
Check the status of 0. When SW110 is off,
Proceeding to step 704, the input state of the lens drive command is checked. If there is no command value (if fLensCmdIn = 0), it is determined in step 710 that the lens control command is not in the valid state, and the flag fReadyLensCmd = 0. Then, the subroutine RemoteCmdIn1
To end.

【0075】また、ステップ701にてSTART−S
W110がオンしている場合は、ステップ702に進
み、レンズをサーボ・モードに設定するために、フラグ
fLensManual=0とする。このレンズ状態を
カメラに知らせるために、シリアル通信を用いて、fL
ensManualフラグ(サーボ・モード状態)およ
びSTART−SWオン情報を転送する。そしてステッ
プ704に進む。
Also, in step 701, START-S
If W110 is on, the flow advances to step 702 to set the flag fLensManual = 0 to set the lens to the servo mode. In order to notify the camera of this lens state, fL
An ensManual flag (servo mode state) and START-SW on information are transferred. Then, the process proceeds to step 704.

【0076】ステップ704において指令値があると判
断された場合(fLensCmdIn=1の場合)、ス
テップ705において、位置指令(CmdPos)を停
止目標位置Ltargetに、目標速度(CmdRp
m)を指令速度DemRpmにそれぞれセットし、レン
ズ制御信号として使用する。
If it is determined in step 704 that there is a command value (if fLensCmdIn = 1), in step 705, the position command (CmdPos) is set to the stop target position Ltarget, and the target speed (CmdRp
m) is set to the command speed DemRpm and used as a lens control signal.

【0077】指令値を制御信号として使用したので、そ
の有効範囲をチェックするために、ステップ706に進
み、サブルーチンLTargetLmtを呼び出す。そ
して次の指令入力のためにステップ707にてフラグf
LensCmdIn=0とする。
Since the command value has been used as the control signal, the process proceeds to step 706 to call the subroutine LTargetLmt to check the effective range. Then, in step 707, the flag f is input for the next command input.
Let LensCmdIn = 0.

【0078】またカメラ指令によるマニュアル・モード
解除(サーボ・モードの設定)として、ステップ708
にてfLensManual=0とする。ステップ70
9にてレンズ制御指令が有効状態であるとしてフラグf
ReadyLensCmd=1とする。そしてサブルー
チンRemoteCmdIn1を終了する。
In step 708, manual mode release (servo mode setting) by camera command is performed.
Let fLensManual = 0. Step 70
At 9 it is determined that the lens control command is in the valid state and the flag f
ReadyLensCmd = 1. Then, the subroutine RemoteCmdIn1 ends.

【0079】サブルーチンRemoteCmdIn1で
は、マニュアル・モードの解除(サーボ・モードの設
定)をSTART−SW110のオンもしくはカメラか
らのレンズ制御指令にて行ったが、別な実施の形態とし
て、START−SW110のオンのみで行う場合を図
8を用いて説明する。またここでこのサブルーチンの名
称をRemoteCmdIn2とする。
In the subroutine RemoteCmdIn1, the manual mode is released (servo mode setting) by turning on the START-SW 110 or a lens control command from the camera. However, as another embodiment, the START-SW 110 is turned on. The case of performing only this will be described with reference to FIG. Here, the name of this subroutine is RemoteCmdIn2.

【0080】まず、ステップ801でSTART−SW
110がオンしているかどうかを調べる。オンしている
場合は、ステップ802にてフラグfLensManu
al=0(サーボ・モード)とする。その情報をカメラ
に知らせるために、ステップ803にてシリアル通信を
用いて、fLensManualフラグ(サーボ・モー
ド状態)およびSTART−SWオン情報を転送する。
そしてステップ804に進む。
First, in step 801, the START-SW
Check if 110 is on. If it is on, the flag fLensManu is set in step 802.
Let al = 0 (servo mode). In order to inform the camera of this information, the fLensManual flag (servo mode state) and the START-SW on information are transferred using serial communication in step 803.
Then, the process proceeds to step 804.

【0081】ステップ801でSW110がオフしてい
る場合は、ステップ804に進む。ステップ804では
カメラからレンズ指令が来ているかどうかを調べる。指
令値入力がない状態(fLensCmdIn=0)で
は、ステップ809に進み、レンズ制御指令が有効状態
でないとしてフラグfReadyLensCmd=0と
する。そしてサブルーチンRemoteCmdIn2を
終了する。
If it is determined in step 801 that the SW 110 is off, the process proceeds to step 804. In step 804, it is checked whether a lens command has been received from the camera. If there is no command value input (fLensCmdIn = 0), the process proceeds to step 809, where the flag fReadyLensCmd = 0 is set as the lens control command is not valid. Then, the subroutine RemoteCmdIn2 ends.

【0082】またステップ804にて指令値入力がある
状態(fLensCmdIn=1)ではステップ805
において、位置指令を(CmdPos)を停止目標位置
Ltargetに、目標速度(CmdRpm)を指令速
度DemRpmにそれぞれセットし、レンズ制御信号と
して使用する。
If there is a command value input in step 804 (fLensCmdIn = 1), step 805
In, the position command (CmdPos) is set to the stop target position Ltarget, and the target speed (CmdRpm) is set to the command speed DemRpm, and used as a lens control signal.

【0083】指令値を制御信号として使用したので、そ
の有効範囲をチェックするために、ステップ806に進
み、サブルーチンLTargetLmtを呼び出す。そ
して次の指令入力のためにステップ807にてフラグf
LensCmdIn=0とする。
Since the command value has been used as the control signal, the process proceeds to step 806 to check the effective range, and calls the subroutine LTargetLmt. Then, the flag f is set at step 807 for the next command input.
Let LensCmdIn = 0.

【0084】そしてステップ808でレンズがサーボ・
モードにあるかを調べ、マニュアル・モードである(f
LensManual=1)と判断された場合、ステッ
プ809に進む。またサーボ・モードである(fLen
sManual=0)と判断された場合、ステップ81
0にてレンズ制御指令が有効状態であるとしてフラグf
ReadyLensCmd=1とする。そしてサブルー
チンRemoteCmdIn2を終了する。
Then, in step 808, the lens
Mode is checked, and the mode is the manual mode (f
If it is determined that (LensManual = 1), the process proceeds to step 809. In the servo mode (fLen
If sManual = 0) is determined, step 81
0 indicates that the lens control command is in the valid state
ReadyLensCmd = 1. Then, the subroutine RemoteCmdIn2 ends.

【0085】図9を用いて、サブルーチンSetLen
sDirの説明を行う。
Referring to FIG. 9, the subroutine SetLen
sDir will be described.

【0086】ステップ901で、現在位置Lposから
停止目標位置Ltaretまでの移動距離Lrestを
次式により算出する。
At step 901, the moving distance Lrest from the current position Lpos to the target stop position Ltarget is calculated by the following equation.

【0087】 Lrest = Ltarget − Lpos ・・・・・ (1) ステップ902では、Lrestの符号により、移動方
向を調べる。Lrest>0の場合、CW(MOD)方
向に回転するため、ステップ906に進み、次式により
指令速度DemRpmの符号を正にする。
Lrest = Ltarget−Lpos (1) In step 902, the moving direction is checked based on the sign of Lrest. If Lrest> 0, the rotation in the CW (MOD) direction proceeds to step 906, where the sign of the command speed DemRpm is made positive by the following equation.

【0088】 DemRpm = ABS(DemRpm) ・・・・・ (2) ここでABS(X)は、Xの絶対値をとるものとする。
そしてステップ905で、CW(MOD)方向の回転指
令を示すフラグをfDemCwCcw=1とし、サブル
ーチンSetLensDirを終了する。ステップ90
2でLrestが負である場合は、ステップ903に進
み、次式により指令速度DemRpmの符号を負にす
る。
DemRpm = ABS (DemRpm) (2) Here, ABS (X) takes the absolute value of X.
Then, in step 905, the flag indicating the rotation command in the CW (MOD) direction is set to fDemCwCcw = 1, and the subroutine SetLensDir ends. Step 90
If Lrest is negative in step 2, the routine proceeds to step 903, where the sign of the command speed DemRpm is made negative by the following equation.

【0089】 DemRpm = −ABS(DemRpm) ・・・・・ (3) そしてステップ904に進み、CCW(INF)方向の
回転指令を示すフラグをfDemCwCcw=0とし、
サブルーチンSetLensDirを終了する。
DemRpm = −ABS (DemRpm) (3) Then, the flow advances to step 904 to set a flag indicating a rotation command in the CCW (INF) direction to fDemCwCcw = 0.
The subroutine SetLensDir ends.

【0090】図10を用いてサブルーチンCheckD
riveCmdを説明する。
A subroutine CheckD will be described with reference to FIG.
liveCmd will be described.

【0091】ステップ1011で速度指令DemRpm
を調べる。速度指令DemRpm=0の場合は、レンズ
停止要求指令とみなして、ステップ1012に進み、レ
ンズを停止させる。そしてステップ1013で、駆動中
フラグfLensOnDrive=0として、サブルー
チンCheckDriveCmdを終了する。
In step 1011, the speed command DemRpm
Find out. If the speed command DemRpm = 0, it is regarded as a lens stop request command, and the process proceeds to step 1012 to stop the lens. In step 1013, the driving flag fLensOnDrive = 0 is set, and the subroutine CheckDriveCmd is ended.

【0092】また、ステップ1011で、速度指令De
mRpm≠0の場合、ステップ1001に進む。ステッ
プ1001では、最新指令による回転要求方向を調べ
る。フラグfDemCwCcw=1の場合(CW方向に
回転要求)、ステップ1003に進み、現在のレンズの
回転要求方向を調べる。fDrvCwCcw=1の場
合、現在レンズはCW(MOD)方向に回転要求してい
るため、一致しているので、そのままサブルーチンCh
eckDriveCmdを終了する。
In step 1011, the speed command De
If mRpm ≠ 0, the process proceeds to step 1001. In step 1001, the rotation request direction according to the latest command is checked. If the flag fDemCwCcw is 1 (a rotation request in the CW direction), the process proceeds to step 1003, and the current rotation request direction of the lens is checked. In the case of fDrvCwCcw = 1, since the lens is currently requesting rotation in the CW (MOD) direction, they coincide with each other.
eckDriveCmd ends.

【0093】またステップ1003で、fDrvCwC
cw=0の場合は、現在レンズはCCW(INF)され
ているため指令が一致しないので、ステップ1004に
進み、レンズを停止させる。停止したのでステップ10
05では、駆動中フラグfLensOnDrive=0
とし、ステップ1006で停止安定用のディレイを行
う。これは現在の駆動方向とは逆の方向の移動指令が来
たため、レンズの急反転による振動防止対策である。こ
のディレイはあまり長いと指令に対する応答性が悪くな
るため、機械的時定数を考慮して、20〜50[mse
c]程度のディレイが良い。
In step 1003, fDrvCwC
If cw = 0, the command does not match because the lens is currently CCW (INF), so the flow advances to step 1004 to stop the lens. Step 10 because it stopped
05, the driving flag fLensOnDrive = 0
In step 1006, a delay for stabilizing the stop is performed. This is a measure for preventing vibration due to sudden reversal of the lens because a movement command in the direction opposite to the current driving direction is received. If this delay is too long, the response to the command is deteriorated. Therefore, considering the mechanical time constant, 20 to 50 [msec
c) is good.

【0094】ステップ1006でディレイをとった後、
サブルーチンCheckDriveCmdを終了する。
またステップ1001で、フラグfDemCwCcw=
0の場合(CCW方向に回転要求)、ステップ1002
に進み、現在のレンズの回転要求方向を調べる。fDr
vCwCcw=0の場合、現在レンズはCCW(IN
F)方向に回転要求しているため、一致しているので、
そのままサブルーチンCheckDriveCmdを終
了する。
After taking the delay in step 1006,
The subroutine CheckDriveCmd ends.
In step 1001, the flag fDemCwCcw =
If 0 (rotation request in CCW direction), step 1002
To check the current required rotation direction of the lens. fDr
If vCwCcw = 0, the current lens is CCW (IN
F) Since it is requesting rotation in the direction, it matches, so
The subroutine CheckDriveCmd ends as it is.

【0095】またステップ1002でfDrvCwCc
w=1の場合(CW方向に回転要求)、現在レンズはC
W(MOD)されているため指令が一致しないので、ス
テップ1004に進み、その後は上述の通りの処理であ
る。
In step 1002, fDrvCwCc
If w = 1 (rotation request in CW direction), the current lens is C
Since the commands do not match because of W (MOD), the process proceeds to step 1004, and thereafter, the processing is as described above.

【0096】図11を用いてサブルーチンCheckD
eadZoneを説明する。
The subroutine CheckD will be described with reference to FIG.
The eadZone will be described.

【0097】ステップ1111で、速度指令DemRp
mを調べる。速度指令DemRpm=0の場合は駆動開
始許可を与えないため、ステップ1102に進む。速度
指令DemRpm≠0の場合は、ステップ1101に進
む。ステップ1101では、現在位置Lposから停止
目標位置Ltargetまでの移動量Lrestの大き
さを次式により調べる。
In step 1111, the speed command DemRp
Examine m. When the speed command DemRpm = 0, the process proceeds to step 1102 because the driving start permission is not given. If the speed command DemRpm ≠ 0, the process proceeds to step 1101. In step 1101, the magnitude of the movement amount Lrest from the current position Lpos to the target stop position Ltarget is checked by the following equation.

【0098】 DriveDeadZone ≧ ABS(Lrest) ・・・・・ (4 ) 式(4)が成立した場合、レンズの移動量Lrestが
不感帯DriveDeadZone以下であるから、駆
動開始許可を与えないため、ステップ1102で駆動開
始許可フラグfDriveStart=0とし、サブル
ーチンCheckDeadZoneを終了する。
DriveDeadZone ≧ ABS (Lrest) (4) When the equation (4) is satisfied, since the lens movement amount Lrest is equal to or less than the dead zone DriveDeadZone, no drive start permission is given. The drive start permission flag fDriveStart = 0 is set, and the subroutine CheckDeadZone is ended.

【0099】またステップ1101で式(4)が不成立
の場合、レンズの移動量Lrestが不感帯Drive
DeadZone以上であるから、駆動開始許可を与え
るために、ステップ1103において、駆動開始許可フ
ラグfDriveStart=1とし、サブルーチンC
heckDeadZoneを終了する。
If the equation (4) is not satisfied in step 1101, the lens movement amount Lrest is set to the dead zone Drive.
Since it is equal to or greater than DeadZone, the drive start permission flag fDriveStart = 1 is set in step 1103 to give the drive start permission, and the subroutine C
end the hookDeadZone.

【0100】図12を用いてサブルーチンPrepDr
iveの説明をする。ステップ1201で、レンズの現
在位置Lposを以下のようにセットする。
Referring to FIG. 12, subroutine PrepDr is used.
ive will be described. In step 1201, the current position Lpos of the lens is set as follows.

【0101】 速度算出用位置バッファ Lpos0 = Lpos 停止検出用位置バッファ Lstop0 = Lpos ステップ1202では、過誤差検出のために、現在時刻
T1を以下のようにセットする。
Speed calculation position buffer Lpos0 = Lpos Stop detection position buffer Lstop0 = Lpos In step 1202, the current time T1 is set as follows to detect an excessive error.

【0102】 停止検出用タイマ・バッファ Tstop0 = T1 逆移動検出用タイマ・バッファ Tinv0 = T1 速度誤差異常検出用タイマ・バッファ Trpm0 = T1 ステップ1203では、過誤差検出用基準タイマなどの
セットを以下のように行う。
Stop detection timer buffer Tstop0 = T1 Reverse movement detection timer buffer Tinv0 = T1 Speed error abnormality detection timer buffer Trpm0 = T1 In step 1203, an over error detection reference timer and the like are set as follows. To do.

【0103】 停止検出用基準時間バッファ TstopStd = 100[msec] 逆移動検出用基準時間バッファ TinvStd = 100[msec] 速度誤差異常検出用基準時間バッファ TrpmStd = 100[ms ec] 速度誤差異常検出用割合基準バッファ RpmErrRatio = 70[ %] 以上、各データの初期化が終了したら、ステップ120
4で、過誤差検出表示および目標位置到達表示を消す。
そしてステップ1205で、目標位置到達フラグfTa
rgetPos=0とし、サブルーチンPrepDri
veを終了する。
Stop detection reference time buffer TstopStd = 100 [msec] Reverse movement detection reference time buffer TinvStd = 100 [msec] Speed error abnormality detection reference time buffer TrpmStd = 100 [ms ec] Speed error abnormality detection ratio reference Buffer RpmErrRatio = 70 [%] When the initialization of each data is completed, step 120
In step 4, the over error detection display and the target position arrival display are turned off.
Then, in step 1205, the target position reaching flag fTa
rgetPos = 0 and subroutine PrepDri
Exit ve.

【0104】図13を用いてサブルーチンLensDr
iveStartを説明する。
Referring to FIG. 13, subroutine LensDr is used.
iveStart will be described.

【0105】ステップ1301では、レンズが駆動中で
あることを示すため、フラグfLensOnDrive
=1とする。ステップ1302では、指令速度DemR
pmがレンズ・システムの最高速度LensMaxRp
mを越えていないかどうかを次式により調べる。
In step 1301, a flag fLensOnDrive is set to indicate that the lens is being driven.
= 1. In step 1302, the command speed DemR
pm is the maximum speed of the lens system LensMaxRp
It is checked by the following equation whether m does not exceed m.

【0106】 LensMaxRpm ≧ DemRpm ・・・・・ (5) 式(5)が成立している場合は、ステップ1304に進
む。また式(5)が不成立の場合は、ステップ1303
に進み、LensMaxRpmの値を指令速度DemR
pmにセットし、ステップ1304に進む。
LensMaxRpm ≧ DemRpm (5) If Expression (5) holds, the flow advances to Step 1304. If equation (5) is not satisfied, step 1303
To change the value of LensMaxRpm to the command speed DemR.
pm and proceed to step 1304.

【0107】ステップ1304では、駆動要求の方向を
調べる。駆動要求がCWの場合(fDemCwCcw=
1の場合)、ステップ1305にて、レンズを指令速度
DemRpmでCW方向に駆動開始する。そしてステッ
プ1306で、駆動方向を示すフラグfDrvCwCc
w=1とし、サブルーチンLensDriveStar
tを終了する。
In step 1304, the direction of the drive request is checked. When the drive request is CW (fDemCwCcw =
In the case of 1), in step 1305, the lens starts to be driven in the CW direction at the command speed DemRpm. Then, in step 1306, a flag fDrvCwCc indicating the driving direction is set.
w = 1, subroutine LensDriveStar
Terminates t.

【0108】また、ステップ1304でCCW方向に駆
動要求がある場合(fDemCwCcw=0の場合)、
ステップ1307にて、レンズを指令速度DemRpm
でCCW方向に駆動開始する。そしてステップ1308
で、駆動方向を示すフラグfDrvCwCcw=0と
し、サブルーチンLensDriveStartを終了
する。
If there is a drive request in the CCW direction in step 1304 (if fDemCwCcw = 0),
In step 1307, the lens is moved to the command speed DemRpm
To start driving in the CCW direction. And step 1308
Then, a flag fDrvCwCcw = 0 indicating the driving direction is set, and the subroutine LensDriveStart is ended.

【0109】図14にてサブルーチンCheckLen
sStopPosの説明を行う。
In FIG. 14, the subroutine CheckLen
sStopPos will be described.

【0110】ステップ1401で、現在の駆動方向を調
べる。駆動方向がCW(MOD方向)の場合(fDrv
CwCcw=1の場合)、ステップ1402に進み、停
止目標位置Ltargetから実際に停止するための停
止位置LstopPosを次式により算出する。
At step 1401, the current driving direction is checked. When the driving direction is CW (MOD direction) (fDrv
If CwCcw = 1), the process proceeds to step 1402, and a stop position LstopPos for actually stopping from the stop target position Ltarget is calculated by the following equation.

【0111】 LstopPos = Ltarget − StopOffset ・・・ ・・ (6) これはレンズを停止したときに、イナーシャや位置サン
プリングの遅れなどによるオーバーランを防止するため
に、少し手前で停止させることを目的としている。そし
てステップ1403で、LstopPosと現在位置L
Posとを次式により比較する。
LstopPos = Ltarget−StopOffset (6) This is for the purpose of stopping the lens slightly before the lens stops to prevent overrun due to inertia or delay in position sampling. I have. Then, in step 1403, LstopPos and the current position L
Pos is compared with the following equation.

【0112】 Lpos ≧ LstopPos ・・・・・ (7) ステップ1403にて、式(7)が成立した場合、レン
ズは停止目標位置に到達したとして、ステップ1406
に進み、停止目標位置到達フラグfReachPosS
top=1とし、サブルーチンCheckLensSt
opPosを終了する。
Lpos ≧ LstopPos (7) If Expression (7) is satisfied in Step 1403, it is determined that the lens has reached the target stop position, and Step 1406 is reached.
To the stop target position reaching flag fReachPosS
Top = 1, subroutine CheckLensSt
End opPos.

【0113】またステップ1403にて、式(7)が不
成立の場合、レンズは停止目標位置に到達していないと
し、ステップ1407に進み、停止目標位置到達フラグ
fReachPosStop=0とし、サブルーチンC
heckLensStopPosを終了する。ここで上
述したステップ1401における駆動方向がCCW(I
NF)の場合(fDrvCwCcw=0の場合)、ステ
ップ1404に進み、停止目標位置Ltargetから
実際に停止するための停止位置LstopPosを、上
述したようにレンズのオーバーラン防止のため、次式に
より算出する。
If the formula (7) is not satisfied in step 1403, it is determined that the lens has not reached the stop target position, the flow advances to step 1407, the stop target position reaching flag fReachPosStop = 0 is set, and the subroutine C
end the checkLensStopPos. Here, the driving direction in step 1401 is CCW (I
In the case of (NF) (if fDrvCwCcw = 0), the process proceeds to step 1404, and the stop position LstopPos for actually stopping from the stop target position Ltarget is calculated by the following equation in order to prevent overrun of the lens as described above. .

【0114】 LstopPos = Ltarget + StopOffset ・・・ ・・ (8) そして、ステップ1405で、LstopPosと現在
位置LPosとを次式により比較する。
LstopPos = Ltarget + StopOffset (8) Then, in step 1405, LstopPos is compared with the current position LPos by the following formula.

【0115】 Lpos ≦ LstopPos ・・・・・ (9) ステップ1405で、式(9)が成立した場合は、レン
ズは停止目標位置に到達したとして、ステップ1406
に進み、上記と同様の処理を経過し、サブルーチンCh
eckLensStopPosを終了する。
Lpos ≦ LstopPos (9) If Expression (9) is satisfied in Step 1405, it is determined that the lens has reached the target stop position, and Step 1406 is reached.
To the subroutine Ch
End eckLensStopPos.

【0116】また、ステップ1405で、式(9)が不
成立の場合、ステップ1407に進み、上記と同様の処
理を経過し、サブルーチンCheckLensStop
Posを終了する。
If the formula (9) is not satisfied in step 1405, the flow advances to step 1407 to execute the same processing as above, and to execute the subroutine CheckLensStop.
Exit Pos.

【0117】図15を用いて、サブルーチンReach
Posの説明を行う。
Referring to FIG. 15, a subroutine Reach will be described.
Pos will be described.

【0118】停止目標位置に到達したので、ステップ1
501でレンズを停止させる。そしてステップ1502
でレンズ駆動フラグfLensOnDrive=0と
し、停止目標位置到達フラグfTartgetPos=
1とする。
Since the stop target position has been reached, step 1
At 501, the lens is stopped. And step 1502
To set the lens drive flag fLensOnDrive = 0, and to set the stop target position reaching flag fTargetGetPos =
Let it be 1.

【0119】ステップ1503ではレンズのモードを調
べる。リモート・モードの場合(fRemoteLoc
al=1の場合)、ステップ1504で、目標位置到達
フラグ(fTartgetPos=1)をカメラ部にシ
リアル通信を用いて転送する。
In step 1503, the mode of the lens is checked. In remote mode (fRemoteLoc
If al = 1), in step 1504, the target position arrival flag (fTargetPos = 1) is transferred to the camera unit using serial communication.

【0120】さらにステップ1505にて、目標位置に
到達したことを示す表示を行い、サブルーチンReac
hPosを終了する。また、ステップ1503にて、ロ
ーカル・モードである場合(fRemoteLocal
=0の場合)、ステップ1505に進み、以下同様の処
理を経過し、サブルーチンReachPosを終了す
る。
Further, at step 1505, a display indicating that the target position has been reached is displayed, and a subroutine Reac
Exit hPos. If it is determined in step 1503 that the mode is the local mode (fRemoteLocal
In the case of = 0, the process proceeds to step 1505, and the same processing is performed thereafter, and the subroutine ReachPos ends.

【0121】図16を用いて、サブルーチンCheck
LensStsの説明を行う。
Referring to FIG. 16, subroutine Check
A description of LensSts will be given.

【0122】ステップ1601では、サブルーチンCa
lcRpmを呼び出し、現在のレンズ速度を算出する。
次にステップ1602では、サブルーチンCheckS
topを呼び出し、レンズの停止状態を調べる。ステッ
プ1603では、サブルーチンCheckDirを呼び
出し、レンズの駆動方向と実際の回転方向が同じかどう
かを調べる。そしてステップ1604では、サブルーチ
ンCheckRpmを呼び出し、現在の速度の状態を調
べる。
At step 1601, the subroutine Ca
Call lcRpm to calculate the current lens speed.
Next, in step 1602, the subroutine CheckS
Top is called to check the stop state of the lens. In step 1603, a subroutine CheckDir is called to check whether the driving direction of the lens and the actual rotation direction are the same. In step 1604, a subroutine CheckRpm is called to check the current speed state.

【0123】ここで、各サブルーチンでセットされたフ
ラグを調べる。まずステップ1605では、レンズの停
止状態を表すフラグfLensStopErrを調べ
る。fLensStopErr=1の場合、レンズは停
止していたと判断し、ステップ1609に進み、レンズ
が過誤差状態であるとし、fLensStsErr=1
として、サブルーチンCheckLensStsを終え
る。
Here, the flags set in each subroutine are checked. First, in step 1605, a flag fLensStopErr indicating the stopped state of the lens is checked. If fLensStopErr = 1, it is determined that the lens has stopped, and the flow advances to step 1609 to determine that the lens is in an excessive error state, and fLensStsErr = 1.
To end the subroutine CheckLensSts.

【0124】またステップ1605で、fLensSt
opErr=0の場合は、レンズは回転していると判断
され、ステップ1606に進む。ステップ1606で
は、レンズの回転方向の異常を表すフラグfLensI
nvErrを調べる。fLensInvErr=1の場
合、レンズの回転方向に異常があったと判断し、ステッ
プ1609に進む。
In step 1605, fLensSt
If opErr = 0, it is determined that the lens is rotating, and the flow advances to step 1606. In step 1606, a flag fLensI indicating an abnormality in the rotation direction of the lens is set.
Check nvErr. If fLensInvErr = 1, it is determined that there is an abnormality in the rotation direction of the lens, and the process proceeds to step 1609.

【0125】fLensInvErr=0の場合は、レ
ンズの回転方向が正常であると判断されるので、ステッ
プ1607に進む。ステップ1607では、レンズの速
度の異常を表すフラグfLensRpmErrを調べ
る。fLensRpmErr=1の場合、レンズの速度
に異常が発生したと判断されるため、ステップ1609
に進む。
If fLensInvErr = 0, it is determined that the rotation direction of the lens is normal, and the flow advances to step 1607. In step 1607, a flag fLensRpmErr indicating an abnormality of the lens speed is checked. If fLensRpmErr = 1, it is determined that an abnormality has occurred in the lens speed.
Proceed to.

【0126】fLensRpmErr=0の場合は、速
度が正常であると判断されたため、ステップ1608に
進む。ステップ1608では、レンズは正常に動作して
いると判断され、fLensStsErr=0として、
サブルーチンCheckLensStsを終了する。
When fLensRpmErr = 0, it is determined that the speed is normal, and the flow advances to step 1608. In step 1608, it is determined that the lens is operating normally, and fLensStsErr = 0, and
The subroutine CheckLensSts ends.

【0127】図17を用いてサブルーチンCalcRp
mを説明する。
Using FIG. 17, subroutine CalcRp
m will be described.

【0128】ステップ1701では、以下の式によりレ
ンズの現在の速度を算出する。
In step 1701, the current speed of the lens is calculated by the following equation.

【0129】 CurRpm = (Lpos−Lpos0)/(T1―Tpos0) ・・ ・ (10) ステップ1702では、次回の計算のための準備を行
う。
CurRpm = (Lpos-Lpos0) / (T1-Tpos0) (10) In step 1702, preparations are made for the next calculation.

【0130】 現在時刻の保存 Tpos0 = T1 現在位置の保存 Lpos0 = Lpos ステップ1703では、次式によりステップ1701で
算出された現在速度の符号を調べる。
Storage of current time Tpos0 = T1 Storage of current position Lpos0 = Lpos In step 1703, the sign of the current speed calculated in step 1701 by the following equation is checked.

【0131】 CurRpm > 0 ・・・・・ ( 11) 式(11)が成立した場合、レンズはCW(MOD)方
向に回転しているものとし、ステップ1705に進み、
fCurCwCcw=1として、サブルーチンCalc
Rpmを終了する。式(11)が不成立の場合、レンズ
はCW(INF)方向に回転しているものとし、ステッ
プ1704に進み、fCurCwCcw=0として、サ
ブルーチンCalcRpmを終了する。
CurRpm> 0 (11) If Expression (11) holds, it is assumed that the lens is rotating in the CW (MOD) direction, and the flow proceeds to step 1705.
Assuming that fCurCwCcw = 1, the subroutine Calc
Exit Rpm. If Expression (11) is not satisfied, it is assumed that the lens is rotating in the CW (INF) direction, the flow proceeds to step 1704, and fCurCwCcw = 0, and the subroutine CalcRpm ends.

【0132】図18を用いてサブルーチンCheckS
topを説明する。
A subroutine CheckS will be described with reference to FIG.
The top will be described.

【0133】ステップ1801では前回調べた位置Ls
top0と今回サンプリングした位置Lposの比較を
行う。一致していない場合、ステップ1802に進み、
次回のチェックのための準備を行う。
In step 1801, the position Ls checked last time
A comparison is made between top0 and the position Lpos sampled this time. If not, proceed to step 1802,
Prepare for the next check.

【0134】 現在位置の保存 Lstop0 = Lpos 現在時刻の保存 Tpos0 = T1 そしてステップ1806に進み、レンズは停止していな
いとして、fLensStopErr=0として、サブ
ルーチンCheckStopを終了する。
Save current position Lstop0 = Lpos Save current time Tpos0 = T1 Then proceed to step 1806, assuming that the lens has not stopped, set fLensStopErr = 0, and end the subroutine CheckStop.

【0135】またステップ1801で前回調べた位置L
stop0と今回サンプリングした位置Lposが一致
している場合、ステップ1804に進み、次式により停
止時間を算出する。
In step 1801, the position L previously checked
If stop0 and the currently sampled position Lpos match, the process proceeds to step 1804, and the stop time is calculated by the following equation.

【0136】 Tstop = T1 ― Tstop0 ・・・・・ (12) そしてステップ1805に進み、算出された停止時間T
stopと停止検出用基準時間TstopStdとの比
較を次式により行う。
Tstop = T1−Tstop0 (12) Then, the process proceeds to step 1805, where the calculated stop time T is calculated.
The stop and the stop detection reference time TstopStd are compared by the following equation.

【0137】 Tstop ≧ TstopStd ・・・・・ (13) 式(13)が不成立の場合、レンズは動いているとし
て、ステップ1806に進む。また式(13)が成立の
場合、ステップ1807に進み、レンズが停止している
とし、フラグfLensStopErr=1として、サ
ブルーチンCheckStopを終了する。
Tstop ≧ TstopStd (13) If Expression (13) is not satisfied, it is determined that the lens is moving, and the process proceeds to Step 1806. If Expression (13) is satisfied, the flow advances to step 1807 to determine that the lens is stopped, set the flag fLensStopErr = 1, and end the subroutine CheckStop.

【0138】図19を用いてサブルーチンCheckD
irを説明する。
Using the subroutine CheckD with reference to FIG.
ir will be described.

【0139】ステップ1901では、駆動方向フラグf
DrvCwCcwと現在の回転方向フラグfCurCw
Ccwの一致性を調べる。一致している場合、駆動方向
にレンズは回転しているので、ステップ1905に進
み、次回のチェックのための準備をする。
In step 1901, the driving direction flag f
DrvCwCcw and current rotation direction flag fCurCw
Check Ccw for consistency. If they match, the lens is rotating in the drive direction, so the process proceeds to step 1905 to prepare for the next check.

【0140】 現在時刻の保存 Tinv0 = T1 ・・・・・ (14) ステップ1906ではレンズの回転方向に異常はないと
して、フラグfLensInvErr=0とし、サブル
ーチンCheckDirを終了する。
Saving the current time Tinv0 = T1 (14) In step 1906, it is determined that there is no abnormality in the rotation direction of the lens, the flag fLensInvErr is set to 0, and the subroutine CheckDir is ended.

【0141】ステップ1901で、駆動方向フラグfD
rvCwCcwと現在の回転方向フラグfCurCwC
cwが一致していない場合、ステップ1902に進み、
回転方向の異常時間を次式により算出する。
At step 1901, the driving direction flag fD
rvCwCcw and current rotation direction flag fCurCwC
If cw does not match, proceed to step 1902,
The abnormal time in the rotation direction is calculated by the following equation.

【0142】 Tinv = T1 ― Tinv0 ・・・・・ (15) 次にステップ1903で、回転方向異常時間Tinvと
逆移動検出用基準時間TinvStdとの比較を次式に
より行なう。 Tinv ≧ TinvStd ・・・・・ (16) ステップ1903で、式(16)が不成立の場合、回転
方向の異常時間が基準時間以内なので、ステップ190
6に進む。
Tinv = T1−Tinv0 (15) Next, in step 1903, a comparison is made between the abnormal rotational direction time Tinv and the reference time TinvStd for reverse movement detection by the following equation. Tinv ≧ TinvStd (16) In step 1903, if the equation (16) is not satisfied, the abnormal time in the rotation direction is within the reference time, so step 190
Proceed to 6.

【0143】ステップ1903で式(16)が成立した
場合、回転方向の異常時間が基準時間以上経過したの
で、回転方向異常が発生したとして、ステップ1904
で、フラグfLensInvErr=1とし、サブルー
チンCheckDirを終了する。
If the equation (16) is satisfied in step 1903, the abnormal time in the rotational direction has passed the reference time or more, so it is determined that an abnormal rotational direction has occurred, and step 1904 is considered.
Then, the flag fLensInvErr = 1 is set, and the subroutine CheckDir is ended.

【0144】図20を用いてサブルーチンCheckR
pmの説明を行う。
The subroutine CheckR will be described with reference to FIG.
pm will be described.

【0145】ステップ2001では、指令速度DemR
pmに対する速度誤差基準速度RpmErrStdを次
式により算出する。
In step 2001, the command speed DemR
The speed error reference speed RpmErrStd with respect to pm is calculated by the following equation.

【0146】 RpmErrStd = ABS(DemRpm × RpmErrRatio) ・・・・・ (17) ステップ2002では、指令速度DemRpmと現在速
度CurRpmとの速度誤差RpmErrを次式により
算出する。
RpmErrStd = ABS (DemRpm × RpmErrRatio) (17) In step 2002, a speed error RpmErr between the command speed DemRpm and the current speed CurRpm is calculated by the following equation.

【0147】 RpmErr = ABS(DemRpm ― CurRpm) ・・・・・ (18) ステップ2003では、速度誤差基準速度RpmErr
Stdと速度誤差RpmErrとの比較を次式にて行
う。
RpmErr = ABS (DemRpm−CurRpm) (18) In step 2003, the speed error reference speed RpmErr
A comparison between Std and the speed error RpmErr is performed by the following equation.

【0148】 RpmErrStd ≧ RpmErr ・・・・・ (19) ステップ2003で式(19)が成立した場合(速度誤
差が小さいと見なされる場合)、速度誤差異常が発生し
たとみなさず、ステップ2007で、次回のチェックの
ための準備を行う。
RpmErrStd ≧ RpmErr (19) When Expression (19) is satisfied in Step 2003 (when the speed error is considered to be small), it is not considered that a speed error abnormality has occurred, and in Step 2007, Prepare for the next check.

【0149】現在時間の保存 Trpm0 = T1 そして、ステップ2008で速度異常が発生していない
として、フラグfLensRpmErr=0とし、サブ
ルーチンCheckRpmを終了する。
Save current time Trpm0 = T1 Then, in step 2008, it is determined that no speed abnormality has occurred, the flag fLensRpmErr = 0, and the subroutine CheckRpm is terminated.

【0150】ステップ2003で式(19)が不成立の
場合(速度誤差が大きいと見なされる場合)、ステップ
2004で、不成立時間を次式にて算出する。
If equation (19) is not satisfied in step 2003 (if the speed error is considered to be large), in step 2004, the unsatisfied time is calculated by the following equation.

【0151】 Trpm = T1 ― Trpm0 ・・・・・ (20) ステップ2005で、算出された速度異常時間Trpm
と速度誤差異常検出用基準時間TrpmStdとの比較
を次式にて行う。 Trpm ≧ TrpmStd ・・・・・ (21) ステップ2005で、式(21)が不成立の場合、速度
の異常時間が基準時間以内なのでステップ2008に進
む。ステップ2005で式(21)が成立した場合、速
度の異常時間が基準時間を越えたので、速度異常が発生
したとして、ステップ2006に進み、フラグfLen
sRpmErr=1とし、サブルーチンCheckRp
mを終了する。
Trpm = T1−Trpm0 (20) The speed abnormal time Trpm calculated in step 2005
The speed error abnormality detection reference time TrpStd is compared with the following formula. Trpm ≧ TrpmStd (21) In step 2005, if the formula (21) is not satisfied, the process proceeds to step 2008 because the abnormal speed time is within the reference time. If Expression (21) is satisfied in step 2005, the abnormal speed time has exceeded the reference time, so that it is determined that a speed abnormality has occurred, and the process proceeds to step 2006 and the flag fLen
sRpmErr = 1, subroutine CheckRp
Exit m.

【0152】図21を用いて、サブルーチンOverE
rrorを説明する。
Referring to FIG. 21, subroutine OverE
rr will be described.

【0153】ステップ2101で、レンズを停止する。
ステップ2102で、過誤差状態で停止したことを示す
表示を行う。ステップ2103で、フラグ処理を行う。
In step 2101, the lens is stopped.
In step 2102, a display indicating that the operation has stopped in an excessive error state is performed. In step 2103, a flag process is performed.

【0154】 レンズ駆動中フラグ fLensOnDrive=0 レンズ・マニュアル・フラグ fLensManual=1 ステップ2104で、レンズがリモートモード/ローカ
ル・モードのチェックを行う。リモート・モードの場合
(fRemoteLocal=1の場合)、レンズがマ
ニュアル・モードになったことを知らせるために、ステ
ップ2105で、マニュアル・モード・フラグ(fLe
nsManual=1)をシリアル通信を用いて、カメ
ラに転送する。
Lens driving flag fLensOnDrive = 0 Lens manual flag fLensManual = 1 In step 2104, the lens checks the remote mode / local mode. In the case of the remote mode (when fRemoteLocal = 1), the manual mode flag (fLe) is set in step 2105 to notify that the lens has entered the manual mode.
nsManual = 1) to the camera using serial communication.

【0155】ステップ2104で、ローカル・モードの
場合(fRemoteLocal=0の場合)、ステッ
プ2106にて、マニュアル・モード解除用データとし
て、停止目標位置LtargetをDemandMan
uとし保存し、サブルーチンOverErrorを終了
する。
In step 2104, in the case of the local mode (when fRemoteLocal = 0), in step 2106, the stop target position Ltarget is set as DemandMan as data for releasing the manual mode.
Save as u, and terminate the subroutine OverError.

【0156】ここで、ローカル・モードの場合、停止目
標位置LtargetをDemandManuとして保
存したが、改めてデマンド情報を入力し直して、Dem
andManuとして保存しても同じ効果が得られる。
Here, in the case of the local mode, the stop target position Ltarget is stored as DemandManu.
The same effect can be obtained by saving as andManu.

【0157】図22を用いてサブルーチンLocalC
mdInの説明を行う。
A subroutine LocalC will be described with reference to FIG.
mdIn will be described.

【0158】ステップ2201でデマンド指令を入力す
る。ステップ2202では、入力したデマンド指令から
フォーカス・レンズ位置指令DemandPosを算出
する。これはデマンド指令がレンズ移動量に一致すると
は限らないための補正である。例えば、デマンド入力を
する際にA/D変換器(10bit)を用いた場合、A
/D変換器のレンジは0〜1024になる。ところがフ
ォーカス・レンズの全域移動範囲は0〜10000であ
る。そこで DemandPos = A/D変換値 × 1000
0 ÷ 1024 という変換式を用いてDemandPosを算出すれば
良い。
At step 2201, a demand command is input. In step 2202, a focus / lens position command DemandPos is calculated from the input demand command. This is a correction because the demand command does not always coincide with the lens movement amount. For example, when an A / D converter (10 bits) is used when performing demand input, A
The range of the / D converter is 0 to 1024. However, the entire range of movement of the focus lens is 0 to 10,000. Therefore, DemandPos = A / D conversion value × 1000
DemandPos may be calculated using a conversion formula of 0 ÷ 1024.

【0159】ステップ2203では、レンズがマニュア
ル・モードかサーボ・モードかの判断を行う。サーボ・
モードの場合(fLensManual=0の場合)、
ステップ2204に進み、目標速度DemandRpm
に仮速度TempLensRpmをセットする。
In step 2203, it is determined whether the lens is in the manual mode or the servo mode. The servo·
In the case of the mode (when fLensManual = 0),
Proceeding to step 2204, the target speed DemandRpm
Is set to the temporary speed TempLensRpm.

【0160】ステップ2205では、フォーカス位置指
令DemandPosを停止目標位置Ltarget
に、目標速度DemandRpmを指令速度DemRp
mにそれぞれセットし、レンズ制御信号として使用す
る。その有効範囲をチェックするために、ステップ22
06に進み、サブルーチンLTargetLmtを呼び
出す。
In step 2205, the focus position command DemandPos is changed to the stop target position Ltarget.
In addition, the target speed DemandRpm is changed to the command speed DemRp
m and used as lens control signals. Step 22 to check its scope
In step 06, the subroutine LTargetLmt is called.

【0161】さらにステップ2207ではレンズ制御指
令の準備が整ったとして、フラグfReadyLens
Cmd=1とし、サブルーチンLocalCmdInを
終了する。
In step 2207, it is determined that the lens control command is ready, and the flag fReadyLens is set.
Cmd = 1, and the subroutine LocalCmdIn ends.

【0162】ステップ2203で、マニュアル・モード
と判断された場合(fLensManual=1の場
合)、ステップ2208で、次式によりデマンド操作量
を算出する。
If it is determined in step 2203 that the mode is the manual mode (if fLensManual = 1), in step 2208, the demand operation amount is calculated by the following equation.

【0163】 DemandMove = ABS(DemandPos ―DemandManu) ・・・ (22) ステップ2209は、式(22)で算出されたデマンド
操作量DemandMoveとマニュアル・モード解除
デマンド操作量DemandServoとの比較を次式
で行う。
DemandMove = ABS (DemandPos−DemandManu) (22) In step 2209, the demand operation amount DemandMove calculated by equation (22) is compared with the manual mode release demand operation amount DemandServo by the following equation. .

【0164】 DemandMove ≧ DemandServo ・・・・・(23) ステップ2209式(23)が成立した場合、デマンド
操作量が十分あったと判断し、ステップ2211に進
み、フラグfLensManual=0とし、サーボ・
モードにセットする。そしてステップ2204に進む。
DemandMove ≧ DemandService... (23) If the expression (23) is satisfied in step 2209, it is determined that the demand operation amount is sufficient, and the flow advances to step 2211 to set the flag fLensManual = 0 and set the flag fLensManual = 0.
Set the mode. Then, the process proceeds to step 2204.

【0165】ステップ2209で、式(23)が不成立
の場合、デマンド操作量が十分でないとして、マニュア
ル・モードを解除しなため、ステップ2210でフラグ
fReadyLensCmd=0として、サブルーチン
LocalCmdInを終了する。
If the expression (23) is not satisfied in step 2209, the demand operation amount is not sufficient, and the manual mode is not released. In step 2210, the flag fReadyLensCmd = 0 is set, and the subroutine LocalCmdIn is ended.

【0166】図29を用いてサブルーチンLtarge
tLmtの説明を行う。
Using the subroutine Ltarget with reference to FIG.
A description will be given of tLmt.

【0167】ステップ2901では、以下の式により停
止目標位置Ltargetの下限を調べる。
In step 2901, the lower limit of the stop target position Ltarget is checked by the following equation.

【0168】 Ltarget ≧ 0 ・・・・・ (30) ステップ2901で、式(30)が成立しなかった場
合、下限を越えているためステップ2903にて、停止
目標位置Ltargetに0をセットし、サブルーチン
LtargetLmt終了する。
Ltarget ≧ 0 (30) If the equation (30) is not satisfied in step 2901, since the lower limit is exceeded, in step 2903, 0 is set to the stop target position Ltarget, and The subroutine LtargetLmt ends.

【0169】またステップ2901で式(30)が成立
した場合、ステップ2902にて、次式により上限をチ
ェックする。
If equation (30) is satisfied in step 2901, the upper limit is checked in step 2902 by the following equation.

【0170】 LTarget ≦ 10000 ・・・・・ (31) ステップ2902で式(31)が成立しなかった場合、
ステップ2904にて、停止目標位置Ltargetに
10000をセットし、サブルーチンLtargetL
mtを終了する。
LTarget ≦ 10000 (31) If Expression (31) is not satisfied in Step 2902,
In step 2904, 10000 is set as the stop target position Ltarget, and the subroutine LtargetL is set.
mt ends.

【0171】また、ステップ2902にて、式(31)
が成立した場合、停止目標位置Ltargetは、レン
ズ制御範囲内にあるため、そのまま使用することとし、
サブルーチンLtargetLmtを終了する。
In step 2902, the equation (31) is obtained.
Is satisfied, the stop target position Ltarget is within the lens control range, and therefore is used as it is.
The subroutine LtargetLmt ends.

【0172】ここで図28を用いて、端処理について説
明する。
Here, the edge processing will be described with reference to FIG.

【0173】前提条件として、上記にINF端を0、M
OD端を10000とし、フォーカス・レンズの移動位
置を仮定したが、これは実際にフォーカス・レンズが移
動する値であっても良く、一方、レンズによって実際の
移動量は異なる場合があるため、レンズ部とカメラ部の
取り決めによって正規化された値であっても良い。
As preconditions, the INF end is 0, M
Although the OD end is assumed to be 10000 and the movement position of the focus lens is assumed, this may be a value at which the focus lens actually moves. On the other hand, the actual movement amount may differ depending on the lens. It may be a value normalized by agreement between the unit and the camera unit.

【0174】また初期化データとして、このINF端と
MOD端の値をレンズ部とカメラ部の通信を用いて情報
交換しても良い。
As the initialization data, the values of the INF end and the MOD end may be exchanged using communication between the lens unit and the camera unit.

【0175】すなわち、このフォーカス・レンズの位置
の値は、INF端を基準として(例えば、0)、MOD
端の値(例えば、10000)という値をとる、という
情報をレンズ部からカメラ部へ転送することで、カメラ
部はフォーカス・レンズがどの位置に移動させたいかを
判断することができるようになる。
That is, the value of the position of the focus lens is MOD based on the INF end (for example, 0).
By transferring the information of taking the value of the edge (for example, 10000) from the lens unit to the camera unit, the camera unit can determine which position the focus lens wants to move. .

【0176】ところで、フォーカス・レンズの移動可能
範囲は図28のようになっている。すなわち、INF側
では、aメカ端2801、aサーボ端2802、a光学
端2803が存在し、MOD側にも同様にbメカ端28
04、bサーボ端2805、b光学端2806が存在す
る。
The movable range of the focus lens is as shown in FIG. That is, on the INF side, there are a mechanical end 2801, a servo end 2802, and a optical end 2803, and similarly on the MOD side, the b mechanical end
04, b servo end 2805, b optical end 2806.

【0177】ここで、光学端に対してレンズが移動でき
る範囲が広いのは、製造誤差などがあっても、仕様上の
データを満足するために余裕を設けていることによる。
よって、手動操作部でレンズを操作した場合は、INF
側のaメカ端2801とMOD側のbメカ端2804の
間を移動可能であり、サーボ操作をした場合は、INF
側のaサーボ端2802とMOD側のbサーボ端280
5の間を移動可能となる。
Here, the reason why the range in which the lens can be moved with respect to the optical end is wide is that a margin is provided to satisfy the specification data even if there is a manufacturing error.
Therefore, when the lens is operated with the manual operation unit, the INF
Side can be moved between the mechanical end 2801 on the side MOD and the mechanical end 2804b on the MOD side.
Side a servo end 2802 and MOD side b servo end 280
5 can be moved.

【0178】また、カメラ指令やデマンド指令によるレ
ンズの駆動はサーボ・モードであるので、INF側のa
サーボ端2802とMOD側のbサーボ端2805の間
を移動することになる。
Further, since the lens driving by the camera command or the demand command is in the servo mode, the INF side a
It moves between the servo end 2802 and the b servo end 2805 on the MOD side.

【0179】ここで、INF側のaサーボ端2802の
位置を0、MOD側のbサーボ端2805の位置を10
000とする。このとき、INF側のaメカ端2801
の位置は、−100、a光学端2803の位置は10
0、MOD側のbメカ端2804の位置は10100、
b光学端2806の位置は9900に相当するものとす
る。
Here, the position of the a servo end 2802 on the INF side is 0, and the position of the b servo end 2805 on the MOD side is 10
000. At this time, the a mechanical end 2801 on the INF side
Is -100, and the position of the optical end 2803 is 10
0, the position of the mechanical end 2804 on the MOD side is 10100,
It is assumed that the position of the b optical end 2806 corresponds to 9900.

【0180】このように位置設定をすることで、光学性
能の仕様がマニュアル・モードでもサーボ・モードでも
満足することになる。
By setting the position in this way, the specifications of the optical performance are satisfied in both the manual mode and the servo mode.

【0181】ここで、マニュアル・モードでフォーカス
・レンズが2つのサーボ端間の範囲を越えてしまった場
合を考える。例えばINF側において、レンズの位置が
−50の位置にいるものとする。この状態において、サ
ーボ・モードに切り替えられ、レンズの位置指令が0で
あったとする。
Here, consider a case where the focus lens has exceeded the range between the two servo ends in the manual mode. For example, on the INF side, it is assumed that the position of the lens is at the position of -50. In this state, it is assumed that the mode is switched to the servo mode and the lens position command is 0.

【0182】この場合、レンズは、INF側のaサーボ
端2802まで移動しなければならない。MOD側でも
同様な場合が考えられる。
In this case, the lens must move to the a servo end 2802 on the INF side. A similar case can be considered on the MOD side.

【0183】すなわち、例えば、レンズがマニュアル・
モードにおいて手動操作部によりbサーボ端2805と
bメカ端2804との間の10050の位置に存在して
いるときに、サーボ・モードになり、位置指令がMOD
側のbサーボ端2805の位置である10000という
位置指令が来た場合である。このときレンズがサーボ端
に移動してしまうとピントが合っている被写体が非合焦
になってしまうことが起きる。
That is, for example, if the lens is
In the mode, when the manual operation unit exists at the position of 10050 between the b servo end 2805 and the b mechanical end 2804, the servo mode is set and the position command is set to MOD.
This is a case where a position command of 10000, which is the position of the b servo end 2805 on the side, is received. At this time, if the lens moves to the servo end, an in-focus subject may be out of focus.

【0184】それを防ぐために、マニュアル・モードで
フォーカス・レンズがサーボ端間に存在しない場合にお
いて、サーボ・モードに移行した場合、同じ物体距離側
の端へ移動するための位置指令(INF側のaサーボ端
2802とaメカ端2801にレンズが存在していた場
合は、INF側のaサーボ端2802に移動する位置指
令、また、MOD側のbサーボ端2805とbメカ端2
804にレンズが存在していた場合は、MOD側のbサ
ーボ端2804に移動する位置指令)が来た場合は、フ
ォーカス・レンズを駆動しなければよい。これによりマ
ニュアル・モードからサーボ・モードに移行した場合に
不用意なピント移動がなくなる。
To prevent this, in the manual mode, when the focus lens does not exist between the servo ends, when the mode is shifted to the servo mode, the position command (the INF side) for moving to the same object distance side end is obtained. If a lens exists at the a servo end 2802 and the a mechanical end 2801, a position command to move to the a servo end 2802 on the INF side, and the b servo end 2805 and the b mechanical end 2 on the MOD side
If a lens is present at 804, a position command to move to the b servo end 2804 on the MOD side) is received, and the focus lens need not be driven. This eliminates inadvertent focus movement when shifting from the manual mode to the servo mode.

【0185】また、サーボ・モードにおいて、サーボ端
に移動する位置指令でフォーカス・レンズが移動して停
止した場合に、オーバーランが発生することが考えられ
る。この場合も同様な処理をすることで、不用意なピン
ト移動を防げる。
In the servo mode, when the focus lens moves and stops at the position command to move to the servo end, an overrun may occur. In this case, by performing the same processing, careless focus movement can be prevented.

【0186】ここでフォーカス・フォローについて説明
する。
Now, focus follow will be described.

【0187】レンズ内部処理ではフォーカス位置は両メ
カ端間の値をカウントしなければ、サーボ端でのオーバ
ーランやマニュアル・モードでのレンズ位置の確認がで
きなくなる。
In the lens internal processing, if the focus position does not count the value between both mechanical ends, overrun at the servo end and confirmation of the lens position in the manual mode cannot be performed.

【0188】しかし、カメラ部がフォーカス位置を確認
する必要があり、シリアル通信によりフォーカス・フォ
ローを要求してきた場合、レンズ部がサーボ端間以外の
値をカメラ部に返すと、フォーカス・レンズに異常があ
ったと誤認する可能性がある。
However, if the camera unit needs to confirm the focus position and requests focus follow through serial communication, if the lens unit returns a value other than that between the servo ends to the camera unit, the focus lens becomes abnormal. May be mistaken for

【0189】そこで、サーボ端間をオーバーした場合に
は、フォーカス・フォローに関してはサーボ端の値でリ
ミットを設けることで解決できる。すなわち、フォーカ
ス・レンズがINF側で−10の位置にいた場合、レン
ズ部がフォーカス・フォローをカメラ部に転送する場
合、0にして転送することになる。MOD側でも同様で
ある。
Therefore, when the distance between the servo ends is exceeded, the focus follow can be solved by providing a limit with the value of the servo end. That is, when the focus lens is located at the position -10 on the INF side, when the lens unit transmits the focus follow to the camera unit, the focus follow is set to 0 and transmitted. The same applies to the MOD side.

【0190】速度指令優先について説明する。通常ある
目標位置までレンズが移動する場合、ある速度パターン
で移動することになる。このときレンズが移動中に現在
位置で停止したい場合が発生したとする。レンズのフォ
ロー情報より現在位置を指令値として与えることで、そ
の位置で停止することになるが、指令の遅れなどにより
レンズが逆方向に戻ることが発生することがあるため、
レンズが振動モードに入ってしまう可能性がある。
The speed command priority will be described. Usually, when the lens moves to a certain target position, it moves with a certain speed pattern. At this time, it is assumed that a case occurs where the user wants to stop at the current position while the lens is moving. By giving the current position as a command value from the follow information of the lens, it will stop at that position, but the lens may return in the opposite direction due to a delay in the command, etc.
The lens may enter vibration mode.

【0191】それを防止するために速度ゼロ指令により
停止指令とするのである。この指令が来た場合は、位置
のフィードバックを無視し、レンズを停止することのみ
を行う。これによりレンズが振動モードに入ることを防
げることになる。また、レンズが停止している場合に速
度ゼロ指令が来た場合には、レンズ駆動は行わないこと
になる。
In order to prevent this, a stop command is issued by a zero speed command. When this command is received, the position feedback is ignored and only the lens is stopped. This prevents the lens from entering the vibration mode. If a zero speed command is received while the lens is stopped, the lens is not driven.

【0192】ここで、今回ような通信機能をもつレンズ
が通信機能をもたないカメラに付いた場合について説明
する。
Here, a case in which a lens having a communication function like this time is attached to a camera having no communication function will be described.

【0193】図27に示すように通信機能を持つレンズ
が通信機能を持たないカメラに付く場合と通信機能を持
つカメラに付く場合が考えられる。通信機能をもつレン
ズと通信機能を持たないカメラが組み合わされた場合
は、R/L−SW112がオン状態で、リモート・モー
ドに設定されていると、デマンド操作でレンズが動作し
なくなってしまう。システムによっては、R/L−SW
112がカメラ部にも存在して通信機能でリモート・モ
ード/ローカル・モードを設定することも考えられる。
このとき、レンズ部が電源オン後にリモート・モードに
設定されていると、デマンド操作ではレンズが動作しな
くなってしまう。
As shown in FIG. 27, a lens having a communication function may be attached to a camera having no communication function or a camera having a communication function. When a lens having a communication function and a camera having no communication function are combined, if the R / L-SW 112 is turned on and the remote mode is set, the lens will not operate due to demand operation. Depending on the system, R / L-SW
It is also conceivable that 112 is also provided in the camera unit to set the remote mode / local mode by the communication function.
At this time, if the lens unit is set to the remote mode after the power is turned on, the lens will not operate in the demand operation.

【0194】そこで、レンズ部は電源オン直後はローカ
ル・モードに設定されるようにすればよい。さらに、レ
ンズ部にあるR/L−SW112をカメラ部に通信機能
があると確認できた時点で有効とすれば、R/L−SW
112がリモート・モードに設定されていても、電源オ
ン直後はローカル・モードに設定されるため、上記問題
は解決される。また電源オン直後がマニュアル・モード
になっている場合は、デマンド操作によるマニュアル・
モードからサーボ・モードへの移行が必要となるため、
デマンド操作の不感帯による操作感の違和感がでてく
る。
Therefore, the lens unit may be set to the local mode immediately after the power is turned on. Further, if the R / L-SW 112 in the lens unit is validated when it is confirmed that the camera unit has a communication function, the R / L-SW
Even if 112 is set to the remote mode, the above-mentioned problem is solved because the local mode is set immediately after the power is turned on. If the manual mode is set immediately after the power is turned on, the manual
Mode must be changed to servo mode.
The sense of incongruity of the operation due to the dead zone of the demand operation comes out.

【0195】そこで、電源オン直後はサーボ・モードに
設定されていれば、デマンドで指定されている位置にレ
ンズが移動することになり、マニュアル・モードの解除
によるデマンド操作の違和感がなくなる。
Therefore, if the servo mode is set immediately after the power is turned on, the lens moves to the position specified by the demand, and the sense of inconsistency in the demand operation due to the release of the manual mode is eliminated.

【0196】ここでレンズ部とカメラ部との通信内容と
レンズ部の通信機能有効タイミングについて説明する。
Here, the communication contents between the lens unit and the camera unit and the effective timing of the communication function of the lens unit will be described.

【0197】一般的に電源投入(パワーオン・リセッ
ト)直後における、CPU以外の周辺ICの機能やCP
U内蔵の周辺機能(たとえばシリアル通信機能など)
は、禁止状態になっているものが多い。そこで今回使用
しているシリアル通信機能も電源投入直後は、禁止状態
になっていることを前提とする。
Generally, immediately after power-on (power-on reset), the functions of peripheral ICs other than the CPU and the CP
U built-in peripheral functions (for example, serial communication function)
Are often prohibited. Therefore, it is assumed that the serial communication function used this time is in the disabled state immediately after the power is turned on.

【0198】カメラ部ではレンズ部の情報を用いて画像
データの補正などを行うことがある。レンズ部のワイド
端の焦点距離情報や、テレ端の焦点距離情報、エクステ
ンダの種類情報などの固定情報もある。
The camera unit sometimes corrects image data using information of the lens unit. There is also fixed information such as focal length information at the wide end of the lens unit, focal length information at the telephoto end, and extender type information.

【0199】ところが、今回のフォーカス・レンズのよ
うに相対値出力をもつエンコーダを使用した場合には、
前述したように絶対位置情報を得るためにはフォーカス
・レンズ位置の初期化が必要になる。また、アイリス
(IRIS)は絶対値で位置情報が分かるように絶対値
出力をもつエンコーダを使用してサーボ系を構成してい
るものとする。
However, when an encoder having a relative value output is used as in the present focus lens,
As described above, in order to obtain the absolute position information, it is necessary to initialize the focus / lens position. Also, the iris (IRIS) is assumed to constitute a servo system using an encoder having an absolute value output so that the position information can be known by an absolute value.

【0200】このような状況では、シリアル通信により
固定データやIRISの位置情報がカメラ部から要求さ
れてもすぐに応答可能であるが、フォーカス・レンズの
場合は、初期化が終了するまでフォーカス・フォロー値
をカメラ部に返すことができないため、カメラ部の要求
に応えられるものと応えられないのもが存在してしまう
ことになる。
In such a situation, even if fixed data or IRIS position information is requested from the camera unit by serial communication, it is possible to respond immediately, but in the case of a focus lens, the focus lens is kept until the initialization is completed. Since the follow value cannot be returned to the camera unit, there are some that can meet the request of the camera unit and some that cannot.

【0201】このとき、カメラ部の要求に応答できるも
のとできないものが存在するため、レンズ部が異常であ
ると誤解する可能性がある。そこでレンズ部の初期化が
すべて終了するまでは、通信機能をディスエーブル状態
にするか、あるいはすべて無視すればよい。すなわちカ
メラ部の要求に対してすべて応答できるようになるまで
は、送信しないようにするのである。以上を簡単にまと
めると、相対値出力のレンズの絶対位置が確定し初期化
が完了するまでは、 設定(1) 通信機能そのものを禁止状態にしておく 設定(2) 転送可能な情報がある場合でも、送信禁止
に状態にしておく 設定(3) カメラ部からの要求指令を受信禁止状態に
しておく これらの組み合わせによりカメラ部はレンズ部が異常で
あると誤認することがなくなる。
At this time, there is a camera that can respond to the request of the camera unit and a camera unit that cannot respond to the request, so that there is a possibility that the lens unit may be misunderstood as being abnormal. Therefore, the communication function may be disabled or all may be ignored until all the lens units have been initialized. That is, transmission is not performed until all requests from the camera unit can be responded. In summary, the setting (1) keeps the communication function disabled until the absolute position of the lens for relative value output is determined and initialization is completed. Setting (2) When there is information that can be transferred However, the transmission is prohibited. Setting (3) The request command from the camera is set to the reception prohibited state. By combining these, the camera does not mistakenly recognize that the lens is abnormal.

【0202】これをフローで説明すると、設定(1)は
図5に相当する。設定(2)及び設定(3)の図示は省
略するが、設定(2)の条件では、図5におけるステッ
プ502の後に、受信機能のみを許可し、ステップ50
4で送信機能を許可すればよい。また、設定(3)の条
件では、図5におけるステップ502の後に、送信機能
のみを許可し、ステップ504で受信機能を許可すれば
よいわけである。
This will be described with reference to a flowchart. Setting (1) corresponds to FIG. Although illustration of the setting (2) and the setting (3) is omitted, only the receiving function is permitted after the step 502 in FIG.
In step 4, the transmission function may be permitted. Further, under the condition of the setting (3), only the transmission function may be permitted after the step 502 in FIG. 5, and the reception function may be permitted in the step 504.

【0203】ここで、送信機能のみや受信機能のみを許
可するタイミングがデータ設定であるステップ502の
後に設定したが、ステップ501やステップ502のデ
ータ設定の前後のタイミングに許可してもよいことはい
うまでもない。
Here, the timing at which only the transmission function or only the reception function is permitted is set after step 502, which is the data setting. However, the timing may be permitted before or after the data setting at step 501 or step 502. Needless to say.

【0204】これまで通信を禁止する条件は、相対値出
力のフォーカス・レンズをあげたが、図示していないが
レンズ・システム部には、他にA/D変換器やD/A変
換器、周辺IC用の発信器など初期化を必要とするもの
が多数存在したり、さらにレンズ・システム内でダブル
CPU構成を用いている場合には、CPU同士の通信の
ための機能(シリアル通信、FIFO、DPRAMな
ど)を初期化し、各々のCPUがレディ状態になったこ
とを確認しあう必要もある。このような初期化が済み、
レンズ部が正常に可動するまでは、上述したのと同様に
通信機能をディスエーブル状態にしておくことも可能で
ある。
The condition for prohibiting communication has been described above with respect to a focus lens having a relative value output. Although not shown, the lens system section further includes an A / D converter, a D / A converter, and the like. If there are a number of transmitters for peripheral ICs that require initialization, or if a double CPU configuration is used in the lens system, a function for communication between CPUs (serial communication, FIFO) , DPRAM, etc.) and confirm that each CPU is ready. After such initialization,
Until the lens unit moves normally, the communication function can be disabled in the same manner as described above.

【0205】上記記述の中で、不感帯や停止オフセット
の値が固定値であったが、図25の表に示すように、I
RISの値によって可変であることも可能である。すな
わち、焦点深度に依存するデータにすることが可能とな
る。
In the above description, the values of the dead zone and the stop offset are fixed values, but as shown in the table of FIG.
It is also possible to change the value depending on the value of RIS. That is, it is possible to make the data dependent on the depth of focus.

【0206】さらに図26に示すように、ズーム・レン
ズの位置により不感帯や停止オフセットの値に倍率をか
けたりすることも可能であり、さらにテーブル化しても
よい。またエクステンダの値によって可変する事も可能
である。ところでテーブル化をするとテーブルのための
メモリ領域がかなり必要になる場合がある。その場合
は、以下のように、F値と焦点距離とエクステンダの関
数として算出することも可能である。
Further, as shown in FIG. 26, it is possible to multiply the value of the dead zone or the stop offset by the position of the zoom lens, and it is also possible to make a table. Also, it can be changed by the value of the extender. By the way, when a table is formed, a considerable memory area for the table may be required. In that case, it is also possible to calculate as a function of the F value, the focal length, and the extender as follows.

【0207】 不感帯 = f(F値、焦点距離、エクテンダ) 停止オフセット = g(F値、焦点距離、エクテンダ) また、リモート・モード、ローカル・モードを選択する
SW(R/L−SW)112がレンズ部に存在したが、
カメラ部に存在し、その情報をシリアル通信を用いてレ
ンズ部に転送して選択するようにしても良い。
Dead zone = f (F value, focal length, extender) Stop offset = g (F value, focal length, extender) Further, the SW (R / L-SW) 112 for selecting the remote mode or the local mode is provided. Although it was in the lens part,
The information may be present in the camera unit, and the information may be transferred to the lens unit using serial communication for selection.

【0208】さらには、(不感帯)≧(停止オフセッ
ト)という関係を保つように設定すれば、停止目標位置
が同じ位置である指令が連続的に来ても、停止目標位置
に対する不感帯内で停止することになる。
Furthermore, if the relation of (dead zone) ≧ (stop offset) is set to be maintained, even if a command that the stop target position is the same position comes continuously, it stops within the dead zone with respect to the stop target position. Will be.

【0209】ここで図30を用いて、フォーカス・レン
ズにおける不感帯について説明する。フォーカス・レン
ズの現在の停止位置3001から、INF方向に不感帯
3002およびMOD方向に不感帯3003が存在す
る。このとき、停止目標位置がINF側の不感帯300
2とMOD側の不感帯3003の間に存在すると、フォ
ーカス・レンズは駆動開始しないことになる。
Now, the dead zone in the focus lens will be described with reference to FIG. From the current stop position 3001 of the focus lens, there is a dead zone 3002 in the INF direction and a dead zone 3003 in the MOD direction. At this time, the stop target position is set to the dead zone 300 on the INF side.
2 and the dead zone 3003 on the MOD side, the focus lens does not start driving.

【0210】また、停止目標位置がINF側の不感帯3
002とMOD側の不感帯3003の間にない場合、現
在の停止位置3001から停止目標位置までの移動距離
をもとに、フォーカス・レンズは駆動開始することにな
る。
The target stop position is the dead zone 3 on the INF side.
When the distance is not between 002 and the dead zone 3003 on the MOD side, the focus lens starts driving based on the moving distance from the current stop position 3001 to the stop target position.

【0211】ここで図31を用いて、停止オフセットの
説明をする。停止目標位置3102に向かってレンズが
移動(移動軌跡3103上を移動)しているとする。こ
のとき、停止オフセット3101を考慮した位置にレン
ズが到達したときに、ブレーキを掛けることになる。す
なわち停止目標位置3102に対して、レンズのイナー
シャを考慮したブレーキを掛けることにより、レンズの
実際に停止する位置が停止目標位置から大幅にずれるこ
とを防ぐことが可能となる。
The stop offset will now be described with reference to FIG. It is assumed that the lens is moving toward the stop target position 3102 (moving on the movement locus 3103). At this time, when the lens reaches a position in consideration of the stop offset 3101, the brake is applied. In other words, by applying a brake to the stop target position 3102 in consideration of the inertia of the lens, it is possible to prevent the position where the lens actually stops from significantly deviating from the stop target position.

【0212】本実施の形態において、不感帯と前記停止
オフセットの領域を、(不感帯)≧(停止オフセット)
としているが、レンズには必ずイナーシャが存在するた
め、ブレーキを掛けてもすぐに停止することがないこと
を考慮すると、停止オフセットが不感帯の近傍であれ
ば、(不感帯)≦(停止オフセット)としても、レンズ
は不感帯内で停止することも可能である。
In the present embodiment, the area of the dead zone and the stop offset is defined as (dead zone) ≧ (stop offset)
However, considering that the lens always has an inertia and does not stop immediately even when the brake is applied, if the stop offset is near the dead zone, (dead zone) ≦ (stop offset) However, the lens can also be stopped within the dead zone.

【0213】これまで指令速度DemRpmに対して、
図23に示すように、一定速度にて駆動するように説明
を行ってきたが、図24に示すように、速度指令を最高
速度をDemRpmに設定した台形速度パターンもしく
はS字カーブなどで駆動してもよい。さらに速度の単位
として[RPM]という表記を用いたが、角速度等の他
の速度単位でも同様である。
With respect to the command speed DemRpm,
Although the description has been given of driving at a constant speed as shown in FIG. 23, as shown in FIG. 24, the speed command is driven by a trapezoidal speed pattern or S-shaped curve with the maximum speed set to DemRpm. You may. Furthermore, the notation [RPM] is used as a unit of speed, but the same applies to other speed units such as angular speed.

【0214】また、設定データとして具体的な数値をあ
げてきたが、数値そのものに規定されるものではなく、
他の数値でも良いことは言うまでもない。
Although specific numerical values have been given as setting data, they are not limited to numerical values themselves, but
It goes without saying that other numerical values may be used.

【0215】さらにデータをEEPROMのように書き
換え可能な不揮発性メモリを使用して記憶させておけ
ば、レンズ一つ一つにカスタマイズが可能となるため、
ユーザの好みに合わせることが可能となる。
Further, if data is stored using a rewritable nonvolatile memory such as an EEPROM, it is possible to customize each lens.
It is possible to match the user's preference.

【0216】以上、フォーカス・レンズを例にあげてき
たが、ズーム・レンズやIRIS、さらにはAFに使用
されるウォブリング・レンズなどにも応用可能である
し、カメラ部とレンズ部とのインターフェースがシリア
ルだけでなく、パラレル・インターフェースを用いても
同様なことが可能である。
The focus lens has been described above as an example. However, the present invention can be applied to a zoom lens, an IRIS, a wobbling lens used for AF, and the like. The same can be achieved by using not only serial but also a parallel interface.

【0217】[0219]

【発明の効果】請求項1〜請求項6に係る発明によれ
ば、駆動制御手段のゲインを高く設定しても、目標位置
までの光学手段の移動距離が移動しなくても影響がない
ような場合には移動させないようにしているので、光学
手段の発振または微振動を防止することができる。
According to the first to sixth aspects of the present invention, even if the gain of the drive control means is set high, there is no influence even if the moving distance of the optical means to the target position does not move. In such a case, the optical means is not moved, so that oscillation or micro-vibration of the optical means can be prevented.

【0218】また、焦点距離や焦点深度に応じて合焦光
学系が制御されるため、ピンぼけのない映像が得られる
ことになる。
Further, since the focusing optical system is controlled according to the focal length and the focal depth, an image without defocus can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態を示すシステムブロック図FIG. 1 is a system block diagram showing an embodiment of the present invention.

【図2】図1のレンズの移動方向における絶対位置を示
す図
FIG. 2 is a view showing an absolute position of the lens in FIG. 1 in a moving direction.

【図3】図1のシステムのメイン処理のフローチャートFIG. 3 is a flowchart of a main process of the system in FIG. 1;

【図4】図3のシリアル通信による割り込み処理のフロ
ーチャート
FIG. 4 is a flowchart of interrupt processing by serial communication in FIG. 3;

【図5】図3の初期化処理のフローチャートFIG. 5 is a flowchart of an initialization process in FIG. 3;

【図6】図3のレンズモードセットのフローチャートFIG. 6 is a flowchart of a lens mode set in FIG. 3;

【図7】図3のレンズリモートモード処理1のフローチ
ャート
FIG. 7 is a flowchart of lens remote mode processing 1 of FIG. 3;

【図8】図3のレンズリモートモード処理2のフローチ
ャート
FIG. 8 is a flowchart of lens remote mode processing 2 in FIG. 3;

【図9】図3のレンズ駆動方向の処理のフローチャートFIG. 9 is a flowchart of processing in a lens driving direction in FIG. 3;

【図10】図3のレンズ駆動方向のチェック処理のフロ
ーチャート
FIG. 10 is a flowchart of a lens driving direction check process in FIG. 3;

【図11】図3の駆動不感帯のチェック処理のフローチ
ャート
FIG. 11 is a flowchart of a drive dead zone check process in FIG. 3;

【図12】図3のレンズ駆動の準備処理のフローチャー
FIG. 12 is a flowchart of a lens drive preparation process of FIG. 3;

【図13】図3のレンズの駆動開始処理のフローチャー
FIG. 13 is a flowchart of a lens driving start process of FIG. 3;

【図14】図3のレンズの位置停止処理のフローチャー
FIG. 14 is a flowchart of a lens position stop process of FIG. 3;

【図15】図3の目標位置到達停止処理のフローチャー
FIG. 15 is a flowchart of target position arrival stop processing of FIG. 3;

【図16】図3のレンズ状態のチェック処理のフローチ
ャート
FIG. 16 is a flowchart of a lens state checking process in FIG. 3;

【図17】図3のレンズ速度の処理のフローチャートFIG. 17 is a flowchart of processing of the lens speed in FIG. 3;

【図18】図3のレンズの停止処理のフローチャートFIG. 18 is a flowchart of a lens stopping process of FIG. 3;

【図19】図3の回転方向処理のフローチャートFIG. 19 is a flowchart of a rotation direction process of FIG. 3;

【図20】図3の速度誤差チェック処理のフローチャー
FIG. 20 is a flowchart of a speed error check process of FIG. 3;

【図21】図3の過誤差検出停止処理のフローチャートFIG. 21 is a flowchart of an over error detection stop process of FIG. 3;

【図22】図3のレンズローカルモード処理のフローチ
ャート
FIG. 22 is a flowchart of a lens local mode process of FIG. 3;

【図23】図3の処理で駆動されるレンズの駆動速度パ
ターン1を示す図
23 is a diagram showing a driving speed pattern 1 of the lens driven in the processing of FIG. 3;

【図24】図3の処理で駆動されるレンズの駆動速度パ
ターン2を示す図
24 is a diagram showing a driving speed pattern 2 of the lens driven in the processing of FIG. 3;

【図25】図3で処理されるレンズ制御データ1を示す
FIG. 25 is a diagram showing lens control data 1 processed in FIG. 3;

【図26】図3で処理されるレンズ制御データ2を示す
FIG. 26 is a diagram showing lens control data 2 processed in FIG. 3;

【図27】本発明の実施の形態のレンズとカメラとの組
み合わせを示す図
FIG. 27 is a diagram showing a combination of a lens and a camera according to an embodiment of the present invention.

【図28】図3の端処理のフローチャートFIG. 28 is a flowchart of end processing in FIG. 3;

【図29】図3の停止目標位置制限処理のフローチャー
FIG. 29 is a flowchart of a stop target position restriction process of FIG. 3;

【図30】図3の不感帯処理のフローチャートFIG. 30 is a flowchart of dead zone processing in FIG. 3;

【図31】図3の停止オフセット処理のフローチャートFIG. 31 is a flowchart of a stop offset process of FIG. 3;

【符号の説明】[Explanation of symbols]

101 レンズ部 102 aCPU 103 タイマ 104 モータ駆動ドライバ 105 モータ 106 光学レンズ 107 エンコーダ 108 カウンタ 109 手動操作部 110 START−SW 111 表示部 112 R/L−SW 113 EEPROM 120 カメラ部 121 bCPU Reference Signs List 101 lens unit 102 aCPU 103 timer 104 motor drive driver 105 motor 106 optical lens 107 encoder 108 counter 109 manual operation unit 110 START-SW 111 display unit 112 R / L-SW 113 EEPROM 120 camera unit 121 bCPU

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 光学手段と、前記光学手段を移動させる
ための駆動手段と、前記光学手段の位置を検出する位置
検出手段と、前記光学手段についての目標位置に基づい
て前記駆動手段を制御する駆動制御手段と、を有する光
学装置において、 前記位置検出手段の出力に基づいて前記光学手段の移動
方向における前記目標位置から第1の所定量の手前の位
置で前記駆動手段を制動するための制動制御手段と、前
記位置検出手段の検出位置と前記目標位置との差分を検
出する差分検出手段と、前記光学手段が停止している際
において前記差分検出手段の検出した差分の絶対値が第
2の所定量以下の場合には前記駆動制御手段による駆動
制御を禁止する駆動禁止手段と、を有することを特徴と
する光学装置。
1. An optical unit, a driving unit for moving the optical unit, a position detecting unit for detecting a position of the optical unit, and controlling the driving unit based on a target position of the optical unit. And a drive control unit. A brake for braking the drive unit at a position a first predetermined amount before the target position in the moving direction of the optical unit based on an output of the position detection unit. Control means, difference detection means for detecting a difference between the detection position of the position detection means and the target position, and an absolute value of the difference detected by the difference detection means when the optical means is stopped is a second value. And a drive prohibiting unit for prohibiting the drive control by the drive control unit when the amount is equal to or less than a predetermined amount.
【請求項2】 合焦用光学手段と、前記光学手段を駆動
するための駆動手段と、前記光学手段の位置を検出する
位置検出手段と、前記光学手段についての目標位置に基
づいて前記駆動手段を制御する駆動制御手段と、を有す
る光学装置において、 前記位置検出手段の出力に基づいて、前記光学手段の移
動方向における前記目標位置から第1の所定量手前の位
置で前記駆動手段を制動するための制動制御手段と、前
記位置検出手段の検出位置と前記目標位置との差分を検
出する差分検出手段と、前記光学手段が停止している際
において前記差分検出手段の検出した差分の絶対値が第
2の所定量以下の場合には前記駆動制御手段による駆動
制御を禁止する駆動禁止手段と、を有することを特徴と
する光学装置。
2. An optical device for focusing, a driving device for driving the optical device, a position detecting device for detecting a position of the optical device, and the driving device based on a target position of the optical device. And a drive control unit for controlling the drive unit, wherein the drive unit is braked at a position that is a first predetermined amount before the target position in the moving direction of the optical unit based on an output of the position detection unit. Braking control means, a difference detection means for detecting a difference between a detection position of the position detection means and the target position, and an absolute value of the difference detected by the difference detection means when the optical means is stopped. An optical device, comprising: a drive prohibiting unit that prohibits the drive control by the drive control unit when the value is less than or equal to a second predetermined amount.
【請求項3】 前記第1の所定量を前記第2の所定量と
等しく又は前記第2の所定量より小さく設定したことを
特徴とする請求項1または2記載の光学装置。
3. The optical device according to claim 1, wherein the first predetermined amount is set to be equal to or smaller than the second predetermined amount.
【請求項4】 前記第1の所定量を前記第2の所定量よ
り大きく設定したことを特徴とする請求項1または2記
載の光学装置。
4. The optical device according to claim 1, wherein the first predetermined amount is set to be larger than the second predetermined amount.
【請求項5】 前記第1および第2の所定量の少なくと
も一方は、前記光学装置の状態により変動する光学特性
に基づいて変化させることを特徴とする請求項1、2、
3または4記載の光学装置。
5. The apparatus according to claim 1, wherein at least one of the first and second predetermined amounts is changed based on an optical characteristic that changes according to a state of the optical device.
5. The optical device according to 3 or 4.
【請求項6】 前記第1および第2の所定量の少なくと
も一方は、前記光学装置の状態により変動する被写界深
度に関連して変化させることを特徴とする請求項2、
3、4または5記載の光学装置。
6. The apparatus according to claim 2, wherein at least one of the first and second predetermined amounts is changed in relation to a depth of field that varies depending on a state of the optical device.
6. The optical device according to 3, 4 or 5.
JP11113487A 1999-04-21 1999-04-21 Optical device Pending JP2000305001A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11113487A JP2000305001A (en) 1999-04-21 1999-04-21 Optical device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11113487A JP2000305001A (en) 1999-04-21 1999-04-21 Optical device

Publications (1)

Publication Number Publication Date
JP2000305001A true JP2000305001A (en) 2000-11-02

Family

ID=14613550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11113487A Pending JP2000305001A (en) 1999-04-21 1999-04-21 Optical device

Country Status (1)

Country Link
JP (1) JP2000305001A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003046918A (en) * 2001-07-27 2003-02-14 Canon Inc Imaging apparatus and method therefor, computer- readable record medium, and computer program
JP6028876B1 (en) * 2016-02-02 2016-11-24 ソニー株式会社 Lens unit, imaging device, and control method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003046918A (en) * 2001-07-27 2003-02-14 Canon Inc Imaging apparatus and method therefor, computer- readable record medium, and computer program
JP4695785B2 (en) * 2001-07-27 2011-06-08 キヤノン株式会社 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, COMPUTER-READABLE STORAGE MEDIUM, AND PROGRAM
JP6028876B1 (en) * 2016-02-02 2016-11-24 ソニー株式会社 Lens unit, imaging device, and control method
JP2017138386A (en) * 2016-02-02 2017-08-10 ソニー株式会社 Lens unit, imaging device, and control method
US9813603B2 (en) 2016-02-02 2017-11-07 Sony Corporation Lens unit, imaging device, and control method
US10567631B2 (en) 2016-02-02 2020-02-18 Sony Corporation Lens unit, imaging device, and control method
US11221462B2 (en) 2016-02-02 2022-01-11 Sony Corporation Lens unit, imaging device, and control method

Similar Documents

Publication Publication Date Title
JP3205296B2 (en) Shooting lens device
US5903783A (en) Motion compensation device to control a centering operation of a motion compensation lens
JP2000305001A (en) Optical device
US6600876B2 (en) Photographing apparatus with shake detection function
JP2000221380A (en) Optical device, lens device and camera system
US5940631A (en) Optical apparatus having a vibration compensation device operable during photographic preparations
JPH10254010A (en) Lens device and optical equipment provided therewith
JPH11287944A (en) Driving device, optical device, photographing lens device and camera system
JPH11287943A (en) Driving device, optical device and photographing lens device
JP2000221381A (en) Photographing lens device
US6128443A (en) Camera and interchangeable lens
US5740472A (en) Vibration reduction device
JPH10186489A (en) Controller, camera accessory device, and camera apparatus
US7756406B2 (en) Photographic apparatus and interchangeable camera lens
JP2003195383A (en) Photographing system and camera
JP3248586B2 (en) Camera system and camera
JP3360718B2 (en) camera
JPH10197782A (en) Optical equipment
JPH08160487A (en) Shake correcting device
JP2842380B2 (en) camera
JP2007025468A (en) Lens device
JP2005284149A (en) Lens device
JPH07333671A (en) Photographing device
JP2000321484A (en) Optical device, camera system, and optical system
JP2000352658A (en) Zoom lens, zoom lens system and camera system

Legal Events

Date Code Title Description
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