{"id":16190699,"url":"https://github.com/tiagocoutinho/gepace","last_synced_at":"2025-08-17T05:06:17.568Z","repository":{"id":51113418,"uuid":"274979030","full_name":"tiagocoutinho/gepace","owner":"tiagocoutinho","description":"GEPace 1000/5000/6000 python library + simulator + tango device server","archived":false,"fork":false,"pushed_at":"2023-01-21T20:05:49.000Z","size":9361,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T00:22:59.449Z","etag":null,"topics":["ge","gepace","pace","python","simulator","tango","tango-server"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagocoutinho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-25T17:42:53.000Z","updated_at":"2024-03-06T08:16:42.000Z","dependencies_parsed_at":"2023-02-12T12:30:18.465Z","dependency_job_id":null,"html_url":"https://github.com/tiagocoutinho/gepace","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/tiagocoutinho/gepace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fgepace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fgepace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fgepace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fgepace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagocoutinho","download_url":"https://codeload.github.com/tiagocoutinho/gepace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fgepace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270807934,"owners_count":24649346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ge","gepace","pace","python","simulator","tango","tango-server"],"created_at":"2024-10-10T07:43:58.383Z","updated_at":"2025-08-17T05:06:17.543Z","avatar_url":"https://github.com/tiagocoutinho.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GE Pace library\n\n\u003cimg align=\"right\" alt=\"Pace 5000\" width=\"400\" src=\"docs/pace5000.png\" /\u003e\n\nThis library is used to control basic features of a GE Pressure Automated\nCalibration Equipment (Pace) models 1000, 5000 and 6000.\n\nIt is composed of a core library, an optional simulator and\nan optional [tango](https://tango-controls.org/) device server.\n\nIt has been tested with the Pace 5000 model, but should work with other models.\n\n## Installation\n\nFrom within your favorite python environment type:\n\n`$ pip install gepace`\n\n\n## Library\n\nThe core of the gepace library consists of Pace object.\nTo create a Pace object you need to pass a communication object.\n\nThe communication object can be any object that supports a simple API\nconsisting of two methods (either the sync or async version is supported):\n\n* `write_readline(buff: bytes) -\u003e bytes` *or*\n\n  `async write_readline(buff: bytes) -\u003e bytes`\n\n* `write(buff: bytes) -\u003e None` *or*\n\n  `async write(buff: bytes) -\u003e None`\n\nA library that supports this API is [sockio](https://pypi.org/project/sockio/)\n(gepace comes pre-installed so you don't have to worry about installing it).\n\nThis library includes both async and sync versions of the TCP object. It also\nsupports a set of features like reconnection and timeout handling.\n\nHere is how to connect to a GE Pace controller:\n\n```python\nimport asyncio\n\nfrom sockio.aio import TCP\nfrom gepace import Pace\n\n\nasync def main():\n    tcp = TCP(\"192.168.1.123\", 5000)  # use host name or IP\n    pace = Pace(tcp)\n\n    idn = await pace.idn()\n    name = await pace.name()\n    print(\"Connected to {} ({})\".format(idn, name))\n\n    # channel access:\n    temp_A = await pace['A'].temperature()\n    unit = await pace['A'].unit()\n    print(\"Channel A temperature: {}{}\".format(temp_A, unit))\n\n    # loop access:\n    source_1 = await pace[1].source()\n    print(\"Loop 1 source: {}\".format(source_1))\n\n    # activate control\n    await pace.control(True)\n\n    # hardware only accepts queries every 100ms. Yo can, however,\n    # group queries in single request:\n    async with pace as group:\n        pace.idn()\n        pace.control()\n        pace['A'].temperature()\n    idn, ctrl, temp_A = group.replies\n\n\nasyncio.run(main())\n```\n\n### Simulator\n\nA Pace simulator is provided.\n\nBefore using it, make sure everything is installed with:\n\n`$ pip install gepace[simulator]`\n\nThe [sinstruments](https://pypi.org/project/sinstruments/) engine is used.\n\nTo start a simulator you need to write a YAML config file where you define\nhow many devices you want to simulate and which properties they hold.\n\nThe following example exports 2 hardware devices. The first is a minimal\nconfiguration using default values and the second defines some initial values\nexplicitly:\n\n```yaml\n# config.yml\n\ndevices:\n- class: Pace\n  name: MyPressureDevice\n  package: gepace.simulator\n  transports:\n  - type: tcp\n    url: :5000\n\n```\n\nTo start the simulator type:\n\n```terminal\n$ sinstruments-server -c ./config.yml --log-level=DEBUG\n2020-05-14 16:02:35,004 INFO  simulator: Bootstraping server\n2020-05-14 16:02:35,004 INFO  simulator: no backdoor declared\n2020-05-14 16:02:35,004 INFO  simulator: Creating device Pace ('Pace')\n2020-05-14 16:02:35,080 INFO  simulator.Pace[('', 5000)]: listening on ('', 5000) (newline='\\n') (baudrate=None)\n```\n\n(To see the full list of options type `sinstruments-server --help`)\n\nYou can access it as you would a real hardware:\n\n```terminal\n$ nc localhost 5000\n*IDN?\nGE,Pace5000,204683,1.01A\n```\n\nor using the library:\n```python\n$ python\n\u003e\u003e\u003e from sockio.sio import TCP   # use synchronous socket in the CLI!\n\u003e\u003e\u003e from gepace import Pace\n\u003e\u003e\u003e pace = Pace(TCP('localhost', 5000))\n\u003e\u003e\u003e print(pace.idn())\nGE,Pace5000,204683,1.01A\n```\n\n### Tango server\n\nA [tango](https://tango-controls.org/) device server is also provided.\n\nMake sure everything is installed with:\n\n`$ pip install gepace[tango]`\n\nRegister a gepace tango server in the tango database:\n```\n$ tangoctl server add -s GEPace/test -d Pace test/cryocon/1\n$ tangoctl device property write -d test/pace/1 -p address -v \"tcp://192.168.123:5000\"\n```\n\n(the above example uses [tangoctl](https://pypi.org/project/tangoctl/). You would need\nto install it with `pip install tangoctl` before using it. You are free to use any other\ntango tool like [fandango](https://pypi.org/project/fandango/) or Jive)\n\nLaunch the server with:\n\n```terminal\n$ GEPace test\n```\n\n## TODO\n\n* Add `on_connection_made` callback to initialize controller with:\n  * unit=`K`\n  * cache IDN, fw revision, hw revision\n  * should we cache system:name? and input:name? in theory in could be modified\n    directly with the hardware front panel\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fgepace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagocoutinho%2Fgepace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fgepace/lists"}