LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DSC: Importing Shared Variables results in error -1950679010

This post is more of an "FYI" rather than a question.  I am using LV DSC 8.2.

ASIDE:  I ran into this problem because I was trying to solve a related problem with Deploy Library.vi (I had dependant libraries that deployed manually, but not programmatically).  Eventually, I found the answer in http://digital.ni.com/public.nsf/allkb/8EF71E1DDDC36C908625716900594B50 (not a very satisfactory answer however, IMHO).

During my solution search, another hint was provided with http://forums.ni.com/ni/board/message?board.id=170&message.id=177268&requireLogin=False which hints that using a "Network" defined SV, as opposed to a "Project" defined SV, could help.  Then I discovered the difference between Network:ProjectPath and Network:URL in the SV property definition.  Then I realized that Network:ProjectBinding is exposed in the Import fields (using the Multiple Variable Editor to do the importing of course), and this gave me the idea of being able to define a Network SV using the Import function.

Unfortunately, it does not work.  In the csv file I set Network:ProjectBinding to FALSE, Network:UseBinding to TRUE and provide a valid Network SV path, but this results in error -1950679010: "Shared variable is bound but path or URL is not specified", which occurs when trying to save the LVLIB.  It would be nice to know why this doesn't work, as I think it should.  I think it is a problem with the SV import mechanism.

David Moerman
TruView Technology Integration Ltd.
0 Kudos
Message 1 of 9
(13,279 Views)
When i try to import a shared variable from a .csv file, this is the error i am getting, using the import from CSV. Can anyone help me?

Error -1950679005 occurred at Property Node (arg 1) in NI_Variable.lvlib:SetRawCluster.vi->MVE Add Variables.vi->MVE Import.vi->MVE Import.vi.ProxyCaller

I am trying to import SV's(Shared Variables) as tags from a spreadsheet file. I created a csv file with each row being a tag, but i keep getting this error each time i try something different.
0 Kudos
Message 2 of 9
(11,637 Views)
I believe it will also generate this error if it tries to import anything that doesn't make sense.  To ensure what you're importing makes sense, create a "test" library with a single shared variable with whatever parameters you are interested in, then perform an "export to csv".  That way you can confirm your column and content formatting is correct.

David Moerman
0 Kudos
Message 3 of 9
(11,634 Views)
Yes! that sounds like a good idea. I will try exporting a shared variable and seeing the format in the csv file.

Is there a way to write labVIEW code later, to automatically read csv files and generate shared variables? As, the exampled only show a manual way of doing it.
0 Kudos
Message 4 of 9
(11,633 Views)
Yes, you can do this programatically.  I've attached a small chunk of example code (LV 8.5) that creates just 1 variable, as well as an image of it in case you are using an earlier version of LV.  If you want to create multiple variables for the same library just put the "AddSharedVariableToLibrary" in a loop, of course.

David Moerman
Download All
0 Kudos
Message 5 of 9
(11,583 Views)
Hey David, thanks for that, you were very helpful. Cheers.
0 Kudos
Message 6 of 9
(11,154 Views)
This code generates an SV and adds it to a specific library. How about reading an SV from a csv file programatically and then adding it to a library?
0 Kudos
Message 7 of 9
(11,152 Views)

Hi Ching ching,

David's example could be modified to programmatically read properties from a .csv file and then create and add the shared variables to a library.  The File I/O VIs can be used to read the .csv file into LabVIEW, and then converted into arrays using the "Spreadsheet string to array" VI.  Then use the loop as David mentioned to create the variables, index the arrays, and manipulate their properties.

Message Edited by JamesR on 10-22-2007 06:28 PM

Regards,

James R.
National Instruments
0 Kudos
Message 8 of 9
(11,010 Views)
OK Thanks, i shall give this a go.
0 Kudos
Message 9 of 9
(10,992 Views)