LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

wait on active event hangs

I changed the Create ActiveX Event subvi, and now it is not executable.  It says "Can not connect different refnum types."  I can't think of another way to pass the notifer to the new wait on activex event.
0 Kudos
Message 11 of 18
(1,332 Views)
Hi shivels,

The issue is that you are trying to connect two different notifier types.  What you should do to remedy this issue is delete the Event Notifier Out in Create ActiveX Event Queue_New, and then right click on the output of the Obtain Notifier VI.  Then copy the Notifier Out to the Wait On ActiveX Event_New.  Change it to a control, delete the Event Notifier In, and wire the new control  to where the Event Notifier In use to be.  Delete the Event Notifier Out and Event Data, and create indicators for those two outputs.

If this doesn't resolve the issue, please let me know.

Best of luck on your application, and have a great day!!
Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 12 of 18
(1,307 Views)
Thanks for the info.  When I deleted the event data, and created an indicator, it changed the indicator to a numeric type.  How can I keep the "event data" as a string type?  It needs to be a string type, because it has to contain a voice command spoken by the user.  Here is the vi's I changed.
 
Thanks,
Adam 
Download All
0 Kudos
Message 13 of 18
(1,300 Views)
Hi Adam,

Have you tried to use the Number To Decimal String VI to convert the "event data" back to a string? 

Best of luck on your application, and please let me know if this does not work for you.
Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 14 of 18
(1,284 Views)
I am stumped by this.  I still get a wire error.  It says "Type of source is string."  Then it says the "Type of sink is typedef "Eventdata.ctl" cluster of 4 elements.  Is there any way to create an eventdata.ctl output?
0 Kudos
Message 15 of 18
(1,279 Views)
Hi shivels,

I think I am a bit confused as to what output your are talking about.  Can you please include a screen shot of the output that you think should be a string?

I have included a screen shot of what I believed to be the issue, and how I would fix it. 



Best of luck on your application, and have a wonderful weekend!!

Message Edited by cphuong on 12-22-2006 03:21 PM

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 16 of 18
(1,250 Views)
Converting the numeric notifier to a decimal string works fine.  When I try and connect the indicator to a cluster of type parameter data, it gives an error saying it wants a tpyedef of "Eventdata.ctl."  I am trying to replace the original "Wait on activex event."  The original vi has a timeout value of 10 seconds.  But after it timeouts it hangs.  If you try and change the timeout value, it does not work.  It won't wait for longer than 10 seconds.  I am trying to wire up a vi, that will wait for an indefinte amount of time.  Is this possible?
 
Adam  
Download All
0 Kudos
Message 17 of 18
(1,244 Views)
Adam,

I suggest you take a look at wherever you create the notifier that you are reading.  The "notification" output of the "Wait on Notification.vi" changes datatype based on the element datatype wired to the "Obtain Notifier.vi".  It appears that you are trying to use unbundle by name on a number - hence the broken wire.  Make sure that when the notifier is being created it has the appropriate datatype (in this case it looks like you need a certain cluster).

To answer your actual question in this post, yes I'm sure it is possible to create a VI which will not timeout (almost all things are possible in LabVIEW, a lot of them are quite easy, this might be one of the not-so-easy cases).  Have you tried placing one of the old VIs which only waits for 10 seconds in a loop which simply calls the VI again whenever a timeout occurs?

I hope this helps.

Simon H
Applications Engineer
National Instruments
http://www.ni.com/support/
0 Kudos
Message 18 of 18
(1,194 Views)