There are several ways to achieve this:
1. Distinguish different Network Interface Cards (NICs) through TCP is by using the TCP Listen.vi and TCP Create Listener.vi. Both VIs have an input parameter called net address.
Use the String to IP function for the input in order to enter the IP address of the network card you wish to use.
- Once this connection is established, you may use the Connection ID or Listener ID output to reference this connection. This functionality was specifically implemented for multiple network card configurations.
Figure 1. Using TCP Listen.vi
Figure 2. Using TCP Create Listener.vi
2. If using TCP Open Connection, the operating system decides which network card to use based on the local PC's IP address and the IP address of the computer to which you are attempting to open a connection.
3. By using FTP VIs, there are actually two connections being made with the FTP server.
- First connection is the command connection, where commands are being sent. The FTP server is the listener and the client is the one that opens the connection.
- Second is a data connection, which is opened only when transferring a file. For the data connection there are two choices : Active or Passive.
- Active connection: the data connection is opened by the FTP server and the client is the listener (reverse of the command connection)
- Passive connection: FTP server listens and the client connects.
**Active is the default behavior for most FTP clients which means that we are doing a TCP Listen on the client side.
The simplest way to make LabVIEW use a particular network card is to simply force the connection to be Passive by changing the Active input of FTP Get File.vi to false and entering the IP address of the network card to the host input of the FTP Get File.vi.
Figure 3. Using FTP Get File.vi