T Clancy Posted January 6, 2011 Report Share Posted January 6, 2011 Hi, I am thinking about writing an application that will grab user events from an executable that it connects to via VI server, stores the events (and the initial states) and then replays them on command. I was just fooling around, I discovered I can read and write to controls on the running executable but when it comes to registering user events I get Error 1055 occurred at Register For Events in Test.vi Possible reason(s): LabVIEW: Object reference is invalid From the attachement it can be seen that the error occurs when you try and register a user event. Is this a security issue which causes this limitation? Is there a way around it? Thanks, Tim Quote Link to comment
Black Pearl Posted January 6, 2011 Report Share Posted January 6, 2011 I'm not sure if this works, but you can give it a try: Type cast the ref to a more specific type (e.g. string control) before registering the event. Felix Quote Link to comment
Ton Plomp Posted January 6, 2011 Report Share Posted January 6, 2011 Sometime ago (LV 8.6?) LabVIEW stopped supporting inter-application communication, meaning that you cannot share Queues, Notifiers between them. I assume that extends to events as well. Norm Kirchner wrote a framework called LvX that could be used for those cases. I have never used it, but you can try it out, it is hosted somewhere on LAVA Ton Quote Link to comment
Yair Posted January 6, 2011 Report Share Posted January 6, 2011 Sometime ago (LV 8.6?) LabVIEW stopped supporting inter-application communication, meaning that you cannot share Queues, Notifiers between them. I assume that extends to events as well. LabVIEW never allowed this. What you're probably thinking of was a bug in LV 8.0 where this block (which probably occurs naturally in separate processes) was not implemented for different projects opened in the same LV instance. Quote Link to comment
Dan DeFriese Posted January 6, 2011 Report Share Posted January 6, 2011 From your code it looks like your trying to open a reference to your VI using the full path. As I recall you should only need the VI name when opening a VI reference from the executable. Quote Link to comment
Antoine Chalons Posted January 6, 2011 Report Share Posted January 6, 2011 LabVIEW never allowed this. What you're probably thinking of was a bug in LV 8.0 where this block (which probably occurs naturally in separate processes) was not implemented for different projects opened in the same LV instance. I think this is the thread you're talking about. But we can use control's and VI's references across contexts, so why not events? If it's indeed not possible, that's sad... Quote Link to comment
T Clancy Posted January 6, 2011 Author Report Share Posted January 6, 2011 So it could be a bug in Labview? Quote Link to comment
Jarrod S Posted January 7, 2011 Report Share Posted January 7, 2011 You can't register for events from controls in another application. That functionality doesn't exist. You would need to add code to the exe to facilitate getting this data out. You could do this in a similar way to the example below, which registers for User Events (rather than front panel events) across app boundaries. http://decibel.ni.com/content/docs/DOC-14216 It will take some work, but the solution could be made fairly generic. The basic idea is to have the local app request that the remote app register a particular event on its behalf and forward it the data via some callback. Quote Link to comment
T Clancy Posted January 7, 2011 Author Report Share Posted January 7, 2011 I think this is the thread you're talking about. But we can use control's and VI's references across contexts, so why not events? If it's indeed not possible, that's sad... Very very sad... The link provided above is for labview 10.... can anyone provide a 2009 version? Thanks You can't register for events from controls in another application. That functionality doesn't exist. You would need to add code to the exe to facilitate getting this data out. You could do this in a similar way to the example below, which registers for User Events (rather than front panel events) across app boundaries. http://decibel.ni.co.../docs/DOC-14216 It will take some work, but the solution could be made fairly generic. The basic idea is to have the local app request that the remote app register a particular event on its behalf and forward it the data via some callback. Do you reckon you could make it exist? and if not why not? Thanks Tim Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.