# Latching register bits in SLC 500

**URL:** <https://forum.inductiveautomation.com/t/latching-register-bits-in-slc-500/12145>\
**Category:** Archived Topics\
**Created:** [September 21, 2016, 4:59pm UTC](https://forum.inductiveautomation.com/t/latching-register-bits-in-slc-500/12145 "2016-09-21T16:59:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidkr](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@davidkr](https://forum.inductiveautomation.com/u/davidkr)\
**Post date:** [September 21, 2016, 4:59pm UTC](https://forum.inductiveautomation.com/t/latching-register-bits-in-slc-500/12145/1 "2016-09-21T16:59:37Z")

</div>

I need to latch and unlatch bits within registers of a SLC 500 PLC. IF I have a 2 state toggle, how would I write an action script to set and unset the following bit?

Path BOSS/Global/BHOITBITS/BHOITBITS\_9\_

bit 2
