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

Proposal: modification of the set command #44

Open
dihm opened this issue Sep 26, 2024 · 1 comment · May be fixed by #50
Open

Proposal: modification of the set command #44

dihm opened this issue Sep 26, 2024 · 1 comment · May be fixed by #50
Labels
enhancement New feature or request
Milestone

Comments

@dihm
Copy link
Contributor

dihm commented Sep 26, 2024

Something that I don't super love about the current set command is that the firmware has to do some level of processing the float inputs to convert them to the required hex fractional integers for programming. This often leads to strange edge cases where what comes out is slightly different than what you programmed due to rounding errors and the like. In many cases, that is fine, but often these small differences can matter, and now the only way to truly know what is being programmed is to send the command, then query what was actually stored in memory. It is a bit tedious. This get exacerbated by the delta word for ramps, which is required as a fractional int (ie native), but the user can only choose the ideal value by first converting their floats to the native ints of the DDS then performing logic.

I think it would be good to have two modes for the set command (or perhaps a parallel command with alternative syntax) that allows for specifying things in one of two ways:

  • Standard mode: Basically maintain the current set command, but remove the delta argument and have the firmware perform the logic to choose the best value internally. This type of command is useful for quick and dirty work when you want to command outputs simply, but don't want to bother with the little internal details and can live with the arbitrary round-off choices.
  • Pass-through mode: In this mode, the user is expected to program all settings as their DDS native hex integers. This requires the user to understand the underlying logic of the DDS generation, but it also allows the user full, explicit control of what the output is going to be, as the firmware does no processing of the inputs. This mode would require the ramp delta word to be provided by the user.
@dihm dihm added the enhancement New feature or request label Sep 26, 2024
@dihm dihm added this to the Stretch milestone Sep 26, 2024
@carterturn carterturn linked a pull request Nov 12, 2024 that will close this issue
@dihm
Copy link
Contributor Author

dihm commented Jan 7, 2025

seti of #50 addresses the second half of this. I still think modifying the set command to auto-calculate sweep rates is a good improvement, but we should save that for another PR than #50, which is touching many things already.

Going to create a separate issue for tracking modified set behavior so that this can be considered closed by #50.

@dihm dihm linked a pull request Jan 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant