# M-Code Reference - Controlling GPIO from G-Code

**URL:** <https://forum.universal-robots.com/t/m-code-reference-controlling-gpio-from-g-code/37963>\
**Category:** Technical Questions\
**Created:** [January 10, 2025, 9:28am UTC](https://forum.universal-robots.com/t/m-code-reference-controlling-gpio-from-g-code/37963 "2025-01-10T09:28:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![s73016](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@s73016](https://forum.universal-robots.com/u/s73016)\
**Post date:** [January 10, 2025, 9:28am UTC](https://forum.universal-robots.com/t/m-code-reference-controlling-gpio-from-g-code/37963/1 "2025-01-10T09:28:44Z")

</div>

I was looking for the m-Codes that are used for the GPIO control features.  
I found [this FAQ](https://www.universal-robots.com/articles/ur/application-installation/remote-tcp-toolpath-urcap-faq/) as well as [this Article](https://www.universal-robots.com/articles/ur/programming/controlling-end-effector-from-g-code-when-using-toolpath-nodes-in-remote-tcp-toolpath-urcap-polyscope-version-5115/), but they both do not give a full list of available g- and m-Codes.  
Specifically, I’m looking for a way to set the analog output from a g-Code file to set some simple parameters for the attached end-effector.  
I know that what I’m asking for is possible when running UR-Script files instead of g-Code, but the playback seams to be stuttering when playing back very large files, which is why I wanted to go down the g-Code route.

A fully digital interface would also be helpful, but I do not expect there to be m-Codes to send messages via RS485 or Modbus. (I’m aware of the possibility to send Modbus via UR-Script)
