LabVIEW“驱动" - 入门 [英] LabVIEW "driver" - getting started
问题描述
我编写了一个独立的应用程序,该应用程序通过RS-232端口控制设备,一些客户希望能够在LabVIEW中使用该设备.我已经看到一些线程描述了学习使用LabVIEW时应从何处开始,但是我想知道是否有人有为LabVIEW编写插件/驱动程序的经验(这是正确的词吗?),也许会为我指明正确的方向.>
现有的应用程序是GUI,它使人们可以用更高层次的概念来控制设备-而不需要知道串行端口通讯的语法和协议.我也想将其抽象化,以便用户可以将某些东西插入LabVIEW,并且我想它公开了一些动词和方法,可以操纵设备并向客户端提供数据.
我认为LabVIEW提供了一个串行端口接口,但是我确信使用该设备的人并不需要编写代码(解析器等)来与设备进行通信.
如果您准备投入一些时间来学习如何在LabVIEW中进行编程,则可以找到有关如何开发仪器驱动程序的相关信息此处和这可能会有所帮助(Rolf Kalbermatter是将LabVIEW与外部代码接口的专家).
如果您想找到LabVIEW程序员,National Instruments可以通过他们的联盟计划将您引荐给您.
(编辑后添加到LAVA论坛中有关为LabVIEW编写DLL的链接)
I have written a standalone app that controls a device through RS-232 port and some customers want to be able to use the device with LabVIEW. I have seen some threads describing where to start when learning to use LabVIEW, but I was wondering if anyone has experience with writing a plugin/driver (is that the right word?) for LabVIEW and perhaps point me in the right direction.
The existing app is GUI that allows people to control the device with higher level concepts - rather than have to know the syntax and protocol of the serial port comms stuff. I want to abstract that away as well so that users can just plug something into LabVIEW and I suppose it exposes some verbs and methods that allow the device to be manipulated and also provide data to clients.
I think there is a serial port interface from LabVIEW, but I am sure the people using this device do not want to have to write the code (parsers and etc) to communicate with the device.
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屋!