Go to Post Just remember to be as transparent and inclusive as you can. - DonRotolo [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 28-12-2014, 05:25
labbed out labbed out is offline
Registered User
no team
 
Join Date: Dec 2014
Location: Ireland
Posts: 1
labbed out is an unknown quantity at this point
reset the shift register?

Hi All
is it possible to reset a number in a feedback loop? I attached an image, I am taking a number from a shift register and i want to increment it until a setpoint is reached but I want to start with another number in the feedback loop and start incrementing again.
P.S
Title should read: reset the feedback loop.
Attached Thumbnails
Click image for larger version

Name:	pic9.png
Views:	60
Size:	15.3 KB
ID:	17645  

Last edited by labbed out : 28-12-2014 at 06:03. Reason: rename the title
Reply With Quote
  #2   Spotlight this post!  
Unread 28-12-2014, 11:39
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: reset the shift register?

I can make a couple comments about the code that you attached, but I'm not sure that they will help you solve your problem. If you'd like help writing the code that performs the logic, it would be better to attach more of the code and a more thorough description of what it is trying to accomplish.

First, notice that the enable terminal in your example serves no purpose. By placing the shift register and add inside of a case, you have double guarded the operation. The value going to the enable must always be True, which is equivalent to hiding it again. Or you can possibly remove the case statement, but I can't tell for sure since I can't see enough of your code.

Second, I find it helpful to think about feedback nodes as delaying your input for N cycles of execution. The only purpose for the initializer is for the initial execution. After that, you control their next output by controlling this input. In the code that you showed, this will likely be accomplished by simplifying ... by removing the case statement and using a select statement instead. I suspect that what you may want is something like this ...

Notice that it writes to the feedback node each execution, either a zero or an incremented count. There are many other ways to write this, but first, let's make sure it does what you intended.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	From Clipboard.PNG
Views:	32
Size:	16.2 KB
ID:	17646  
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 08:52.

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