LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify variables in VI using C++ .net

Hello:

I'm very new to LabView and I need to be able to modify variables in a Labview VI programmatically from my C++ .net application.  Basically what we need to do is run through configuration files that are created in the C++ app, send values found in those configuration files to the VI and have the VI do its thing.  When it's done with that run, the C++ app will send a new set of values found in the configuration files and this process will be repeated over and over.  We're trying to automate data collection.  Being new to LV, I keep reading through articles and discussions but can't seem to figure out the theoretical "best way" to solve this problem.  Can someone provide methodologies/examples for doing this? 

Thank you very much in advance.
0 Kudos
Message 1 of 4
(2,316 Views)
Just wondering... Are the configuration files already created when you start the program(s) running?

If so, then I would suggest that you have LabVIEW do ALL the work. With LabVIEW you can read binary files byte by byte if you need to and do all the conversions to whatever format you need. This is assuming that you know the format of the configuration files in the first place.

If the C++ app is creating the configuration files "on the fly" then you could also have LabVIEW watch for changes in the files and load the new data when appropriate.

Just a thought to avoid interfacing 2 programs bult in different languages...
0 Kudos
Message 2 of 4
(2,307 Views)
Thank you Robert.

I kept playing around after I posted that message and I managed to get my C++ app to use a labview dll with a VI that reads data from a file and processes that data.  You have validated my approach in that I figured I could have the C++ app create a config file, invoke a VI that knows to read data from that config file, process the data appropriately and write results to another file and then return control to my program.  Being new to LV, it's hard for me to know what tools I have at my disposal.  Thank you so so much for your advice.

Vanessa
0 Kudos
Message 3 of 4
(2,306 Views)
Last time that I did a mixed program set, I had LabVIEW calling a DLL built in C++. Just goes to show where a person's focus is I guess (or the area they know better, anyway).

Glad to hear that you got it to work and thank you for letting us know what the solution was instead of leaving us hanging.
0 Kudos
Message 4 of 4
(2,295 Views)