Jump to content

Register User Events through VI Server


Recommended Posts

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

post-18537-0-72826500-1294291064_thumb.p

Link to comment

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

Link to comment

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.

Link to comment

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...

Link to comment

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.

Link to comment

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

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.