LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW TCP/IP interface: through NI-VISA or TCP/IP dedicated blocks?

Solved!
Go to solution

Hi,

 

I  designed a custom system that communicates with a LabVIEW GUI via TCP/IP. Which is the best to use for the interface: the NI-VISA core or the dedicated TCP/IP blocks? I know it works with NI-VISA, but to what extend?

 

PS: I am sending large amount of data over TCP/IP.

 

Thanks in advance,

VM

0 Kudos
Message 1 of 4
(2,937 Views)

Hi Vlad,

 

I'd suggest using the TCP nodes if you want to do TCP/IP communication.

Is there some problem or concern you have about these?

 

There are some guides and documents about using TCP in LabVIEW, but if you've already built the other half of this system I'd guess they might not be necessary for you?

Basic TCP/IP in LabVIEW 

Using LabVIEW with TCP/IP and UDP 

How to Transfer Big Amounts of Data Using TCP/IP 


GCentral
Message 2 of 4
(2,878 Views)

It very much depends what you really are working on:

 

- TCP Nodes

   + LabVIEW built in, no extra installation necessary 

   + Since LabVIEW 2020 also supporting TLS connection

   + Most efficient

   - If you need to get a some properties of a TCP socket you need to go through some hassles by converting the refnum to a platform socket and calling system APIs on the refnum 

 

- NI-VISA

   - Extra VISA Runtime installation needed

   - Not supporting TLS connections as of now

   - Slightly more overhead through multilayered VISA driver architecture

   + VISA Property nodes support some of the most common TCP/IP socket options

   + VISA is an unified API that lets you easily write one single driver to communicate with a specific instrument that supports GPIB, RS-232, Ethernet interfaces

 

The last point is the main reason to choose NI-VISA above the native TCP nodes. If you only talk to a TCP server there is no real advantage of using the NI-VISA interface. And if you need to implement the TCP Server side NI-VISA is not even an option.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 4
(2,865 Views)
Solution
Accepted by topic author vlad.mihai

@rolfk wrote:

...

   + VISA is an unified API that lets you easily write one single driver to communicate with a specific instrument that supports GPIB, RS-232, Ethernet interfaces

 

The last point is the main reason to choose NI-VISA above the native TCP nodes. If you only talk to a TCP server there is no real advantage of using the NI-VISA interface. And if you need to implement the TCP Server side NI-VISA is not even an option.


+1 to Rolf's last point. I communicate with many instruments that have the option of serial, Ethernet, or USB (or a virtual serial port over USB). These can be communicated with directly through a local serial port or through an Ethernet serial server via TCP/IP (or a local virtual COM port mapped to an Ethernet serial server). So the VISA flexibility is quite awesome to select between COM and TCP options on-the-fly as a system goes from R&D on the bench to a distributed control system on a network in production.

 

If you are implementing a custom TCP/IP communications scheme that will always remain TCP/IP, then for sure use the TCP/IP API primitives. If you are doing instrument communications, VISA is a great option.

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
Message 4 of 4
(2,849 Views)