LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

OOPS concept in Labview thru GOOP

hi
actually we are tryng to implement OOP's concept in Labview thru GOOP.
while implementing the above concepts these are the steps we followed.,
1)First we created class A having int i variable with get and set methods.
2)In new vi let it be main.vi we instantiating the class A and setting the varialbe i thru setI method.
3)Finally we are storing the reference in a Global variable.
4)In another main2.vi,we are calling the refernce from the global variable,and trying to call getI method in class A.
5)we are getting the refernce with i value for the first time, and for the rest of the time the value of i is zero.


could anybody help us out.
0 Kudos
Message 1 of 2
(2,879 Views)
Rajus,

Usually, you can think of refnums as a "pointers" to a reference and when stored in global variable, LabVIEW may update the reference without updating the global thus explaining the fact that you get a zero value the rest of the time.

Cyril Bouton
Applications Engineer
National Instruments
Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 2 of 2
(2,879 Views)