LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The software Icon is still on taskbar , after I close the software in 64-bit Windows 7.


@crossrulz wrote:

@JÞB wrote:

(Try using the App.Kind property to drive the last cases selection)

1b.PNG


I'm more of a fan of the Conditional Disable Structure myself


I suspect the CD would perform a bit better in a benchmark, Especially if the UI thread is heavilly loaded.  Although, most UI activity should be done after cleanupSmiley Wink Might make an interesting diversion and a good use for Precision Timer.vi


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 30
(1,497 Views)

@JÞB wrote:

@crossrulz wrote:

@JÞB wrote:

(Try using the App.Kind property to drive the last cases selection)

1b.PNG


I'm more of a fan of the Conditional Disable Structure myself


I suspect the CD would perform a bit better in a benchmark, Especially if the UI thread is heavilly loaded.  Although, most UI activity should be done after cleanupSmiley Wink Might make an interesting diversion and a good use for Precision Timer.vi


You must be pretty bored for the end of the day on a Friday.  I would almost guarantee that the CD will perform better because it makes the decision at compile time instead of run time.



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 12 of 30
(1,494 Views)

@crossrulz wrote:

You must be pretty bored for the end of the day on a Friday.  I would almost guarantee that the CD will perform better because it makes the decision at compile time instead of run time.

 


 


 

Oh I agree.... Just sometimes.... "unexpected results" can occur so, I'm not putting money down without checking it out. 

almost guarantee reminds me of "a little bit pregnant"

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 30
(1,490 Views)

Yes, I build an exe file.

 

0 Kudos
Message 14 of 30
(1,480 Views)

Please help me to check if it is correct. I never user APP.Kind before.

Thanks a lot.

Steven

Download All
0 Kudos
Message 15 of 30
(1,477 Views)

<NOTE>Should have updated web page before posting...</NOTE>

 

There are quite a few possibilities.  Your code has many race conditions since it uses local variables to pass data around between loops.  This is always a bad idea.  Local variables should only be used to update or initialize UI values.  Values used to control the program should be in wires (preferred), data value references, or  functional global variables (also called shift register or LabVIEW 2 globals).

 

Your program is overly complex.  For example:

 

  1. The second loop from the top is unnecessary.  You could remove the queue and simply write the local directly from the event structure (assuming you kept the local variables - don't).
  2. The delay in the event structure loop does nothing, since the event structure is already slowing down the loop.
  3. Unless you want a current time display, the top loop is unecessary.  You would be better off creating a subVI which generated your time/date strings and calling it when needed.
  4. Your bottom loop lacks a shift register with wire which holds state information (e.g. "event element").  This results in your passing a lot of info on local variables.

To do the fastest fix for this code, I would add a shift register to the bottom loop which includes all your state information and use this to replace all the calls to local variables.  Change the bottom loop from a simple state machine to a queue driven task handler.  Use the event structure to send messages to the bottom loop using the queue.  Delete the other two loops - their functionality can be folded into the new bottom loop.

 

If you are unfamiliar with this master/slave architecture, check out the examples that ship with LabVIEW and that exist on the NI website.

 

When you posted your code, you did not post the subVIs.  In the future do a save with dependencies and zip the entire set of VIs to post.

 

Good luck!

Message 16 of 30
(1,475 Views)

Like I said... refactor the code..  😉

 

To learn more about LabVIEW, I suggest you try looking at some of these tutorials.

0 Kudos
Message 17 of 30
(1,467 Views)

Thanks. I will refactor the code.

But right now, I need to know how to use app.kind to close me application and/or front panel. Please take a look the attachments. Is it correct?

Thanks.

Steven

Download All
0 Kudos
Message 18 of 30
(1,459 Views)

No.. in your case, you are simply closing the reference to the application.

 

I'll draw an example.

0 Kudos
Message 19 of 30
(1,455 Views)

1!.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 20 of 30
(1,445 Views)