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: 

How to communicate wth a LAN instrument that needs a port specified

Solved!
Go to solution

I am trying to use LabVIEW to communicate with a TSR temperature controller from Temptronic.  The controller has a fixed IP address.  The manual specifies that port 23 is the default port and is used when connecting via internet explorer.  This works fine.  The other port is 9760 is used to send commands to the instrument.   I can ping the instrument from a windows command window.   MAX does not see the instrument.  When trying to add it manually in MAX, I can specify the IP adddress, but there is nowhere to put a port number.  xxx.xxx.xx.xxx:port is not accepted by MAX.  Within LabVIEW, I have tried using the TCP vi and the data socket vi.  Using data socket, if I specify http://xxx.xxx.xxx.xxx[text] I can get the web page text returned from the temperature controller, but I can not figure out how to specify I want port 9760.  Using the TCP vi, I have an input for port, however if I use 23 or 9760, the TCP open vi waits the full 60 seconds of time out and then errors stating that it timed out.  I have tried every port between 1 and 9999 and interestingly, if I specify port 80, there is no error, however the following TCP write does not communciate with the instrument.  Any advice would be greatly appreciated.

0 Kudos
Message 1 of 9
(3,458 Views)

I am trying to use LabVIEW to communicate with a TSR temperature controller from Temptronic. 
The controller has a fixed IP address.  The manual specifies that port 23 is the default port
and is used when connecting via internet explorer.  This works fine.  The other port is 9760
is used to send commands to the instrument.   I can ping the instrument from a windows command
window.   MAX does not see the instrument.  When trying to add it manually in MAX, I can specify
the IP adddress, but there is nowhere to put a port number.  xxx.xxx.xx.xxx:port is not accepted
by MAX.  Validation fails with or without the added port number.  Within LabVIEW, I have tried using

the TCP vi and the data socket vi.  Using data socket,
if I specify http://xxx.xxx.xxx.xxx[text] I can get the web page text returned from the temperature
controller, but I can not figure out how to specify that I want port 9760.  Using the TCP vi, I have an
input for port, however if I use 23 or 9760, the TCP open vi waits the full 60 seconds of time out
and then errors stating that it timed out.  I have tried every port between 1 and 9999 and
interestingly, if I specify port 80, there is no error, however the following TCP write does
not communciate with the instrument and port 80 is not mentioned in the instruments documentation.

Thanks in advance for any information.

0 Kudos
Message 2 of 9
(3,451 Views)

I am absolutely delighted to see that even though I typed the colon punctuation mark followed by the word "port" in my text above that some computer thought it was smarter than I am and "fixed" it for me.  My bad for not hitting the preview button.  I am also even more delighted that something crashed when I first entered this post taking out all of my typing only to find out, after reentering the information and reposting, that the original post went through.   Sorry for the redundancy.

0 Kudos
Message 3 of 9
(3,447 Views)

Set it up in NI-MAX (Measurment Automation eXplorer) as a new network device and select TCP/IP device then Manual Entry and put the IP and Port in the boxes.

 

Give it a VISA alias and you should be good to go.

 

max.PNG

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 9
(3,441 Views)

If you are using the TCP primitives instead of VISA then do it like this...

socket.PNG

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 9
(3,435 Views)

@A1Penguin wrote:

I am absolutely delighted to see that even though I typed the colon punctuation mark followed by the word "port" in my text above that some computer thought it was smarter than I am and "fixed" it for me. 


Are you talking about having : port  (without the space) showing up as Smiley Tongue?  Because I don't see that issue when I view your post.  That is because I fixed the default forum setting.

 

Go to your Discussion Forum profile settings, My settings, Preferences, Display.

There is an option called "Emoticon Type" it is probably set on Use default (smiley).  Change it to None.

 Then 😛   (   :  P without the spaces) will not show up automatically as Smiley Tongue

Message 6 of 9
(3,431 Views)

Thank you Ravens Fan.  The emoticon is now gone.  If only my port problem was as easy to fix.

0 Kudos
Message 7 of 9
(3,416 Views)

Thank you RTSLVU.  I had not noticed the third option when manually adding an instrument.  I did get to the screen where I could specify the port number, however now I am at the same road block as when using the TCP open vi.  It will only validate if I use port 80 which is not one of my allowable ports.  The instrument does not respond to visa commands when port 80 is specified.   The TCP open vi times out if I use anything but port 80, but the instrument does not respond to TCP commands from subsequent TCP writes.

0 Kudos
Message 8 of 9
(3,413 Views)
Solution
Accepted by topic author A1Penguin

This doesn't direclty answer my question as posed, however here is how I ultimately communciated with the TSR SA 202403 temperature controller. 

0 Kudos
Message 9 of 9
(3,351 Views)