10-30-2014 04:26 AM
Hi,
I write/ read shared variables on network, my program Labview runs on a computer (Windows 7 Core i7 3.6GHz) and my NI Distributed System Manager is installed on a computer (Windows 7 Core i5, 2.6GHz). And I notice that my program Labview runs faster than the Distributed System Manager, and I Should add a delay of 200ms on my program
I was wondering if there is a solution more simply then this, because I don't want to slow down my Labview program
Thank you in advance for your answers and suggestions
My best regards
Nadia
10-30-2014 07:01 AM
You just learned a very hard lesson: Network Published Shared Variables are SLOW. There are many reasons why you might need the delay. But you could try using the Flush Shared Variable Data VI to force the data to be published. This might help the DSC to stay up to date.
10-30-2014 07:50 AM
Thank you for answering my question, but I don't see how can I use this VI. To publish my data I use single-process Shared variables(see attached) is less complex than to create them programmatically.
My best regards
Nadia
10-30-2014 08:43 AM
@k.nadia wrote:
To publish my data I use single-process Shared variables(see attached)...
That makes no sense. Single Process Shared Variables can only be seen in a single executable. They won't be seen by the other computer's DSC. So you have to be using Network Published Shared Variables. And that VI applies to the standard shared variable as well. It is a low level that your shared variables have to go through anyways.
10-30-2014 09:07 AM
I'm not sure that I have understood your reply, What I should I do To creat a shared variable
Best Regards
Nadia
11-07-2014 03:04 PM
I usually start with a project and a library with variables, but if you don't have a library one will be created automatically. Open the project in LabVIEW. Right-click on My Computer or on the library and select New->Variable. Select Network -Puiblished under the variable section, and choose any other properties you want. When you click OK, a variable will show up in your library with the properties you just chose. Drag that variable onto your block diagram, which will create a terminal in read mode. Right-click tghe terminal and select Access Mode ->Write if you want to write it. Now when you run your vi the library will get deployed. If you go to your Distributed System Manager you will see an entry in Network Items ->(your computer name)->(your library name) ->(your variable name). with the value. The Flush Shared Variable Data vi should work on that variable. To access it from another computer you need to add a shared varialbe terminal to your block diagram and link it using the computer name, library name and variable name either by browsing or directly typing it in.
Rich