Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set multiple constant voltages. Getting AttributeError: 'RuntimeError' object has no attribute 'message' #25

Open
michael-zelos opened this issue Nov 4, 2019 · 1 comment

Comments

@michael-zelos
Copy link

michael-zelos commented Nov 4, 2019

Hi all,

I am trying to set a constant voltage at different time intervals. I am running the following code:

def main():
    session = Session()
    dev = session.devices[0]

    chan_a = dev.channels["A"]
    chan_b = dev.channels["B"]

    chan_a.mode = Mode.SVMI
    chan_b.mode = Mode.SVMI

    chan_a.constant(1.0)

    time.sleep(5)

    chan_a.constant(1.75)

    time.sleep(5)

    chan_a.constant(3.9)

    time.sleep(5)

However I keep receiving the following error:

Traceback (most recent call last):
File "pysmu/libsmu.pyx", line 640, in pysmu.libsmu.SessionDevice.write
RuntimeError: data write timeout, no available queue space: Resource busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "read-write.py", line 18, in <module>
    chan_a.constant(1.75)
  File "pysmu/libsmu.pyx", line 891, in pysmu.libsmu.Channel.constant
  File "pysmu/libsmu.pyx", line 794, in pysmu.libsmu.Channel.write
  File "pysmu/libsmu.pyx", line 646, in pysmu.libsmu.SessionDevice.write
AttributeError: 'RuntimeError' object has no attribute 'message'

I am using the examples as my template for creating this, but always get this same error every time. It seems like I need to flush the buffer or do a read, but even when attempting that it isn't working. Can you explain the reason for this or how I should be flushing the buffers if that is the issue?

@michael-zelos
Copy link
Author

This is also the case for current mode as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant