question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[COM] Cannot set flow_control to none for serial device Gwinstek PST3202 DC Power Supply

See original GitHub issue

Instrument details

Output of pyvisa-info

Machine Details: Platform ID: Linux-5.13.0-27-generic-x86_64-with-glibc2.29 Processor: x86_64

Python: Implementation: CPython Executable: /usr/bin/python3 Version: 3.8.10 Compiler: GCC 9.3.0 Bits: 64bit Build: Nov 26 2021 20:14:08 (#default) Unicode: UCS4

PyVISA Version: 1.11.3

Backends: ivi: Version: 1.11.3 (bundled with PyVISA) Binary library: Not found py: Version: 0.5.2 ASRL INSTR: Available via PySerial (3.5) USB INSTR: Available via PyUSB (1.2.1). Backend: libusb1 USB RAW: Available via PyUSB (1.2.1). Backend: libusb1 TCPIP INSTR: Available TCPIP SOCKET: Available GPIB INSTR: Please install linux-gpib (Linux) or gpib-ctypes (Windows, Linux) to use this resource type. Note that installing gpib-ctypes will give you access to a broader range of funcionality. No module named ‘gpib’

Hi I am running into a weird issue with setting flow_control on this Power Supply. I am using pyvisa-py as the backend. run this simple code:

import pyvisa
from pyvisa.constants import ControlFlow
rm = pyvisa.ResourceManager('@py')
instr = rm.open_resource(
    'ASRL/dev/ttyUSB0::INSTR'
)
instr.flow_control = ControlFlow.none
print(instr.query("*IDN?"))

It throws this error: Traceback (most recent call last): File “simpleserialtest.py”, line 7, in <module> instr.flow_control = ControlFlow.none File “/home/xxx/.local/lib/python3.8/site-packages/pyvisa/attributes.py”, line 184, in set instance.set_visa_attribute( File “/home/xxx/.local/lib/python3.8/site-packages/pyvisa/resources/resource.py”, line 393, in set_visa_attribute return self.visalib.set_attribute(self.session, name, state) File “/home/xxx/.local/lib/python3.8/site-packages/pyvisa_py/highlevel.py”, line 658, in set_attribute return self.handle_return_value( File “/home/xxx/.local/lib/python3.8/site-packages/pyvisa/highlevel.py”, line 251, in handle_return_value raise errors.VisaIOError(rv) pyvisa.errors.VisaIOError: VI_ERROR_NSUP_ATTR_STATE (-1073807330): The specified state of the attribute is not valid, or is not supported as defined by the object.

However, if I set it to xon_xoff (which the instrument doesn’t support) no errors occur. I have tried to separately connect to the instrument using Putty with flow control set to none and it works.

Any suggestions?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
MatthieuDartiailhcommented, Jan 21, 2022

This looks like a bug in pyvisa-py. I will transfer the issue and try to have a look ASAP.

0reactions
MatthieuDartiailhcommented, Jan 23, 2022

If you have the time you can also change IntEnum to IntFlag at https://github.com/pyvisa/pyvisa/blob/main/pyvisa/constants.py#L1080. It should be trivial but having somebody test it is always nice.

Read more comments on GitHub >

github_iconTop Results From Across the Web

siei,spa,KLOCKNER,MOELLER,TPY2,415320 ... - 네이버 블로그
DC,POWER,SUPPLY. ,siei,spa,KLOCKNER,MOELLER,TPY2,415,320,15,b1,siei,spa,한국기술서비스,산업장비수리,010-9289-7737,in. ,Vectrive.
Read more >
Untitled
Not so old fashioned, Record temperatures washington dc! ... Surajkund mela ground, Help desk open source review, Electro house techno mix 2014!
Read more >
Untitled
Burl wood table tops, 123 dale pa lante zumba, Kako izgleda muslimanska sahrana, Oklahoma football schedule 2012 espn, Java 1 bit image, Mil...
Read more >
Entire Catalog - Electronix Express - ManualZilla
255, 257, 262 Banana to Alligator Lead Set . ... 250 DC Power Supply . ... XBee, • Propeller clock and reset, USB...
Read more >
Pyvisa from pyvisa-py repository issues - Github Lab
[COM] Cannot set flow_control to none for serial device Gwinstek PST3202 DC Power Supply · View Comments (8). User Image closed lovetheguitar Updated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found