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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting up TCP/IP

Hello,

 

I am trying to set up a TCP/IP connection with an Epsilon EP-P Servo Motor.  I am trying to understand the TCP Communicator Active/Passive vis.  Can someone explain it a little to me? I am new to TCP/IP connection. 

 

My question is: What is a remote port number?  I know it is specific to the ip-address, I am assuming it is for the driver on my ethernet bus.  Where can I find the correct port number to use?

 

When I just run Commincator Passive.vi, I get an error.

 

====

Error 56 occured at TCP Wait On Listener in TCP Listen.vi:1 --> TCP Communicator - Passive.vi

 

LabVIEW:  The network operation exceeded the user-specified or system time limit.

====

 

Thanks,

Danny

0 Kudos
Message 1 of 2
(2,129 Views)

I think you are looking at the wrong examples for what you want to do. Since you are connecting to your servo motor you should look at the "Data Client" example. This is basically what you will need to do. The remote port number is the port number the device will be listening on for clients to establish a connection. The documentation for the device should include what port it uses. You do not, and should not, specify a local port number. Let the stck assign that for you. You will need to look at the documention for teh device to see what protocol/messaging it uses. Your code will have to match that in order to communicate with the device. Some devices simply accept ASCII commands. Others have a more elaporate protocol and use binary messages. You will need to use four basic VIs: TCP Open, TCP Close, TCP Read and TCP Write.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 2
(2,118 Views)