From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

develop visa driver

I'm new to Labview. I have a Hardware, connected vie etthernet to a desktop computer. I want provide labview code, to easy connect to Labveiw with this hardware.

 

A code in VC C++ already exists connecting to the hardware, with

 

1) Init function, initialising the hardware, prompting first time the user for ip address and finding all modules connected to the hardware

2) start function, starting thread for each module, writing and reading data to an form each module with a given period as parameter

3)IO functions reading and writing to each module, parameters: module, bytepos and value for writing.

 

Is the Visa Driver developemnt the proper way of doing it?

open -> 1)

configure -> 2)

peak, poke -> 3)

 

It is a good idea to use the c-code library functions in an dll library connecting to labview?

 

Or should I use an other approach?

 

Thanks in advance.

0 Kudos
Message 1 of 13
(5,086 Views)

First check to see if there is a LabVIEW driver already available.  Inside of LabVIEW, you can go to Tools->Instrumentation->Find Instrument Driver.  That will open up a window to let you search for your instrument and then install the driver for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 13
(5,079 Views)

Thanks for your hint,

The driver is definitly not yet existing, since the hardware project is an open source project offered by a partner company. In cooperation I want to develop the Labview driver as an open source add on for that hardware.

 

Best regards,

Lutz

 

 

0 Kudos
Message 3 of 13
(5,062 Views)

Well, in that case you should probably just look through the drivers for an instrument.  The Agilent 34401 DMM should be built in for you.  That should give you some good ideas of how to set up your driver.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 13
(5,053 Views)

These are NI's recommendations. Hope it helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 5 of 13
(5,041 Views)

Thanks for all the links,

 

I went through many of the documents.

 

Again the description: In Visual C++ is already existing code, where the user can write an application using API functions for Initialising, Starting and I/O. Only in the background threads, the data are transfered and recieved via Ethernet to the hardware.

 

Rewriting the C code in Labview would only increase the maintanace work.

 

All what i read about VISA functions, they are interfaces to a card, serial port, TCP/IP devices. In my case, Labview should access the c- API functions, so that code will handle the access to the hardware. What is the best way for this access.

 

It is a good idea to import them through a library dll as vi's, put them into the private section of my Labview driver, and use Labview standard public function signitures  to provide a uniqe interface for my code? Exist such an standard, and if yes, where I can find it?

 

Or it is better way , to run the VC Application with a socket server, and using VISA with TCP/IP as resource?

0 Kudos
Message 7 of 13
(4,979 Views)
A c type dll is accessed with the Call Library Function Node. Look at the examples that come with LabVIEW.
0 Kudos
Message 8 of 13
(4,965 Views)

This approach I have already discovert. I might be little complicated what I descriped above, but providing just the dll interface in Labview is not sufficient, because it will be not easy to swich from an other hardware (which communicates via intstrument driver) to this one, if there is not a common interface.

 

So do you think to reach that goal, embedding the dll-interface in the drivers private section will be a good approach?

0 Kudos
Message 9 of 13
(4,901 Views)

To be clear, it should be easy to use existing labview code for an existing instrument to adopt it for the new one which I want to use.

0 Kudos
Message 10 of 13
(4,899 Views)