Jump to content

How to get return data from a dynamically called vi?


Recommended Posts

You keep talking about passing the Event Reg Ref... and I'm surprised no one has mentioned this yet but you can not pass that reference around.

The proper usage of it is to be used within the same chain of VI's as in same VI as event structure or maybe passed out of a subVI for simplicity purposes only to be passed to the calling VI but never to a dynamically called VI.

I smashed my head yesterday for a full hour trying to find out why my "Generate Event" didn't work before I read this token. I was creating the Event Registry Refnum AND User Event Refnum in a subVI from which I then passed the Event Reg to my Dynamically spawned VI and the User Event Refnum to my static VI. The fun part is that it worked great when I was in "debug mode" (with a Dialog Window popping out) but the event didn't get registered when I disabled the dialog box... I was telling my girlfriend this analogy yesterday:

"It's like if I were speaking to you in German and you couldn't understand until I dropped an apple on the table, and then you could understand... bis ich den Apfel entfernt wieder.*".

See the picture below: if I enabled the disable diagram node, it would work...

post-10515-126762509942_thumb.png

* If your german ears are shocked, I apologize for Google's mishaps... ;)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.