08-31-2007 04:50 PM
09-04-2007 08:51 AM
09-04-2007 10:08 AM
Daniel E
Thank you very much. Unfortunately, it doesn't help. I didn't ask about client that would be connect to server that creates Shared variable on fly.
My question was about server. Server creates Shared variable on fly and how it can use these Shared variable to get/put new values? NI example has server.lvlib and the example uses static Shared variables (waveform and command). This way I knew also.
09-05-2007 05:33 PM
This can be done in Variable Manager. In Windows, this can be accessed through Start»Programs»National Instruments»Variable Manager and selecting the Variable Manager. This will show all deployed libraries and variables.
You can drag the variables you'd like to write values to from the tree view over to the watched variables list and double click on the value to write a new value.
Regards,
Craig D
Applications Engineer
National Instruments
09-05-2007 05:46 PM
Graig,
I know that way. That is manual way.
The question was another.
Let say, I have first PC with system1 that has ONE subsystemA (3 SharedVariable). I have second PC with system2 that has TWO subsystemA (6 Shared variable). So I create subsystemA. System1 and system2 are identical. These read ini file and create subsystemA one time or twice. Can I do that (of course, I don't wish to put program system1 and system2 twice twice and I don't like to create SharedVariable manually) programmaticly (on fly).
11-13-2007 03:48 AM
11-13-2007 12:04 PM
Thanks.
I knew this example. But I can't understand how I can use it.
Let take the simplest example. I have 20 computers with the same program. Program uses the same set of variables with prefix ComputerName. So I generate 20 files with filenames as computernames and file are the same (forget about data base)
Now LabVIEW. I need to do 3 steps.
First step, first vi creates shared variables for project (example)
Second step ... Actually, I don't know ... how second vi (real program) will connect to have created shared varilables???
Third step, I need to create application.
If I was right it doesn't look useful.
11-15-2007 10:05 AM
Hi,
In order to programmatically create and publish shared variables, you will need the LabVIEW Datalogging and Supervisory Control (DSC) Module. With this module, VIs are included for creating and publishing shared variables, which you could do in the server VI. The LabVIEW DSC Module also provides functionality for acquiring an array of all the shared variables on the server, so your other VIs can access all of them.
If you don’t know what data types the variables are going to be, once you have the array of all the shared variables, you can use data sockets in a for loop to access the data in these shared variables.