# UR RTDE digital and analog I/O example

SDU Robotics Python example that reads standard/tool digital-output states, sets a standard and tool digital output high, and sets an analog-output current ratio through RTDE. Importing or running the original script can change physical outputs and actuate connected peripherals.

ID: `ur-rtde-io`

Record version: `source-b21a319dda832712cf2f403aaab674e82906b3837f5189160a54179918a8d0fc`

Hub commit: `1c4c1e1533ff364fd4a35cddc8750b9306b0a5ba`

## Access

Read the pinned source and upstream setup before use. This maintainer-reviewed source reference does not install or execute code.

Optional inert file retrieval: `python /PATH_TO_SKILL/scripts/rsh.py fetch-source ur-rtde-io --expected-source-revision f5492109848a9fa6582df76dffa09c510ac36393 --expected-source-sha256 b21a319dda832712cf2f403aaab674e82906b3837f5189160a54179918a8d0fc --project ./experiment --json`. This verifies one file, preserves provenance and never installs or runs it. See [source-file retrieval](https://hub.superfastrobotics.com/source-files.md).

Hub preparation adapter: **false**. Runtime verification: **not_run**.

Upstream setup: https://gitlab.com/sdurobotics/ur_rtde/-/raw/f5492109848a9fa6582df76dffa09c510ac36393/README.md

## Source and license

- Repository: https://gitlab.com/sdurobotics/ur_rtde
- Pinned source: https://gitlab.com/sdurobotics/ur_rtde/-/raw/f5492109848a9fa6582df76dffa09c510ac36393/examples/py/io_example.py
- Revision: `f5492109848a9fa6582df76dffa09c510ac36393`
- Path: `examples/py/io_example.py`
- Source SHA256: `b21a319dda832712cf2f403aaab674e82906b3837f5189160a54179918a8d0fc`
- Source bytes: 1124
- Original authors: SDU Robotics
- License: [MIT](https://gitlab.com/sdurobotics/ur_rtde/-/raw/f5492109848a9fa6582df76dffa09c510ac36393/LICENSE)
- License scope: Selected ur_rtde example source code under the pinned repository MIT license. Preserve its copyright and permission notice, including Anders Prier Lindvig - SDU Robotics. Third-party dependencies, robot firmware, URCaps and hardware retain their own applicable terms.

## Artifact

```json
{
  "kind": "code",
  "format": "python"
}
```

## Requirements

```json
{
  "python": null,
  "packages": [
    "ur_rtde Python bindings providing rtde_io and rtde_receive"
  ],
  "hardware": [
    "Operator-authorized UR controller with reviewed standard/tool digital and analog output wiring; connected peripherals may actuate"
  ],
  "system": [
    "Network access to the intended RTDE controller endpoint",
    "An operator-reviewed Python environment for the pinned source and its bindings"
  ],
  "notes": "The source constructs RTDEIOInterface and RTDEReceiveInterface at module top level using an embedded demonstration address. Review the controller address, channel mapping, wiring and analog-current configuration before any execution. It reads digital-output state indices 7 and 16, sets standard digital output 7 and tool digital output 0 high, waits 0.01 seconds, reads those states again, then sets analog output 1 to current ratio 0.25. It has no restore step for the previous output values. These commands can affect connected hardware even though this source sends no joint or Cartesian motion command. The pinned README provides project-level installation and robot/OS declarations; no Python/package version, controller, firmware, robot, operating-system or timing combination was resolved or tested for this source."
}
```

## Invocation

```json
{
  "entrypoint": "python examples/py/io_example.py",
  "notes": "Upstream invocation only after separate operator authorization and I/O configuration. There is no main guard; importing or executing the file can connect to the controller and change outputs. The Hub supplies no execution/preparation adapter. No upstream execution, I/O change, controller contact, simulator or package installation was performed during source review."
}
```

## Compatibility

```json
[]
```

Missing environment fields remain unknown. Source discovery labels do not establish robot compatibility.

## Evidence

Level: **source_reviewed**. Runtime verification: **not_run**.

Complete pinned source read and SHA-256 checked as inert text; Python AST parsed without importing or executing it. Applicable MIT license and pinned README bytes checked independently. Hardware effects and setup declarations are source observations; no controller, robot, simulator or runtime environment was tested.

Source review and contributor reports do not establish task completion. Preserve upstream attribution and licenses.
