LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to develop a LV driver

I developed a MCU based DAQ and control system that communicates with PC via COM port. My client would like to have a driver for LabView. Since I am not familiar with LV system, but I can program in C, so I would like to ask if I can develop the driver as a dll, and if is there any special requirements that I should know? 

0 Kudos
Message 1 of 7
(3,317 Views)

Once you are done with your VI's functionality & testing it thoroughly, you can develop a driver in LV by building the VI as a DLL.

 

In your Project Explorer, if you rt-click Build Specifications, you can see many options under New >> EXE/DLL/Zip... Use the DLL option to create a LV driver out of your VI.

 

Also, read this article about LV Project Explorer.

Message Edited by parthabe on 10-19-2009 05:08 AM
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 7
(3,309 Views)

From my point of view an awkward solution, but it is doable. Just a tip. Keep the return types and input very simple. Do not use structures but simple types like arrays,numbers, and strings.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 7
(3,295 Views)

I guess you create a dll with a C SDK...

Yes you can build a "LabVIEW driver" using your C-dll. LabVIEW offers a "Call Library Function Node" element:

Unbenannt.JPG

You can configure the node with this dialogue and add, remove parameters. I think your client needs a set of VIs each one calling a certain C function (Init, Status, Read, Write). I never tried to handle events.

Yours RZM

0 Kudos
Message 4 of 7
(3,281 Views)

Coq Rouge wrote:

From my point of view an awkward solution, but it is doable.


Did you mean mine or in general the OP's query? Smiley Indifferent

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 5 of 7
(3,278 Views)

Hey Daodao,

 

For some more information about using the Call Library Funtion Node to call your .dll from LabVIEW, check out this NI Developer Zone: Tutorial.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 6 of 7
(3,230 Views)

I'm thinking that learning enough LabVIEW to understand the requirements to develop a C based dll, then develop and test a LabVIEW wrapper is harder than looking at the serial examples in LabVIEW (he did say it communicates vi the COM port) and writing some vi's that encode/decode the necessary protocol. Since you developed the system I would presume that you are more than a little familiar with the protocol. Then the driver is in "Native" LabVIEW and changes won't require revisiting the dll.  Developing the dll in LabVIEW seems like adding one extra, unnecessary step, unless the desire is to hide the Intellectual Property regarding communicating with the unit. The customer's request appeared to be for a LabVIEW driver, if it was for a dll to be used elsewhere that would be a different story.

 

 

Message Edited by LV_Pro on 10-20-2009 11:10 AM
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 7 of 7
(3,223 Views)