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

Add basic arbitrary waveform generation support for PS3000A series #27

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

Conversation

MatFi
Copy link
Contributor

@MatFi MatFi commented Dec 21, 2024

This PR adds support for arbitrary waveform generation for PS3000A series oscilloscopes. The main changes include:

  1. Added new global variables to track PS3000A-specific AWG states:
PS3000A_EXTRA_OPERATIONS g_awgPS3000AOperation = PS3000A_ES_OFF;
PS3000A_WAVE_TYPE g_awgPS3000AWaveType = PS3000A_SINE;
  1. WaveformType structure has been created to standardise the handling of waveform types in different Pico models and to facilitate the support of new models:
struct WaveformType {
    PICO_WAVE_TYPE type6000;
    PS3000A_WAVE_TYPE type3000;
    PS3000A_EXTRA_OPERATIONS op3000;
};
  1. Added square wave generation functionality with configurable duty cycle, as this is not supported by the SigGenBuiltIn function:
void GenerateSquareWave(int16_t* &waveform, size_t bufferSize, double dutyCycle, int16_t amplitude);

Testing:

  • Tested wave generation with various settings / duty cycles
  • Verified compatibility with existing PS6000A functionality. I don't have access to one and need support here, Although I don't expect any issues.
  • Tested AWG start/stop behavior on PS3000A hardware

Missing

  • Support for custom arbitrary waveforms (until I figured out how to define waveforms with ngscopeclient)
  • Proper AWG buffer management

Note:

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.

1 participant