LabVIEW如何减少下一代测试系统中的硬件过时3
Initial System Configuration
As shown in Figure 4, the test application is running on an NI PXIembedded controller with Windows XP. The PXI controller is connected to theAgilent 33220A signal generator through LAN, to the Tektronix TDS2024 oscilloscopeover USB, and to the Fluke 8845A DMM over GPIB. The NI-SWITCH is controlledover the PXI bus in the PXI chassis. The test fixture is made fromcommercial-off-the-shelf (COTS) products. A low-pass, lowfrequency filter andLED are on the DUT.
Figure4. Hardware in Implementation Example
On top of Windows XP, the application uses NI-VISA to call into thebus specific code (NI-488.2 for GPIB,Windows USB stack, Windows TCP/IP stack).Because NI-VISA will support new instrument control buses in the future, you donot have to worry about upgrading to models that incorporate these new bustechnologies. Also, just like LabVIEW, NI-VISA is OS independent, so you canmove it onto any other OS that NI supports.
To call into NI-VISA, the application uses either LabVIEW Plug andPlay instrument drivers or IVI drivers. The IVI drivers require the IVICompliance Package. NI-VISA includes NI Measurement & Automation Explorer(MAX), which is used to establish communication with the instruments andconfigure the IVI Class driver sessions necessary to use the interchangeabilityfeature of IVI. It would also have been feasible to call directly into VISA fromthe DSSP implementation (direct I/O), but that is recommended only if aninstrument driver is not available.
HAL Implementation Software Architecture
Figure 5 shows the HAL architecture with specific functions listedand the instrument models displayed. The switch is initialized and closeddirectly in ASL by using the NI-SWITCH instrument driver. Though less thanideal, this illustrates that sometimes interchangeability is a higher priorityfor certain instrument/measurement types. Deviating from ASL-DSSP conventionleaves room for future improvements. The ability to add switch functions to theDSSP and create DSSP modules for switches shows how you can extend the HAL.
Figure5. Software in Implementation Example
Test code and ASL code in thisimplementation are standard VIs, not LabVIEW classes. Only the DSSP layer uses LabVIEWclasses (OOP) to allow for dynamic interchangeability and ease developmentefforts by creating a standard set of DSSP functions. The dashed line in Figure5 shows where the interchangeability occurs.
Figure 6 shows the project explorer view of the HAL implementationin LabVIEW. Private data that can be accessed only by the class is representedas a control (.ctl file) and requires Data Member Access VIs such as “Read Instr Resource Str.vi“。
Figure6. Project View of HAL Implementation in LabVIEW
需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。