LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with reference and class

I would like to transit a Data object in member function of another class with Labview 9.0 reference with "In place element structure". I use the reference for optimize allocation memory.

When i use a dispatch static : Vi is executable  -> "TestRefAppExt Statique.vi"
With Dispatch dynamic : Vi is not executable (because Read/Write a reference's data value : class's Object in a reference can't be replaced by another) -> "TestRefAppExt DynamiqueWithoutParent.vi"/"TestRefAppExt DynamiqueWityParent.vi"


When i use Preserve Run-Time Class function the Vi becomes executable but it creates some allocations. Labview creates copy of data object when i'm running the vi. (increase size of data you'll see)

 

The problem is that i can't recuparate the same object without copy in dispatch dynamic. Because LabView can't change the data object transited in a dispatch dynamic function of another class (child class).


I compared in project labview Execution's performance with and without Reference in dynamic and static and for compare, with Message Box and a Reference of Data object's cluster.

 

Without reference, i made three Vi : "TestAppExt Statique.vi", "TestAppExt DynamiqueWithParent.vi" and  "TestAppExt DynamiqueWithoutParent.vi"
The static's function works well, but when Labview calls dispacth Dynamic functions, it works more slowly.

 

With reference, i made three vi too : "TestRefAppExt Statique.vi", "TestRefAppExt DynamiqueWithParent.vi" and "TestRefAppExt DynamiqueWithoutParent.vi" with cast Preserve Run-Time Class.
All This functions are more slowly than without reference.

I tried for fun to test with the same class with Message Box : "TestRefAppExt Fifo.vi" and Cluster "TestRefAppExt DynamiqueCluster.vi" with the dynamic function. The result is better than with reference in dynamic.


"TestRefAppExt StatiqueRef.vi" and "TestRefAppExt DynamiqueRef.vi" are a solution of this problem but it's better to work with In place element structure. And it doesn't resolve reference performance in execution.

Why it's not possible to recuperate data object after a dispatch dynamic?
Why the performance is not good with LabView reference 2009?

 

 I attached the project.

 Could you help me please

 

thank you so much.

 

Pascal

0 Kudos
Message 1 of 1
(2,657 Views)