LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

incorrect access of shared variables

For the data exchange between two executables I need shared variables. To do the job I have to define the variables 'network published'.
A simple test (see attached project) showed that subsequent writing and reading of a variable within the same VI does not work proberly. When the VI is executed in the debug-mode or if I add pauses between the accesses to the variable, the behavior is correct. In normal execution mode the values read from the variable aren't those which were written to it before.
Has somebody an explanation or even a solution of the problem?

thanks for any help, dave
0 Kudos
Message 1 of 6
(3,052 Views)
Here is the right project attached...
0 Kudos
Message 2 of 6
(3,046 Views)
hi
 
What is your need exactly?
 
I've seen that in single process mode it works perfectly.
 
0 Kudos
Message 3 of 6
(3,045 Views)
I can't use the variable in the single process mode because I want to access it from two different processes (executable). But still within one process I want to use the variable in the way I used it in the attached project.
0 Kudos
Message 4 of 6
(3,038 Views)
in this case, I thinks that the simplest way to do this is to sequence the 3 data.
Then you only have 2 shared variables, 1 write and 1 read and you write and read each data after oneother.
 
0 Kudos
Message 5 of 6
(3,035 Views)

I found the same problem. When using a network shared variable within the same vi, it does not work properly. Also, when I enable the real-time fifo, the fifo does not work.  The behavior is not predictable (which is not very good for a real-time application).

The example in the original post should work ? Right?  Can someone explain this behavior (please don't give me a work around).  

0 Kudos
Message 6 of 6
(2,852 Views)