LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use shared variables with native c programs

Hello

What is the way to use shared variables with native c programs?

I have a c/c++ program that uses the NIDAQmx C-API to perform measurements. Now I want to communicate to a LabVIEW program via shared variables.

Is there a C-API for shared variables as there is for the NIDAQmx functionality? Where can I find further documentation? The document "Using the LabVIEW Shared Variable" mentions that one "can read and write to shared variables in ANSI C", but there are no hints about how and where to look.

Thanks in Advance
0 Kudos
Message 1 of 3
(2,978 Views)
Hi user42,

with CVI 8.0, you cannot create or configure shared variables. However, you can read or write to an already configured LabVIEW 8.x shared variable from CVI using the DataSocket API.
In order to do this you need to have and DataSocket 4.3 or higher installed.

Here's a forum post about using the DataSocket functions a LabVIEW Shared Variables:
http://forums.ni.com/ni/board/message?board.id=180&message.id=24569&requireLogin=False

With CVI 8.1 and Measurement Studio 8.1 it's possible to use Shared Variables via the Network Varaiable Library (check out the end of the "Network-Published Shared Variable" section within the "Using the LabVIEW Shared Variable" documentation and the following link).

Datasocket with LabWindows/CVI and LabVIEW Real-Time:
http://digital.ni.com/public.nsf/allkb/CC4343488413A2F586256E6200099638?OpenDocument

Daniel
NIG
Message 2 of 3
(2,951 Views)
Thanks Daniel, that were just the pointers I needed.

Now I know, I want to use CVI and DSTP/DataSocket.
0 Kudos
Message 3 of 3
(2,928 Views)