LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

shared variable / DSC problen

hello out there,

i've got a big problem with labview dsc. i've created library within
an project with several network-bind shared vars (connected to a
symbolic siemens opc server). the problem is that sometimes, when i
use these variables (just drag and drop from the projectexplorer), the
values seemes to be currupted (especially 0). siemens' opc scout say's
there is a value and also NI's shared variable monitor do so.

open to all criticism.
r.p.
0 Kudos
Message 1 of 2
(2,365 Views)

Shared variables must be initialized with a known value, and the node must be ran at least once, before predictable behavior can be expected. They don't behave like plain old global variables. The shared variable manager proves this out, as you've seen.

 

The easiest way to accomplish this is to have each shared variable you'll use in your application's initialize routine, and  "read it out" and write to it once before ever using it in the main application.

 

Message Edited by Broken Arrow on 12-16-2008 09:47 AM
Message Edited by Broken Arrow on 12-16-2008 09:48 AM
Richard






0 Kudos
Message 2 of 2
(2,355 Views)