BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

activeX callback VI

Hi:)

I am new with Labview. I have an ActiveX object. I also registered an event for it.
Now, I want labview to indicate me whenever the event is called. That is all.

The event is about a complete move of a motor. I would like to have a LED blinking whenever the event "Move complete" is called.

I tried several versions. None of them worked. I think I might have forgotten something really simple.
But I can't find the solutions myself. As I said I am a " bloody beginner".

Thank you very much for your help in advance!!!!

cheers Denise
0 Kudos
Message 1 of 5
(5,393 Views)
For an understanding of using .NET with LabVIEW, I would reccomend you look at Brian Tyler's Lycangeek blog.

There is an entry there regarding registering for and handling .NET callbacks called "Let there be Events!" (including examples) that should help get you going. I've tinkered a bit and created a .NET callback that monitors the UPS of my system amd generates a LabVIEW Notifier when the UPS changes states. Its available in the community.ni.com forums as .NET PowerModeChanged Notifier

Message Edited by Phillip Brooks on 12-06-2006 06:18 AM


Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
If you don't hate time zones, you're not a real programmer.

"You are what you don't automate"
Inplaceness is synonymous with insidiousness

0 Kudos
Message 2 of 5
(5,373 Views)

Hello Denise,

Just so you know, the "Breakpoint" forum is not really for technical discussions. It's kind of our community, talk about whatever you want forum. This topic would be better off in the "LabVIEW" forum. But no harm done.

There's a pretty good example of how to setup an ActiveX callback here on the Developer Zone. I think it should provide just what you're looking for.

Registering for Event Callbacks in LabVIEW

Try that and let us know if you still need help.

Ed



Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 5
(5,361 Views)
Hi,

thank you for your effort.

I didn't realize where I posted my question. But thinking about it now...it does make sense that a forum called break point is not supposed to discuss technical problems;)

Next time I'll be more careful.

However, thanks a lot for your suggestions. However, none of them brought me forward. My trouble is that I am a physicist. I had just a little programming in my studies. But the spectrometer I am working with is based on Labview and if I want to work with it I need to change it. That's why I am faced with LV programming.

And the examples you showed me are always using other kinds of event data. Well, have a look if you like.

I think I still don't understand why you need event structures. I mean isn't it right that as soon as an event is fired the callback VI will be called and run. So I was trying to let the callback VI return a "yes" ( as a blinking LED) so that I know the event was fired.

hio denise




0 Kudos
Message 4 of 5
(5,321 Views)
hi:)

I just came back to let you know that I got it working. I remembered reading on ni.com that the user parameters must be set first. Otherwise the callback VI wire can break.

Now, all examples had returned messages...titles, names etc. I needed to return a yes or no and thus update my indicator. So this time I wired a reference for my indicator to the parameter input. AFTER THAT I created the callback VI.

And is working now. Not as easy as I thought it was, but it is working. That is all that matters:)

Thank you very much for your help and advice.

cheers denise
0 Kudos
Message 5 of 5
(5,312 Views)