LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

network shared variable

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

0 Kudos
Message 1 of 6
(3,410 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(3,383 Views)

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

0 Kudos
Message 3 of 6
(3,373 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(3,362 Views)

I'm not sure that I have understood your reply, What I should I do To creat a  shared variable

Best Regards

Nadia

0 Kudos
Message 5 of 6
(3,347 Views)

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

0 Kudos
Message 6 of 6
(3,263 Views)