10-17-2007 04:07 PM
10-17-2007 04:21 PM
There are many possibilities. (local variables on one singe stop button for example). I prefer event structures.
see e.g.: http://forums.ni.com/ni/board/message?board.id=170&message.id=136388#M136388
10-18-2007 10:26 AM - edited 10-18-2007 10:26 AM
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: http://forums.ni.com/ni/board/message?board.id=170&message.id=237840&view=by_date_ascending&page=4
Personally, I generally use local variable/property nodes, or have a (command) queue in the loop, with either a special stop command for the loop, or the loop simply terminates when the queue is unavailable. (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
10-18-2007
11:06 AM
- last edited on
06-11-2025
10:57 AM
by
Content Cleaner
I don't really use dynamic events, so I cannot comment on that specific thread, but for plain events I never had any issues with multiple event structures tied to the same FP event.
In my opinion, the following are OK:
Not OK are the following (again in my opinion):
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 NI documentation for other more details. I cannot find any objection against firing multiple event structures in parallel. 🙂
10-18-2007 11:13 AM
@Anthony de Vries wrote:
Personally, I generally use local variable/property nodes, ...
My solution has the advantage that the loop rate can be extremely long and the stop still occurs immediately. Imagine you have a logging loop that takes a snapshot every hour, using the event timeout. Pressing the stop breaks the timeout and finishes the loop immediately and you can even trigger a final snapshot if desired.
Sure you can use other methods to do the same, but it will probably be more complicated.
10-18-2007 11:26 AM