pydg1000z


Namepydg1000z JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/PMSchueler/pydg1000z
SummaryRigol DG1000Z control library (unofficial)
upload_time2024-11-24 22:41:48
maintainerNone
docs_urlNone
authorP.M Schueler
requires_python>=3.9
licenseMIT
keywords rigol waveform generator dg1000z
VCS
bugtrack_url
requirements pylabdevs-tspspi
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Rigol DG1000Z arbitrary waveform generator Python library (unofficial)

![A Rigol DG1000Z setup](/doc/DG1000Z.jpg)

A simple Python library and utility to control Rigol DG1000Z arbitrary waveform generator. This library implements the [functiongenerator](https://github.com/tspspi/pylabdevs/src/labdevices/functiongenerator.py) class from
the [pylabdevs](https://github.com/tspspi/pylabdevs) package which exposes the public interface.

## Installing 

There is a PyPi package that can be installed using

```
pip install pydg1000z
```

## Simple example to generate waveforms:

```python
import time
from pydg1000z import *
from labdevices.scpi import SCPIDeviceEthernet
from labdevices.functiongenerator import FunctionGeneratorWaveform

with PYDG1000Z(address="10.0.0.124") as awg:

  awg.set_channel_enabled(0, True)
  awg.set_channel_enabled(1, True)

  awg.set_channel_frequency(0, 600000)
  awg.set_channel_waveform(channel=0, waveform=FunctionGeneratorWaveform.SINE)
  awg.set_channel_waveform(channel=1, waveform=FunctionGeneratorWaveform.SINE)

  awg.set_channel_amplitude(0, 5.0)
  awg.set_coupling(True)

  awg.set_channel_frequency(0, 1000)
  time.sleep(10)

  awg.set_channel_frequency(0, 10000)

  print("Press Key to switch off")
  input()

  awg.set_channel_enabled(0, False)
  awg.set_channel_enabled(1, False)
```

## Supported waveforms

* FunctionGeneratorWaveform.SINE : Set the waveform of the specified channel to sine waveform with the specified frequency, amplitude, offset and phase
* FunctionGeneratorWaveform.SQUARE : Set the waveform of the specified channel to square waveform with the specified frequency, amplitude, offset and phase.
* FunctionGeneratorWaveform.RAMP : Set the waveform of the specified channel to ramp waveform with the specifiedfrequency, amplitude, offset and phase.
* FunctionGeneratorWaveform.TRGL : Set the waveform of the specified channel to triangle waveform with the specified frequency, amplitude, offset and phase.
* FunctionGeneratorWaveform.DC : Set the waveform of the specified channel to DC with the specified offset.
* FunctionGeneratorWaveform.WHITENOISE : Set the waveform of the specified channel to noise with the specified amplitude and offset.


For more detailed information about waveforms see **:SOURce:FUNCtion** in [DG1000Z Progamming Guide](/doc/DG1000Z_ProgrammingGuide_EN.pdf)


## Supported methods

* ```identify()```
* Connection management (when not using ```with``` context management):
   * ```connect()```
   * ```disconnect()```
* ```set_channel_enable(channel, enabled)```
* ```is_channel_enabled(channel)```
* ```set_channel_waveform(channel, waveform[, arbitrary])```
* ```get_channel_waveform(channel)```
* ```set_channel_frequency(channel, freq_Hz)```
* ```get_channel_frequency(channel)```
* ```set_channel_phase(channel, phase_deg:float)```
* ```get_channel_phase(channel)```
* ```set_channel_amplitude(channel, amp_Vpp:float)```
* ```get_channel_amplitude(channel)```
* ```set_channel_offset(channel, offset_V:float)```
* ```get_channel_offset(channel)```
* ```set_coupling(on)```
* ```get_coupling()```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PMSchueler/pydg1000z",
    "name": "pydg1000z",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "RIGOL, WAVEFORM GENERATOR, DG1000Z",
    "author": "P.M Schueler",
    "author_email": "peter.schueler@gmxpro.de",
    "download_url": "https://files.pythonhosted.org/packages/ab/f6/710fe22225d520532c70e2a2888bf5ab42ed062172106e84378af9a377e3/pydg1000z-0.1.1.tar.gz",
    "platform": null,
    "description": "# Rigol DG1000Z arbitrary waveform generator Python library (unofficial)\n\n![A Rigol DG1000Z setup](/doc/DG1000Z.jpg)\n\nA simple Python library and utility to control Rigol DG1000Z arbitrary waveform generator. This library implements the [functiongenerator](https://github.com/tspspi/pylabdevs/src/labdevices/functiongenerator.py) class from\nthe [pylabdevs](https://github.com/tspspi/pylabdevs) package which exposes the public interface.\n\n## Installing \n\nThere is a PyPi package that can be installed using\n\n```\npip install pydg1000z\n```\n\n## Simple example to generate waveforms:\n\n```python\nimport time\nfrom pydg1000z import *\nfrom labdevices.scpi import SCPIDeviceEthernet\nfrom labdevices.functiongenerator import FunctionGeneratorWaveform\n\nwith PYDG1000Z(address=\"10.0.0.124\") as awg:\n\n  awg.set_channel_enabled(0, True)\n  awg.set_channel_enabled(1, True)\n\n  awg.set_channel_frequency(0, 600000)\n  awg.set_channel_waveform(channel=0, waveform=FunctionGeneratorWaveform.SINE)\n  awg.set_channel_waveform(channel=1, waveform=FunctionGeneratorWaveform.SINE)\n\n  awg.set_channel_amplitude(0, 5.0)\n  awg.set_coupling(True)\n\n  awg.set_channel_frequency(0, 1000)\n  time.sleep(10)\n\n  awg.set_channel_frequency(0, 10000)\n\n  print(\"Press Key to switch off\")\n  input()\n\n  awg.set_channel_enabled(0, False)\n  awg.set_channel_enabled(1, False)\n```\n\n## Supported waveforms\n\n* FunctionGeneratorWaveform.SINE : Set the waveform of the specified channel to sine waveform with the specified frequency, amplitude, offset and phase\n* FunctionGeneratorWaveform.SQUARE : Set the waveform of the specified channel to square waveform with the specified frequency, amplitude, offset and phase.\n* FunctionGeneratorWaveform.RAMP : Set the waveform of the specified channel to ramp waveform with the specifiedfrequency, amplitude, offset and phase.\n* FunctionGeneratorWaveform.TRGL : Set the waveform of the specified channel to triangle waveform with the specified frequency, amplitude, offset and phase.\n* FunctionGeneratorWaveform.DC : Set the waveform of the specified channel to DC with the specified offset.\n* FunctionGeneratorWaveform.WHITENOISE : Set the waveform of the specified channel to noise with the specified amplitude and offset.\n\n\nFor more detailed information about waveforms see **:SOURce:FUNCtion** in [DG1000Z Progamming Guide](/doc/DG1000Z_ProgrammingGuide_EN.pdf)\n\n\n## Supported methods\n\n* ```identify()```\n* Connection management (when not using ```with``` context management):\n   * ```connect()```\n   * ```disconnect()```\n* ```set_channel_enable(channel, enabled)```\n* ```is_channel_enabled(channel)```\n* ```set_channel_waveform(channel, waveform[, arbitrary])```\n* ```get_channel_waveform(channel)```\n* ```set_channel_frequency(channel, freq_Hz)```\n* ```get_channel_frequency(channel)```\n* ```set_channel_phase(channel, phase_deg:float)```\n* ```get_channel_phase(channel)```\n* ```set_channel_amplitude(channel, amp_Vpp:float)```\n* ```get_channel_amplitude(channel)```\n* ```set_channel_offset(channel, offset_V:float)```\n* ```get_channel_offset(channel)```\n* ```set_coupling(on)```\n* ```get_coupling()```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rigol DG1000Z control library (unofficial)",
    "version": "0.1.1",
    "project_urls": {
        "Download": "https://github.com/PMSchueler/pydg1000z/archive/refs/tags/0.1.1.tar.gz",
        "Homepage": "https://github.com/PMSchueler/pydg1000z"
    },
    "split_keywords": [
        "rigol",
        " waveform generator",
        " dg1000z"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "abf6710fe22225d520532c70e2a2888bf5ab42ed062172106e84378af9a377e3",
                "md5": "75d44438414d513a32453148ec448116",
                "sha256": "b016ef95b9a62985fdc482826c09908afa68549861f40cdbc409a3f512a71ef9"
            },
            "downloads": -1,
            "filename": "pydg1000z-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "75d44438414d513a32453148ec448116",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5449,
            "upload_time": "2024-11-24T22:41:48",
            "upload_time_iso_8601": "2024-11-24T22:41:48.567601Z",
            "url": "https://files.pythonhosted.org/packages/ab/f6/710fe22225d520532c70e2a2888bf5ab42ed062172106e84378af9a377e3/pydg1000z-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-24 22:41:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PMSchueler",
    "github_project": "pydg1000z",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "pylabdevs-tspspi",
            "specs": [
                [
                    ">=",
                    "0.0.15"
                ]
            ]
        }
    ],
    "lcname": "pydg1000z"
}
        
Elapsed time: 0.39794s