Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

Success Package solution CLD3 for review (with pause and no pause)

Hi,

 

Please review and comment. compare with model NI solution too. Looks functionally OK though. Comments shoud highlight what is percieved right or wrong or what can improve.

 

Thank you.

[BADGE NAME]

0 Kudos
Message 1 of 5
(3,156 Views)

Let's start with the "No Pause" version

  1. You broke the error chain!  Any upstream errors are lost.  That is very bad and a debug nightmare.   
  2. No way to use this as a sub-vi.  A FGV needs a definite exit.  As you wrote it the outer loop will continue to iterate until you somehow open the FP and press Stop.  Try that again, this time remove the outer for loop and use a Feedback Node to store "Last Time".

Pause Version:

  1. See #2 above
  2. You didn't break the error chain this time but, since there is no way to change the value of error in why have a FBN at all on it?
  3. It would help if the Boolean indicator "Has Time Elapsed" was wired to the connector pane!  The caller will never know time has elapsed!

"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(3,127 Views)

Jeff,

 

i didn't seek to express the FGV as a sub- vi though so that would address most of the points you raised. My intention ( which I achieved) was to get that code running continuously till stopped). Can you tell me how else to do that without an outer while loop with a stop button? As I understand an FGV will execute once until called again since it typically has a true constant wired to the while loop. Post a vi to illustrate. Also If you notice, there is a lot less code with this implementation ( less number of shift registers and "Get date and time in seconds" vi). Also i don't believe I used any "For" loops anywhere  ( used while loops only) as you suggested . Will look into the "breaking of Error " as you mentioned. Thank you.

[BADGE NAME]

0 Kudos
Message 3 of 5
(3,121 Views)

Attached shows the subvi idea if intended. But one thing I wanted to mention is that the use of only one "Get data and time in sec vi" to get  "incremental time" seems to make for more efficient code? Also please can you throw more light on the breaking of the error chain? Thanks.

[BADGE NAME]

0 Kudos
Message 4 of 5
(3,117 Views)

It is completely anathema to have a "FGV" or Action Engine (the AE is closer to what you have, a FGV is usually only Read/Write) without several key components.  Private Data Storage, (USR or FBN), "Methods" to act on the data,  and a discrete Exit.  Go back and read Ben's famous Action Engine Nugget. There is a good reason why it is the single most kudosed post outside of the Idea Exchange. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 5
(3,110 Views)