Go to Post No one wants to have the piece that they spent hours swiss-cheesing break in half... - BillCloyes [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

 
 
 
Thread Tools Rating: Thread Rating: 7 votes, 4.86 average. Display Modes
Prev Previous Post   Next Post Next
  #11   Spotlight this post!  
Unread 16-03-2013, 16:55
NeatNit's Avatar
NeatNit NeatNit is offline
Alumni Programmer
FRC #1577 (Steampunk)
Team Role: Teacher
 
Join Date: Sep 2011
Rookie Year: 2011
Location: Israel
Posts: 60
NeatNit is an unknown quantity at this point
Re: Run something only once in a while loop?

Quote:
Originally Posted by Greg McKaskle View Post
The explicit purpose of the feedback node is to retain information for another run of that diagram expression. The complication is specifying what the lifetime is for the retained state data -- when is it to be initialized and with what value. The initializer terminal on the feedback node and the left side of the shift register are there to specify the value and timing of the initialization. Perhaps it doesn't work the way your intuition says it should, and I'd like to hear more about that, but it seems pretty complete, useful, and teachable. I'd like to hear the cases you are having issues with.

Greg McKaskle
Well to put it short I am having problems predicting when feedback nodes get initialized, especially when teaching about them. They seem to be very determined in retaining information always always, and sometimes even between totally separate runs. Shift registers are completely predictable - they get initiated when the loop is started. But I've seen some generally nice code by rookie programmers get slaughtered by this. Stopping, editing code, and running it again, feedback nodes actually retained information from previous runs. I find it difficult to teach people "when to use what", because they're not going to accomplish anything if they don't learn these kinds of things the way they understand them, and with feedback node and shift registers being so similar, it's very hard for me to just tell someone "forget it, feedback node's broken, switch to shift register".
Reply With Quote
 


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 20:57.

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