Author Topic: Solved: Controlling an spd3303x PS using python+pyvisa+ni-vi, vxi11  (Read 1069 times)

0 Members and 1 Guest are viewing this topic.

Offline n3mmr

  • Regular Contributor
  • *
  • Posts: 96
  • Country: se
It turned out it was simple:

You need to instantiate instruments with write_termination = '\n', read_termination = '\n'.

Like so:
ps1 = rm.open_resource('<string descrbing instrument>', with write_termination = '\n', read_termination = '\n')

Then write and read work, but not query.


I installed NI-VISA and EasyPower, and I can control the PS thru ni-max as well as thru the scpi panel in EasyPower.

I would dearly love to be able to control the 3303X via pyvisa and pyvisa-shell.

I can do 'list' in pyvisa-shell, and then 'open 0' to get at the USB connection to the 3303X.

However, 'query' anything to the 3303X just makes the power supply beep.
Restarting all, power supply and pyvisa, and then doing 'write *IDN?' completed, but 'read' then returned an empty string.
Writing any correct scpi at all works, returning success, but no response strings can be read.
And doing 'query <SCPI COMMANDS>' makes the 3303X beep and then any 'write' operation makes it beep.

NI-MAX can send strings to the 3303X and gets proper strings back.

What can the problem be?
« Last Edit: March 08, 2019, 04:05:20 pm by n3mmr »
 

Offline awallin

  • Frequent Contributor
  • **
  • Posts: 692
Re: Controlling an spd3303x PS using python+pyvisa+ni-visa fails
« Reply #1 on: March 03, 2019, 02:11:39 pm »
Under linux and using Ethernet I recall us using vxi-11 without issues:
https://pypi.org/project/python-vxi11/
 
The following users thanked this post: n3mmr

Offline n3mmr

  • Regular Contributor
  • *
  • Posts: 96
  • Country: se
Re: Controlling an spd3303x PS using python+pyvisa+ni-visa fails
« Reply #2 on: March 03, 2019, 04:57:50 pm »
Is the 3303X  a  VXI  machine?
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 22019
  • Country: nz
  • Taupaki Technologies Ltd. NZ Siglent Distributor
    • Taupaki Technologies Ltd.
Avid Rabid Hobbyist
 

Offline n3mmr

  • Regular Contributor
  • *
  • Posts: 96
  • Country: se
Re: Controlling an spd3303x PS using python+pyvisa+ni-visa fails
« Reply #4 on: March 03, 2019, 07:34:39 pm »
Under linux and using Ethernet I recall us using vxi-11 without issues:
https://pypi.org/project/python-vxi11/

After I found the manual page, this actually worked quite well. ThNks for the pointer!
 

Offline n3mmr

  • Regular Contributor
  • *
  • Posts: 96
  • Country: se
Re: Controlling an spd3303x PS using python+pyvisa+ni-vi, vxi11
« Reply #5 on: March 04, 2019, 02:57:20 pm »
This is getting intresting!

Tried all the queries available in 3303x scpi, using vxi11+python.

*READALL? is interesting!

That returns a string with eleven comma separated words.
I think they mean

Unknown first word
Ch1 volt out
Ch1 curr out
Ch1 power out
Ch2 volt out
Ch2 curr out
Ch2 power out
Ch1 volt set
Ch1 curr set
Ch2 volt set
Ch2 curr set

So, what does the first "word" mean?

I have so far seen two values of that first word: '4' and '52'.

What's up?
« Last Edit: March 06, 2019, 08:39:16 am by n3mmr »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf