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

Format of floating point numbers causes excessive heating. #1

Open
thilokru opened this issue Jul 11, 2024 · 0 comments · May be fixed by #2
Open

Format of floating point numbers causes excessive heating. #1

thilokru opened this issue Jul 11, 2024 · 0 comments · May be fixed by #2

Comments

@thilokru
Copy link

req = self._http_request(sv_reqests[self.channel]+str(voltage))

Here, the desired voltage is sent to the device. To do this, the floating point number is converted into a string.

This works fine for large enough numbers. They will be formatted into something like 0.0000123.

If the number becomes sufficiently small though, it will be converted into scientific notation: 3.12...e-12

It looks like the ControlByWeb device does not parse the e-12 and sets a voltage of 3.12... Volts, which causes excessive heating.

A potential fix would set a fixed format of the number, forbidding scientific notation.

Otherwise, P should not be lower than 1e-5

@thilokru thilokru linked a pull request Jul 11, 2024 that will close this issue
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 a pull request may close this issue.

1 participant