01-28-2022 04:15 AM
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
Solved! Go to Solution.
01-30-2022
10:40 PM
- last edited on
11-06-2024
06:49 PM
by
Content Cleaner
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?
01-31-2022 02:54 AM
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.
01-31-2022 08:39 AM
@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.