Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Communication problem, 6221 via ethernet

6220, 6221 Current Sources
Post Reply
SimonG
Posts: 1
Joined: March 31st, 2014, 12:17 pm
Country: Canada

Communication problem, 6221 via ethernet

Post by SimonG » March 31st, 2014, 12:31 pm

Hi,
I am trying to control a 6221 source via an ethernet cable connected directly to my computer. MAX doesn't see the source. I made sure my computer is set to "Obtain an IP address automatically". I tried adding it manually with its IP address but MAX still wasn't finding it although I was able to ping in through the command window.
I also have a DAQ-6341 connected to the same computer and had no problem with it.

Any ideas?

Thanks

Andrea C
Keithley Applications
Keithley Applications
Posts: 1323
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: Communication problem, 6221 via ethernet

Post by Andrea C » April 2nd, 2014, 6:17 am

Hi Simon,

You can successfully ping the 6221 from the command line of your computer?

In NI-VISA, is the passport for TCPIP and VXI-11 enabled?
In NI-MAX, use menu: Tools>NI-VISA>VISA Options and examine the Passports.

Andrea

bsrf88
Posts: 2
Joined: December 4th, 2014, 12:15 am
Country: China

Re: Communication problem, 6221 via ethernet

Post by bsrf88 » December 4th, 2014, 1:17 am

Hi,
I have the same problem. I can successfully ping the 6221 from the command line of my computer. but the MAX can't find the 6221. I have check the MAX according to your advices, the passport for TCPIP and VXI-11 is okay in menu Tools>NI-VISA>VISA Options. What do I should do next?

Dave W
Tektronix Applications
Tektronix Applications
Posts: 276
Joined: April 26th, 2010, 12:01 pm
Country: United States

Re: Communication problem, 6221 via ethernet

Post by Dave W » December 4th, 2014, 7:55 am

Hi,

The 6221 is not an LXI capable Ethernet instrument so MAX will not be able to automatically detect it. To get the instrument to appear in MAX you will need to add it manually as a Raw Socket TCP/IP Resource.

To add the 6621 in MAX do the following:
  • Go to Network Devices in MAX and click Add Network Device.
  • In the Create New... dialog select Manual Entry of Raw Socket then click Next
  • Enter the IP address of the instrument in the Hostname or IP address field. Enter 1394 in the Port Number field. Click Next.
  • Give the instrument an alias if you would like then click Finish.
The instrument should now be added to MAX.

Note: when you open a VISA session to the instrument you will most likely need to enable the termination character in order to send and receive messages to/from the instrument without the writes/reads timing out.

Hope this helps!

bsrf88
Posts: 2
Joined: December 4th, 2014, 12:15 am
Country: China

Re: Communication problem, 6221 via ethernet

Post by bsrf88 » December 4th, 2014, 6:33 pm

Hi Dave W

Thank you very much! Everything is okay.

Port number 1394 is the key point of my problem. It seems that I can't find the Port number in the reference manual of 6221.

bryerton
Posts: 1
Joined: June 19th, 2018, 12:10 pm
Country: Canada

Re: Communication problem, 6221 via ethernet

Post by bryerton » June 19th, 2018, 12:16 pm

If you are using pyvisa, you can use the following python code to print out the identification information

It's not that clear but TCPIP0 indicates the first ethernet adapter on your PC, to access a device connected to the another adapter, adjust the '0' as appropriate.

192.168.1.205 is the IP for my device, change as appropriate
1394 is the port (discovered via this thread, this information is still missing from the manual as of June 19, 2018)

Code: Select all

import visa
rm = visa.ResourceManager()
i_source = rm.open_resource('TCPIP0::192.168.1.205::1394::SOCKET', write_termination='\r', read_termination='\n')

i_source.write("*idn?")
print (i_source.read())

Post Reply

Return to “Current Sources”

Who is online

Users browsing this forum: No registered users and 1 guest