# Basic table from device status

**URL:** <https://forum.inductiveautomation.com/t/basic-table-from-device-status/105364>\
**Category:** Ignition\
**Created:** [April 22, 2025, 12:30am UTC](https://forum.inductiveautomation.com/t/basic-table-from-device-status/105364 "2025-04-22T00:30:24Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![will.martin](https://avatars.discourse-cdn.com/v4/letter/w/65b543/32.png) [@will.martin](https://forum.inductiveautomation.com/u/will.martin)\
**Post date:** [May 12, 2025, 4:15pm UTC](https://forum.inductiveautomation.com/t/basic-table-from-device-status/105364/7 "2025-05-12T16:15:02Z")

</div>

I was able to get it to work using another thread I thread I found on here.

The other thread:[UDT to power table](https://forum.inductiveautomation.com/t/udt-to-power-table/33028)

My final version:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/7/a700868997da6742f935e34aad3e7c3d1d43e985.png)

The final script I created I placed under a timer gateway event script.

Open to feedback!

```python
tagPath = '[default]PLC Status/All PLCs'
udtID = 'PLC Status/PLC Status'

keys = ["Parameters/DeviceName", "Key Switch Postion","Fault Status","Program State","Full Revision","PLC Connection"]
headers = ["Name", "Key Switch Postion","Fault Status","Program Status","Revision","Connection"]

    # Browse the tags. Filters on tagType to look only for UDT instances,
browse = system.tag.browse(path = tagPath, filter = {'tagType':'UdtInstance'})

    # Create tag names from browse results and keys.
tagsIn = [str(r['fullPath']) + '/' + key for r in browse.getResults() for key in keys if r['typeId'] == udtID]

    # Get tag values
values = [t.value for t in system.tag.readBlocking(tagsIn)]

    # Group the values by the number of keys
data = [values[i:i+len(keys)] for i in range(0, len(values)-(len(keys)-1), len(keys))]
dataset = system.dataset.toDataSet(headers, data)
system.tag.writeBlocking('[default]PLC Status/PLC Status', dataset)

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/basic-table-from-device-status/105364)._
