Drivers In Labview Vi
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.
Enter the function group, short text and click save. Enter the import parameter INPUT. Below screen will appear. Click continue. Below screen will appear.
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 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).
National Instruments LabVIEW instr.lib. Rename the driver folder to the driver name you would like to appear in LabVIEW. Re-open LabVIEW. Open a new VI and right-click on the block diagram to open the Functions Palette. Your instrument drivers should appear under Functions » All Functions » Instrument I/O »Instrument Drivers on the Functions Palette as shown below. XP2i LabVIEW Drivers Manual — Overview IntroductIon The XP2i LabVIEW Driver Library is a set of VIs (Virtual Instruments) that implements the serial commands of the XP2i. A sample test panel is also provided to demonstrate the use of each of the VIs, as well as a simple data plotting example.
There are two options for what you're trying to do. • Create a DLL that users of your device can.
• Rewrite your application in LabVIEW. To reach the largest possible number of potential customers, option #1 would be the best solution for you. If your customers are specifically asking for a LabVIEW driver then option #2 would probably be the least hassle for that specific customer. The reason for this is that LabVIEW is very much a niche language (for automation and data acquisition), and for many LabVIEW developers it's the only language they know (or the only one they know well). LabVIEW can handle RS232 communication with little problems - you just need to provide the customer with a list of the commands and syntax that the device uses, and perhaps a small framework or example VI with basic functionality. I applaud you for wanting to provide a more robust driver that doesn't require the user to parse their own commands; what is usually called a LabVIEW 'driver' by most vendors is little more than a few commands ('init','read') bundled up in a simple GUI.
You don't have to rebuild your complete application, just give them enough to get started on their own =) To get started, you will probably want to use. Your customer wants to use your code with LabVIEW.