Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a driver

I'm fairly new to LV.
 
I want to write a instrument driver for a DC->AC inverter. I already have C source code library from the manufacturer of the inverter that uses their RS-232 protocol.
 
All the examples I've seen involve writing device VI's within LV commands, such are VISA-read, VISA-write, etc. and then using LV command to strip out the data from responses. This seem silly to me since I already have 90% of the code  written with the manufacture's C source code.
 
Can someone point me in the direction I should go?
 
Thanks.
 
 
0 Kudos
Message 1 of 3
(3,440 Views)

What about compiling the source code into a dll and calling the functions from within LabVIEW?

Under Help in LabVIEW you should find assistance and examples of calling external code within dll's

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 3
(3,437 Views)
Hi

It is silly to double the work.
In lv8.2 you can even automatically generate a wrapper around the dll.
But for new implementations and testing LabVIEW is superior in debugging stuff like this.
I'm old in LabVIEW and even older in other programming languages and find it a lot easier than all others I learned since 1975.

So for new I suggest use LabVIEW
For already implemented stuff, add a layer the cheapest way possible
and when an update is necessary do it in LabVIEW

greetings from the Netherlands
0 Kudos
Message 3 of 3
(3,424 Views)