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

Fixes by sinihappo #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sinihappo
Copy link

Please test and consider my changes. I modified the code to consistently send '\n' after each command and with this the sleep is avoided and the power supply responds immediately. Now the code also reads until it gets a full line as all responses are single line and terminated with '\n'.

@Lukse
Copy link
Contributor

Lukse commented Feb 4, 2023

Thank you for the changes! Looks like something is wrong with the measure function after the changes:

example.py
{'manufacturer': 'Siglent Technologies', 'model': 'SPD3303X', 'sn': 'SPD3XHBXxxxxxx', 'firmware_ver': '1.01.01.02.05', 'hadrware_ver': 'V3.0'}
{'ch1_mode': <MODE.CV: 1>, 'ch2_mode': <MODE.CV: 1>, 'mode': <TRACK.INDEPENDENT: 0>, 'ch1': <STATE.OFF: 0>, 'ch2': <STATE.OFF: 0>}
Traceback (most recent call last):
  File "Z:\5. Development\projects_github\siglent_test\example.py", line 29, in <module>
    r = s.measure(ch = siglent.CHANNEL.CH1, parameter = siglent.PARAMETER.VOLTAGE)
  File "Z:\5. Development\projects_github\siglent_test\siglent_psu_api.py", line 82, in measure
    reply = float(reply)
ValueError: could not convert string to float: ''

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

Successfully merging this pull request may close these issues.

2 participants