Go to Post it's shadows and fog and stormy skies and a reminder that things are rarely black and white but instead, the places in between. - MissInformation [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: 14 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 13-08-2008, 02:22
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Labview: Feedback node doesn't reset on "stop"

Yes, I am using continuous run. The default value of a boolean feedback node is FALSE, and that just happens to be what I need to to initialize to.

Quote:
Originally Posted by Greg McKaskle View Post
The continuous run is simply running your entire diagram again and again including the init code. If you want better control over initialization, which you do, place your own loop around this with a button to exit the loop. You can then init on entering the loop and have state data inside the loop.
Huh. I just tried it, and I must have done it wrong, because it didn't work. One of the most basic VIs I'm working on to make my programming easier is the latching relay (the VI I uploaded). The output should only be on if the trigger has been pressed, and should only turn off if reset has been pressed. (in other words, there's one input to turn the signal on, and one to turn it off)
I suppose I could just wire every reset of every subVI I use to the "firstcall" indicator (which I should be doing anyways), but it makes it quite a pain for testing my code.

Quote:
Originally Posted by Greg McKaskle View Post
Personally, I then prefer to switch over to the loop shift registers. They aren't necessarily better, but they are what I learned, and to me are simpler to explain things like initialization.

When you are ready to use the code you are writing as a subVI called from other locations, if the loop doesn't belong inside the subVI, but the state data does, then set the loop to a constant to run only once.
I'm not really sure how I can get a feedback node to initialize only once, when it seems to go through initialization every time it is called.

Apparently feedback nodes have a default initialization value. Shouldn't this mean that it resets to its default value when it is called for the first time, before it has a chance to collect data? (or perhaps even when "abort execution is pressed"*)

* I made a mistake in confusing "abort execution" with "stop" in my previous post.
Attached Files
File Type: vi Latching Relay.vi (10.0 KB, 253 views)
__________________
-- Marshal Horn
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop with the "RTFM" stuff Karthik General Forum 31 06-01-2008 16:33
Use a USB Joystick - "FORCE FEEDBACK 2" or yaniv Control System 8 04-12-2005 19:55
New NEMO White Papers! "Creating a Killer Packet" and "25 Ways to Sponsor" Jessica Boucher Team Organization 0 10-08-2005 10:55
"Thunderbirds" Vs. "Team America" Which one will rule the box office? Elgin Clock Chit-Chat 3 07-09-2004 19:53
Stop The "Lesser of two evils" MattK Chit-Chat 8 07-08-2004 23:31


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

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