Go to Post I think Dean has surpassed my 12 minute prediction.... - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-07-2013, 13:27
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: How to toggle a relay with one button?

Ugh. The LabVIEW Developer in me can't stand feedback nodes. They make everything so much harder to understand.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-07-2013, 15:47
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
Ugh. The LabVIEW Developer in me can't stand feedback nodes. They make everything so much harder to understand.
Interesting. It's one of the symbols that seems second nature to me. Perhaps because of many years working with digital controls systems. It's just Z-1.


Reply With Quote
  #3   Spotlight this post!  
Unread 02-07-2013, 16:18
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: How to toggle a relay with one button?

I understand them, but they break left to right data flow, which is considered a no-no in most of the LabVIEW world.

I prefer to use shift registers and while loops.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-07-2013, 18:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
I prefer to use shift registers and while loops.
Are you saying this would look clearer to you using shift registers and while loops instead of feedback nodes?


Reply With Quote
  #5   Spotlight this post!  
Unread 03-07-2013, 10:37
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: How to toggle a relay with one button?

Generally, yes.

I find that vi to be difficult to understand, as the loop that causes the feedback nodes to contain data is outside the scope of the vi. Tracking the flow of the program gets much harder that way.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-07-2013, 11:07
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
Generally, yes.
Can you post a PNG or GIF of how you would re-write that?


Reply With Quote
  #7   Spotlight this post!  
Unread 03-07-2013, 14:14
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: How to toggle a relay with one button?

This would have identical function to the other one. Similar in compactness, and IMO easier to understand what is happening. Its a style thing though, I fully understand that other people may find feedback nodes easier to understand.

Click image for larger version

Name:	shift register based toggle.png
Views:	108
Size:	13.3 KB
ID:	15042

Last edited by Racer26 : 03-07-2013 at 14:45.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-07-2013, 14:27
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
This would have identical function to the other one.
Don't you need to leave the shift registers uninitialized for this to work?
Reply With Quote
  #9   Spotlight this post!  
Unread 03-07-2013, 14:46
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Joe Ross View Post
Don't you need to leave the shift registers uninitialized for this to work?
D'oh. Yes, you do. Fixed.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-07-2013, 17:00
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
D'oh. Yes, you do. Fixed.
My lip is bleeding.


Reply With Quote
  #11   Spotlight this post!  
Unread 03-07-2013, 16:59
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,065
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
This would have identical function to the other one. Similar in compactness, and IMO easier to understand what is happening. Its a style thing though, I fully understand that other people may find feedback nodes easier to understand.

Attachment 15042
Yikes. Similar in compactness? Easier to understand? To each his own I guess


Reply With Quote
  #12   Spotlight this post!  
Unread 05-07-2013, 09:42
Aren Siekmeier's Avatar
Aren Siekmeier Aren Siekmeier is offline
on walkabout
FRC #2175 (The Fighting Calculators)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: 대한민국
Posts: 735
Aren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond reputeAren Siekmeier has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by Racer26 View Post
I understand them, but they break left to right data flow, which is considered a no-no in most of the LabVIEW world.
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...
Reply With Quote
  #13   Spotlight this post!  
Unread 05-07-2013, 10:48
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: How to toggle a relay with one button?

Quote:
Originally Posted by compwiztobe View Post
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.
Reply With Quote
  #14   Spotlight this post!  
Unread 06-07-2013, 08:12
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: How to toggle a relay with one button?

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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:12.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi