65
National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential VBI Lecture Series Computer-based Motion Control

  • View
    224

  • Download
    6

Embed Size (px)

Citation preview

Page 1: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

VBI Lecture SeriesComputer-based Motion

Control

Page 2: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

• 建構運動控制系統• NI 運動控制器• Computer-Based 運動控制程式設計• 運動影像整合進階應用• 問題及建議

內容摘要

Page 3: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

系統開放整合性高彈性極大使用容易成本考量現有的工具豐富

為什麼選擇 Computer-Based 運動控制?

Page 4: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

運動控制– 於量測及自動化系統中扮演的角色

應用程式開發軟體硬體及驅動程式

UUT

Page 5: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

NI 運動控制工具

PCI PXI PXI RTPC-Base 系統

NI-Motion Driver Software

分散式系統CANopen IEEE 1394

NI SoftMotion 控制器

客製化

M Series NI-DAQ

R Series NI-DAQ

NI Compact FP

NI Compact RIO

NI SoftMotion Development

Module for LabVIEW

LabVIEWC, C++, Basic, CVI, Measurement Studio

Motion Assistant

Page 6: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達控制系統

Page 7: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達控制系統

平台平台

• 馬達• 回饋裝置• 極限開關

Page 8: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達控制系統

馬達或平台馬達或平台 馬達驅動器馬達驅動器

Converts low level voltage to high level current or voltage

Page 9: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達控制系統

馬達或平台馬達或平台 馬達驅動器馬達驅動器

馬達控制卡馬達控制卡和軟體和軟體

• Supervisory control

• Trajectory generation

• Servo control

• Step generation

Page 10: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達控制系統

馬達或平台馬達或平台 馬達驅動器馬達驅動器

馬達控制卡馬達控制卡和軟體和軟體

NI 馬達合作廠商 NI

Page 11: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

輕鬆規劃一個整合系統• National Instruments 提供您最簡單規劃馬達整合系統的環境

• Measurement & Automation Explorer

• 可規劃所有 National Instruments的硬體設備

• 馬達控制硬體的安裝 , 組態設定及測試

Demo

Page 12: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

在 Measurement & Automation Explorer (MAX) 做基本的設定與檢測• Limits and home sensors• Encoders• Closed-loop stability

– Gain & phase margin– Transient response

• Performance measured using feedback sensor:

– Minimal incremental motion

– Bi-directional repeatability

– Accuracy– Maximum velocity

Page 13: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用程式 馬達控制器 放大器 / 驅動器 馬達

回饋裝置

位置 電壓 電流

(ex: 位置 )(ex: 位置回饋 )

馬達系統的組成要件

Page 14: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

組件的選擇

• 分析馬達及周邊機構• 決定馬達運動方式• 選擇馬達 / 平台• 選擇馬達驅動器• 選擇控制器• 選擇軟體平台

• 系統需要的馬達種類為何?• 馬達的尺寸大小 / 規格?• 驅動器的種類?• 馬達運動的環境為何?• 所需的控制精準度為何?• 需要有回饋裝置嗎?回饋的方式?精確度?

• 如何控制?

Page 15: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用程式 馬達控制器 放大器

回饋裝置

馬達及其相關機構件

馬達

Page 16: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

步進馬達

• 典型的應用• 自動化工廠 ( 繪圖機 , 縫紉機 , x-y 平台 )

• 半導體製程• 簡單的定位

有限的最大速度及扭力耐用對扭力應用無法感應低價無動態滑動補償容易使用設定時間長高精度 /解析度低速性能不良 (不平順 )低速扭力佳缺點優點

Page 17: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

有刷或無刷伺服馬達

• 典型的應用• 工具機 , 機械手臂• 輸送帶速度控制

有刷馬達需要維修連續回饋微小移動困難動態滑動補償需要微調速度較快需要解碼器高速扭力佳缺點優點

Page 18: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

選擇馬達

無刷伺服

有刷伺服

步進

昂貴且複雜的驅動器無需維修 , 壽命長 , 無火花 , 高速 , 潔淨室 , 安靜 , 低溫運轉

需維修 , 非潔淨室 , 有電花 ,EMI 及爆炸環境的危險

便宜 , 中速 , 高扭力佳 ,驅動容易

吵雜及共振 , 高速扭力差 , 不適合高溫 , 不適合會變動的負荷應用

便宜 , 可以開路控制 ,低扭力佳 , 潔淨室可

缺點優點

機器手臂 , 撿拾及置件 , 超高扭力應用

速度控制 , 高速運動

定位 , 微步運動

應用領域

Page 19: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

• 齒軌 & 齒輪 • 履帶 & 滾輪

• 變速箱

• 螺絲置物架

• 輸送帶

Power Transmissions動力傳輸

Page 20: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

選擇馬達 /平台• 根據下列條件 :

• 解析度• 行程長度• 反覆性• 最大負載• 馬達種類

Page 21: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達 /平台網上諮詢• 搜尋超過 100 個馬達及平台• 馬達及平台規格比較• 搜尋馬達控制器與平台連線圖示

• ni.com/motion/advisors

Page 22: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用程式 馬達控制器 放大器 馬達

回饋裝置及極限

回饋裝置

Page 23: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

回饋裝置• 編碼器

• 增值編碼器• 類比回饋

• 電位計• 其他感測器 ( 扭力 , 壓力等… )

• 其他回饋來源• IMAQ

• DAQ

Page 24: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

極限及馬達 I/O

• 用行程極限終點 (Limit) 來避免馬達控制系統損壞• 用起點 (Home) 開關來標示參考點• 用位置中斷點 (Breakpoint)功能輸出作以觸發外部裝置• 用高速位置擷取功能輸入來獲得與位置相關的數據

Page 25: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用程式 馬達控制器 馬達

回饋裝置

馬達驅動器或放大器

放大器

Page 26: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達驅動器的要求• 馬達驅動器要與馬達相匹配

• 例如 , 二相式步進馬達需要二相式的馬達驅動器等…• 提供足夠的驅動力 :

• 電流峰值 - 損壞馬達?• 連續電流值 - 扭力大小?• 電壓 –速度大小?

Page 27: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

NI 馬達驅動器• MID 系列 ( 伺服及步進馬達 )

•萬用馬達介面 (UMI) 方便用來與他廠牌的驅動器連接•網上驅動器推薦 ni.com/motion/advisors 可找到他廠驅動器的資訊

Page 28: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用程式 馬達控制器 放大器 馬達

回饋裝置

馬達控制器

Page 29: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

馬達控制器的目的•板上計算每一個移動命令的軌跡以減少Windows 的干擾• 提供扭力命令給馬達驅動器• 馬達極限及緊急停止之監視控制•閉路 PID迴圈

Page 30: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

一個簡單運動軌跡之特徵

•一個運動軌跡開始於 起始點位置 (SP), 加速度 (Acceleration), 持續以目標速度 (Target Velocity) 運行一段預設時間 , 然後減速至目標位置 (Target Position).

Time

Velocity

Page 31: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

運動控制的幾種描述方式• 簡單點對點的移動•向量點對點的移動• 連續運動•循跡控制 /任意路徑

•目標位置 , 速度 ,加速度•目標位置 (X,Y,Z), 向量速度 ,向量加速度

•目標位置 A,目標位置 B, 調和係數 (blend factor)

• [多點位置暫存 ]

Page 32: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

基本運動模式• 點對點位置模式 (範圍和控制器解析度有關 )

• 梯形加減速• 絕對或相對目標位置

• 速度模式• 無限距離永久維持某速度• 可動態連續改變馬達速度 (Velocity Profiling)

•多軸同步運動

Page 33: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

基本運動方式•簡單單軸點對點運動•需要運動目標位置

Page 34: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

基本運動模式 ( 定位方式 )

• 起點 (Home) 開關• 硬體開關裝置• 可設定尋找起點的方向及模式

• 尋找歸零點 (Find Index)

• 從起點位置開始尋找編碼器的歸零點 (Index)

• 一般將尋找歸零點的位置定義為該軸的零點

Page 35: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

進階運動模式• S 形加減速• 可減少突然加減速 ( Jerk )

• 需要 DSP或靠效能的處理器方能完成

速度

加速減速

速度

時間

Page 36: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

進階運動模式•向量空間多軸控制

• 直線 2D & 3D 補間• 平面圓弧、立體螺旋及立體圓弧補間• DSP 晶片即時計算立方平滑曲面以內插方式進行圓弧補間

x

y

z

(x1,y1,z1)

(x2,y2,z2)

Page 37: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

進階運動模式

Y 軸

X 軸

•向量點對點運動•需要 X 位置及 Y 位置

Page 38: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

進階運動模式

• 高速位置擷取• 在某個時刻即時偵測馬達位置

• 位置中斷點輸出• 馬達行經一個預定的位置時輸出一個數位觸發

Page 39: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

連續運動 ( Blending )

• 連結兩段運動軌跡 ( 直線與直線、直線與圓弧、圓弧與圓弧 )

•兩段運動軌跡之間可設定減速與否或停留時間

Move 1Move 1 Move 2Move 2

Page 40: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

連續運動 ( Blending )

Page 41: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

連續運動 ( Blending )

原始路徑

調和路徑

X 軸

Y 軸

•調和運動•需要二個向量運動及一個調和係數

Page 42: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

循跡控制 (Contouring Control)

立方平滑曲面

位置

N 毫秒間格

立方平滑曲面允許客制化描述

Page 43: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

循跡控制 (Contouring Control)

X 軸

Y 軸

•循跡控制 /任意路徑 : 由暫存器讀取多點位置•需要存放多點的暫存器

Page 44: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

基本運動模式 - ( 電子齒輪 ) Electronic Gearing•電子齒輪 : 隨從齒輪訊號來源隨從齒輪訊號來源:–另一軸–編碼器回授–類比回授

軸 1 軸 2

Page 45: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

基本運動模式 - ( 電子齒輪 ) Electronic Gearing

•主從齒輪架構•隨從齒輪訊號來源 :

• 另一軸• 任何編碼器• 任何電壓訊號

• 可動態改變主從齒輪比率• 動態改變電子齒輪會造成的效應 - 扭力、速度 ..

MasterPosition

1:1

1:1

2:1

Page 46: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

下載程式碼 (Onboard Programming)

• FlexMotion 系列產品才有的功能• 可在介面卡的微處理器上獨立執行最多十個程式• 豐富指令集,包括運動控制、數學及邏輯運算、條件及迴路控制•在即時作業系統執行,可不受Windows 環境影響• 可將下載程式存放在介面卡的 RAM或 Flash-ROM上,即使電腦關機仍可保留

Page 47: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

Motion 系列介面卡•四軸或六軸、步進或伺服馬達運動控制介面卡

• 提供即時作業環境微處理器及 DSP晶片• 伺服系列:每軸 63 sec PID 控制• 步進系列: 1.5 MHz Step rate

•支援所有基本及進階運動模式•完整支援 LabVIEW ,C 及 Visual Basic等應用程式開發軟體

Page 48: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

NI 馬達控制器比較

Page 49: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

NI 馬達控制器好在哪裡 ?

• 最簡單的規劃環境 (MAX)

• 自動微調精靈• 與其他硬體同步的進階功能 (IMAQ, DAQ)

• LabVIEW 簡化程式開發• 開放的連接能力

Page 50: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

NI 馬達產品網上推薦

•協助你進行下列選擇 :

• 適合的控制器• 匹配的驅動器• 必備的纜線• 軟體套件

• ni.com/motion/advisors

Page 51: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

Computer-Based 運動控制程式設計

Page 52: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用軟體 馬達控制器 放大器 馬達

回饋裝置

應用軟體

Page 53: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

軟體大綱

設定

原型設計

應用開發環境NI-Motion Driver for LabVIEW,Measurement Studio,C/C++ Visual Basic

Motion Assistant

Measurement and Automation Explorer

Page 54: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

Motion Assistant

•獨立的運動控制程序開發系統• 圖控式建構運動控制程序• 可自動產生 LabVIEW 程式碼

Demo

Page 55: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

可配置化 vs. 可程式化• 可配置化• 容易使用•互動性高• 不需要程式撰寫

• 可程式化• 彈性• 容易與其他元件進行整合

Page 56: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

簡單的運動控制範例 — 三步驟

1. 設定移動距離座標2. 開始3. 錯誤檢查

Demo

Page 57: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

視覺運動同步進階應用

Page 58: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

運動 , 影像 , 和資料擷取整合應用

Page 59: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

同步•讓您系統中的量測或動作能夠同時發生或一起工作•同步必須能夠做到

•同時間內從多個設備擷取量測結果•從不同的硬體協同動作• 精確地控制不同設備間的定時事件

Page 60: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

主機通訊

同步的佈線選擇•透過外部連線進行佈線•透過內部 (PCI介面卡上的 RTSI) 連線進行佈線

•透過內部 (PXI介面卡上的 PXI匯流排或星型觸發 ) 連線進行佈線

直接通訊 (透過 RTSI/PXI 觸

發匯流排 )•客戶反應:使用 RTSI 與 RS-232或 GPIB介面比較速度可以快 10~40倍

Page 61: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

PXI 觸發匯流排

系統

控制器

星型觸發

控制器

周邊裝置

10 MHz時脈

132 Mb/s, 33 MHz, 32-bit 電腦匯流排

星型觸發

馬達

控制器

周邊裝置

本地匯流排

PXI 訊號整合 - 定時及觸發提昇效能

Page 62: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用範例 : 生醫藥物研發

培養皿

馬達驅動器

PXI,馬達控制器 ,以及影像擷取卡

伺服活塞

相機

兩軸平台

藥物樣品

Page 63: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

應用範例 : 半導體檢測

Probe 鏡頭

兩軸平台Defective dye

Good dye

PXI,馬達控制器 ,以及影像擷取卡

馬達驅動器

Page 64: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

Vision & Motion 自動化檢測系統 •結合 NI vision和motion 的技術與軟硬體,模擬工廠自動化生產的品管檢測流程基本架構,利用馬達帶動履帶傳送待測物再利用 CCD 快速擷取影像做分析及檢測。

•利用 Vision Builder AI做即時而又快速的影像分析– 量測間隔距離– NI logo pattern match– 單顆 IC pattern match

8252 & 7344

PXI chassis

Motor & CCD

Page 65: National Instruments Confidential VBI Lecture Series Computer-based Motion Control

National Instruments Confidential

結論

•彈性 , 高品質 PC-Based 機器視覺系統–低價到高速–類比到數位

•彈性 , 高品質 PC-Based 運動控制系統–步進到伺服–主控電腦 , 分散式 , 客製化

•與 I/O 卡的高整合度滿足您的需求•參考 NI 影像擷取 / 運動控制卡比較表