# Arduino to ignition loosing connection

**URL:** <https://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286>\
**Category:** Ignition\
**Created:** [August 1, 2020, 3:06pm UTC](https://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286 "2020-08-01T15:06:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gijovarghese8](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gijovarghese8/32/20571_2.png) [@gijovarghese8](https://forum.inductiveautomation.com/u/gijovarghese8)\
**Post date:** [August 1, 2020, 3:06pm UTC](https://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286/1 "2020-08-01T15:06:04Z")

</div>

Hello,

I have an Arduino UNO with an ethernet shield communicating with ignition. I had it working, but when I tried to reconnect the very next day, the status of the device goes from connected to disconnected, and I cannot seem to find what is going on. I have tried rebooting PC, Arduino, different Arduino boards, connected the Arduino as a new device.

any help would be much appreciated.

Thank you  
Gijo

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 1, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286/2 "2020-08-01T15:11:24Z")

</div>

Anything in the logs? Can you communicate with the Arduino over ethernet with anything else?

---

<div class="post-metadata">

**Author:** ![gijovarghese8](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/gijovarghese8/32/20571_2.png) [@gijovarghese8](https://forum.inductiveautomation.com/u/gijovarghese8)\
**Post date:** [August 15, 2020, 1:54pm UTC](https://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286/3 "2020-08-15T13:54:45Z")

</div>

Hello Pturmel,

sorry for the late response but I got it to work, but I have no idea why it works this way. so turns out in the Arduino script I have to set the initial values after I create the registers and coils.

```auto
 mb.addHreg(power_Holding); // adding the holding register for power
  mb.addHreg(center_Holding); // same for center
  mb.addIreg(center_Pot_ir); // inPut register for center pot
  mb.addIreg(power_Pot_ir); // inPut register for power pot

  mb.addCoil(manual_Coil); // adding the coil for manual control using ignition.
  mb.addCoil(disable_Coil); // adding a coil to disable the arduino controls, so to move the motors by hand

  stepsinCenter = 0; 
  stepsinPower = 0; 
  power = 0;
  power_prev = 0;
  powertotal = 0;
  centertotal= 0;
  center = 0; // not sure why the values for each variables need to be called here and not right when creating them back on line 30-34
  center_prev = 0;
  manual = false; // else the arduino wont have a good connection to ignition. connection will keep dropping. 
  Enable = false;
  powerDir = true; 
  powerenable = true;

  mb.Hreg(power_Holding, power);
  mb.Hreg(center_Holding, center);
  mb.Ireg(center_Pot_ir, Center_Pot_Val);
  mb.Ireg(power_Pot_ir, Power_Pot_Val);

  mb.Coil (manual_Coil, manual);
  mb.Ireg(disable_Coil, Enable);

```

---

<div class="post-metadata">

**Author:** ![SSven](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@SSven](https://forum.inductiveautomation.com/u/SSven)\
**Post date:** [February 9, 2021, 5:21pm UTC](https://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286/4 "2021-02-09T17:21:45Z")

</div>

Continuing the discussion from [Arduino to ignition loosing connection](http://forum.inductiveautomation.com/t/arduino-to-ignition-loosing-connection/37286):

Which library are you using ? I am trying to connect UNO via Modbus IP. While Gateway connects to the UNO, I cant seem to link the tag. Always getting bad quality.
