




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、building programmable automation controllers with labview fpgaoverviewprogrammable automation controllers (pacs) are gaining acceptance within the industrial control market as the ideal solution for applications that require highly integrated analog and digital i/o, floating-point processing, and se
2、amless connectivity to multiple processing nodes. national instruments offers a variety of pac solutions powered by one common software development environment, ni labview. with labview, you can build custom i/o interfaces for industrial applications using add-on software, such as the ni labview fpg
3、a module. with the labview fpga module and reconfigurable i/o (rio) hardware, national instruments delivers an intuitive, accessible solution for incorporating the flexibility and customizability of fpga technology into industrial pac systems. you can define the logic embedded in fpga chips across t
4、he family of rio hardware targets without knowing low-level hardware description languages (hdls) or board-level hardware design details, as well as quickly define hardware for ultrahigh-speed control, customized timing and synchronization, low-level signal processing, and custom i/o with analog, di
5、gital, and counters within a single device. you also can integrate your custom ni rio hardware with image acquisition and analysis, motion control, and industrial protocols, such as can and rs232, to rapidly prototype and implement a complete pac system.table of contents1. introduction 2. ni rio har
6、dware for pacs 3. building pacs with labview and the labview fpga module 4. fpga development flow 5. using ni softmotion to create custom motion controllers 6. applications 7. conclusion introduction you can use graphical programming in labview and the labview fpga module to configure the fpga (fiel
7、d-programmable gate array) on ni rio devices. rio technology, the merging of labview graphical programming with fpgas on ni rio hardware, provides a flexible platform for creating sophisticated measurement and control systems that you could previously create only with custom-designed hardware.an fpg
8、a is a chip that consists of many unconfigured logic gates. unlike the fixed, vendor-defined functionality of an asic (application-specific integrated circuit) chip, you can configure and reconfigure the logic on fpgas for your specific application. fpgas are used in applications where either the co
9、st of developing and fabricating an asic is prohibitive, or the hardware must be reconfigured after being placed into service. the flexible, software-programmable architecture of fpgas offer benefits such as high-performance execution of custom algorithms, precise timing and synchronization, rapid d
10、ecision making, and simultaneous execution of parallel tasks. today, fpgas appear in such devices as instruments, consumer electronics, automobiles, aircraft, copy machines, and application-specific computer hardware. while fpgas are often used in industrial control products, fpga functionality has
11、not previously been made accessible to industrial control engineers. defining fpgas has historically required expertise using hdl programming or complex design tools used more by hardware design engineers than by control engineers.with the labview fpga module and ni rio hardware, you now can use lab
12、view, a high-level graphical development environment designed specifically for measurement and control applications, to create pacs that have the customization, flexibility, and high-performance of fpgas. because the labview fpga module configures custom circuitry in hardware, your system can proces
13、s and generate synchronized analog and digital signals rapidly and deterministically. figure 1 illustrates many of the ni rio devices that you can configure using the labview fpga module.figure 1. labview fpga vi block diagram and rio hardware platforms ni rio hardware for pacs historically, program
14、ming fpgas has been limited to engineers who have in-depth knowledge of vhdl or other low-level design tools, which require overcoming a very steep learning curve. with the labview fpga module, ni has opened fpga technology to a broader set of engineers who can now define fpga logic using labview gr
15、aphical development. measurement and control engineers can focus primarily on their test and control application, where their expertise lies, rather than the low-level semantics of transferring logic into the cells of the chip. the labview fpga module model works because of the tight integration bet
16、ween the labview fpga module and the commercial off-the-shelf (cots) hardware architecture of the fpga and surrounding i/o components.national instruments pacs provide modular, off-the-shelf platforms for your industrial control applications. with the implementation of rio technology on pci, pxi, an
17、d compact vision system platforms and the introduction of rio-based compactrio, engineers now have the benefits of a cots platform with the high-performance, flexibility, and customization benefits of fpgas at their disposal to build pacs. national instruments pci and pxi r series plug-in devices pr
18、ovide analog and digital data acquisition and control for high-performance, user-configurable timing and synchronization, as well as onboard decision making on a single device. using these off-the-shelf devices, you can extend your ni pxi or pci industrial control system to include high-speed discre
19、te and analog control, custom sensor interfaces, and precise timing and control. ni compactrio, a platform centered on rio technology, provides a small, industrially rugged, modular pac platform that gives you high-performance i/o and unprecedented flexibility in system timing. you can use ni compac
20、trio to build an embedded system for applications such as in-vehicle data acquisition, mobile nvh testing, and embedded machine control systems. the rugged ni compactrio system is industrially rated and certified, and it is designed for greater than 50 g of shock at a temperature range of -40 to 70
21、°c.ni compact vision system is a rugged machine vision package that withstands the harsh environments common in robotics, automated test, and industrial inspection systems. ni cvs-145x devices offer unprecedented i/o capabilities and network connectivity for distributed machine vision applicati
22、ons.ni cvs-145x systems use ieee 1394 (firewire) technology, compatible with more than 40 cameras with a wide range of functionality, performance, and price. ni cvs-1455 and ni cvs-1456 devices contain configurable fpgas so you can implement custom counters, timing, or motor control in your machine
23、vision application.building pacs with labview and the labview fpga modulewith labview and the labview fpga module, you add significant flexibility and customization to your industrial control hardware. because many pacs are already programmed using labview, programming fpgas with labview is easy bec
24、ause it uses the same labview development environment. when you target the fpga on an ni rio device, labview displays only the functions that can be implemented in the fpga, further easing the use of labview to program fpgas. the labview fpga module functions palette includes typical labview structu
25、res and functions, such as while loops, for loops, case structures, and sequence structures as well as a dedicated set of labview fpga-specific functions for math, signal generation and analysis, linear and nonlinear control, comparison logic, array and cluster manipulation, occurrences, analog and
26、digital i/o, and timing. you can use a combination of these functions to define logic and embed intelligence onto your ni rio device.figure 2 shows an fpga application that implements a pid control algorithm on the ni rio hardware and a host application on a windows machine or an rt target that comm
27、unicates with the ni rio hardware. this application reads from analog input 0 (ai0), performs the pid calculation, and outputs the resulting data on analog output 0 (ao0). while the fpga clock runs at 40 mhz the loop in this example runs much slower because each component takes longer than one-clock
28、 cycle to execute. analog control loops can run on an fpga at a rate of about 200 khz. you can specify the clock rate at compile time. this example shows only one pid loop; however, creating additional functionality on the ni rio device is merely a matter of adding another while loop. unlike traditi
29、onal pc processors, fpgas are parallel processors. adding additional loops to your application does not affect the performance of your pid loop.figure 2. pid control using an embedded labview fpga vi with corresponding labview host vi. fpga development flow after you create the labview fpga vi, you
30、compile the code to run on the ni rio hardware. depending on the complexity of your code and the specifications of your development system, compile time for an fpga vi can range from minutes to several hours. to maximize development productivity, with the r series rio devices you can use a bit-accur
31、ate emulation mode so you can verify the logic of your design before initiating the compile process. when you target the fpga device emulator, labview accesses i/o from the device and executes the vi logic on the windows development computer. in this mode, you can use the same debugging tools availa
32、ble in labview for windows, such as execution highlighting, probes, and breakpoints.once the labview fpga code is compiled, you create a labview host vi to integrate your ni rio hardware into the rest of your pac system. figure 3 illustrates the development process for creating an fpga application.
33、the host vi uses controls and indicators on the fpga vi front panel to transfer data between the fpga on the rio device and the host processing engine. these front panel objects are represented as data registers within the fpga. the host computer can be either a pc or pxi controller running windows
34、or a pc, pxi controller, compact vision system, or compactrio controller running a real-time operating system (rtos). in the above example, we exchange the set point, pid gains, loop rate, ai0, and ao0 data with the labview host vi.figure 3. labview fpga development flowthe ni rio device driver incl
35、udes a set of functions to develop a communication interface to the fpga. the first step in building a host vi is to open a reference to the fpga vi and rio device. the open fpga vi reference function, as seen in figure 2, also downloads and runs the compiled fpga code during execution. after openin
36、g the reference, you read and write to the control and indicator registers on the fpga using the read/write control function. once you wire the fpga reference into this function, you can simply select which controls and indicators you want to read and write to. you can enclose the fpga read/write fu
37、nction within a while loop to continuously read and write to the fpga. finally, the last function within the labview host vi in figure 2 is the close fpga vi reference function. the close fpga vi reference function stops the fpga vi and closes the reference to the device. now you can download other
38、compiled fpga vis to the device to change or modify its functionality.the labview host vi can also be used to perform floating-point calculations, data logging, networking, and any calculations that do not fit within the fpga fabric. for added determinism and reliability, you can run your host appli
39、cation on an rtos with the labview real-time module. labview real-time systems provide deterministic processing engines for functions performed synchronously or asynchronously to the fpga. for example, floating-point arithmetic, including ffts, pid calculations, and custom control algorithms, are of
40、ten performed in the labview real-time environment. relevant data can be stored on a labview real-time system or transferred to a windows host computer for off-line analysis, data logging, or user interface displays. the architecture for this configuration is shown in figure 4. each ni pac platform
41、that offers rio hardware can run labview real-time vis.figure 4. complete pac architecture using labview fpga, labview real-time and host pcwithin each r series and compactrio device, there is flash memory available to store a compiled labview fpga vi and run the application immediately upon power u
42、p of the device. in this configuration, as long as the fpga has power, it runs the fpga vi, even if the host computer crashes or is powered down. this is ideal for programming safety power down and power up sequences when unexpected events occur.using ni softmotion to create custom motion controller
43、s the ni softmotion development module for labview provides vis and functions to help you build custom motion controllers as part of ni pac hardware platforms that can include ni rio devices, daq devices, and compact fieldpoint. ni softmotion provides all of the functions that typically reside on a
44、motion controller dsp. with it, you can handle path planning, trajectory generation, and position and velocity loop control in the ni labview environment and then deploy the code on labview real-time or labview fpga-based target hardware.ni softmotion includes functions for trajectory generator and
45、spline engine and examples with complete source code for supervisory control, position, and velocity control loop using the pid algorithm. supervisory control and the trajectory generator run on a labview real-time target and run at millisecond loop rates. the spline engine and the control loop can
46、run either on a labview real-time target at millisecond loop rates or on a labview fpga target at microsecond loop rates.applications because the labview fpga module can configure low-level hardware design of fpgas and use the fpgas within in a modular system, it is ideal for industrial control appl
47、ications requiring custom hardware. these custom applications can include a custom mix of analog, digital, and counter/timer i/o, analog control up to 125 khz, digital control up to 20 mhz, and interfacing to custom digital protocols for the following:· batch control· discrete control·
48、; motion control· in-vehicle data acquisition· machine condition monitoring· rapid control prototyping (rcp)· industrial control and acquisition· distributed data acquisition and control· mobile/portable noise, vibration, and harshness (nvh) analysisconclusion the labvi
49、ew fpga module brings the flexibility, performance, and customization of fpgas to pac platforms. using ni rio devices and labview graphical programming, you can build flexible and custom hardware using the cots hardware often required in industrial control applications. because you are using labview
50、, a programming language already used in many industrial control applications, to define your ni rio hardware, there is no need to learn vhdl or other low-level hardware design tools to create custom hardware. using the labview fpga module and ni rio hardware as part of your ni pac adds significant
51、flexibility and functionality for applications requiring ultrahigh-speed control, interfaces to custom digital protocols, or a custom i/o mix of analog, digital, and counters.使用labview fpga(現(xiàn)場可編程門陣列)模塊開發(fā)可編程自動化控制器綜述 工業(yè)控制上的應用要求高度集成的模擬和數(shù)字輸入輸出、浮點運算和多重處理節(jié)點的無縫連接。因為它對這些應用的理想解決方案,在工業(yè)
52、控制市場上,可編程自動化控制器(pac)正逐漸被接受。通過一種普通的軟件開發(fā)環(huán)境ni labview,國家儀器公司提供各種可編程自動化控制器的解決方案。有了labview,你可以用像ni labview fpga模塊一樣的附加軟件為工業(yè)應用開發(fā)自定義輸入輸出界面。 為將fpga技術的靈活性和可定制性并入工業(yè)pac系統(tǒng),國家儀器公司利用labview fpga模塊和實時輸入輸出(rio)硬件提供了一種直觀、容易理解的解決方法。無須了解低級的硬件描述語言(hdl)或廣泛的硬件設計細節(jié),你可以定義嵌入含有rio硬件對象家族的fpga芯片里的邏輯,也可以
53、快速地為超高速控制、定制的定時和同步、低級的信號處理、用模擬或數(shù)字定制的輸入輸出、一個單獨設備的計數(shù)器來定義硬件。你也可以將得到的圖像、分析、運動控制、比如can和rs232一樣的工業(yè)協(xié)議集成到你的定制ni rio(實時輸入輸出)硬件,這樣就可以快速地事先并標準一個完整的pac系統(tǒng)。目錄1. 簡介2. pac(可編程自動化控制器)的ni rio(實時輸入輸出)硬件3. 使用labview和labview fpga 模塊開發(fā)pac(可編程自動化控制器)4. fgpa開發(fā)流程5. 利用ni softmotion來開發(fā)自定義運動
54、控制器6. 應用7. 結束簡介你可以使用lavview和lavview fpga 模塊的圖形編程功能在ni rio器件上配置fpga(現(xiàn)場可編程門陣列)。將labview圖形編程功能和fpga融合在nirio硬件上的就是rio技術。它為開發(fā)復雜的測量和操作系統(tǒng)提供了靈活的平臺,而這些你以前只能用定制設計的硬件來做。 fpga是一種包含許多未配置邏輯門的芯片。不像那些asic(專用集成電路)的芯片只有固定的廠家定制好的功能,你可以為你的特殊的應用配置或重新配置fpga上的邏輯關系。無論是開發(fā)制作asic(專用集成
55、電路)的成本有限還是一大硬件投入使用就要重新配置都可以使用fpga。由于fpga的靈活和可軟件編程的架構,使得定制算法的高精度實施、精準的定時和同步、快速決策和多功能同時運行更容易。今天,fpga正出現(xiàn)在儀器、消費電子產(chǎn)品、汽車、航天器、復印機和專用的計算機硬件上。雖然fpga經(jīng)常用于工業(yè)控制產(chǎn)品,它先前的功能在工業(yè)控制器械上是不容易應用的。由于定義fpga需要使用硬件描述語言和復雜設計工具的專門技術,自古就是硬件設計工程師比控制工程師用fpga的多。圖1.labview fpga 的vi(一種文本圖形編輯器)方框圖和rio硬件平臺 有了labview fp
56、ga模塊和ni rio硬件,你可以用為測量和控制應用特殊設計的labview這種高級的圖形開發(fā)環(huán)境來開發(fā)pac了,開發(fā)具有fpga的專門化、靈活性及高精確性的pac。因為labview fpga 模塊將定制的電路配置到硬件中,所以你的系統(tǒng)可以快速而精確地處理和產(chǎn)生同步的模擬和數(shù)字信號。圖1列舉了許多你可以用labview fpga 模塊來配置的ni rio器件。為可編程自動化控制器的ni rio 硬件 在以前,fpga編程僅限于熟習vhdl或其他低端設計工具的工程師,也就是說他需要征服艱難的學習過程。有了labview fpga 模塊,ni公司讓更多領域的工
57、程師能使用fpga技術,他們能用labview圖形開發(fā)功能定義fpga的邏輯。測量和控制工程師就可以只關注他們所擅長的測試與控制的應用,而不是專注于將邏輯轉換成芯片單元的低級語義。labview fpga 模塊模型之所以有如此有用,是因為它將labview fpga 模塊與fpga的商業(yè)的未定制(cots)硬件結構、周圍輸入輸出元件緊密結合在一起。 ni的可編程自動化控制器為你的工業(yè)控制應用提供了標準的、未定制的平臺。有了rio在pci、pxi、緊湊型視覺系統(tǒng)平臺和基于rio的緊湊的rio引入,工程師們正受益于一個具有fpga的高性能、靈活性、專用化優(yōu)勢的商
58、業(yè)未定制平臺,結果是能隨心所欲地開發(fā)pac。 ni的pci和pxi的r系列的插件設備提供了模擬和數(shù)字數(shù)據(jù)獲取,針對高性能、用戶可配置的定時和同步、在單個設備上的板載決定等功能。利用這些未定制設備,你可以將你的ni pxi或pci工業(yè)控制系統(tǒng),擴展為具有高速離散和模擬信號控制、自定義傳感器接口、精確定時和控制的系統(tǒng)。 ni 緊湊rio 一個以rio技術為核心的平臺,提供了一個小的,工業(yè)上半成品的標準pac平臺。它能在系統(tǒng)定時方面帶給你高性能輸入輸出和空前靈活性。你可以用ni 緊湊的rio為諸如車載數(shù)據(jù)采集、汽車nvh(噪聲振
59、動和聲振粗糙度noise vibration harshness)測試和內置機械控制系統(tǒng)的應用,開發(fā)內置系統(tǒng)。半成的緊湊rio系統(tǒng)是工業(yè)評估與鑒定的,是為在大于50g震動和在-40到70°c的溫度范圍內設計的。 ni緊湊型視覺系統(tǒng)是一個半成的機器視覺包裝,他需要經(jīng)受在機器人技術中常見的苛刻的環(huán)境、自動化測試和工業(yè)檢測系統(tǒng)。ni的cvs-145x設備為分布式的機器視覺應用提供了空前的輸入輸出能力和網(wǎng)絡連接。ni的cvs-145x系統(tǒng)應用ieee的1394(火線)技術,可以與40多種有各種各樣功能、性能和價值的照相機兼容。ni的cvs-1455和ni的
60、cvs-1456設備包含可配置的fpga,所以你可以在你的機器視覺應用中實現(xiàn)計數(shù)器自定義、定時或電機控制。利用labview和labview fpga 模塊開發(fā)可編程自動化控制器有了labview 和labview fpga 模塊,你就為你的工業(yè)控制硬件增加了重要的靈活性和專用化。因為許多pac已經(jīng)使用labview編程的,所以用labview為fpga編程很容易,因為它也使用相同labview開發(fā)環(huán)境。當你把目標定為在ni的rio(實時輸入輸出),labview就只顯示可以在fpga中實現(xiàn)的功能,這樣進一步使得用labview為fpga編程變簡單labview fpga 模塊功能版上包含典型的labview結構與功能,比如while循環(huán)、for循環(huán)、case結構、sequence結構、一系列專業(yè)的labview 中fpga專屬的數(shù)學函數(shù)、信號產(chǎn)生于分析、線
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 南京信息工程大學《物聯(lián)網(wǎng)應用3》2023-2024學年第二學期期末試卷
- 上海海洋大學《小學班級管理主任工作》2023-2024學年第二學期期末試卷
- 溫州醫(yī)科大學仁濟學院《水利工程類專業(yè)導論》2023-2024學年第二學期期末試卷
- 2025屆惠水縣四下數(shù)學期末教學質量檢測模擬試題含解析
- 長治幼兒師范高等??茖W?!秶嬋宋锢L本》2023-2024學年第二學期期末試卷
- 天津天獅學院《集成電路CAD課程設計》2023-2024學年第二學期期末試卷
- 長春健康職業(yè)學院《動物學實驗》2023-2024學年第二學期期末試卷
- 河南師范大學《世紀歐美文學》2023-2024學年第二學期期末試卷
- 天津理工大學中環(huán)信息學院《社會科學研究方法》2023-2024學年第二學期期末試卷
- 昭通衛(wèi)生職業(yè)學院《當代小說研究》2023-2024學年第二學期期末試卷
- 2025年鄂東高三語文2月調研聯(lián)考試卷附答案解析
- 滬教版數(shù)學四年級下冊全冊教案
- 數(shù)字孿生技術 課件 第1、2章 概述;數(shù)字孿生中的物聯(lián)網(wǎng)和人工智能
- 2025年廣東省廣晟控股集團有限公司招聘筆試參考題庫含答案解析
- 湖南省2023年普通高等學校對口招生考試英語試卷
- 2024年山東外貿(mào)職業(yè)學院高職單招語文歷年參考題庫含答案解析
- 數(shù)字經(jīng)濟學導論-全套課件
- NB/T 10742-2021智能化綜采工作面設計規(guī)范
- 第6章向量空間ppt課件
- 醫(yī)療機構聘用(返聘)證明
- 碘-淀粉比色法測定淀粉酶活力
評論
0/150
提交評論