How to toggle a relay with one button?

D’oh. Yes, you do. Fixed.

Yikes. Similar in compactness? Easier to understand? To each his own I guess :slight_smile:

My lip is bleeding.

In the posted example, only one of the feedback nodes “breaks” this flow, the other is oriented left to right. And there is an arrow…

Do you find it easy to understand that what goes into the left hand side of a a left-to-right oriented feedback node is different to what comes out of the right hand side?

Personally, I find it difficult. Especially without the loop there to show that the code you’re looking at is actually being called in a looping fashion to populate the feedback nodes.

I’m pretty sure its a personal preference thing though.

I have little-to-no experience with using LabVIEW in an FRC environment. Are we able to use event structures? Most of the LabVIEW programs I write make heavy use of the Event Structure to control process flow.

Teams can use event structures, but few do. This is RT, so very little UI and not much need for user events.

As for the shift register versus feedback node. It took awhile for me to warm up to the feedback. I was so used to doing it with loops. I now use a mix. I typically use a shift register if it already has a loop or if it is a functional global. I use a feedback node if it is like the button example and is super local. I find that I change direction on the node when doing a compare for change, it makes much more sense to me. If I need the i-1 term for something else, I typically leave it in the default direction. I don’t go for separating the init from the feedback. As you say, it is a style decision.

Greg McKaskle