# (Unofficial) SSG3021X function generator control library
![SSG3021X function generator](https://github.com/tspspi/pyssg3021x/blob/master/doc/devicephoto.png)
This is a simple (currently incomplete) implementation of
the [FunctionGenerator baseclass](https://github.com/tspspi/pylabdevs/blob/master/src/labdevices/functiongenerator.py)
of the [pylabdevs base classes](https://github.com/tspspi/pylabdevs) for the
Siglent SSG3021X function generator. It establishes a connection via
Ethernet and allows currently to:
* Set and query frequency of the RF port
* Enable and disable the RF port
* Setting the power on the RF port
## Installation
This package is available as PyPi package ```ssg3021x-tspspi```:
```
pip install ssg3021x-tspspi
```
## Usage
### Simple example (with context management)
```
from ssg3021x.ssg3021x import SSG3021X
from time import sleep
with SSG3021X("198.51.100.1") as ssg:
# Ask for identification
print(ssg.identify())
# Set frequency to 200 MHz, 10 dBm output power and enable output
ssg.set_channel_frequency(0, 202e6)
ssg.set_channel_amplitude(0, 10)
ssg.set_channel_enabled(0, True)
# Query status
print(f"Frequency:\t{ssg.get_channel_frequency()}")
print(f"Amplitude:\t{ssg.get_channel_amplitude()}")
print(f"Enabled:\t{ssg.is_channel_enabled()}")
# Wait
sleep(60)
# Disable
ssg.set_channel_enabled(0, False)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/tspspi/pyssg3021x",
"name": "pyssg3021x-tspspi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Thomas Spielauer",
"author_email": "pypipackages01@tspi.at",
"download_url": "https://files.pythonhosted.org/packages/51/e8/770e83dbfcdb2e57c62f9ebe6618e23ff797fa321144e455c504cb361e2f/pyssg3021x-tspspi-0.0.2.tar.gz",
"platform": null,
"description": "# (Unofficial) SSG3021X function generator control library\n\n![SSG3021X function generator](https://github.com/tspspi/pyssg3021x/blob/master/doc/devicephoto.png)\n\nThis is a simple (currently incomplete) implementation of\nthe [FunctionGenerator baseclass](https://github.com/tspspi/pylabdevs/blob/master/src/labdevices/functiongenerator.py)\nof the [pylabdevs base classes](https://github.com/tspspi/pylabdevs) for the\nSiglent SSG3021X function generator. It establishes a connection via\nEthernet and allows currently to:\n\n* Set and query frequency of the RF port\n* Enable and disable the RF port\n* Setting the power on the RF port\n\n## Installation\n\nThis package is available as PyPi package ```ssg3021x-tspspi```:\n\n```\npip install ssg3021x-tspspi\n```\n\n## Usage\n\n### Simple example (with context management)\n\n```\nfrom ssg3021x.ssg3021x import SSG3021X\nfrom time import sleep\n\nwith SSG3021X(\"198.51.100.1\") as ssg:\n\t# Ask for identification\n\tprint(ssg.identify())\n\n\t# Set frequency to 200 MHz, 10 dBm output power and enable output\n\tssg.set_channel_frequency(0, 202e6)\n\tssg.set_channel_amplitude(0, 10)\n\tssg.set_channel_enabled(0, True)\n\n\t# Query status\n\tprint(f\"Frequency:\\t{ssg.get_channel_frequency()}\")\n\tprint(f\"Amplitude:\\t{ssg.get_channel_amplitude()}\")\n\tprint(f\"Enabled:\\t{ssg.is_channel_enabled()}\")\n\n\t# Wait\n\tsleep(60)\n\n\t# Disable\n\tssg.set_channel_enabled(0, False)\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "Unofficial control library for SSG3021X function generators",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/tspspi/pyssg3021x"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "462e4d1e64b72f35452b32fb06972909184413c063c47f1cb477ba1d1c8a6812",
"md5": "b7238711b8bfcbcdc758fb40cbb6beb8",
"sha256": "59ca91bf0019a0f92ec77947b28763dccc9fd96f4be3013c2bea2380be418b19"
},
"downloads": -1,
"filename": "pyssg3021x_tspspi-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b7238711b8bfcbcdc758fb40cbb6beb8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 2802,
"upload_time": "2023-10-12T11:38:56",
"upload_time_iso_8601": "2023-10-12T11:38:56.527093Z",
"url": "https://files.pythonhosted.org/packages/46/2e/4d1e64b72f35452b32fb06972909184413c063c47f1cb477ba1d1c8a6812/pyssg3021x_tspspi-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "51e8770e83dbfcdb2e57c62f9ebe6618e23ff797fa321144e455c504cb361e2f",
"md5": "7445935da8c668f659921e32a3599fbd",
"sha256": "0f7ed756ca233770d7ccf0242fcc522023342e5b5b2e26d030d4c5c3549ea27d"
},
"downloads": -1,
"filename": "pyssg3021x-tspspi-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "7445935da8c668f659921e32a3599fbd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 2650,
"upload_time": "2023-10-12T11:38:58",
"upload_time_iso_8601": "2023-10-12T11:38:58.771812Z",
"url": "https://files.pythonhosted.org/packages/51/e8/770e83dbfcdb2e57c62f9ebe6618e23ff797fa321144e455c504cb361e2f/pyssg3021x-tspspi-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-12 11:38:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tspspi",
"github_project": "pyssg3021x",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyssg3021x-tspspi"
}