LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to do every 600 seconds to execute For loop?


@P Anand wrote:
[..]I know there are Pros and Cons between the Shift register and the feedback node but where is given feedback node is correct compared to shift register. [..]


You do know, that during the transforms (DFIR i think it is in this case), ALL feedback nodes are replaced by shift registers?

 

Norbert 

 

EDIT: Altenbach pointed out correctly, that this transform was, i think, modified with LV 2010. So on older versions of LV, FN and SR do have different performance. 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 31 of 40
(892 Views)

@P Anand wrote:
SR-FN - Timing.PNG

 

This is what I get when I run your code still you stick on to your point?. ( LV2011 version)


Can you post your benchmark VI?

Also please give the system parameters (RAM, OS, CPU and so on).

I see no actual reason for such a huge difference between the performance since, as written before, there should not be any performance difference if both mechanism are used in a comparable way.

So either you have a flaw in how you benchmark the timing or you are using both in a different way!

 

Norbert 

 

EDIT: And again, as Altenbach pointed out correctly, you DID DISABLE debugging for you benchmark, no? 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 32 of 40
(888 Views)

I feel sorry for the OP since this thread has morphed into lively exchange regarding shift registers and feedback nodes.  Smiley Happy

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 33 of 40
(875 Views)

The VI was posted here:http://forums.ni.com/t5/LabVIEW/how-to-do-every-600-seconds-to-execute-For-loop/m-p/2132502#M690963

 

They are looking for a difference between an expanded shift register and 3 feedback nodes.  With debugging off, I get fairly comparable results between the two methods (FBN actually slightly faster).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 34 of 40
(872 Views)

@Norbert_B wrote:

@P Anand wrote:
SR-FN - Timing.PNG

 

This is what I get when I run your code still you stick on to your point?. ( LV2011 version)


Can you post your benchmark VI?

Also please give the system parameters (RAM, OS, CPU and so on).

I see no actual reason for such a huge difference between the performance since, as written before, there should not be any performance difference if both mechanism are used in a comparable way.

So either you have a flaw in how you benchmark the timing or you are using both in a different way!

 

Norbert 

 

EDIT: And again, as Altenbach pointed out correctly, you DID DISABLE debugging for you benchmark, no? 


That is not my benchmark vi and crossrulz has given the link. When I run the code in my machine (2011) I got SR outperformed FN ( I am not sure debugging enabled or not). I support neither SR nor FN just trying to know what drives FN more than SR in performance.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 35 of 40
(866 Views)

Hi 多多,

 

 Here is my VI attached. Sorry, i dont read the message before.

 

Good Luck.

 

 



About SR vs FBN

 

       At LabVIEW 2009, debugging off, I got SR~9.6sec and FBN ~8.1sec.

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 36 of 40
(856 Views)

thank you~ Luis_AM3C

 

your vi is so cool~

 


0 Kudos
Message 37 of 40
(845 Views)

Here is a much simpler VI that will do the exact same thing.  I even added a stop button to illustrate a point I made earlier.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Download All
Message 38 of 40
(839 Views)

Hi crossrulz,

 

  Yeah your VI is very simple. Now understand why you call my VI a Rube Goldberg Machine Robot Sad. I was seeing only the images with for loops. And because my english is unskilled, i didnt understand when you explained me.

 

   Probably my mind wanted to use FBN.

 

Best Regards,

Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
0 Kudos
Message 39 of 40
(831 Views)

@Luis_AM3C wrote:

   Probably my mind wanted to use FBN.


I know, find a new shiney toy and you want to use it for everything.  We've all been there.  And we all then use them in ways they were not really meant to be used.  Don't be afraid of FBNs, but remember that other constructs may work better.  It really depends on the situation.

 

Just for fun, here's a couple more ways it can be done, one of which is still using a feedback node, just for you.  I would still with the shift register version because I have ran into cases where an event will determine the timeout.  So it is cleaner to use a shift register.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 40 of 40
(819 Views)