1. James Powell

    Re: “First, since the event registration refnum passes through a subVI boundary, the event case that handles the user event gets a non-descriptive name of “User Event”.”

    You can give the User Event a descriptive name, though it is rather non-obvious. Create a constant of your User Event, change its label to what you want to eventually see in the Event structure, wire the constant into the Register function, and create an indicator from that. Then delete the constant and wire up your original User Event. The indicator, used as your subVI output terminal, retains the name.

  2. Quote : “Using the QMH as a State Machine – …. The NI QMH accomplishes this by providing an “enqueue multiple messages” polymorphic instance of the enqueue VI. However, there is still a slight possibility that a message could get enqueued by a parallel process between two loop iterations within this VI.”

    I’m wondering how could the states enqueue in parallel as the “Enqueue Message (Array).vi” a non-reentrant and for loop is also not configured for parallelism.

    • Ajayvignesh,

      It is a very small window of opportunity, yes, the enqueue message (array).vi might not be reentrant, but it is not the only VI that has access to put messages in the queue, we also have the enqueue message (single message). So, there is a small possibility of having a single message be enqueued while the enqueue message (array) is in between iterations. It is a very small possibility, however it is still possible. The worst part is that this would be very hard to reproduce, so you might see it from time to time and not know why/how is happening. That is why if you can not afford a sequence of messages to be interrupted to make them an atomic action in a single case in your Message Handling Loop. I hope this makes sense.

      • James Powell

        You could actually build an “atomic enqueue multiple” subVI. It would send the messages in a single batch and the dequeuing subVI would pass them out one-by-one.

  3. iikka

    Hello, and thanks for the great blog!

    Quote: “Rumor has it that the Register For Events function will no longer be wrapped in a subVI in future versions of the NI QMH project template. We will update this blog post as soon as this rumor is confirmed.”

    It seems that in LabVIEW 2015 the Register For Events function is not in the subVI anymore.


Leave a Reply

Your email address will not be published. Required fields are marked *