Coder Social home page Coder Social logo

get_Frequency about qulab HOT 6 CLOSED

feihoo87 avatar feihoo87 commented on August 11, 2024
get_Frequency

from qulab.

Comments (6)

feihoo87 avatar feihoo87 commented on August 11, 2024

Check result of the following code

import visa

pna_addr = 'Your PNA Address'

rm = visa.ResourceManager()
pna = rm.open_resource(pna_addr)
print(pna.query('CALC:X?'))

from qulab.

Lagikna avatar Lagikna commented on August 11, 2024
---------------------------------------------------------------------------
VisaIOError                               Traceback (most recent call last)
<ipython-input-56-0d079e9273cb> in <module>()
      5 rm = visa.ResourceManager()
      6 pna = rm.open_resource(pna_addr)
----> 7 print(pna.query('CALC:X?'))

B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\resources\messagebased.py in query(self, message, delay)
    562         if delay > 0.0:
    563             time.sleep(delay)
--> 564         return self.read()
    565 
    566     def ask(self, message, delay=None):

B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\resources\messagebased.py in read(self, termination, encoding)
    411         if termination is None:
    412             termination = self._read_termination
--> 413             message = self._read_raw().decode(enco)
    414         else:
    415             with self.read_termination_context(termination):

B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\resources\messagebased.py in _read_raw(self, size)
    384                     logger.debug('%s - reading %d bytes (last status %r)',
    385                                  self._resource_name, size, status)
--> 386                     chunk, status = self.visalib.read(self.session, size)
    387                     ret.extend(chunk)
    388             except errors.VisaIOError as e:

B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\ctwrapper\functions.py in read(library, session, count)
   1582     buffer = create_string_buffer(count)
   1583     return_count = ViUInt32()
-> 1584     ret = library.viRead(session, buffer, count, byref(return_count))
   1585     return buffer.raw[:return_count.value], ret
   1586 

B:\WinPython-64bit-3.6.3.0Qt5\python-3.6.3.amd64\lib\site-packages\pyvisa\ctwrapper\highlevel.py in _return_handler(self, ret_value, func, arguments)
    186 
    187         if ret_value < 0:
--> 188             raise errors.VisaIOError(ret_value)
    189 
    190         if ret_value in self.issue_warning_on:

VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.

from qulab.

feihoo87 avatar feihoo87 commented on August 11, 2024

Is any other SCPI command executed correctly? Try SYST:ERR? to find out the problem.

from qulab.

Lagikna avatar Lagikna commented on August 11, 2024

这个R&S的矢量网分,其他的get_Trace可以读出,但会报一个远程错误:queue overflow,设置power时不成功仪器会报一个 numeric data not allowed的错误

from qulab.

feihoo87 avatar feihoo87 commented on August 11, 2024

I don't have the manual of this one, you should write a driver yourself.

from qulab.

Lagikna avatar Lagikna commented on August 11, 2024

是有些不一样,设置power那个我把“POW1”改成“POW”就好了没有错误
没有CALC:X?这条命令,我自己新建个改改

from qulab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.