From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value (Signaling) property and programmatically generate value change event?

I need to do exactly what Frans wanted to do.

 

So 6 years on, is there an event based (non-polling) method to have an ActiveX client (to a LabVIEW ActiveX EXE server) do the equivalent of setting the value signalling Property of a control on that EXE's FP?

 

rgds
Message Edited by Peter_B on 05-27-2010 12:58 AM
Peter
0 Kudos
Message 11 of 16
(1,205 Views)

I guess not.  So my chosen solution is to write a vi which grabs a reference to the desired control and sets the Value Signaling property of it.  This vi will be called from my C# .NET code via the ActiveX method   object.Call([paramNames], [paramVals]) 

 

There is a great example here for how to do thism just scroll down to the bottom and click on callinglvcsharpusingactivex.zip

 

rgds

Peter
Message 12 of 16
(1,174 Views)

Perhaps what you are after is a callback.  Here is a page referencing .net but I think you can use them with active X as well.  I have used them within LabVIEW itself instead of polling.

 

http://decibel.ni.com/content/docs/DOC-9161

 

Craig

 

here also is doing it with activeX http://digital.ni.com/public.nsf/allkb/292FA0C0E7A0D69B86256D18007F525E

 

Message Edited by craigc on 02--06-2010 10:42 AM
LabVIEW 2012
0 Kudos
Message 13 of 16
(1,162 Views)

Thanks Craig.  I considered using an Event callback and got most of the way to implementing it in C# until I realised how much simpler it is in both programming environments to do it the way I mentioned above.  I was already communicating to the LabVIEW ActiveX EXE server from the C# environment, so it seemed a logical and simpler way to solve the problem.  Events in C# require too much coding compared to using the ActiveX call method I highlighted above.

rgds

Peter
0 Kudos
Message 14 of 16
(1,153 Views)

Can some one please help me with what is the correct method to call 

SetControlValue method so that respective change event triggers automatically ? 

0 Kudos
Message 15 of 16
(61 Views)

I don't think that is possible using the Method (Control Value Set), instead write to the Value Signaling property.

Peter_B_0-1709038585222.png

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000004BKFSA2

 

You can also do this in a sub vi by passing a reference to the control into a generic property node and selecting Val(Sgnl)

 

Peter
0 Kudos
Message 16 of 16
(47 Views)