LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No events from CWDataSocket. Viewing from ActiveX Container Tool

Using Labview 6.1 on Windows 2000. Exploring ways our C++ program can get and set values into a VI. Was looking at the CWDataSocket ActiveX Control in the VC++ ActiveX Test Container Tool and was trying to get it to fire events.
I set both a VI control and The URL in CWDataSocket Control to "dstp://localhost/clay". The DataSocketServer window received my connection, but when I changed the variable in the VI, I couldn't see any events (Expecting OnUpdatedData()).
I'd like the events to fire so I don't have to poll.
The VI control was set to "Publish", and for accessMode on my CWDataSocket I tried both the read and the readAutoUpdate settings.
Ultimately I would like to map many variables from a C++ stru
cture in a shared memory (Map File) to values of controls in VI. If there is a better way to do this than datasockets (like DDE) I am very open to suggestions.

Thank you very much for your time and help.
0 Kudos
Message 1 of 2
(2,648 Views)
Interesting question Clay!

I have never done it from outisde of LabVIEW but ActiveX maybe the ticket.

LabVIEW serves upits front panel controls and indicators. You may be able to get at them as variants by reading from;

LabVIEW>>>FrontPanel>>>Controls

will return an array of ActiveX references to all of the Controls and indicators.

Read the "Label" Property of of each of these refferences to get the name of each control. Search through this list for the control or indicator you wnat to access. Then you can use the property node called "Value" to get the value you are after as a variant.

I have never done this thing myself in C++ but I was able you look at the VBA examples to use navigate PowerPoint from LabVIEW, so in theory you should be able to do the
same thing backwards.

Just my thought, hope it helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(2,648 Views)