# Reset to factory defaults returns without having finished?

**URL:** <https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811>\
**Category:** Programming Questions\
**Created:** [June 12, 2019, 5:24am UTC](https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811 "2019-06-12T05:24:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [June 12, 2019, 5:24am UTC](https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811/1 "2019-06-12T05:24:40Z")

</div>

I’m finding that sometimes after doing a factory reset in code, the camera doesn’t appear to be ‘ready’ for the next command, and I get an exception. The reason why I think this may be a timing issue is that if I step through the code, it doesn’t happen.

```
var nodeMap = device.NodeMaps[NodeMapNames.Device];

//Reset to factory defaults
nodeMap.Set("Std::UserSetSelector", "Default");
nodeMap.Execute("Std::UserSetLoad");

nodeMap.Set("Cust::fastReadoutMode", "Off"); //Exception here

```

The Exception is:

```
Stemmer.Cvb.CvbException: 'EnumerationNode[Cust::fastReadoutMode]: WriteMem 
    returned error: TL Error: -1001, WriteReg failed'

```

Is there a better way to do this (I don’t want to do Thread.Sleep!)

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [June 12, 2019, 2:22pm UTC](https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811/2 "2019-06-12T14:22:29Z")

</div>

@Ben,

I think the issue here is that the camera need more time for loading the UserSet then the average node. This will probably also trigger read / write timeouts if you use this feature in the GenICam Browser. The GigE-Vision Standard does provide a so called PENDING\_ACK message as a solution for this dilemma. This Pending Acknowledge can be used by the camera to share the information that the current task will take some time and can change the timeout for this specific task.  
However, the camera you are using is probably not supporting this feature and therefore I do not know if we can figure out when exactly the camera is ready for new commands.

I will discuss this with my colleagues here and check if we can find a good solution for you. 😉

Regards,  
Theo

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [June 13, 2019, 6:09am UTC](https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811/3 "2019-06-13T06:09:16Z")

</div>

Of course an alternative would be to set the Power-up configuration to Factory settings…

---

<div class="post-metadata">

**Author:** ![Theo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/theo/32/482_2.png) [@Theo](https://forum.commonvisionblox.com/u/Theo)\
**Post date:** [June 27, 2019, 6:52am UTC](https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811/4 "2019-06-27T06:52:08Z")

</div>

Yes, loading the factory settings as Power-up configuration would be the best solution I would say. We can not think of a workaround for this as this behavior is triggered by the camera, which clearly does not behave as it should.

---

<div class="post-metadata">

**Author:** ![Ben](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@Ben](https://forum.commonvisionblox.com/u/Ben)\
**Post date:** [June 27, 2019, 9:01am UTC](https://forum.commonvisionblox.com/t/reset-to-factory-defaults-returns-without-having-finished/811/5 "2019-06-27T09:01:48Z")

</div>

That’s what I ended up doing. It doesn’t cover the case where someone has messed with the settings between two Opens, but I’ll live with that…
