LabVIEW“驱动" - 入门 [英] LabVIEW "driver" - getting started

查看:269
本文介绍了LabVIEW“驱动" - 入门的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个独立的应用程序,该应用程序通过RS-232端口控制设备,一些客户希望能够在LabVIEW中使用该设备.我已经看到一些线程描述了学习使用LabVIEW时应从何处开始,但是我想知道是否有人有为LabVIEW编写插件/驱动程序的经验(这是正确的词吗?),也许会为我指明正确的方向.

现有的应用程序是GUI,它使人们可以用更高层次的概念来控制设备-而不需要知道串行端口通讯的语法和协议.我也想将其抽象化,以便用户可以将某些东西插入LabVIEW,并且我想它公开了一些动词和方法,可以操纵设备并向客户端提供数据.

我认为LabVIEW提供了一个串行端口接口,但是我确信使用该设备的人并不需要编写代码(解析器等)来与设备进行通信.

解决方案

如果您准备投入一些时间来学习如何在LabVIEW中进行编程,则可以找到有关如何开发仪器驱动程序的相关信息此处 解决方案

If you are prepared to invest a bit of time into learning how to program in LabVIEW, the relevant info on how to develop an instrument driver can be found here and here .

Essentially you should provide a set of VI's (the unit of LabVIEW code) that implement the various operations supported by your device. LabVIEW programmers will chain a sequence of these together using the VISA resource (i.e. serial port) and error in/out terminals which your VI's should provide. See the second link for an example.

If you don't want to learn how to do this properly - which your second post suggests you don't - then either create a DLL that exposes the necessary functions, or commission a LabVIEW programmer to write the driver for you. If you can supply adequate documentation of your protocol and it's not hideously complicated then it should take them an afternoon. If you have users who are keen on LabVIEW then one of them might be happy to do the job for you for an appropriate discount or incentive - it's really not hard for anyone competent in LabVIEW to do and they are the ones who already have their hands on your device and understand what it does. You might want to beta test the result with your other LabVIEW users first, as you won't be in a position to assess the quality of what they do yourself.

If you go the DLL route you'll need to check that the parameters you require are compatible with LabVIEW data types. I'm not a C/C++ programmer so I can't tell you in detail what this means but this might be helpful (Rolf Kalbermatter is the guru on interfacing LabVIEW with external code).

If you want to find a LabVIEW programmer then National Instruments can refer you to one through their alliance scheme.

(Edited to add link to LAVA forum post on writing DLLs for LabVIEW)

这篇关于LabVIEW“驱动" - 入门的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆