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.
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.
05-27-2010 12:57 AM - edited 05-27-2010 12:58 AM
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
06-02-2010 01:48 AM
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
06-02-2010 04:40 AM - edited 06-02-2010 04:42 AM
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
06-02-2010 05:08 AM
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
02-27-2024 06:15 AM
Can some one please help me with what is the correct method to call
SetControlValue method so that respective change event triggers automatically ?
02-27-2024 07:00 AM
I don't think that is possible using the Method (Control Value Set), instead write to the Value Signaling property.
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)