Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA USB driver for sbRIO-9627

Hello,

I´m trying to communicate with a sbRIO-9627 FPGA board via a VISA USB driver. In the meantime I was able to create with the driver wizard a VISA USB driver for Windows and the sbRIO is detectet in MAX as a VISA device.

 

I´m also able to open a VISA session and read bytes from the USB port.

 

My problem is now that I can´t find any further information or examples how the programming part on the sbRIO-FPGA side should look like.

 

In MAX I have seen that on the sbRIO board already a software is installed which is called „NI-VISA 16.0“ and also „NI-VISA USB passport“.

Is there any documentation how to develop a VISA driver for sbRIO boards ?

 

Thanks

Holger

0 Kudos
Message 1 of 5
(3,802 Views)

Hey Holger,

 

there are several starting points for this. Have you tried out the following examples:

 

RS-232 Interface Reference Example for LabVIEW FPGA - National Instruments
http://www.ni.com/example/27164/en/

 

Re: RS232 with FPGA crio - anyone done this ? - Discussion Forums - National Instruments
https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/RS232-with-FPGA-crio-anyone-done-this/m-p/43...

 

Otherwise, this thread might be of interest for you:

 

sbRIO-9631 and communicating using RS-232 - Discussion Forums - National Instruments
http://forums.ni.com/t5/LabVIEW/sbRIO-9631-and-communicating-using-RS-232/td-p/1405868

 

Cheers,

Niko

Niko NR
Systems Engineer, National Instruments
0 Kudos
Message 2 of 5
(3,726 Views)

Hey Nico,

 

thanks for your reply.

I already saw the examples given for the RS232 but that´s not what I´m searching for. As far as I understood they are for an additional port – not for the USB interface which is already connected.

I also don´t want to limit my transmission rate.

 

Until now I thought a VISA USB drive would be the answer but perhaps my question was much to detailed and does not really describe my problem:

 

We want to build an instrument based on a sbRIO-9627 FPGA. For this instrument it is necessary to get a driver which is also accessible not only from a LabVIEW programm but from other languages like C+.

To be more specific: In our case the sbRIO instrument will be part of a bigger setup which is already running under IGOR (from wavemetrics).  Therefore I´m searching for the best way of programming (connecting to) our sbRIO device.

I really like NIs way of programming in which there is an application on the host computer which handles the connection via USB or LAN to the sbRIO device. It was quite easy and there are many examples.

My only problem is that in this case I have just a LabVIEW programm. How would an external programm written in C+ or especially in IGOR get a connection to the LabVIEW host application?

 

More general:  If a company decides to build an instrument based on the sbRIO-9627 – how would they write an instrument driver which customers can address under C (or languages like VisualBasic etc.) ?

 

Cheers

Holger

0 Kudos
Message 3 of 5
(3,696 Views)

Hi Holger,

thanks for the clarification.

That changes pretty much everything from a design point of view. 

Normally, you would call a compiled C DLL from within LabVIEW. I don't know if this is possible for Igor. The other option I would see is to establish a TCP/IP conenction between LabVIEw and Igor, like suggested in this post here:

 

Read / Write a Network Shared Variable from a C++ program - Discussion Forums - National Instruments
https://forums.ni.com/t5/LabVIEW/Read-Write-a-Network-Shared-Variable-from-a-C-program/td-p/2680853

 

Does that work for you?

Otherwise how much data do you have to transfer and how often?

Cheers,

Niko

Niko NR
Systems Engineer, National Instruments
0 Kudos
Message 4 of 5
(3,692 Views)

Hallo Niko,

 

thanks a lot for your quick answer – now I think I´m much more on the right way. Your hint with the DLL is something I was already thinking about. Unfortunately I never before worked with DLLs.

 

What I´m knowing so far is: LabVIEW has the possibility to address DLLs and I found a tutorial how to do this if the DLL is already existing. I also have seen that there is an example in the subfolder called „DLL“.

 

As far as I understood in IGOR there is also the possibility to convert DLL code which is written in C+ to a file IGOR can deal with.

 

I will try if I´m able to read or write a simple variable in the way it is shown in the LabVIEW example with IGOR. Later it should be possible not only to set single parameters of our instrument but read (fast) a whole dataset.

Thanks so far

Holger

0 Kudos
Message 5 of 5
(3,685 Views)