Skip to content

Fixes by sinihappo - #6

Open
sinihappo wants to merge 1 commit into
Kurokesu:masterfrom
sinihappo:20230131-alo
Open

Fixes by sinihappo#6
sinihappo wants to merge 1 commit into
Kurokesu:masterfrom
sinihappo:20230131-alo

Conversation

@sinihappo

Copy link
Copy Markdown

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

Lukse commented Feb 4, 2023

Copy link
Copy Markdown
Contributor

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