# Best way to copy tag values from one register to another

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-copy-tag-values-from-one-register-to-another/44069>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 3, 2021, 10:14pm UTC](https://forum.inductiveautomation.com/t/best-way-to-copy-tag-values-from-one-register-to-another/44069 "2021-03-03T22:14:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [March 4, 2021, 8:44pm UTC](https://forum.inductiveautomation.com/t/best-way-to-copy-tag-values-from-one-register-to-another/44069/4 "2021-03-04T20:44:12Z")

</div>

One version I believe replaces all the functionality in use in the function you shared above (caveat: untested):

```auto
def load_mem_to_current(cell_id):
   """Load recipe parameters from memory to cell/current location
   
   Param:
   	cell_id (str): Id designation of cell
   """
   # List tags to read.
   readTags = ['[{}]/Cell/Recipe/Memory/{}'.format(cell_id, x) for x in range(0,49)]
   # Read tags and extract values.
   writeValues = [x.value for x in system.tag.readBlocking(readTags)]
   # List tags to write.
   writeTags = ['[{}]/Cell/Recipe/Current/Cell/{}'.format(cell_id, x) for x in range(0,49)]
   # Write values to tags.
   system.tag.writeBlocking(writeTags, writeValues)

```

Yes, I like list comprehensions 🙂

---

_[View the full topic](https://forum.inductiveautomation.com/t/best-way-to-copy-tag-values-from-one-register-to-another/44069)._
