版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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 applications.ni
22、 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 vision
23、 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 because i
24、t 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 structures an
25、d 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 digita
26、l 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 communicat
27、es 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 cycle
28、 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 traditional p
29、c 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 compil
30、e 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-accurate em
31、ulation 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 available in
32、 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. the ho
33、st 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 or a p
34、c, 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 includes a
35、 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 opening the
36、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 function
37、 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 compil
38、ed 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 application
39、 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 often pe
40、rformed 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 that o
41、ffers 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 up of t
42、he 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 controllers the
43、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 motion
44、 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 spline
45、 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 run ei
46、ther 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 applicatio
47、ns 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 motion control in-vehi
48、cle 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 labview fpga module brings the flexibility, performance, and cust
49、omization 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, a programming language already used in many industrial con
50、trol 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 flexibility and functionality for applications requiring ult
51、rahigh-speed control, interfaces to custom digital protocols, or a custom i/o mix of analog, digital, and counters.使用labview fpga(现场可编程门阵列)模块开发可编程自动化控制器综述 工业控制上的应用要求高度集成的模拟和数字输入输出、浮点运算和多重处理节点的无缝连接。因为它对这些应用的理想解决方案,在工业控制市场上,可编程自动化控制器(pac)正逐渐被接受。通过一种普通的软件开发环境ni labview,国家仪器公司提供各种可编程自动化控制器的解决方案。有了labvie
52、w,你可以用像ni labview fpga模块一样的附加软件为工业应用开发自定义输入输出界面。 为将fpga技术的灵活性和可定制性并入工业pac系统,国家仪器公司利用labview fpga模块和实时输入输出(rio)硬件提供了一种直观、容易理解的解决方法。无须了解低级的硬件描述语言(hdl)或广泛的硬件设计细节,你可以定义嵌入含有rio硬件对象家族的fpga芯片里的逻辑,也可以快速地为超高速控制、定制的定时和同步、低级的信号处理、用模拟或数字定制的输入输出、一个单独设备的计数器来定义硬件。你也可以将得到的图像、分析、运动控制、比如can和rs232一样的工业协议集成到你的定制ni rio(
53、实时输入输出)硬件,这样就可以快速地事先并标准一个完整的pac系统。目录1. 简介2. pac(可编程自动化控制器)的ni rio(实时输入输出)硬件3. 使用labview和labview fpga 模块开发pac(可编程自动化控制器)4. fgpa开发流程5. 利用ni softmotion来开发自定义运动控制器6. 应用7. 结束简介你可以使用lavview和lavview fpga 模块的图形编程功能在ni rio器件上配置fpga(现场可编程门阵列)。将labview图形编程功能和fpga融合在nirio硬件上的就是rio技术。它为开发复杂的测量和操作系统提供了灵活的平台,而这些你以
54、前只能用定制设计的硬件来做。 fpga是一种包含许多未配置逻辑门的芯片。不像那些asic(专用集成电路)的芯片只有固定的厂家定制好的功能,你可以为你的特殊的应用配置或重新配置fpga上的逻辑关系。无论是开发制作asic(专用集成电路)的成本有限还是一大硬件投入使用就要重新配置都可以使用fpga。由于fpga的灵活和可软件编程的架构,使得定制算法的高精度实施、精准的定时和同步、快速决策和多功能同时运行更容易。今天,fpga正出现在仪器、消费电子产品、汽车、航天器、复印机和专用的计算机硬件上。虽然fpga经常用于工业控制产品,它先前的功能在工业控制器械上是不容易应用的。由于定义fpga需要使用硬件
55、描述语言和复杂设计工具的专门技术,自古就是硬件设计工程师比控制工程师用fpga的多。图1.labview fpga 的vi(一种文本图形编辑器)方框图和rio硬件平台 有了labview fpga模块和ni rio硬件,你可以用为测量和控制应用特殊设计的labview这种高级的图形开发环境来开发pac了,开发具有fpga的专门化、灵活性及高精确性的pac。因为labview fpga 模块将定制的电路配置到硬件中,所以你的系统可以快速而精确地处理和产生同步的模拟和数字信号。图1列举了许多你可以用labview fpga 模块来配置的ni rio器件。为可编程自动化控制器的ni rio 硬件 在
56、以前,fpga编程仅限于熟习vhdl或其他低端设计工具的工程师,也就是说他需要征服艰难的学习过程。有了labview fpga 模块,ni公司让更多领域的工程师能使用fpga技术,他们能用labview图形开发功能定义fpga的逻辑。测量和控制工程师就可以只关注他们所擅长的测试与控制的应用,而不是专注于将逻辑转换成芯片单元的低级语义。labview fpga 模块模型之所以有如此有用,是因为它将labview fpga 模块与fpga的商业的未定制(cots)硬件结构、周围输入输出元件紧密结合在一起。 ni的可编程自动化控制器为你的工业控制应用提供了标准的、未定制的平台。有了rio在pci、p
57、xi、紧凑型视觉系统平台和基于rio的紧凑的rio引入,工程师们正受益于一个具有fpga的高性能、灵活性、专用化优势的商业未定制平台,结果是能随心所欲地开发pac。 ni的pci和pxi的r系列的插件设备提供了模拟和数字数据获取,针对高性能、用户可配置的定时和同步、在单个设备上的板载决定等功能。利用这些未定制设备,你可以将你的ni pxi或pci工业控制系统,扩展为具有高速离散和模拟信号控制、自定义传感器接口、精确定时和控制的系统。 ni 紧凑rio 一个以rio技术为核心的平台,提供了一个小的,工业上半成品的标准pac平台。它能在系统定时方面带给你高性能输入输出和空前灵活性。你可以用ni 紧
58、凑的rio为诸如车载数据采集、汽车nvh(噪声振动和声振粗糙度noise vibration harshness)测试和内置机械控制系统的应用,开发内置系统。半成的紧凑rio系统是工业评估与鉴定的,是为在大于50g震动和在-40到70c的温度范围内设计的。 ni紧凑型视觉系统是一个半成的机器视觉包装,他需要经受在机器人技术中常见的苛刻的环境、自动化测试和工业检测系统。ni的cvs-145x设备为分布式的机器视觉应用提供了空前的输入输出能力和网络连接。ni的cvs-145x系统应用ieee的1394(火线)技术,可以与40多种有各种各样功能、性能和价值的照相机兼容。ni的cvs-1455和ni的
59、cvs-1456设备包含可配置的fpga,所以你可以在你的机器视觉应用中实现计数器自定义、定时或电机控制。利用labview和labview fpga 模块开发可编程自动化控制器有了labview 和labview fpga 模块,你就为你的工业控制硬件增加了重要的灵活性和专用化。因为许多pac已经使用labview编程的,所以用labview为fpga编程很容易,因为它也使用相同labview开发环境。当你把目标定为在ni的rio(实时输入输出),labview就只显示可以在fpga中实现的功能,这样进一步使得用labview为fpga编程变简单labview fpga 模块功能版上包含典型的labview结构与功
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2030年电加热元件(电加热器)行业市场现状供需分析及重点企业投资评估规划分析研究报告
- 2024-2030年版中国污水处理及再生利用行业需求分析及发展规划研究报告
- 2024年数据中心清洁与保养分包合同
- 2024-2030年新版中国金融卡项目可行性研究报告
- 2024-2030年新版中国金树切削工具项目可行性研究报告
- 2024-2030年新版中国精轧钢管项目可行性研究报告
- 2024-2030年新版中国电动用碳刷架项目可行性研究报告
- 2024年度工程设备采购与安装合同
- 2024-2030年全球涂镀板行业发展分析及投资规划研究报告
- 2024-2030年全球及中国贵金属化学品行业运行态势及供应情况预测报告
- 关于学习“国语普通话”发声亮剑【三篇】
- 玻璃厂应急预案
- 婴幼儿游戏照料(婴幼儿回应性照护课件)
- 货车进入车间安全要求
- MAC地址-厂商对应表
- 2022年中国出版业总体状况分析
- BIM大赛题库含答案
- 造纸术学习课件
- (完整版)译林版四年级上册Unit7单元测试
- 水上作业危险源辨识与技术控制措施
- 吊索具检查记录表
评论
0/150
提交评论