Re: Properly close multi loop application - labview

This is a discussion on Re: Properly close multi loop application - labview ; Don't want to hijack the thread....   but isn't it bad style to have multiple event structures like that?   Or is that only a problem for dynamically registered event?   I'm thinking about this thread: <a href="http://forums.ni.com/ni/board/message?board.id=170&message.id=237840&view=by_date_ascending&page=4" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&message.id=237840&view=by_date_ascending&page=4</a>   Personally, I generally ...

+ Reply to Thread
Results 1 to 2 of 2

Re: Properly close multi loop application

  1. Default Re: Properly close multi loop application

    Don't want to hijack the thread....   but isn't it bad style to have multiple event structures like that?   Or is that only a problem for dynamically registered event?  
    I'm thinking about this thread: <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=237840&amp;view=by_date_ascending&amp;page=4" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=237840&amp;view=by_date_ascending&amp;page=4</a>
    &nbsp;
    Personally, I generally use local variable/property nodes,&nbsp;or have a (command) queue in the loop, with either a special stop command for the loop,&nbsp; or the loop simply terminates when the queue is unavailable.&nbsp;&nbsp; (Like the producer/consumer design patterns that you can select when creating a new vi.)Message Edited by Anthony de Vries on 10-18-2007 05:27 PM

  2. Default Re: Properly close multi loop application

    I don't really use dynamic events, so I cannot comment on that specific thread, but for plain events I&nbsp;never had any issues with multiple event structures&nbsp;tied to the same FP event.
    In my opinion, the following are OK:

    - Multiple event structures serving the same FP event (e.g. "stop:value changed" in this case). Each in it's own while loop.

    Not OK are the following (again in my opinion):

    - Multiple events in the same loop (unless all are "transparent" with 0ms timeout). Still, this is not something I would do.

    - event structures&nbsp;within event structures

    - event structures inside case structures

    - event structures inside certain&nbsp;sequences (if any of the frames contains delays).

    - events containing long delays.

    - events NOT in a while loop (except for dialog style VIs that don't have any while loops)

    - events containing interactive while loops (short "math" while loops are of course ok, e.g. as used in a newton iteration)

    - ...

    In summary: any event topology that prevents the event from being serviced by the code dataflow within a short time is NOT OK.
    This is my own list. Have a look at the <a href="http://zone.ni.com/reference/en-XX/help/371361D-01/lvhowto/caveatsrecmndtnsevnts/" target="_blank">NI documentation</a> for other more details. I cannot find any objection&nbsp;against firing multiple event structures in parallel.

+ Reply to Thread

Similar Threads

  1. Net::Telnet won't close properly
    By Application Development in forum RUBY
    Replies: 0
    Last Post: 12-16-2007, 01:03 PM
  2. How to close socket properly?
    By Application Development in forum CSharp
    Replies: 1
    Last Post: 12-14-2007, 02:37 PM
  3. what do I need to close an app properly
    By Application Development in forum Java
    Replies: 2
    Last Post: 03-08-2007, 12:54 AM
  4. How to properly close app?
    By Application Development in forum basic.visual
    Replies: 0
    Last Post: 08-16-2005, 04:23 PM
  5. Clinet doesn't close properly.
    By Application Development in forum Microsoft Exchange
    Replies: 0
    Last Post: 04-01-2004, 05:07 AM