# Cycle Path Problem

**URL:** <https://forum.xod.io/t/cycle-path-problem/129>\
**Category:** Uncategorized\
**Created:** [October 12, 2017, 10:24pm UTC](https://forum.xod.io/t/cycle-path-problem/129 "2017-10-12T22:24:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrishidalgo](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@chrishidalgo](https://forum.xod.io/u/chrishidalgo)\
**Post date:** [October 12, 2017, 10:24pm UTC](https://forum.xod.io/t/cycle-path-problem/129/1 "2017-10-12T22:24:18Z")

</div>

Good afternoon,

I am trying to make a Node that receives a pulse (button push), runs a light for a combined 60 seconds, then turns off.

For example, I’d like to be able to click a push button, run the light for 35 seconds, push the button again to turn it off. Then later when I click the button, the light would run for 25 seconds and then automatically shut off.

To do this, I’ve created this

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/b7cb1897feb7425956540286e3d800f2ed27b1f7.png)  
Whenever I try to get the code, it gives me  
“The program has a cycle path. Delete links that cause a cycle to continue”

Logically it makes sense to me, a pulse hits the flip flop, turning on the light. The If/Else has T=1, F=0. When the flip flop is on, a 1 is sent to the clock, which ticks and increases the count, when the count reaches greater than 60, a reset is sent to the count and the flip flop is set to reset.

It looks like it does not like the greater sending signals “up” the chain, what other way could I accomplish this task?

thanks!

---

<div class="post-metadata">

**Author:** ![chrishidalgo](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@chrishidalgo](https://forum.xod.io/u/chrishidalgo)\
**Post date:** [October 13, 2017, 12:54am UTC](https://forum.xod.io/t/cycle-path-problem/129/2 "2017-10-13T00:54:53Z")

</div>

Still learning ardunio (day3), are those loops not permitted? I noticed I could get it to work if I assigned it to an unused I/O port (in this case port 8).

Here’s my final working setup

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/8b9c0e9102d3c156203a985c15361747863bdae8.png)

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [October 13, 2017, 8:21am UTC](https://forum.xod.io/t/cycle-path-problem/129/3 "2017-10-13T08:21:55Z")

</div>

Hello and welcome!

Yep, graph cycles are not supported yet. But they will be possible in the next version (0.15.0). Already done it in the development edge version. The release ETA is 1-2 weeks.

Meanwhile, you could use the [delay node](https://xod.io/libs/xod/core/delay/) to achieve the result.

 ![delay-example](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/aac28381b5200c0d6d1f8774919283382e7ed46a.png)

Am I understood your question correctly?

---

<div class="post-metadata">

**Author:** ![chrishidalgo](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@chrishidalgo](https://forum.xod.io/u/chrishidalgo)\
**Post date:** [October 17, 2017, 4:47pm UTC](https://forum.xod.io/t/cycle-path-problem/129/4 "2017-10-17T16:47:37Z")

</div>

Pretty close - the reason I did not use the delay timer is that I wanted the time value to be held, so if the LED ran for 15 seconds, the next time it runs it would only run for 45 seconds. Additionally, I have the same button input act as on and off.

Once graph cycles are implemented, this will work much more simply, but in the meantime I can use an open I/O point to run the node.

thanks!

---

<div class="post-metadata">

**Author:** ![nkrkv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/nkrkv/32/8_2.png) [@nkrkv](https://forum.xod.io/u/nkrkv)\
**Post date:** [November 1, 2017, 8:20am UTC](https://forum.xod.io/t/cycle-path-problem/129/5 "2017-11-01T08:20:02Z")

</div>

Feedback loops are available since [v0.15.0](https://forum.xod.io/t/xod-0-15-1-released/153).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [November 3, 2017, 8:20am UTC](https://forum.xod.io/t/cycle-path-problem/129/6 "2017-11-03T08:20:50Z")

</div>

Closed on November 3, 2017, 8:20am UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
